google-cloud-secure_source_manager-v1 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb +3979 -256
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb +109 -0
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb +3719 -248
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb +2311 -96
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb +0 -17
- data/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb +0 -17
- data/lib/google/cloud/secure_source_manager/v1/version.rb +1 -1
- data/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb +68 -1
- data/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb +76 -23
- data/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb +1069 -14
- metadata +2 -2
@@ -35,23 +35,6 @@ module Google
|
|
35
35
|
#
|
36
36
|
# Access Secure Source Manager instances, resources, and repositories.
|
37
37
|
#
|
38
|
-
# This API is split across two servers: the Control Plane and the Data Plane.
|
39
|
-
#
|
40
|
-
# Data Plane endpoints are hosted directly by your Secure Source Manager
|
41
|
-
# instance, so you must connect to your instance's API hostname to access
|
42
|
-
# them. The API hostname looks like the following:
|
43
|
-
#
|
44
|
-
# https://[instance-id]-[project-number]-api.[location].sourcemanager.dev
|
45
|
-
#
|
46
|
-
# For example,
|
47
|
-
#
|
48
|
-
# https://my-instance-702770452863-api.us-central1.sourcemanager.dev
|
49
|
-
#
|
50
|
-
# Data Plane endpoints are denoted with **Host: Data Plane**.
|
51
|
-
#
|
52
|
-
# All other endpoints are found in the normal Cloud API location, namely,
|
53
|
-
# `securcesourcemanager.googleapis.com`.
|
54
|
-
#
|
55
38
|
class Client
|
56
39
|
# @private
|
57
40
|
API_VERSION = ""
|
@@ -648,7 +631,8 @@ module Google
|
|
648
631
|
##
|
649
632
|
# Lists Repositories in a given project and location.
|
650
633
|
#
|
651
|
-
#
|
634
|
+
# The instance field is required in the query parameter for requests using
|
635
|
+
# the securesourcemanager.googleapis.com endpoint.
|
652
636
|
#
|
653
637
|
# @overload list_repositories(request, options = nil)
|
654
638
|
# Pass arguments to `list_repositories` via a request object, either of type
|
@@ -678,10 +662,9 @@ module Google
|
|
678
662
|
# Optional. The name of the instance in which the repository is hosted,
|
679
663
|
# formatted as
|
680
664
|
# `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
|
681
|
-
# When listing repositories via
|
682
|
-
#
|
683
|
-
#
|
684
|
-
# API), this field is ignored.
|
665
|
+
# When listing repositories via securesourcemanager.googleapis.com, this
|
666
|
+
# field is required. When listing repositories via *.sourcemanager.dev, this
|
667
|
+
# field is ignored.
|
685
668
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
686
669
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>]
|
687
670
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -749,8 +732,6 @@ module Google
|
|
749
732
|
##
|
750
733
|
# Gets metadata of a repository.
|
751
734
|
#
|
752
|
-
# **Host: Data Plane**
|
753
|
-
#
|
754
735
|
# @overload get_repository(request, options = nil)
|
755
736
|
# Pass arguments to `get_repository` via a request object, either of type
|
756
737
|
# {::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest} or an equivalent Hash.
|
@@ -831,7 +812,8 @@ module Google
|
|
831
812
|
##
|
832
813
|
# Creates a new repository in a given project and location.
|
833
814
|
#
|
834
|
-
#
|
815
|
+
# The Repository.Instance field is required in the request body for requests
|
816
|
+
# using the securesourcemanager.googleapis.com endpoint.
|
835
817
|
#
|
836
818
|
# @overload create_repository(request, options = nil)
|
837
819
|
# Pass arguments to `create_repository` via a request object, either of type
|
@@ -925,32 +907,34 @@ module Google
|
|
925
907
|
end
|
926
908
|
|
927
909
|
##
|
928
|
-
#
|
929
|
-
#
|
930
|
-
# **Host: Data Plane**
|
910
|
+
# Updates the metadata of a repository.
|
931
911
|
#
|
932
|
-
# @overload
|
933
|
-
# Pass arguments to `
|
934
|
-
# {::Google::Cloud::SecureSourceManager::V1::
|
912
|
+
# @overload update_repository(request, options = nil)
|
913
|
+
# Pass arguments to `update_repository` via a request object, either of type
|
914
|
+
# {::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest} or an equivalent Hash.
|
935
915
|
#
|
936
|
-
# @param request [::Google::Cloud::SecureSourceManager::V1::
|
916
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::Hash]
|
937
917
|
# A request object representing the call parameters. Required. To specify no
|
938
918
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
939
919
|
# @param options [::Gapic::CallOptions, ::Hash]
|
940
920
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
941
921
|
#
|
942
|
-
# @overload
|
943
|
-
# Pass arguments to `
|
922
|
+
# @overload update_repository(update_mask: nil, repository: nil, validate_only: nil)
|
923
|
+
# Pass arguments to `update_repository` via keyword arguments. Note that at
|
944
924
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
945
925
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
946
926
|
#
|
947
|
-
# @param
|
948
|
-
#
|
949
|
-
#
|
950
|
-
#
|
951
|
-
#
|
952
|
-
#
|
953
|
-
#
|
927
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
928
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
929
|
+
# repository resource by the update.
|
930
|
+
# The fields specified in the update_mask are relative to the resource, not
|
931
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
932
|
+
# user does not provide a mask then all fields will be overwritten.
|
933
|
+
# @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash]
|
934
|
+
# Required. The repository being updated.
|
935
|
+
# @param validate_only [::Boolean]
|
936
|
+
# Optional. False by default. If set to true, the request is validated and
|
937
|
+
# the user is provided with an expected result, but no actual change is made.
|
954
938
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
955
939
|
# @yieldparam result [::Gapic::Operation]
|
956
940
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -966,10 +950,10 @@ module Google
|
|
966
950
|
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
967
951
|
#
|
968
952
|
# # Create a request. To set request fields, pass in keyword arguments.
|
969
|
-
# request = Google::Cloud::SecureSourceManager::V1::
|
953
|
+
# request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new
|
970
954
|
#
|
971
|
-
# # Call the
|
972
|
-
# result = client.
|
955
|
+
# # Call the update_repository method.
|
956
|
+
# result = client.update_repository request
|
973
957
|
#
|
974
958
|
# # The returned object is of type Gapic::Operation. You can use it to
|
975
959
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -981,16 +965,16 @@ module Google
|
|
981
965
|
# puts "No response received."
|
982
966
|
# end
|
983
967
|
#
|
984
|
-
def
|
968
|
+
def update_repository request, options = nil
|
985
969
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
986
970
|
|
987
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::
|
971
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest
|
988
972
|
|
989
973
|
# Converts hash and nil to an options object
|
990
974
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
991
975
|
|
992
976
|
# Customize the options with defaults
|
993
|
-
call_metadata = @config.rpcs.
|
977
|
+
call_metadata = @config.rpcs.update_repository.metadata.to_h
|
994
978
|
|
995
979
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
996
980
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1001,15 +985,15 @@ module Google
|
|
1001
985
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1002
986
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1003
987
|
|
1004
|
-
options.apply_defaults timeout: @config.rpcs.
|
988
|
+
options.apply_defaults timeout: @config.rpcs.update_repository.timeout,
|
1005
989
|
metadata: call_metadata,
|
1006
|
-
retry_policy: @config.rpcs.
|
990
|
+
retry_policy: @config.rpcs.update_repository.retry_policy
|
1007
991
|
|
1008
992
|
options.apply_defaults timeout: @config.timeout,
|
1009
993
|
metadata: @config.metadata,
|
1010
994
|
retry_policy: @config.retry_policy
|
1011
995
|
|
1012
|
-
@secure_source_manager_stub.
|
996
|
+
@secure_source_manager_stub.update_repository request, options do |result, operation|
|
1013
997
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1014
998
|
yield result, operation if block_given?
|
1015
999
|
throw :response, result
|
@@ -1019,34 +1003,35 @@ module Google
|
|
1019
1003
|
end
|
1020
1004
|
|
1021
1005
|
##
|
1022
|
-
#
|
1006
|
+
# Deletes a Repository.
|
1023
1007
|
#
|
1024
|
-
# @overload
|
1025
|
-
# Pass arguments to `
|
1026
|
-
# {::Google::
|
1008
|
+
# @overload delete_repository(request, options = nil)
|
1009
|
+
# Pass arguments to `delete_repository` via a request object, either of type
|
1010
|
+
# {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash.
|
1027
1011
|
#
|
1028
|
-
# @param request [::Google::
|
1012
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Hash]
|
1029
1013
|
# A request object representing the call parameters. Required. To specify no
|
1030
1014
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1031
1015
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1032
1016
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1033
1017
|
#
|
1034
|
-
# @overload
|
1035
|
-
# Pass arguments to `
|
1018
|
+
# @overload delete_repository(name: nil, allow_missing: nil)
|
1019
|
+
# Pass arguments to `delete_repository` via keyword arguments. Note that at
|
1036
1020
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1037
1021
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1038
1022
|
#
|
1039
|
-
# @param
|
1040
|
-
#
|
1041
|
-
#
|
1042
|
-
#
|
1043
|
-
#
|
1044
|
-
#
|
1023
|
+
# @param name [::String]
|
1024
|
+
# Required. Name of the repository to delete.
|
1025
|
+
# The format is
|
1026
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
|
1027
|
+
# @param allow_missing [::Boolean]
|
1028
|
+
# Optional. If set to true, and the repository is not found, the request will
|
1029
|
+
# succeed but no action will be taken on the server.
|
1045
1030
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1046
|
-
# @yieldparam result [::
|
1031
|
+
# @yieldparam result [::Gapic::Operation]
|
1047
1032
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1048
1033
|
#
|
1049
|
-
# @return [::
|
1034
|
+
# @return [::Gapic::Operation]
|
1050
1035
|
#
|
1051
1036
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1052
1037
|
#
|
@@ -1057,24 +1042,31 @@ module Google
|
|
1057
1042
|
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1058
1043
|
#
|
1059
1044
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1060
|
-
# request = Google::
|
1045
|
+
# request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new
|
1061
1046
|
#
|
1062
|
-
# # Call the
|
1063
|
-
# result = client.
|
1047
|
+
# # Call the delete_repository method.
|
1048
|
+
# result = client.delete_repository request
|
1064
1049
|
#
|
1065
|
-
# # The returned object is of type
|
1066
|
-
#
|
1050
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1051
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1052
|
+
# # Here is how to wait for a response.
|
1053
|
+
# result.wait_until_done! timeout: 60
|
1054
|
+
# if result.response?
|
1055
|
+
# p result.response
|
1056
|
+
# else
|
1057
|
+
# puts "No response received."
|
1058
|
+
# end
|
1067
1059
|
#
|
1068
|
-
def
|
1060
|
+
def delete_repository request, options = nil
|
1069
1061
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1070
1062
|
|
1071
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::
|
1063
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest
|
1072
1064
|
|
1073
1065
|
# Converts hash and nil to an options object
|
1074
1066
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1075
1067
|
|
1076
1068
|
# Customize the options with defaults
|
1077
|
-
call_metadata = @config.rpcs.
|
1069
|
+
call_metadata = @config.rpcs.delete_repository.metadata.to_h
|
1078
1070
|
|
1079
1071
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1080
1072
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1085,58 +1077,53 @@ module Google
|
|
1085
1077
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1086
1078
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1087
1079
|
|
1088
|
-
options.apply_defaults timeout: @config.rpcs.
|
1080
|
+
options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
|
1089
1081
|
metadata: call_metadata,
|
1090
|
-
retry_policy: @config.rpcs.
|
1082
|
+
retry_policy: @config.rpcs.delete_repository.retry_policy
|
1091
1083
|
|
1092
1084
|
options.apply_defaults timeout: @config.timeout,
|
1093
1085
|
metadata: @config.metadata,
|
1094
1086
|
retry_policy: @config.retry_policy
|
1095
1087
|
|
1096
|
-
@secure_source_manager_stub.
|
1088
|
+
@secure_source_manager_stub.delete_repository request, options do |result, operation|
|
1089
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1097
1090
|
yield result, operation if block_given?
|
1091
|
+
throw :response, result
|
1098
1092
|
end
|
1099
1093
|
rescue ::Gapic::Rest::Error => e
|
1100
1094
|
raise ::Google::Cloud::Error.from_error(e)
|
1101
1095
|
end
|
1102
1096
|
|
1103
1097
|
##
|
1104
|
-
#
|
1098
|
+
# Lists hooks in a given repository.
|
1105
1099
|
#
|
1106
|
-
# @overload
|
1107
|
-
# Pass arguments to `
|
1108
|
-
# {::Google::
|
1100
|
+
# @overload list_hooks(request, options = nil)
|
1101
|
+
# Pass arguments to `list_hooks` via a request object, either of type
|
1102
|
+
# {::Google::Cloud::SecureSourceManager::V1::ListHooksRequest} or an equivalent Hash.
|
1109
1103
|
#
|
1110
|
-
# @param request [::Google::
|
1104
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::Hash]
|
1111
1105
|
# A request object representing the call parameters. Required. To specify no
|
1112
1106
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1113
1107
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1114
1108
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1115
1109
|
#
|
1116
|
-
# @overload
|
1117
|
-
# Pass arguments to `
|
1110
|
+
# @overload list_hooks(parent: nil, page_size: nil, page_token: nil)
|
1111
|
+
# Pass arguments to `list_hooks` via keyword arguments. Note that at
|
1118
1112
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1119
1113
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1120
1114
|
#
|
1121
|
-
# @param
|
1122
|
-
#
|
1123
|
-
#
|
1124
|
-
#
|
1125
|
-
#
|
1126
|
-
#
|
1127
|
-
#
|
1128
|
-
# might reject them.
|
1129
|
-
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1130
|
-
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
1131
|
-
# the fields in the mask will be modified. If no mask is provided, the
|
1132
|
-
# following default mask is used:
|
1133
|
-
#
|
1134
|
-
# `paths: "bindings, etag"`
|
1115
|
+
# @param parent [::String]
|
1116
|
+
# Required. Parent value for ListHooksRequest.
|
1117
|
+
# @param page_size [::Integer]
|
1118
|
+
# Optional. Requested page size. Server may return fewer items than
|
1119
|
+
# requested. If unspecified, server will pick an appropriate default.
|
1120
|
+
# @param page_token [::String]
|
1121
|
+
# Optional. A token identifying a page of results the server should return.
|
1135
1122
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1136
|
-
# @yieldparam result [::Google::
|
1123
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>]
|
1137
1124
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1138
1125
|
#
|
1139
|
-
# @return [::Google::
|
1126
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>]
|
1140
1127
|
#
|
1141
1128
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1142
1129
|
#
|
@@ -1147,24 +1134,28 @@ module Google
|
|
1147
1134
|
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1148
1135
|
#
|
1149
1136
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1150
|
-
# request = Google::
|
1137
|
+
# request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new
|
1151
1138
|
#
|
1152
|
-
# # Call the
|
1153
|
-
# result = client.
|
1139
|
+
# # Call the list_hooks method.
|
1140
|
+
# result = client.list_hooks request
|
1154
1141
|
#
|
1155
|
-
# # The returned object is of type
|
1156
|
-
#
|
1142
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1143
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1144
|
+
# result.each do |item|
|
1145
|
+
# # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Hook.
|
1146
|
+
# p item
|
1147
|
+
# end
|
1157
1148
|
#
|
1158
|
-
def
|
1149
|
+
def list_hooks request, options = nil
|
1159
1150
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1160
1151
|
|
1161
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::
|
1152
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest
|
1162
1153
|
|
1163
1154
|
# Converts hash and nil to an options object
|
1164
1155
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1165
1156
|
|
1166
1157
|
# Customize the options with defaults
|
1167
|
-
call_metadata = @config.rpcs.
|
1158
|
+
call_metadata = @config.rpcs.list_hooks.metadata.to_h
|
1168
1159
|
|
1169
1160
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1170
1161
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1175,53 +1166,50 @@ module Google
|
|
1175
1166
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1176
1167
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1177
1168
|
|
1178
|
-
options.apply_defaults timeout: @config.rpcs.
|
1169
|
+
options.apply_defaults timeout: @config.rpcs.list_hooks.timeout,
|
1179
1170
|
metadata: call_metadata,
|
1180
|
-
retry_policy: @config.rpcs.
|
1171
|
+
retry_policy: @config.rpcs.list_hooks.retry_policy
|
1181
1172
|
|
1182
1173
|
options.apply_defaults timeout: @config.timeout,
|
1183
1174
|
metadata: @config.metadata,
|
1184
1175
|
retry_policy: @config.retry_policy
|
1185
1176
|
|
1186
|
-
@secure_source_manager_stub.
|
1177
|
+
@secure_source_manager_stub.list_hooks request, options do |result, operation|
|
1178
|
+
result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_hooks, "hooks", request, result, options
|
1187
1179
|
yield result, operation if block_given?
|
1180
|
+
throw :response, result
|
1188
1181
|
end
|
1189
1182
|
rescue ::Gapic::Rest::Error => e
|
1190
1183
|
raise ::Google::Cloud::Error.from_error(e)
|
1191
1184
|
end
|
1192
1185
|
|
1193
1186
|
##
|
1194
|
-
#
|
1195
|
-
# IAM permission checks are not required on this method.
|
1187
|
+
# Gets metadata of a hook.
|
1196
1188
|
#
|
1197
|
-
# @overload
|
1198
|
-
# Pass arguments to `
|
1199
|
-
# {::Google::
|
1189
|
+
# @overload get_hook(request, options = nil)
|
1190
|
+
# Pass arguments to `get_hook` via a request object, either of type
|
1191
|
+
# {::Google::Cloud::SecureSourceManager::V1::GetHookRequest} or an equivalent Hash.
|
1200
1192
|
#
|
1201
|
-
# @param request [::Google::
|
1193
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::Hash]
|
1202
1194
|
# A request object representing the call parameters. Required. To specify no
|
1203
1195
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1204
1196
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1205
1197
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1206
1198
|
#
|
1207
|
-
# @overload
|
1208
|
-
# Pass arguments to `
|
1199
|
+
# @overload get_hook(name: nil)
|
1200
|
+
# Pass arguments to `get_hook` via keyword arguments. Note that at
|
1209
1201
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1210
1202
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1211
1203
|
#
|
1212
|
-
# @param
|
1213
|
-
#
|
1214
|
-
#
|
1215
|
-
#
|
1216
|
-
# The set of permissions to check for the `resource`. Permissions with
|
1217
|
-
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
1218
|
-
# information see
|
1219
|
-
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
1204
|
+
# @param name [::String]
|
1205
|
+
# Required. Name of the hook to retrieve.
|
1206
|
+
# The format is
|
1207
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.
|
1220
1208
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1221
|
-
# @yieldparam result [::Google::
|
1209
|
+
# @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Hook]
|
1222
1210
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1223
1211
|
#
|
1224
|
-
# @return [::Google::
|
1212
|
+
# @return [::Google::Cloud::SecureSourceManager::V1::Hook]
|
1225
1213
|
#
|
1226
1214
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1227
1215
|
#
|
@@ -1232,24 +1220,24 @@ module Google
|
|
1232
1220
|
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1233
1221
|
#
|
1234
1222
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1235
|
-
# request = Google::
|
1223
|
+
# request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new
|
1236
1224
|
#
|
1237
|
-
# # Call the
|
1238
|
-
# result = client.
|
1225
|
+
# # Call the get_hook method.
|
1226
|
+
# result = client.get_hook request
|
1239
1227
|
#
|
1240
|
-
# # The returned object is of type Google::
|
1228
|
+
# # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook.
|
1241
1229
|
# p result
|
1242
1230
|
#
|
1243
|
-
def
|
1231
|
+
def get_hook request, options = nil
|
1244
1232
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1245
1233
|
|
1246
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::
|
1234
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetHookRequest
|
1247
1235
|
|
1248
1236
|
# Converts hash and nil to an options object
|
1249
1237
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1250
1238
|
|
1251
1239
|
# Customize the options with defaults
|
1252
|
-
call_metadata = @config.rpcs.
|
1240
|
+
call_metadata = @config.rpcs.get_hook.metadata.to_h
|
1253
1241
|
|
1254
1242
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1255
1243
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1260,15 +1248,15 @@ module Google
|
|
1260
1248
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1261
1249
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1262
1250
|
|
1263
|
-
options.apply_defaults timeout: @config.rpcs.
|
1251
|
+
options.apply_defaults timeout: @config.rpcs.get_hook.timeout,
|
1264
1252
|
metadata: call_metadata,
|
1265
|
-
retry_policy: @config.rpcs.
|
1253
|
+
retry_policy: @config.rpcs.get_hook.retry_policy
|
1266
1254
|
|
1267
1255
|
options.apply_defaults timeout: @config.timeout,
|
1268
1256
|
metadata: @config.metadata,
|
1269
1257
|
retry_policy: @config.retry_policy
|
1270
1258
|
|
1271
|
-
@secure_source_manager_stub.
|
1259
|
+
@secure_source_manager_stub.get_hook request, options do |result, operation|
|
1272
1260
|
yield result, operation if block_given?
|
1273
1261
|
end
|
1274
1262
|
rescue ::Gapic::Rest::Error => e
|
@@ -1276,26 +1264,34 @@ module Google
|
|
1276
1264
|
end
|
1277
1265
|
|
1278
1266
|
##
|
1279
|
-
#
|
1267
|
+
# Creates a new hook in a given repository.
|
1280
1268
|
#
|
1281
|
-
# @overload
|
1282
|
-
# Pass arguments to `
|
1283
|
-
# {::Google::Cloud::SecureSourceManager::V1::
|
1269
|
+
# @overload create_hook(request, options = nil)
|
1270
|
+
# Pass arguments to `create_hook` via a request object, either of type
|
1271
|
+
# {::Google::Cloud::SecureSourceManager::V1::CreateHookRequest} or an equivalent Hash.
|
1284
1272
|
#
|
1285
|
-
# @param request [::Google::Cloud::SecureSourceManager::V1::
|
1273
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::Hash]
|
1286
1274
|
# A request object representing the call parameters. Required. To specify no
|
1287
1275
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1288
1276
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1289
1277
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1290
1278
|
#
|
1291
|
-
# @overload
|
1292
|
-
# Pass arguments to `
|
1279
|
+
# @overload create_hook(parent: nil, hook: nil, hook_id: nil)
|
1280
|
+
# Pass arguments to `create_hook` via keyword arguments. Note that at
|
1293
1281
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1294
1282
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1295
1283
|
#
|
1296
1284
|
# @param parent [::String]
|
1297
|
-
#
|
1298
|
-
#
|
1285
|
+
# Required. The repository in which to create the hook. Values are of the
|
1286
|
+
# form
|
1287
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
|
1288
|
+
# @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash]
|
1289
|
+
# Required. The resource being created.
|
1290
|
+
# @param hook_id [::String]
|
1291
|
+
# Required. The ID to use for the hook, which will become the final component
|
1292
|
+
# of the hook's resource name. This value restricts to lower-case letters,
|
1293
|
+
# numbers, and hyphen, with the first character a letter, the last a letter
|
1294
|
+
# or a number, and a 63 character maximum.
|
1299
1295
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1300
1296
|
# @yieldparam result [::Gapic::Operation]
|
1301
1297
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1311,10 +1307,10 @@ module Google
|
|
1311
1307
|
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1312
1308
|
#
|
1313
1309
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1314
|
-
# request = Google::Cloud::SecureSourceManager::V1::
|
1310
|
+
# request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new
|
1315
1311
|
#
|
1316
|
-
# # Call the
|
1317
|
-
# result = client.
|
1312
|
+
# # Call the create_hook method.
|
1313
|
+
# result = client.create_hook request
|
1318
1314
|
#
|
1319
1315
|
# # The returned object is of type Gapic::Operation. You can use it to
|
1320
1316
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -1326,16 +1322,16 @@ module Google
|
|
1326
1322
|
# puts "No response received."
|
1327
1323
|
# end
|
1328
1324
|
#
|
1329
|
-
def
|
1325
|
+
def create_hook request, options = nil
|
1330
1326
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1331
1327
|
|
1332
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::
|
1328
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest
|
1333
1329
|
|
1334
1330
|
# Converts hash and nil to an options object
|
1335
1331
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1336
1332
|
|
1337
1333
|
# Customize the options with defaults
|
1338
|
-
call_metadata = @config.rpcs.
|
1334
|
+
call_metadata = @config.rpcs.create_hook.metadata.to_h
|
1339
1335
|
|
1340
1336
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1341
1337
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1346,15 +1342,15 @@ module Google
|
|
1346
1342
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1347
1343
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1348
1344
|
|
1349
|
-
options.apply_defaults timeout: @config.rpcs.
|
1345
|
+
options.apply_defaults timeout: @config.rpcs.create_hook.timeout,
|
1350
1346
|
metadata: call_metadata,
|
1351
|
-
retry_policy: @config.rpcs.
|
1347
|
+
retry_policy: @config.rpcs.create_hook.retry_policy
|
1352
1348
|
|
1353
1349
|
options.apply_defaults timeout: @config.timeout,
|
1354
1350
|
metadata: @config.metadata,
|
1355
1351
|
retry_policy: @config.retry_policy
|
1356
1352
|
|
1357
|
-
@secure_source_manager_stub.
|
1353
|
+
@secure_source_manager_stub.create_hook request, options do |result, operation|
|
1358
1354
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1359
1355
|
yield result, operation if block_given?
|
1360
1356
|
throw :response, result
|
@@ -1364,31 +1360,36 @@ module Google
|
|
1364
1360
|
end
|
1365
1361
|
|
1366
1362
|
##
|
1367
|
-
#
|
1363
|
+
# Updates the metadata of a hook.
|
1368
1364
|
#
|
1369
|
-
# @overload
|
1370
|
-
# Pass arguments to `
|
1371
|
-
# {::Google::Cloud::SecureSourceManager::V1::
|
1365
|
+
# @overload update_hook(request, options = nil)
|
1366
|
+
# Pass arguments to `update_hook` via a request object, either of type
|
1367
|
+
# {::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest} or an equivalent Hash.
|
1372
1368
|
#
|
1373
|
-
# @param request [::Google::Cloud::SecureSourceManager::V1::
|
1369
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::Hash]
|
1374
1370
|
# A request object representing the call parameters. Required. To specify no
|
1375
1371
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1376
1372
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1377
1373
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1378
1374
|
#
|
1379
|
-
# @overload
|
1380
|
-
# Pass arguments to `
|
1375
|
+
# @overload update_hook(update_mask: nil, hook: nil)
|
1376
|
+
# Pass arguments to `update_hook` via keyword arguments. Note that at
|
1381
1377
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1382
1378
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1383
1379
|
#
|
1384
|
-
# @param
|
1385
|
-
#
|
1386
|
-
#
|
1380
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1381
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
1382
|
+
# hook resource by the update.
|
1383
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1384
|
+
# the full request. A field will be overwritten if it is in the mask.
|
1385
|
+
# The special value "*" means full replacement.
|
1386
|
+
# @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash]
|
1387
|
+
# Required. The hook being updated.
|
1387
1388
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1388
|
-
# @yieldparam result [::Gapic::
|
1389
|
+
# @yieldparam result [::Gapic::Operation]
|
1389
1390
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1390
1391
|
#
|
1391
|
-
# @return [::Gapic::
|
1392
|
+
# @return [::Gapic::Operation]
|
1392
1393
|
#
|
1393
1394
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1394
1395
|
#
|
@@ -1399,28 +1400,31 @@ module Google
|
|
1399
1400
|
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1400
1401
|
#
|
1401
1402
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1402
|
-
# request = Google::Cloud::SecureSourceManager::V1::
|
1403
|
+
# request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new
|
1403
1404
|
#
|
1404
|
-
# # Call the
|
1405
|
-
# result = client.
|
1405
|
+
# # Call the update_hook method.
|
1406
|
+
# result = client.update_hook request
|
1406
1407
|
#
|
1407
|
-
# # The returned object is of type Gapic::
|
1408
|
-
# #
|
1409
|
-
#
|
1410
|
-
#
|
1411
|
-
#
|
1408
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1409
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1410
|
+
# # Here is how to wait for a response.
|
1411
|
+
# result.wait_until_done! timeout: 60
|
1412
|
+
# if result.response?
|
1413
|
+
# p result.response
|
1414
|
+
# else
|
1415
|
+
# puts "No response received."
|
1412
1416
|
# end
|
1413
1417
|
#
|
1414
|
-
def
|
1418
|
+
def update_hook request, options = nil
|
1415
1419
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1416
1420
|
|
1417
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::
|
1421
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest
|
1418
1422
|
|
1419
1423
|
# Converts hash and nil to an options object
|
1420
1424
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1421
1425
|
|
1422
1426
|
# Customize the options with defaults
|
1423
|
-
call_metadata = @config.rpcs.
|
1427
|
+
call_metadata = @config.rpcs.update_hook.metadata.to_h
|
1424
1428
|
|
1425
1429
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1426
1430
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1431,16 +1435,16 @@ module Google
|
|
1431
1435
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1432
1436
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1433
1437
|
|
1434
|
-
options.apply_defaults timeout: @config.rpcs.
|
1438
|
+
options.apply_defaults timeout: @config.rpcs.update_hook.timeout,
|
1435
1439
|
metadata: call_metadata,
|
1436
|
-
retry_policy: @config.rpcs.
|
1440
|
+
retry_policy: @config.rpcs.update_hook.retry_policy
|
1437
1441
|
|
1438
1442
|
options.apply_defaults timeout: @config.timeout,
|
1439
1443
|
metadata: @config.metadata,
|
1440
1444
|
retry_policy: @config.retry_policy
|
1441
1445
|
|
1442
|
-
@secure_source_manager_stub.
|
1443
|
-
result = ::Gapic::
|
1446
|
+
@secure_source_manager_stub.update_hook request, options do |result, operation|
|
1447
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1444
1448
|
yield result, operation if block_given?
|
1445
1449
|
throw :response, result
|
1446
1450
|
end
|
@@ -1449,32 +1453,32 @@ module Google
|
|
1449
1453
|
end
|
1450
1454
|
|
1451
1455
|
##
|
1452
|
-
#
|
1456
|
+
# Deletes a Hook.
|
1453
1457
|
#
|
1454
|
-
# @overload
|
1455
|
-
# Pass arguments to `
|
1456
|
-
# {::Google::Cloud::SecureSourceManager::V1::
|
1458
|
+
# @overload delete_hook(request, options = nil)
|
1459
|
+
# Pass arguments to `delete_hook` via a request object, either of type
|
1460
|
+
# {::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest} or an equivalent Hash.
|
1457
1461
|
#
|
1458
|
-
# @param request [::Google::Cloud::SecureSourceManager::V1::
|
1462
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::Hash]
|
1459
1463
|
# A request object representing the call parameters. Required. To specify no
|
1460
1464
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1461
1465
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1462
1466
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1463
1467
|
#
|
1464
|
-
# @overload
|
1465
|
-
# Pass arguments to `
|
1468
|
+
# @overload delete_hook(name: nil)
|
1469
|
+
# Pass arguments to `delete_hook` via keyword arguments. Note that at
|
1466
1470
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1467
1471
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1468
1472
|
#
|
1469
1473
|
# @param name [::String]
|
1470
|
-
# Required. Name of the
|
1474
|
+
# Required. Name of the hook to delete.
|
1471
1475
|
# The format is
|
1472
|
-
# `projects/{
|
1476
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.
|
1473
1477
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1474
|
-
# @yieldparam result [::
|
1478
|
+
# @yieldparam result [::Gapic::Operation]
|
1475
1479
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1476
1480
|
#
|
1477
|
-
# @return [::
|
1481
|
+
# @return [::Gapic::Operation]
|
1478
1482
|
#
|
1479
1483
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1480
1484
|
#
|
@@ -1485,24 +1489,3151 @@ module Google
|
|
1485
1489
|
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1486
1490
|
#
|
1487
1491
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1488
|
-
# request = Google::Cloud::SecureSourceManager::V1::
|
1492
|
+
# request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new
|
1489
1493
|
#
|
1490
|
-
# # Call the
|
1491
|
-
# result = client.
|
1492
|
-
#
|
1493
|
-
# # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule.
|
1494
|
-
# p result
|
1494
|
+
# # Call the delete_hook method.
|
1495
|
+
# result = client.delete_hook request
|
1495
1496
|
#
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1497
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1498
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1499
|
+
# # Here is how to wait for a response.
|
1500
|
+
# result.wait_until_done! timeout: 60
|
1501
|
+
# if result.response?
|
1502
|
+
# p result.response
|
1503
|
+
# else
|
1504
|
+
# puts "No response received."
|
1505
|
+
# end
|
1506
|
+
#
|
1507
|
+
def delete_hook request, options = nil
|
1508
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1509
|
+
|
1510
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest
|
1511
|
+
|
1512
|
+
# Converts hash and nil to an options object
|
1513
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1514
|
+
|
1515
|
+
# Customize the options with defaults
|
1516
|
+
call_metadata = @config.rpcs.delete_hook.metadata.to_h
|
1517
|
+
|
1518
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1519
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1520
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1521
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
1522
|
+
transports_version_send: [:rest]
|
1523
|
+
|
1524
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1525
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1526
|
+
|
1527
|
+
options.apply_defaults timeout: @config.rpcs.delete_hook.timeout,
|
1528
|
+
metadata: call_metadata,
|
1529
|
+
retry_policy: @config.rpcs.delete_hook.retry_policy
|
1530
|
+
|
1531
|
+
options.apply_defaults timeout: @config.timeout,
|
1532
|
+
metadata: @config.metadata,
|
1533
|
+
retry_policy: @config.retry_policy
|
1534
|
+
|
1535
|
+
@secure_source_manager_stub.delete_hook request, options do |result, operation|
|
1536
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1537
|
+
yield result, operation if block_given?
|
1538
|
+
throw :response, result
|
1539
|
+
end
|
1540
|
+
rescue ::Gapic::Rest::Error => e
|
1541
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1542
|
+
end
|
1543
|
+
|
1544
|
+
##
|
1545
|
+
# Get IAM policy for a repository.
|
1546
|
+
#
|
1547
|
+
# @overload get_iam_policy_repo(request, options = nil)
|
1548
|
+
# Pass arguments to `get_iam_policy_repo` via a request object, either of type
|
1549
|
+
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
1550
|
+
#
|
1551
|
+
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
1552
|
+
# A request object representing the call parameters. Required. To specify no
|
1553
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1554
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1555
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1556
|
+
#
|
1557
|
+
# @overload get_iam_policy_repo(resource: nil, options: nil)
|
1558
|
+
# Pass arguments to `get_iam_policy_repo` via keyword arguments. Note that at
|
1559
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1560
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1561
|
+
#
|
1562
|
+
# @param resource [::String]
|
1563
|
+
# REQUIRED: The resource for which the policy is being requested.
|
1564
|
+
# See the operation documentation for the appropriate value for this field.
|
1565
|
+
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
1566
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
1567
|
+
# `GetIamPolicy`.
|
1568
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1569
|
+
# @yieldparam result [::Google::Iam::V1::Policy]
|
1570
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1571
|
+
#
|
1572
|
+
# @return [::Google::Iam::V1::Policy]
|
1573
|
+
#
|
1574
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1575
|
+
#
|
1576
|
+
# @example Basic example
|
1577
|
+
# require "google/cloud/secure_source_manager/v1"
|
1578
|
+
#
|
1579
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1580
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1581
|
+
#
|
1582
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1583
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
1584
|
+
#
|
1585
|
+
# # Call the get_iam_policy_repo method.
|
1586
|
+
# result = client.get_iam_policy_repo request
|
1587
|
+
#
|
1588
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1589
|
+
# p result
|
1590
|
+
#
|
1591
|
+
def get_iam_policy_repo request, options = nil
|
1592
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1593
|
+
|
1594
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
|
1595
|
+
|
1596
|
+
# Converts hash and nil to an options object
|
1597
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1598
|
+
|
1599
|
+
# Customize the options with defaults
|
1600
|
+
call_metadata = @config.rpcs.get_iam_policy_repo.metadata.to_h
|
1601
|
+
|
1602
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1603
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1604
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1605
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
1606
|
+
transports_version_send: [:rest]
|
1607
|
+
|
1608
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1609
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1610
|
+
|
1611
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy_repo.timeout,
|
1612
|
+
metadata: call_metadata,
|
1613
|
+
retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy
|
1614
|
+
|
1615
|
+
options.apply_defaults timeout: @config.timeout,
|
1616
|
+
metadata: @config.metadata,
|
1617
|
+
retry_policy: @config.retry_policy
|
1618
|
+
|
1619
|
+
@secure_source_manager_stub.get_iam_policy_repo request, options do |result, operation|
|
1620
|
+
yield result, operation if block_given?
|
1621
|
+
end
|
1622
|
+
rescue ::Gapic::Rest::Error => e
|
1623
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1624
|
+
end
|
1625
|
+
|
1626
|
+
##
|
1627
|
+
# Set IAM policy on a repository.
|
1628
|
+
#
|
1629
|
+
# @overload set_iam_policy_repo(request, options = nil)
|
1630
|
+
# Pass arguments to `set_iam_policy_repo` via a request object, either of type
|
1631
|
+
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
1632
|
+
#
|
1633
|
+
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
1634
|
+
# A request object representing the call parameters. Required. To specify no
|
1635
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1636
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1637
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1638
|
+
#
|
1639
|
+
# @overload set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil)
|
1640
|
+
# Pass arguments to `set_iam_policy_repo` via keyword arguments. Note that at
|
1641
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1642
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1643
|
+
#
|
1644
|
+
# @param resource [::String]
|
1645
|
+
# REQUIRED: The resource for which the policy is being specified.
|
1646
|
+
# See the operation documentation for the appropriate value for this field.
|
1647
|
+
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
1648
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
1649
|
+
# the policy is limited to a few 10s of KB. An empty policy is a
|
1650
|
+
# valid policy but certain Cloud Platform services (such as Projects)
|
1651
|
+
# might reject them.
|
1652
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1653
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
1654
|
+
# the fields in the mask will be modified. If no mask is provided, the
|
1655
|
+
# following default mask is used:
|
1656
|
+
#
|
1657
|
+
# `paths: "bindings, etag"`
|
1658
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1659
|
+
# @yieldparam result [::Google::Iam::V1::Policy]
|
1660
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1661
|
+
#
|
1662
|
+
# @return [::Google::Iam::V1::Policy]
|
1663
|
+
#
|
1664
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1665
|
+
#
|
1666
|
+
# @example Basic example
|
1667
|
+
# require "google/cloud/secure_source_manager/v1"
|
1668
|
+
#
|
1669
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1670
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1671
|
+
#
|
1672
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1673
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
1674
|
+
#
|
1675
|
+
# # Call the set_iam_policy_repo method.
|
1676
|
+
# result = client.set_iam_policy_repo request
|
1677
|
+
#
|
1678
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1679
|
+
# p result
|
1680
|
+
#
|
1681
|
+
def set_iam_policy_repo request, options = nil
|
1682
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1683
|
+
|
1684
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
|
1685
|
+
|
1686
|
+
# Converts hash and nil to an options object
|
1687
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1688
|
+
|
1689
|
+
# Customize the options with defaults
|
1690
|
+
call_metadata = @config.rpcs.set_iam_policy_repo.metadata.to_h
|
1691
|
+
|
1692
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1693
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1694
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1695
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
1696
|
+
transports_version_send: [:rest]
|
1697
|
+
|
1698
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1699
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1700
|
+
|
1701
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy_repo.timeout,
|
1702
|
+
metadata: call_metadata,
|
1703
|
+
retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy
|
1704
|
+
|
1705
|
+
options.apply_defaults timeout: @config.timeout,
|
1706
|
+
metadata: @config.metadata,
|
1707
|
+
retry_policy: @config.retry_policy
|
1708
|
+
|
1709
|
+
@secure_source_manager_stub.set_iam_policy_repo request, options do |result, operation|
|
1710
|
+
yield result, operation if block_given?
|
1711
|
+
end
|
1712
|
+
rescue ::Gapic::Rest::Error => e
|
1713
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1714
|
+
end
|
1715
|
+
|
1716
|
+
##
|
1717
|
+
# Test IAM permissions on a repository.
|
1718
|
+
# IAM permission checks are not required on this method.
|
1719
|
+
#
|
1720
|
+
# @overload test_iam_permissions_repo(request, options = nil)
|
1721
|
+
# Pass arguments to `test_iam_permissions_repo` via a request object, either of type
|
1722
|
+
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
1723
|
+
#
|
1724
|
+
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
1725
|
+
# A request object representing the call parameters. Required. To specify no
|
1726
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1727
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1728
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1729
|
+
#
|
1730
|
+
# @overload test_iam_permissions_repo(resource: nil, permissions: nil)
|
1731
|
+
# Pass arguments to `test_iam_permissions_repo` via keyword arguments. Note that at
|
1732
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1733
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1734
|
+
#
|
1735
|
+
# @param resource [::String]
|
1736
|
+
# REQUIRED: The resource for which the policy detail is being requested.
|
1737
|
+
# See the operation documentation for the appropriate value for this field.
|
1738
|
+
# @param permissions [::Array<::String>]
|
1739
|
+
# The set of permissions to check for the `resource`. Permissions with
|
1740
|
+
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
1741
|
+
# information see
|
1742
|
+
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
1743
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1744
|
+
# @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
|
1745
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1746
|
+
#
|
1747
|
+
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
1748
|
+
#
|
1749
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1750
|
+
#
|
1751
|
+
# @example Basic example
|
1752
|
+
# require "google/cloud/secure_source_manager/v1"
|
1753
|
+
#
|
1754
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1755
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1756
|
+
#
|
1757
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1758
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
1759
|
+
#
|
1760
|
+
# # Call the test_iam_permissions_repo method.
|
1761
|
+
# result = client.test_iam_permissions_repo request
|
1762
|
+
#
|
1763
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
1764
|
+
# p result
|
1765
|
+
#
|
1766
|
+
def test_iam_permissions_repo request, options = nil
|
1767
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1768
|
+
|
1769
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
|
1770
|
+
|
1771
|
+
# Converts hash and nil to an options object
|
1772
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1773
|
+
|
1774
|
+
# Customize the options with defaults
|
1775
|
+
call_metadata = @config.rpcs.test_iam_permissions_repo.metadata.to_h
|
1776
|
+
|
1777
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1778
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1779
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1780
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
1781
|
+
transports_version_send: [:rest]
|
1782
|
+
|
1783
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1784
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1785
|
+
|
1786
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions_repo.timeout,
|
1787
|
+
metadata: call_metadata,
|
1788
|
+
retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy
|
1789
|
+
|
1790
|
+
options.apply_defaults timeout: @config.timeout,
|
1791
|
+
metadata: @config.metadata,
|
1792
|
+
retry_policy: @config.retry_policy
|
1793
|
+
|
1794
|
+
@secure_source_manager_stub.test_iam_permissions_repo request, options do |result, operation|
|
1795
|
+
yield result, operation if block_given?
|
1796
|
+
end
|
1797
|
+
rescue ::Gapic::Rest::Error => e
|
1798
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1799
|
+
end
|
1800
|
+
|
1801
|
+
##
|
1802
|
+
# CreateBranchRule creates a branch rule in a given repository.
|
1803
|
+
#
|
1804
|
+
# @overload create_branch_rule(request, options = nil)
|
1805
|
+
# Pass arguments to `create_branch_rule` via a request object, either of type
|
1806
|
+
# {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash.
|
1807
|
+
#
|
1808
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Hash]
|
1809
|
+
# A request object representing the call parameters. Required. To specify no
|
1810
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1811
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1812
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1813
|
+
#
|
1814
|
+
# @overload create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil)
|
1815
|
+
# Pass arguments to `create_branch_rule` via keyword arguments. Note that at
|
1816
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1817
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1818
|
+
#
|
1819
|
+
# @param parent [::String]
|
1820
|
+
# @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash]
|
1821
|
+
# @param branch_rule_id [::String]
|
1822
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1823
|
+
# @yieldparam result [::Gapic::Operation]
|
1824
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1825
|
+
#
|
1826
|
+
# @return [::Gapic::Operation]
|
1827
|
+
#
|
1828
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1829
|
+
#
|
1830
|
+
# @example Basic example
|
1831
|
+
# require "google/cloud/secure_source_manager/v1"
|
1832
|
+
#
|
1833
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1834
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1835
|
+
#
|
1836
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1837
|
+
# request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new
|
1838
|
+
#
|
1839
|
+
# # Call the create_branch_rule method.
|
1840
|
+
# result = client.create_branch_rule request
|
1841
|
+
#
|
1842
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1843
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1844
|
+
# # Here is how to wait for a response.
|
1845
|
+
# result.wait_until_done! timeout: 60
|
1846
|
+
# if result.response?
|
1847
|
+
# p result.response
|
1848
|
+
# else
|
1849
|
+
# puts "No response received."
|
1850
|
+
# end
|
1851
|
+
#
|
1852
|
+
def create_branch_rule request, options = nil
|
1853
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1854
|
+
|
1855
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest
|
1856
|
+
|
1857
|
+
# Converts hash and nil to an options object
|
1858
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1859
|
+
|
1860
|
+
# Customize the options with defaults
|
1861
|
+
call_metadata = @config.rpcs.create_branch_rule.metadata.to_h
|
1862
|
+
|
1863
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1864
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1865
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1866
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
1867
|
+
transports_version_send: [:rest]
|
1868
|
+
|
1869
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1870
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1871
|
+
|
1872
|
+
options.apply_defaults timeout: @config.rpcs.create_branch_rule.timeout,
|
1873
|
+
metadata: call_metadata,
|
1874
|
+
retry_policy: @config.rpcs.create_branch_rule.retry_policy
|
1875
|
+
|
1876
|
+
options.apply_defaults timeout: @config.timeout,
|
1877
|
+
metadata: @config.metadata,
|
1878
|
+
retry_policy: @config.retry_policy
|
1879
|
+
|
1880
|
+
@secure_source_manager_stub.create_branch_rule request, options do |result, operation|
|
1881
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1882
|
+
yield result, operation if block_given?
|
1883
|
+
throw :response, result
|
1884
|
+
end
|
1885
|
+
rescue ::Gapic::Rest::Error => e
|
1886
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1887
|
+
end
|
1888
|
+
|
1889
|
+
##
|
1890
|
+
# ListBranchRules lists branch rules in a given repository.
|
1891
|
+
#
|
1892
|
+
# @overload list_branch_rules(request, options = nil)
|
1893
|
+
# Pass arguments to `list_branch_rules` via a request object, either of type
|
1894
|
+
# {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash.
|
1895
|
+
#
|
1896
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Hash]
|
1897
|
+
# A request object representing the call parameters. Required. To specify no
|
1898
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1899
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1900
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1901
|
+
#
|
1902
|
+
# @overload list_branch_rules(parent: nil, page_size: nil, page_token: nil)
|
1903
|
+
# Pass arguments to `list_branch_rules` via keyword arguments. Note that at
|
1904
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1905
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1906
|
+
#
|
1907
|
+
# @param parent [::String]
|
1908
|
+
# @param page_size [::Integer]
|
1909
|
+
# @param page_token [::String]
|
1910
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1911
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>]
|
1912
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1913
|
+
#
|
1914
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>]
|
1915
|
+
#
|
1916
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1917
|
+
#
|
1918
|
+
# @example Basic example
|
1919
|
+
# require "google/cloud/secure_source_manager/v1"
|
1920
|
+
#
|
1921
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1922
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1923
|
+
#
|
1924
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1925
|
+
# request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new
|
1926
|
+
#
|
1927
|
+
# # Call the list_branch_rules method.
|
1928
|
+
# result = client.list_branch_rules request
|
1929
|
+
#
|
1930
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1931
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1932
|
+
# result.each do |item|
|
1933
|
+
# # Each element is of type ::Google::Cloud::SecureSourceManager::V1::BranchRule.
|
1934
|
+
# p item
|
1935
|
+
# end
|
1936
|
+
#
|
1937
|
+
def list_branch_rules request, options = nil
|
1938
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1939
|
+
|
1940
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest
|
1941
|
+
|
1942
|
+
# Converts hash and nil to an options object
|
1943
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1944
|
+
|
1945
|
+
# Customize the options with defaults
|
1946
|
+
call_metadata = @config.rpcs.list_branch_rules.metadata.to_h
|
1947
|
+
|
1948
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1949
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1950
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1951
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
1952
|
+
transports_version_send: [:rest]
|
1953
|
+
|
1954
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1955
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1956
|
+
|
1957
|
+
options.apply_defaults timeout: @config.rpcs.list_branch_rules.timeout,
|
1958
|
+
metadata: call_metadata,
|
1959
|
+
retry_policy: @config.rpcs.list_branch_rules.retry_policy
|
1960
|
+
|
1961
|
+
options.apply_defaults timeout: @config.timeout,
|
1962
|
+
metadata: @config.metadata,
|
1963
|
+
retry_policy: @config.retry_policy
|
1964
|
+
|
1965
|
+
@secure_source_manager_stub.list_branch_rules request, options do |result, operation|
|
1966
|
+
result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, "branch_rules", request, result, options
|
1967
|
+
yield result, operation if block_given?
|
1968
|
+
throw :response, result
|
1969
|
+
end
|
1970
|
+
rescue ::Gapic::Rest::Error => e
|
1971
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1972
|
+
end
|
1973
|
+
|
1974
|
+
##
|
1975
|
+
# GetBranchRule gets a branch rule.
|
1976
|
+
#
|
1977
|
+
# @overload get_branch_rule(request, options = nil)
|
1978
|
+
# Pass arguments to `get_branch_rule` via a request object, either of type
|
1979
|
+
# {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash.
|
1980
|
+
#
|
1981
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Hash]
|
1982
|
+
# A request object representing the call parameters. Required. To specify no
|
1983
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1984
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1985
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1986
|
+
#
|
1987
|
+
# @overload get_branch_rule(name: nil)
|
1988
|
+
# Pass arguments to `get_branch_rule` via keyword arguments. Note that at
|
1989
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1990
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1991
|
+
#
|
1992
|
+
# @param name [::String]
|
1993
|
+
# Required. Name of the repository to retrieve.
|
1994
|
+
# The format is
|
1995
|
+
# `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`.
|
1996
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1997
|
+
# @yieldparam result [::Google::Cloud::SecureSourceManager::V1::BranchRule]
|
1998
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1999
|
+
#
|
2000
|
+
# @return [::Google::Cloud::SecureSourceManager::V1::BranchRule]
|
2001
|
+
#
|
2002
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2003
|
+
#
|
2004
|
+
# @example Basic example
|
2005
|
+
# require "google/cloud/secure_source_manager/v1"
|
2006
|
+
#
|
2007
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2008
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2009
|
+
#
|
2010
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2011
|
+
# request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new
|
2012
|
+
#
|
2013
|
+
# # Call the get_branch_rule method.
|
2014
|
+
# result = client.get_branch_rule request
|
2015
|
+
#
|
2016
|
+
# # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule.
|
2017
|
+
# p result
|
2018
|
+
#
|
2019
|
+
def get_branch_rule request, options = nil
|
2020
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2021
|
+
|
1499
2022
|
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest
|
1500
2023
|
|
1501
2024
|
# Converts hash and nil to an options object
|
1502
2025
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1503
2026
|
|
1504
2027
|
# Customize the options with defaults
|
1505
|
-
call_metadata = @config.rpcs.get_branch_rule.metadata.to_h
|
2028
|
+
call_metadata = @config.rpcs.get_branch_rule.metadata.to_h
|
2029
|
+
|
2030
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2031
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2032
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2033
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2034
|
+
transports_version_send: [:rest]
|
2035
|
+
|
2036
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2037
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2038
|
+
|
2039
|
+
options.apply_defaults timeout: @config.rpcs.get_branch_rule.timeout,
|
2040
|
+
metadata: call_metadata,
|
2041
|
+
retry_policy: @config.rpcs.get_branch_rule.retry_policy
|
2042
|
+
|
2043
|
+
options.apply_defaults timeout: @config.timeout,
|
2044
|
+
metadata: @config.metadata,
|
2045
|
+
retry_policy: @config.retry_policy
|
2046
|
+
|
2047
|
+
@secure_source_manager_stub.get_branch_rule request, options do |result, operation|
|
2048
|
+
yield result, operation if block_given?
|
2049
|
+
end
|
2050
|
+
rescue ::Gapic::Rest::Error => e
|
2051
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2052
|
+
end
|
2053
|
+
|
2054
|
+
##
|
2055
|
+
# UpdateBranchRule updates a branch rule.
|
2056
|
+
#
|
2057
|
+
# @overload update_branch_rule(request, options = nil)
|
2058
|
+
# Pass arguments to `update_branch_rule` via a request object, either of type
|
2059
|
+
# {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash.
|
2060
|
+
#
|
2061
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Hash]
|
2062
|
+
# A request object representing the call parameters. Required. To specify no
|
2063
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2064
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2065
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2066
|
+
#
|
2067
|
+
# @overload update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil)
|
2068
|
+
# Pass arguments to `update_branch_rule` via keyword arguments. Note that at
|
2069
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2070
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2071
|
+
#
|
2072
|
+
# @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash]
|
2073
|
+
# @param validate_only [::Boolean]
|
2074
|
+
# Optional. If set, validate the request and preview the review, but do not
|
2075
|
+
# actually post it. (https://google.aip.dev/163, for declarative friendly)
|
2076
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2077
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
2078
|
+
# branchRule resource by the update.
|
2079
|
+
# The fields specified in the update_mask are relative to the resource, not
|
2080
|
+
# the full request. A field will be overwritten if it is in the mask.
|
2081
|
+
# The special value "*" means full replacement.
|
2082
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2083
|
+
# @yieldparam result [::Gapic::Operation]
|
2084
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2085
|
+
#
|
2086
|
+
# @return [::Gapic::Operation]
|
2087
|
+
#
|
2088
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2089
|
+
#
|
2090
|
+
# @example Basic example
|
2091
|
+
# require "google/cloud/secure_source_manager/v1"
|
2092
|
+
#
|
2093
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2094
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2095
|
+
#
|
2096
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2097
|
+
# request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new
|
2098
|
+
#
|
2099
|
+
# # Call the update_branch_rule method.
|
2100
|
+
# result = client.update_branch_rule request
|
2101
|
+
#
|
2102
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2103
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2104
|
+
# # Here is how to wait for a response.
|
2105
|
+
# result.wait_until_done! timeout: 60
|
2106
|
+
# if result.response?
|
2107
|
+
# p result.response
|
2108
|
+
# else
|
2109
|
+
# puts "No response received."
|
2110
|
+
# end
|
2111
|
+
#
|
2112
|
+
def update_branch_rule request, options = nil
|
2113
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2114
|
+
|
2115
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest
|
2116
|
+
|
2117
|
+
# Converts hash and nil to an options object
|
2118
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2119
|
+
|
2120
|
+
# Customize the options with defaults
|
2121
|
+
call_metadata = @config.rpcs.update_branch_rule.metadata.to_h
|
2122
|
+
|
2123
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2124
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2125
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2126
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2127
|
+
transports_version_send: [:rest]
|
2128
|
+
|
2129
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2130
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2131
|
+
|
2132
|
+
options.apply_defaults timeout: @config.rpcs.update_branch_rule.timeout,
|
2133
|
+
metadata: call_metadata,
|
2134
|
+
retry_policy: @config.rpcs.update_branch_rule.retry_policy
|
2135
|
+
|
2136
|
+
options.apply_defaults timeout: @config.timeout,
|
2137
|
+
metadata: @config.metadata,
|
2138
|
+
retry_policy: @config.retry_policy
|
2139
|
+
|
2140
|
+
@secure_source_manager_stub.update_branch_rule request, options do |result, operation|
|
2141
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2142
|
+
yield result, operation if block_given?
|
2143
|
+
throw :response, result
|
2144
|
+
end
|
2145
|
+
rescue ::Gapic::Rest::Error => e
|
2146
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2147
|
+
end
|
2148
|
+
|
2149
|
+
##
|
2150
|
+
# DeleteBranchRule deletes a branch rule.
|
2151
|
+
#
|
2152
|
+
# @overload delete_branch_rule(request, options = nil)
|
2153
|
+
# Pass arguments to `delete_branch_rule` via a request object, either of type
|
2154
|
+
# {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash.
|
2155
|
+
#
|
2156
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Hash]
|
2157
|
+
# A request object representing the call parameters. Required. To specify no
|
2158
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2159
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2160
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2161
|
+
#
|
2162
|
+
# @overload delete_branch_rule(name: nil, allow_missing: nil)
|
2163
|
+
# Pass arguments to `delete_branch_rule` via keyword arguments. Note that at
|
2164
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2165
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2166
|
+
#
|
2167
|
+
# @param name [::String]
|
2168
|
+
# @param allow_missing [::Boolean]
|
2169
|
+
# Optional. If set to true, and the branch rule is not found, the request
|
2170
|
+
# will succeed but no action will be taken on the server.
|
2171
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2172
|
+
# @yieldparam result [::Gapic::Operation]
|
2173
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2174
|
+
#
|
2175
|
+
# @return [::Gapic::Operation]
|
2176
|
+
#
|
2177
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2178
|
+
#
|
2179
|
+
# @example Basic example
|
2180
|
+
# require "google/cloud/secure_source_manager/v1"
|
2181
|
+
#
|
2182
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2183
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2184
|
+
#
|
2185
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2186
|
+
# request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new
|
2187
|
+
#
|
2188
|
+
# # Call the delete_branch_rule method.
|
2189
|
+
# result = client.delete_branch_rule request
|
2190
|
+
#
|
2191
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2192
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2193
|
+
# # Here is how to wait for a response.
|
2194
|
+
# result.wait_until_done! timeout: 60
|
2195
|
+
# if result.response?
|
2196
|
+
# p result.response
|
2197
|
+
# else
|
2198
|
+
# puts "No response received."
|
2199
|
+
# end
|
2200
|
+
#
|
2201
|
+
def delete_branch_rule request, options = nil
|
2202
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2203
|
+
|
2204
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest
|
2205
|
+
|
2206
|
+
# Converts hash and nil to an options object
|
2207
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2208
|
+
|
2209
|
+
# Customize the options with defaults
|
2210
|
+
call_metadata = @config.rpcs.delete_branch_rule.metadata.to_h
|
2211
|
+
|
2212
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2213
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2214
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2215
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2216
|
+
transports_version_send: [:rest]
|
2217
|
+
|
2218
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2219
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2220
|
+
|
2221
|
+
options.apply_defaults timeout: @config.rpcs.delete_branch_rule.timeout,
|
2222
|
+
metadata: call_metadata,
|
2223
|
+
retry_policy: @config.rpcs.delete_branch_rule.retry_policy
|
2224
|
+
|
2225
|
+
options.apply_defaults timeout: @config.timeout,
|
2226
|
+
metadata: @config.metadata,
|
2227
|
+
retry_policy: @config.retry_policy
|
2228
|
+
|
2229
|
+
@secure_source_manager_stub.delete_branch_rule request, options do |result, operation|
|
2230
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2231
|
+
yield result, operation if block_given?
|
2232
|
+
throw :response, result
|
2233
|
+
end
|
2234
|
+
rescue ::Gapic::Rest::Error => e
|
2235
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2236
|
+
end
|
2237
|
+
|
2238
|
+
##
|
2239
|
+
# Creates a pull request.
|
2240
|
+
#
|
2241
|
+
# @overload create_pull_request(request, options = nil)
|
2242
|
+
# Pass arguments to `create_pull_request` via a request object, either of type
|
2243
|
+
# {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest} or an equivalent Hash.
|
2244
|
+
#
|
2245
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::Hash]
|
2246
|
+
# A request object representing the call parameters. Required. To specify no
|
2247
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2248
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2249
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2250
|
+
#
|
2251
|
+
# @overload create_pull_request(parent: nil, pull_request: nil)
|
2252
|
+
# Pass arguments to `create_pull_request` via keyword arguments. Note that at
|
2253
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2254
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2255
|
+
#
|
2256
|
+
# @param parent [::String]
|
2257
|
+
# Required. The repository that the pull request is created from. Format:
|
2258
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
|
2259
|
+
# @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash]
|
2260
|
+
# Required. The pull request to create.
|
2261
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2262
|
+
# @yieldparam result [::Gapic::Operation]
|
2263
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2264
|
+
#
|
2265
|
+
# @return [::Gapic::Operation]
|
2266
|
+
#
|
2267
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2268
|
+
#
|
2269
|
+
# @example Basic example
|
2270
|
+
# require "google/cloud/secure_source_manager/v1"
|
2271
|
+
#
|
2272
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2273
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2274
|
+
#
|
2275
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2276
|
+
# request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new
|
2277
|
+
#
|
2278
|
+
# # Call the create_pull_request method.
|
2279
|
+
# result = client.create_pull_request request
|
2280
|
+
#
|
2281
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2282
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2283
|
+
# # Here is how to wait for a response.
|
2284
|
+
# result.wait_until_done! timeout: 60
|
2285
|
+
# if result.response?
|
2286
|
+
# p result.response
|
2287
|
+
# else
|
2288
|
+
# puts "No response received."
|
2289
|
+
# end
|
2290
|
+
#
|
2291
|
+
def create_pull_request request, options = nil
|
2292
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2293
|
+
|
2294
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest
|
2295
|
+
|
2296
|
+
# Converts hash and nil to an options object
|
2297
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2298
|
+
|
2299
|
+
# Customize the options with defaults
|
2300
|
+
call_metadata = @config.rpcs.create_pull_request.metadata.to_h
|
2301
|
+
|
2302
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2303
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2304
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2305
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2306
|
+
transports_version_send: [:rest]
|
2307
|
+
|
2308
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2309
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2310
|
+
|
2311
|
+
options.apply_defaults timeout: @config.rpcs.create_pull_request.timeout,
|
2312
|
+
metadata: call_metadata,
|
2313
|
+
retry_policy: @config.rpcs.create_pull_request.retry_policy
|
2314
|
+
|
2315
|
+
options.apply_defaults timeout: @config.timeout,
|
2316
|
+
metadata: @config.metadata,
|
2317
|
+
retry_policy: @config.retry_policy
|
2318
|
+
|
2319
|
+
@secure_source_manager_stub.create_pull_request request, options do |result, operation|
|
2320
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2321
|
+
yield result, operation if block_given?
|
2322
|
+
throw :response, result
|
2323
|
+
end
|
2324
|
+
rescue ::Gapic::Rest::Error => e
|
2325
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2326
|
+
end
|
2327
|
+
|
2328
|
+
##
|
2329
|
+
# Gets a pull request.
|
2330
|
+
#
|
2331
|
+
# @overload get_pull_request(request, options = nil)
|
2332
|
+
# Pass arguments to `get_pull_request` via a request object, either of type
|
2333
|
+
# {::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest} or an equivalent Hash.
|
2334
|
+
#
|
2335
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::Hash]
|
2336
|
+
# A request object representing the call parameters. Required. To specify no
|
2337
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2338
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2339
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2340
|
+
#
|
2341
|
+
# @overload get_pull_request(name: nil)
|
2342
|
+
# Pass arguments to `get_pull_request` via keyword arguments. Note that at
|
2343
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2344
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2345
|
+
#
|
2346
|
+
# @param name [::String]
|
2347
|
+
# Required. Name of the pull request to retrieve.
|
2348
|
+
# The format is
|
2349
|
+
# `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`.
|
2350
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2351
|
+
# @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequest]
|
2352
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2353
|
+
#
|
2354
|
+
# @return [::Google::Cloud::SecureSourceManager::V1::PullRequest]
|
2355
|
+
#
|
2356
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2357
|
+
#
|
2358
|
+
# @example Basic example
|
2359
|
+
# require "google/cloud/secure_source_manager/v1"
|
2360
|
+
#
|
2361
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2362
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2363
|
+
#
|
2364
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2365
|
+
# request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new
|
2366
|
+
#
|
2367
|
+
# # Call the get_pull_request method.
|
2368
|
+
# result = client.get_pull_request request
|
2369
|
+
#
|
2370
|
+
# # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest.
|
2371
|
+
# p result
|
2372
|
+
#
|
2373
|
+
def get_pull_request request, options = nil
|
2374
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2375
|
+
|
2376
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest
|
2377
|
+
|
2378
|
+
# Converts hash and nil to an options object
|
2379
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2380
|
+
|
2381
|
+
# Customize the options with defaults
|
2382
|
+
call_metadata = @config.rpcs.get_pull_request.metadata.to_h
|
2383
|
+
|
2384
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2385
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2386
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2387
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2388
|
+
transports_version_send: [:rest]
|
2389
|
+
|
2390
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2391
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2392
|
+
|
2393
|
+
options.apply_defaults timeout: @config.rpcs.get_pull_request.timeout,
|
2394
|
+
metadata: call_metadata,
|
2395
|
+
retry_policy: @config.rpcs.get_pull_request.retry_policy
|
2396
|
+
|
2397
|
+
options.apply_defaults timeout: @config.timeout,
|
2398
|
+
metadata: @config.metadata,
|
2399
|
+
retry_policy: @config.retry_policy
|
2400
|
+
|
2401
|
+
@secure_source_manager_stub.get_pull_request request, options do |result, operation|
|
2402
|
+
yield result, operation if block_given?
|
2403
|
+
end
|
2404
|
+
rescue ::Gapic::Rest::Error => e
|
2405
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2406
|
+
end
|
2407
|
+
|
2408
|
+
##
|
2409
|
+
# Lists pull requests in a repository.
|
2410
|
+
#
|
2411
|
+
# @overload list_pull_requests(request, options = nil)
|
2412
|
+
# Pass arguments to `list_pull_requests` via a request object, either of type
|
2413
|
+
# {::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest} or an equivalent Hash.
|
2414
|
+
#
|
2415
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::Hash]
|
2416
|
+
# A request object representing the call parameters. Required. To specify no
|
2417
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2418
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2419
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2420
|
+
#
|
2421
|
+
# @overload list_pull_requests(parent: nil, page_size: nil, page_token: nil)
|
2422
|
+
# Pass arguments to `list_pull_requests` via keyword arguments. Note that at
|
2423
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2424
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2425
|
+
#
|
2426
|
+
# @param parent [::String]
|
2427
|
+
# Required. The repository in which to list pull requests. Format:
|
2428
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
|
2429
|
+
# @param page_size [::Integer]
|
2430
|
+
# Optional. Requested page size. Server may return fewer items than
|
2431
|
+
# requested. If unspecified, server will pick an appropriate default.
|
2432
|
+
# @param page_token [::String]
|
2433
|
+
# Optional. A token identifying a page of results the server should return.
|
2434
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2435
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>]
|
2436
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2437
|
+
#
|
2438
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>]
|
2439
|
+
#
|
2440
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2441
|
+
#
|
2442
|
+
# @example Basic example
|
2443
|
+
# require "google/cloud/secure_source_manager/v1"
|
2444
|
+
#
|
2445
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2446
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2447
|
+
#
|
2448
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2449
|
+
# request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new
|
2450
|
+
#
|
2451
|
+
# # Call the list_pull_requests method.
|
2452
|
+
# result = client.list_pull_requests request
|
2453
|
+
#
|
2454
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2455
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2456
|
+
# result.each do |item|
|
2457
|
+
# # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequest.
|
2458
|
+
# p item
|
2459
|
+
# end
|
2460
|
+
#
|
2461
|
+
def list_pull_requests request, options = nil
|
2462
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2463
|
+
|
2464
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest
|
2465
|
+
|
2466
|
+
# Converts hash and nil to an options object
|
2467
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2468
|
+
|
2469
|
+
# Customize the options with defaults
|
2470
|
+
call_metadata = @config.rpcs.list_pull_requests.metadata.to_h
|
2471
|
+
|
2472
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2473
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2474
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2475
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2476
|
+
transports_version_send: [:rest]
|
2477
|
+
|
2478
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2479
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2480
|
+
|
2481
|
+
options.apply_defaults timeout: @config.rpcs.list_pull_requests.timeout,
|
2482
|
+
metadata: call_metadata,
|
2483
|
+
retry_policy: @config.rpcs.list_pull_requests.retry_policy
|
2484
|
+
|
2485
|
+
options.apply_defaults timeout: @config.timeout,
|
2486
|
+
metadata: @config.metadata,
|
2487
|
+
retry_policy: @config.retry_policy
|
2488
|
+
|
2489
|
+
@secure_source_manager_stub.list_pull_requests request, options do |result, operation|
|
2490
|
+
result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_requests, "pull_requests", request, result, options
|
2491
|
+
yield result, operation if block_given?
|
2492
|
+
throw :response, result
|
2493
|
+
end
|
2494
|
+
rescue ::Gapic::Rest::Error => e
|
2495
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2496
|
+
end
|
2497
|
+
|
2498
|
+
##
|
2499
|
+
# Updates a pull request.
|
2500
|
+
#
|
2501
|
+
# @overload update_pull_request(request, options = nil)
|
2502
|
+
# Pass arguments to `update_pull_request` via a request object, either of type
|
2503
|
+
# {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest} or an equivalent Hash.
|
2504
|
+
#
|
2505
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::Hash]
|
2506
|
+
# A request object representing the call parameters. Required. To specify no
|
2507
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2508
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2509
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2510
|
+
#
|
2511
|
+
# @overload update_pull_request(pull_request: nil, update_mask: nil)
|
2512
|
+
# Pass arguments to `update_pull_request` via keyword arguments. Note that at
|
2513
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2514
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2515
|
+
#
|
2516
|
+
# @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash]
|
2517
|
+
# Required. The pull request to update.
|
2518
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2519
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
2520
|
+
# pull request resource by the update.
|
2521
|
+
# The fields specified in the update_mask are relative to the resource, not
|
2522
|
+
# the full request. A field will be overwritten if it is in the mask.
|
2523
|
+
# The special value "*" means full replacement.
|
2524
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2525
|
+
# @yieldparam result [::Gapic::Operation]
|
2526
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2527
|
+
#
|
2528
|
+
# @return [::Gapic::Operation]
|
2529
|
+
#
|
2530
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2531
|
+
#
|
2532
|
+
# @example Basic example
|
2533
|
+
# require "google/cloud/secure_source_manager/v1"
|
2534
|
+
#
|
2535
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2536
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2537
|
+
#
|
2538
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2539
|
+
# request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new
|
2540
|
+
#
|
2541
|
+
# # Call the update_pull_request method.
|
2542
|
+
# result = client.update_pull_request request
|
2543
|
+
#
|
2544
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2545
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2546
|
+
# # Here is how to wait for a response.
|
2547
|
+
# result.wait_until_done! timeout: 60
|
2548
|
+
# if result.response?
|
2549
|
+
# p result.response
|
2550
|
+
# else
|
2551
|
+
# puts "No response received."
|
2552
|
+
# end
|
2553
|
+
#
|
2554
|
+
def update_pull_request request, options = nil
|
2555
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2556
|
+
|
2557
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest
|
2558
|
+
|
2559
|
+
# Converts hash and nil to an options object
|
2560
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2561
|
+
|
2562
|
+
# Customize the options with defaults
|
2563
|
+
call_metadata = @config.rpcs.update_pull_request.metadata.to_h
|
2564
|
+
|
2565
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2566
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2567
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2568
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2569
|
+
transports_version_send: [:rest]
|
2570
|
+
|
2571
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2572
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2573
|
+
|
2574
|
+
options.apply_defaults timeout: @config.rpcs.update_pull_request.timeout,
|
2575
|
+
metadata: call_metadata,
|
2576
|
+
retry_policy: @config.rpcs.update_pull_request.retry_policy
|
2577
|
+
|
2578
|
+
options.apply_defaults timeout: @config.timeout,
|
2579
|
+
metadata: @config.metadata,
|
2580
|
+
retry_policy: @config.retry_policy
|
2581
|
+
|
2582
|
+
@secure_source_manager_stub.update_pull_request request, options do |result, operation|
|
2583
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2584
|
+
yield result, operation if block_given?
|
2585
|
+
throw :response, result
|
2586
|
+
end
|
2587
|
+
rescue ::Gapic::Rest::Error => e
|
2588
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2589
|
+
end
|
2590
|
+
|
2591
|
+
##
|
2592
|
+
# Merges a pull request.
|
2593
|
+
#
|
2594
|
+
# @overload merge_pull_request(request, options = nil)
|
2595
|
+
# Pass arguments to `merge_pull_request` via a request object, either of type
|
2596
|
+
# {::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest} or an equivalent Hash.
|
2597
|
+
#
|
2598
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::Hash]
|
2599
|
+
# A request object representing the call parameters. Required. To specify no
|
2600
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2601
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2602
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2603
|
+
#
|
2604
|
+
# @overload merge_pull_request(name: nil)
|
2605
|
+
# Pass arguments to `merge_pull_request` via keyword arguments. Note that at
|
2606
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2607
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2608
|
+
#
|
2609
|
+
# @param name [::String]
|
2610
|
+
# Required. The pull request to merge.
|
2611
|
+
# Format:
|
2612
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
|
2613
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2614
|
+
# @yieldparam result [::Gapic::Operation]
|
2615
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2616
|
+
#
|
2617
|
+
# @return [::Gapic::Operation]
|
2618
|
+
#
|
2619
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2620
|
+
#
|
2621
|
+
# @example Basic example
|
2622
|
+
# require "google/cloud/secure_source_manager/v1"
|
2623
|
+
#
|
2624
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2625
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2626
|
+
#
|
2627
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2628
|
+
# request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new
|
2629
|
+
#
|
2630
|
+
# # Call the merge_pull_request method.
|
2631
|
+
# result = client.merge_pull_request request
|
2632
|
+
#
|
2633
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2634
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2635
|
+
# # Here is how to wait for a response.
|
2636
|
+
# result.wait_until_done! timeout: 60
|
2637
|
+
# if result.response?
|
2638
|
+
# p result.response
|
2639
|
+
# else
|
2640
|
+
# puts "No response received."
|
2641
|
+
# end
|
2642
|
+
#
|
2643
|
+
def merge_pull_request request, options = nil
|
2644
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2645
|
+
|
2646
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest
|
2647
|
+
|
2648
|
+
# Converts hash and nil to an options object
|
2649
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2650
|
+
|
2651
|
+
# Customize the options with defaults
|
2652
|
+
call_metadata = @config.rpcs.merge_pull_request.metadata.to_h
|
2653
|
+
|
2654
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2655
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2656
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2657
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2658
|
+
transports_version_send: [:rest]
|
2659
|
+
|
2660
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2661
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2662
|
+
|
2663
|
+
options.apply_defaults timeout: @config.rpcs.merge_pull_request.timeout,
|
2664
|
+
metadata: call_metadata,
|
2665
|
+
retry_policy: @config.rpcs.merge_pull_request.retry_policy
|
2666
|
+
|
2667
|
+
options.apply_defaults timeout: @config.timeout,
|
2668
|
+
metadata: @config.metadata,
|
2669
|
+
retry_policy: @config.retry_policy
|
2670
|
+
|
2671
|
+
@secure_source_manager_stub.merge_pull_request request, options do |result, operation|
|
2672
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2673
|
+
yield result, operation if block_given?
|
2674
|
+
throw :response, result
|
2675
|
+
end
|
2676
|
+
rescue ::Gapic::Rest::Error => e
|
2677
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2678
|
+
end
|
2679
|
+
|
2680
|
+
##
|
2681
|
+
# Opens a pull request.
|
2682
|
+
#
|
2683
|
+
# @overload open_pull_request(request, options = nil)
|
2684
|
+
# Pass arguments to `open_pull_request` via a request object, either of type
|
2685
|
+
# {::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest} or an equivalent Hash.
|
2686
|
+
#
|
2687
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::Hash]
|
2688
|
+
# A request object representing the call parameters. Required. To specify no
|
2689
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2690
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2691
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2692
|
+
#
|
2693
|
+
# @overload open_pull_request(name: nil)
|
2694
|
+
# Pass arguments to `open_pull_request` via keyword arguments. Note that at
|
2695
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2696
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2697
|
+
#
|
2698
|
+
# @param name [::String]
|
2699
|
+
# Required. The pull request to open.
|
2700
|
+
# Format:
|
2701
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
|
2702
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2703
|
+
# @yieldparam result [::Gapic::Operation]
|
2704
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2705
|
+
#
|
2706
|
+
# @return [::Gapic::Operation]
|
2707
|
+
#
|
2708
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2709
|
+
#
|
2710
|
+
# @example Basic example
|
2711
|
+
# require "google/cloud/secure_source_manager/v1"
|
2712
|
+
#
|
2713
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2714
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2715
|
+
#
|
2716
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2717
|
+
# request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new
|
2718
|
+
#
|
2719
|
+
# # Call the open_pull_request method.
|
2720
|
+
# result = client.open_pull_request request
|
2721
|
+
#
|
2722
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2723
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2724
|
+
# # Here is how to wait for a response.
|
2725
|
+
# result.wait_until_done! timeout: 60
|
2726
|
+
# if result.response?
|
2727
|
+
# p result.response
|
2728
|
+
# else
|
2729
|
+
# puts "No response received."
|
2730
|
+
# end
|
2731
|
+
#
|
2732
|
+
def open_pull_request request, options = nil
|
2733
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2734
|
+
|
2735
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest
|
2736
|
+
|
2737
|
+
# Converts hash and nil to an options object
|
2738
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2739
|
+
|
2740
|
+
# Customize the options with defaults
|
2741
|
+
call_metadata = @config.rpcs.open_pull_request.metadata.to_h
|
2742
|
+
|
2743
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2744
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2745
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2746
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2747
|
+
transports_version_send: [:rest]
|
2748
|
+
|
2749
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2750
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2751
|
+
|
2752
|
+
options.apply_defaults timeout: @config.rpcs.open_pull_request.timeout,
|
2753
|
+
metadata: call_metadata,
|
2754
|
+
retry_policy: @config.rpcs.open_pull_request.retry_policy
|
2755
|
+
|
2756
|
+
options.apply_defaults timeout: @config.timeout,
|
2757
|
+
metadata: @config.metadata,
|
2758
|
+
retry_policy: @config.retry_policy
|
2759
|
+
|
2760
|
+
@secure_source_manager_stub.open_pull_request request, options do |result, operation|
|
2761
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2762
|
+
yield result, operation if block_given?
|
2763
|
+
throw :response, result
|
2764
|
+
end
|
2765
|
+
rescue ::Gapic::Rest::Error => e
|
2766
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2767
|
+
end
|
2768
|
+
|
2769
|
+
##
|
2770
|
+
# Closes a pull request without merging.
|
2771
|
+
#
|
2772
|
+
# @overload close_pull_request(request, options = nil)
|
2773
|
+
# Pass arguments to `close_pull_request` via a request object, either of type
|
2774
|
+
# {::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest} or an equivalent Hash.
|
2775
|
+
#
|
2776
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::Hash]
|
2777
|
+
# A request object representing the call parameters. Required. To specify no
|
2778
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2779
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2780
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2781
|
+
#
|
2782
|
+
# @overload close_pull_request(name: nil)
|
2783
|
+
# Pass arguments to `close_pull_request` via keyword arguments. Note that at
|
2784
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2785
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2786
|
+
#
|
2787
|
+
# @param name [::String]
|
2788
|
+
# Required. The pull request to close.
|
2789
|
+
# Format:
|
2790
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
|
2791
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2792
|
+
# @yieldparam result [::Gapic::Operation]
|
2793
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2794
|
+
#
|
2795
|
+
# @return [::Gapic::Operation]
|
2796
|
+
#
|
2797
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2798
|
+
#
|
2799
|
+
# @example Basic example
|
2800
|
+
# require "google/cloud/secure_source_manager/v1"
|
2801
|
+
#
|
2802
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2803
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2804
|
+
#
|
2805
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2806
|
+
# request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new
|
2807
|
+
#
|
2808
|
+
# # Call the close_pull_request method.
|
2809
|
+
# result = client.close_pull_request request
|
2810
|
+
#
|
2811
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2812
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2813
|
+
# # Here is how to wait for a response.
|
2814
|
+
# result.wait_until_done! timeout: 60
|
2815
|
+
# if result.response?
|
2816
|
+
# p result.response
|
2817
|
+
# else
|
2818
|
+
# puts "No response received."
|
2819
|
+
# end
|
2820
|
+
#
|
2821
|
+
def close_pull_request request, options = nil
|
2822
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2823
|
+
|
2824
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest
|
2825
|
+
|
2826
|
+
# Converts hash and nil to an options object
|
2827
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2828
|
+
|
2829
|
+
# Customize the options with defaults
|
2830
|
+
call_metadata = @config.rpcs.close_pull_request.metadata.to_h
|
2831
|
+
|
2832
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2833
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2834
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2835
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2836
|
+
transports_version_send: [:rest]
|
2837
|
+
|
2838
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2839
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2840
|
+
|
2841
|
+
options.apply_defaults timeout: @config.rpcs.close_pull_request.timeout,
|
2842
|
+
metadata: call_metadata,
|
2843
|
+
retry_policy: @config.rpcs.close_pull_request.retry_policy
|
2844
|
+
|
2845
|
+
options.apply_defaults timeout: @config.timeout,
|
2846
|
+
metadata: @config.metadata,
|
2847
|
+
retry_policy: @config.retry_policy
|
2848
|
+
|
2849
|
+
@secure_source_manager_stub.close_pull_request request, options do |result, operation|
|
2850
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2851
|
+
yield result, operation if block_given?
|
2852
|
+
throw :response, result
|
2853
|
+
end
|
2854
|
+
rescue ::Gapic::Rest::Error => e
|
2855
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2856
|
+
end
|
2857
|
+
|
2858
|
+
##
|
2859
|
+
# Lists a pull request's file diffs.
|
2860
|
+
#
|
2861
|
+
# @overload list_pull_request_file_diffs(request, options = nil)
|
2862
|
+
# Pass arguments to `list_pull_request_file_diffs` via a request object, either of type
|
2863
|
+
# {::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest} or an equivalent Hash.
|
2864
|
+
#
|
2865
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::Hash]
|
2866
|
+
# A request object representing the call parameters. Required. To specify no
|
2867
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2868
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2869
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2870
|
+
#
|
2871
|
+
# @overload list_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil)
|
2872
|
+
# Pass arguments to `list_pull_request_file_diffs` via keyword arguments. Note that at
|
2873
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2874
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2875
|
+
#
|
2876
|
+
# @param name [::String]
|
2877
|
+
# Required. The pull request to list file diffs for.
|
2878
|
+
# Format:
|
2879
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
|
2880
|
+
# @param page_size [::Integer]
|
2881
|
+
# Optional. Requested page size. Server may return fewer items than
|
2882
|
+
# requested. If unspecified, server will pick an appropriate default.
|
2883
|
+
# @param page_token [::String]
|
2884
|
+
# Optional. A token identifying a page of results the server should return.
|
2885
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2886
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>]
|
2887
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2888
|
+
#
|
2889
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>]
|
2890
|
+
#
|
2891
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2892
|
+
#
|
2893
|
+
# @example Basic example
|
2894
|
+
# require "google/cloud/secure_source_manager/v1"
|
2895
|
+
#
|
2896
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2897
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2898
|
+
#
|
2899
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2900
|
+
# request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new
|
2901
|
+
#
|
2902
|
+
# # Call the list_pull_request_file_diffs method.
|
2903
|
+
# result = client.list_pull_request_file_diffs request
|
2904
|
+
#
|
2905
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2906
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2907
|
+
# result.each do |item|
|
2908
|
+
# # Each element is of type ::Google::Cloud::SecureSourceManager::V1::FileDiff.
|
2909
|
+
# p item
|
2910
|
+
# end
|
2911
|
+
#
|
2912
|
+
def list_pull_request_file_diffs request, options = nil
|
2913
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2914
|
+
|
2915
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest
|
2916
|
+
|
2917
|
+
# Converts hash and nil to an options object
|
2918
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2919
|
+
|
2920
|
+
# Customize the options with defaults
|
2921
|
+
call_metadata = @config.rpcs.list_pull_request_file_diffs.metadata.to_h
|
2922
|
+
|
2923
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2924
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2925
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2926
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
2927
|
+
transports_version_send: [:rest]
|
2928
|
+
|
2929
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2930
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2931
|
+
|
2932
|
+
options.apply_defaults timeout: @config.rpcs.list_pull_request_file_diffs.timeout,
|
2933
|
+
metadata: call_metadata,
|
2934
|
+
retry_policy: @config.rpcs.list_pull_request_file_diffs.retry_policy
|
2935
|
+
|
2936
|
+
options.apply_defaults timeout: @config.timeout,
|
2937
|
+
metadata: @config.metadata,
|
2938
|
+
retry_policy: @config.retry_policy
|
2939
|
+
|
2940
|
+
@secure_source_manager_stub.list_pull_request_file_diffs request, options do |result, operation|
|
2941
|
+
result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_file_diffs, "file_diffs", request, result, options
|
2942
|
+
yield result, operation if block_given?
|
2943
|
+
throw :response, result
|
2944
|
+
end
|
2945
|
+
rescue ::Gapic::Rest::Error => e
|
2946
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2947
|
+
end
|
2948
|
+
|
2949
|
+
##
|
2950
|
+
# Fetches a tree from a repository.
|
2951
|
+
#
|
2952
|
+
# @overload fetch_tree(request, options = nil)
|
2953
|
+
# Pass arguments to `fetch_tree` via a request object, either of type
|
2954
|
+
# {::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest} or an equivalent Hash.
|
2955
|
+
#
|
2956
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::Hash]
|
2957
|
+
# A request object representing the call parameters. Required. To specify no
|
2958
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2959
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2960
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2961
|
+
#
|
2962
|
+
# @overload fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil)
|
2963
|
+
# Pass arguments to `fetch_tree` via keyword arguments. Note that at
|
2964
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2965
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2966
|
+
#
|
2967
|
+
# @param repository [::String]
|
2968
|
+
# Required. The format is
|
2969
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
|
2970
|
+
# Specifies the repository to fetch the tree from.
|
2971
|
+
# @param ref [::String]
|
2972
|
+
# Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies
|
2973
|
+
# which tree to fetch. If not specified, the default branch will be used.
|
2974
|
+
# @param recursive [::Boolean]
|
2975
|
+
# Optional. If true, include all subfolders and their files in the response.
|
2976
|
+
# If false, only the immediate children are returned.
|
2977
|
+
# @param page_size [::Integer]
|
2978
|
+
# Optional. Requested page size. Server may return fewer items than
|
2979
|
+
# requested. If unspecified, at most 10,000 items will be returned.
|
2980
|
+
# @param page_token [::String]
|
2981
|
+
# Optional. A token identifying a page of results the server should return.
|
2982
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2983
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>]
|
2984
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2985
|
+
#
|
2986
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>]
|
2987
|
+
#
|
2988
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2989
|
+
#
|
2990
|
+
# @example Basic example
|
2991
|
+
# require "google/cloud/secure_source_manager/v1"
|
2992
|
+
#
|
2993
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2994
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
2995
|
+
#
|
2996
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2997
|
+
# request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new
|
2998
|
+
#
|
2999
|
+
# # Call the fetch_tree method.
|
3000
|
+
# result = client.fetch_tree request
|
3001
|
+
#
|
3002
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3003
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3004
|
+
# result.each do |item|
|
3005
|
+
# # Each element is of type ::Google::Cloud::SecureSourceManager::V1::TreeEntry.
|
3006
|
+
# p item
|
3007
|
+
# end
|
3008
|
+
#
|
3009
|
+
def fetch_tree request, options = nil
|
3010
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3011
|
+
|
3012
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest
|
3013
|
+
|
3014
|
+
# Converts hash and nil to an options object
|
3015
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3016
|
+
|
3017
|
+
# Customize the options with defaults
|
3018
|
+
call_metadata = @config.rpcs.fetch_tree.metadata.to_h
|
3019
|
+
|
3020
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3021
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3022
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3023
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3024
|
+
transports_version_send: [:rest]
|
3025
|
+
|
3026
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3027
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3028
|
+
|
3029
|
+
options.apply_defaults timeout: @config.rpcs.fetch_tree.timeout,
|
3030
|
+
metadata: call_metadata,
|
3031
|
+
retry_policy: @config.rpcs.fetch_tree.retry_policy
|
3032
|
+
|
3033
|
+
options.apply_defaults timeout: @config.timeout,
|
3034
|
+
metadata: @config.metadata,
|
3035
|
+
retry_policy: @config.retry_policy
|
3036
|
+
|
3037
|
+
@secure_source_manager_stub.fetch_tree request, options do |result, operation|
|
3038
|
+
result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :fetch_tree, "tree_entries", request, result, options
|
3039
|
+
yield result, operation if block_given?
|
3040
|
+
throw :response, result
|
3041
|
+
end
|
3042
|
+
rescue ::Gapic::Rest::Error => e
|
3043
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3044
|
+
end
|
3045
|
+
|
3046
|
+
##
|
3047
|
+
# Fetches a blob from a repository.
|
3048
|
+
#
|
3049
|
+
# @overload fetch_blob(request, options = nil)
|
3050
|
+
# Pass arguments to `fetch_blob` via a request object, either of type
|
3051
|
+
# {::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest} or an equivalent Hash.
|
3052
|
+
#
|
3053
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::Hash]
|
3054
|
+
# A request object representing the call parameters. Required. To specify no
|
3055
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3056
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3057
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3058
|
+
#
|
3059
|
+
# @overload fetch_blob(repository: nil, sha: nil)
|
3060
|
+
# Pass arguments to `fetch_blob` via keyword arguments. Note that at
|
3061
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3062
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3063
|
+
#
|
3064
|
+
# @param repository [::String]
|
3065
|
+
# Required. The format is
|
3066
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
|
3067
|
+
# Specifies the repository containing the blob.
|
3068
|
+
# @param sha [::String]
|
3069
|
+
# Required. The SHA-1 hash of the blob to retrieve.
|
3070
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3071
|
+
# @yieldparam result [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse]
|
3072
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3073
|
+
#
|
3074
|
+
# @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse]
|
3075
|
+
#
|
3076
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3077
|
+
#
|
3078
|
+
# @example Basic example
|
3079
|
+
# require "google/cloud/secure_source_manager/v1"
|
3080
|
+
#
|
3081
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3082
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3083
|
+
#
|
3084
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3085
|
+
# request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new
|
3086
|
+
#
|
3087
|
+
# # Call the fetch_blob method.
|
3088
|
+
# result = client.fetch_blob request
|
3089
|
+
#
|
3090
|
+
# # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.
|
3091
|
+
# p result
|
3092
|
+
#
|
3093
|
+
def fetch_blob request, options = nil
|
3094
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3095
|
+
|
3096
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest
|
3097
|
+
|
3098
|
+
# Converts hash and nil to an options object
|
3099
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3100
|
+
|
3101
|
+
# Customize the options with defaults
|
3102
|
+
call_metadata = @config.rpcs.fetch_blob.metadata.to_h
|
3103
|
+
|
3104
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3105
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3106
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3107
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3108
|
+
transports_version_send: [:rest]
|
3109
|
+
|
3110
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3111
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3112
|
+
|
3113
|
+
options.apply_defaults timeout: @config.rpcs.fetch_blob.timeout,
|
3114
|
+
metadata: call_metadata,
|
3115
|
+
retry_policy: @config.rpcs.fetch_blob.retry_policy
|
3116
|
+
|
3117
|
+
options.apply_defaults timeout: @config.timeout,
|
3118
|
+
metadata: @config.metadata,
|
3119
|
+
retry_policy: @config.retry_policy
|
3120
|
+
|
3121
|
+
@secure_source_manager_stub.fetch_blob request, options do |result, operation|
|
3122
|
+
yield result, operation if block_given?
|
3123
|
+
end
|
3124
|
+
rescue ::Gapic::Rest::Error => e
|
3125
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3126
|
+
end
|
3127
|
+
|
3128
|
+
##
|
3129
|
+
# Creates an issue.
|
3130
|
+
#
|
3131
|
+
# @overload create_issue(request, options = nil)
|
3132
|
+
# Pass arguments to `create_issue` via a request object, either of type
|
3133
|
+
# {::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest} or an equivalent Hash.
|
3134
|
+
#
|
3135
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::Hash]
|
3136
|
+
# A request object representing the call parameters. Required. To specify no
|
3137
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3138
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3139
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3140
|
+
#
|
3141
|
+
# @overload create_issue(parent: nil, issue: nil)
|
3142
|
+
# Pass arguments to `create_issue` via keyword arguments. Note that at
|
3143
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3144
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3145
|
+
#
|
3146
|
+
# @param parent [::String]
|
3147
|
+
# Required. The repository in which to create the issue. Format:
|
3148
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
|
3149
|
+
# @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash]
|
3150
|
+
# Required. The issue to create.
|
3151
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3152
|
+
# @yieldparam result [::Gapic::Operation]
|
3153
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3154
|
+
#
|
3155
|
+
# @return [::Gapic::Operation]
|
3156
|
+
#
|
3157
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3158
|
+
#
|
3159
|
+
# @example Basic example
|
3160
|
+
# require "google/cloud/secure_source_manager/v1"
|
3161
|
+
#
|
3162
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3163
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3164
|
+
#
|
3165
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3166
|
+
# request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new
|
3167
|
+
#
|
3168
|
+
# # Call the create_issue method.
|
3169
|
+
# result = client.create_issue request
|
3170
|
+
#
|
3171
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3172
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3173
|
+
# # Here is how to wait for a response.
|
3174
|
+
# result.wait_until_done! timeout: 60
|
3175
|
+
# if result.response?
|
3176
|
+
# p result.response
|
3177
|
+
# else
|
3178
|
+
# puts "No response received."
|
3179
|
+
# end
|
3180
|
+
#
|
3181
|
+
def create_issue request, options = nil
|
3182
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3183
|
+
|
3184
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest
|
3185
|
+
|
3186
|
+
# Converts hash and nil to an options object
|
3187
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3188
|
+
|
3189
|
+
# Customize the options with defaults
|
3190
|
+
call_metadata = @config.rpcs.create_issue.metadata.to_h
|
3191
|
+
|
3192
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3193
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3194
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3195
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3196
|
+
transports_version_send: [:rest]
|
3197
|
+
|
3198
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3199
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3200
|
+
|
3201
|
+
options.apply_defaults timeout: @config.rpcs.create_issue.timeout,
|
3202
|
+
metadata: call_metadata,
|
3203
|
+
retry_policy: @config.rpcs.create_issue.retry_policy
|
3204
|
+
|
3205
|
+
options.apply_defaults timeout: @config.timeout,
|
3206
|
+
metadata: @config.metadata,
|
3207
|
+
retry_policy: @config.retry_policy
|
3208
|
+
|
3209
|
+
@secure_source_manager_stub.create_issue request, options do |result, operation|
|
3210
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3211
|
+
yield result, operation if block_given?
|
3212
|
+
throw :response, result
|
3213
|
+
end
|
3214
|
+
rescue ::Gapic::Rest::Error => e
|
3215
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3216
|
+
end
|
3217
|
+
|
3218
|
+
##
|
3219
|
+
# Gets an issue.
|
3220
|
+
#
|
3221
|
+
# @overload get_issue(request, options = nil)
|
3222
|
+
# Pass arguments to `get_issue` via a request object, either of type
|
3223
|
+
# {::Google::Cloud::SecureSourceManager::V1::GetIssueRequest} or an equivalent Hash.
|
3224
|
+
#
|
3225
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::Hash]
|
3226
|
+
# A request object representing the call parameters. Required. To specify no
|
3227
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3228
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3229
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3230
|
+
#
|
3231
|
+
# @overload get_issue(name: nil)
|
3232
|
+
# Pass arguments to `get_issue` via keyword arguments. Note that at
|
3233
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3234
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3235
|
+
#
|
3236
|
+
# @param name [::String]
|
3237
|
+
# Required. Name of the issue to retrieve.
|
3238
|
+
# The format is
|
3239
|
+
# `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`.
|
3240
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3241
|
+
# @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Issue]
|
3242
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3243
|
+
#
|
3244
|
+
# @return [::Google::Cloud::SecureSourceManager::V1::Issue]
|
3245
|
+
#
|
3246
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3247
|
+
#
|
3248
|
+
# @example Basic example
|
3249
|
+
# require "google/cloud/secure_source_manager/v1"
|
3250
|
+
#
|
3251
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3252
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3253
|
+
#
|
3254
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3255
|
+
# request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new
|
3256
|
+
#
|
3257
|
+
# # Call the get_issue method.
|
3258
|
+
# result = client.get_issue request
|
3259
|
+
#
|
3260
|
+
# # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue.
|
3261
|
+
# p result
|
3262
|
+
#
|
3263
|
+
def get_issue request, options = nil
|
3264
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3265
|
+
|
3266
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest
|
3267
|
+
|
3268
|
+
# Converts hash and nil to an options object
|
3269
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3270
|
+
|
3271
|
+
# Customize the options with defaults
|
3272
|
+
call_metadata = @config.rpcs.get_issue.metadata.to_h
|
3273
|
+
|
3274
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3275
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3276
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3277
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3278
|
+
transports_version_send: [:rest]
|
3279
|
+
|
3280
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3281
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3282
|
+
|
3283
|
+
options.apply_defaults timeout: @config.rpcs.get_issue.timeout,
|
3284
|
+
metadata: call_metadata,
|
3285
|
+
retry_policy: @config.rpcs.get_issue.retry_policy
|
3286
|
+
|
3287
|
+
options.apply_defaults timeout: @config.timeout,
|
3288
|
+
metadata: @config.metadata,
|
3289
|
+
retry_policy: @config.retry_policy
|
3290
|
+
|
3291
|
+
@secure_source_manager_stub.get_issue request, options do |result, operation|
|
3292
|
+
yield result, operation if block_given?
|
3293
|
+
end
|
3294
|
+
rescue ::Gapic::Rest::Error => e
|
3295
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3296
|
+
end
|
3297
|
+
|
3298
|
+
##
|
3299
|
+
# Lists issues in a repository.
|
3300
|
+
#
|
3301
|
+
# @overload list_issues(request, options = nil)
|
3302
|
+
# Pass arguments to `list_issues` via a request object, either of type
|
3303
|
+
# {::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest} or an equivalent Hash.
|
3304
|
+
#
|
3305
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::Hash]
|
3306
|
+
# A request object representing the call parameters. Required. To specify no
|
3307
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3308
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3309
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3310
|
+
#
|
3311
|
+
# @overload list_issues(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
3312
|
+
# Pass arguments to `list_issues` via keyword arguments. Note that at
|
3313
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3314
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3315
|
+
#
|
3316
|
+
# @param parent [::String]
|
3317
|
+
# Required. The repository in which to list issues. Format:
|
3318
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
|
3319
|
+
# @param page_size [::Integer]
|
3320
|
+
# Optional. Requested page size. Server may return fewer items than
|
3321
|
+
# requested. If unspecified, server will pick an appropriate default.
|
3322
|
+
# @param page_token [::String]
|
3323
|
+
# Optional. A token identifying a page of results the server should return.
|
3324
|
+
# @param filter [::String]
|
3325
|
+
# Optional. Used to filter the resulting issues list.
|
3326
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3327
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>]
|
3328
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3329
|
+
#
|
3330
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>]
|
3331
|
+
#
|
3332
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3333
|
+
#
|
3334
|
+
# @example Basic example
|
3335
|
+
# require "google/cloud/secure_source_manager/v1"
|
3336
|
+
#
|
3337
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3338
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3339
|
+
#
|
3340
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3341
|
+
# request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new
|
3342
|
+
#
|
3343
|
+
# # Call the list_issues method.
|
3344
|
+
# result = client.list_issues request
|
3345
|
+
#
|
3346
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3347
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3348
|
+
# result.each do |item|
|
3349
|
+
# # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Issue.
|
3350
|
+
# p item
|
3351
|
+
# end
|
3352
|
+
#
|
3353
|
+
def list_issues request, options = nil
|
3354
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3355
|
+
|
3356
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest
|
3357
|
+
|
3358
|
+
# Converts hash and nil to an options object
|
3359
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3360
|
+
|
3361
|
+
# Customize the options with defaults
|
3362
|
+
call_metadata = @config.rpcs.list_issues.metadata.to_h
|
3363
|
+
|
3364
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3365
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3366
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3367
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3368
|
+
transports_version_send: [:rest]
|
3369
|
+
|
3370
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3371
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3372
|
+
|
3373
|
+
options.apply_defaults timeout: @config.rpcs.list_issues.timeout,
|
3374
|
+
metadata: call_metadata,
|
3375
|
+
retry_policy: @config.rpcs.list_issues.retry_policy
|
3376
|
+
|
3377
|
+
options.apply_defaults timeout: @config.timeout,
|
3378
|
+
metadata: @config.metadata,
|
3379
|
+
retry_policy: @config.retry_policy
|
3380
|
+
|
3381
|
+
@secure_source_manager_stub.list_issues request, options do |result, operation|
|
3382
|
+
result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issues, "issues", request, result, options
|
3383
|
+
yield result, operation if block_given?
|
3384
|
+
throw :response, result
|
3385
|
+
end
|
3386
|
+
rescue ::Gapic::Rest::Error => e
|
3387
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3388
|
+
end
|
3389
|
+
|
3390
|
+
##
|
3391
|
+
# Updates a issue.
|
3392
|
+
#
|
3393
|
+
# @overload update_issue(request, options = nil)
|
3394
|
+
# Pass arguments to `update_issue` via a request object, either of type
|
3395
|
+
# {::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest} or an equivalent Hash.
|
3396
|
+
#
|
3397
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::Hash]
|
3398
|
+
# A request object representing the call parameters. Required. To specify no
|
3399
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3400
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3401
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3402
|
+
#
|
3403
|
+
# @overload update_issue(issue: nil, update_mask: nil)
|
3404
|
+
# Pass arguments to `update_issue` via keyword arguments. Note that at
|
3405
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3406
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3407
|
+
#
|
3408
|
+
# @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash]
|
3409
|
+
# Required. The issue to update.
|
3410
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
3411
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
3412
|
+
# issue resource by the update.
|
3413
|
+
# The fields specified in the update_mask are relative to the resource, not
|
3414
|
+
# the full request. A field will be overwritten if it is in the mask.
|
3415
|
+
# The special value "*" means full replacement.
|
3416
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3417
|
+
# @yieldparam result [::Gapic::Operation]
|
3418
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3419
|
+
#
|
3420
|
+
# @return [::Gapic::Operation]
|
3421
|
+
#
|
3422
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3423
|
+
#
|
3424
|
+
# @example Basic example
|
3425
|
+
# require "google/cloud/secure_source_manager/v1"
|
3426
|
+
#
|
3427
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3428
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3429
|
+
#
|
3430
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3431
|
+
# request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new
|
3432
|
+
#
|
3433
|
+
# # Call the update_issue method.
|
3434
|
+
# result = client.update_issue request
|
3435
|
+
#
|
3436
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3437
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3438
|
+
# # Here is how to wait for a response.
|
3439
|
+
# result.wait_until_done! timeout: 60
|
3440
|
+
# if result.response?
|
3441
|
+
# p result.response
|
3442
|
+
# else
|
3443
|
+
# puts "No response received."
|
3444
|
+
# end
|
3445
|
+
#
|
3446
|
+
def update_issue request, options = nil
|
3447
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3448
|
+
|
3449
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest
|
3450
|
+
|
3451
|
+
# Converts hash and nil to an options object
|
3452
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3453
|
+
|
3454
|
+
# Customize the options with defaults
|
3455
|
+
call_metadata = @config.rpcs.update_issue.metadata.to_h
|
3456
|
+
|
3457
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3458
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3459
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3460
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3461
|
+
transports_version_send: [:rest]
|
3462
|
+
|
3463
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3464
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3465
|
+
|
3466
|
+
options.apply_defaults timeout: @config.rpcs.update_issue.timeout,
|
3467
|
+
metadata: call_metadata,
|
3468
|
+
retry_policy: @config.rpcs.update_issue.retry_policy
|
3469
|
+
|
3470
|
+
options.apply_defaults timeout: @config.timeout,
|
3471
|
+
metadata: @config.metadata,
|
3472
|
+
retry_policy: @config.retry_policy
|
3473
|
+
|
3474
|
+
@secure_source_manager_stub.update_issue request, options do |result, operation|
|
3475
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3476
|
+
yield result, operation if block_given?
|
3477
|
+
throw :response, result
|
3478
|
+
end
|
3479
|
+
rescue ::Gapic::Rest::Error => e
|
3480
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3481
|
+
end
|
3482
|
+
|
3483
|
+
##
|
3484
|
+
# Deletes an issue.
|
3485
|
+
#
|
3486
|
+
# @overload delete_issue(request, options = nil)
|
3487
|
+
# Pass arguments to `delete_issue` via a request object, either of type
|
3488
|
+
# {::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest} or an equivalent Hash.
|
3489
|
+
#
|
3490
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::Hash]
|
3491
|
+
# A request object representing the call parameters. Required. To specify no
|
3492
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3493
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3494
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3495
|
+
#
|
3496
|
+
# @overload delete_issue(name: nil, etag: nil)
|
3497
|
+
# Pass arguments to `delete_issue` via keyword arguments. Note that at
|
3498
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3499
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3500
|
+
#
|
3501
|
+
# @param name [::String]
|
3502
|
+
# Required. Name of the issue to delete.
|
3503
|
+
# The format is
|
3504
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
|
3505
|
+
# @param etag [::String]
|
3506
|
+
# Optional. The current etag of the issue.
|
3507
|
+
# If the etag is provided and does not match the current etag of the issue,
|
3508
|
+
# deletion will be blocked and an ABORTED error will be returned.
|
3509
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3510
|
+
# @yieldparam result [::Gapic::Operation]
|
3511
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3512
|
+
#
|
3513
|
+
# @return [::Gapic::Operation]
|
3514
|
+
#
|
3515
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3516
|
+
#
|
3517
|
+
# @example Basic example
|
3518
|
+
# require "google/cloud/secure_source_manager/v1"
|
3519
|
+
#
|
3520
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3521
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3522
|
+
#
|
3523
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3524
|
+
# request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new
|
3525
|
+
#
|
3526
|
+
# # Call the delete_issue method.
|
3527
|
+
# result = client.delete_issue request
|
3528
|
+
#
|
3529
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3530
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3531
|
+
# # Here is how to wait for a response.
|
3532
|
+
# result.wait_until_done! timeout: 60
|
3533
|
+
# if result.response?
|
3534
|
+
# p result.response
|
3535
|
+
# else
|
3536
|
+
# puts "No response received."
|
3537
|
+
# end
|
3538
|
+
#
|
3539
|
+
def delete_issue request, options = nil
|
3540
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3541
|
+
|
3542
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest
|
3543
|
+
|
3544
|
+
# Converts hash and nil to an options object
|
3545
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3546
|
+
|
3547
|
+
# Customize the options with defaults
|
3548
|
+
call_metadata = @config.rpcs.delete_issue.metadata.to_h
|
3549
|
+
|
3550
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3551
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3552
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3553
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3554
|
+
transports_version_send: [:rest]
|
3555
|
+
|
3556
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3557
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3558
|
+
|
3559
|
+
options.apply_defaults timeout: @config.rpcs.delete_issue.timeout,
|
3560
|
+
metadata: call_metadata,
|
3561
|
+
retry_policy: @config.rpcs.delete_issue.retry_policy
|
3562
|
+
|
3563
|
+
options.apply_defaults timeout: @config.timeout,
|
3564
|
+
metadata: @config.metadata,
|
3565
|
+
retry_policy: @config.retry_policy
|
3566
|
+
|
3567
|
+
@secure_source_manager_stub.delete_issue request, options do |result, operation|
|
3568
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3569
|
+
yield result, operation if block_given?
|
3570
|
+
throw :response, result
|
3571
|
+
end
|
3572
|
+
rescue ::Gapic::Rest::Error => e
|
3573
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3574
|
+
end
|
3575
|
+
|
3576
|
+
##
|
3577
|
+
# Opens an issue.
|
3578
|
+
#
|
3579
|
+
# @overload open_issue(request, options = nil)
|
3580
|
+
# Pass arguments to `open_issue` via a request object, either of type
|
3581
|
+
# {::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest} or an equivalent Hash.
|
3582
|
+
#
|
3583
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::Hash]
|
3584
|
+
# A request object representing the call parameters. Required. To specify no
|
3585
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3586
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3587
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3588
|
+
#
|
3589
|
+
# @overload open_issue(name: nil, etag: nil)
|
3590
|
+
# Pass arguments to `open_issue` via keyword arguments. Note that at
|
3591
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3592
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3593
|
+
#
|
3594
|
+
# @param name [::String]
|
3595
|
+
# Required. Name of the issue to open.
|
3596
|
+
# The format is
|
3597
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
|
3598
|
+
# @param etag [::String]
|
3599
|
+
# Optional. The current etag of the issue.
|
3600
|
+
# If the etag is provided and does not match the current etag of the issue,
|
3601
|
+
# opening will be blocked and an ABORTED error will be returned.
|
3602
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3603
|
+
# @yieldparam result [::Gapic::Operation]
|
3604
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3605
|
+
#
|
3606
|
+
# @return [::Gapic::Operation]
|
3607
|
+
#
|
3608
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3609
|
+
#
|
3610
|
+
# @example Basic example
|
3611
|
+
# require "google/cloud/secure_source_manager/v1"
|
3612
|
+
#
|
3613
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3614
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3615
|
+
#
|
3616
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3617
|
+
# request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new
|
3618
|
+
#
|
3619
|
+
# # Call the open_issue method.
|
3620
|
+
# result = client.open_issue request
|
3621
|
+
#
|
3622
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3623
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3624
|
+
# # Here is how to wait for a response.
|
3625
|
+
# result.wait_until_done! timeout: 60
|
3626
|
+
# if result.response?
|
3627
|
+
# p result.response
|
3628
|
+
# else
|
3629
|
+
# puts "No response received."
|
3630
|
+
# end
|
3631
|
+
#
|
3632
|
+
def open_issue request, options = nil
|
3633
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3634
|
+
|
3635
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest
|
3636
|
+
|
3637
|
+
# Converts hash and nil to an options object
|
3638
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3639
|
+
|
3640
|
+
# Customize the options with defaults
|
3641
|
+
call_metadata = @config.rpcs.open_issue.metadata.to_h
|
3642
|
+
|
3643
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3644
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3645
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3646
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3647
|
+
transports_version_send: [:rest]
|
3648
|
+
|
3649
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3650
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3651
|
+
|
3652
|
+
options.apply_defaults timeout: @config.rpcs.open_issue.timeout,
|
3653
|
+
metadata: call_metadata,
|
3654
|
+
retry_policy: @config.rpcs.open_issue.retry_policy
|
3655
|
+
|
3656
|
+
options.apply_defaults timeout: @config.timeout,
|
3657
|
+
metadata: @config.metadata,
|
3658
|
+
retry_policy: @config.retry_policy
|
3659
|
+
|
3660
|
+
@secure_source_manager_stub.open_issue request, options do |result, operation|
|
3661
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3662
|
+
yield result, operation if block_given?
|
3663
|
+
throw :response, result
|
3664
|
+
end
|
3665
|
+
rescue ::Gapic::Rest::Error => e
|
3666
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3667
|
+
end
|
3668
|
+
|
3669
|
+
##
|
3670
|
+
# Closes an issue.
|
3671
|
+
#
|
3672
|
+
# @overload close_issue(request, options = nil)
|
3673
|
+
# Pass arguments to `close_issue` via a request object, either of type
|
3674
|
+
# {::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest} or an equivalent Hash.
|
3675
|
+
#
|
3676
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::Hash]
|
3677
|
+
# A request object representing the call parameters. Required. To specify no
|
3678
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3679
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3680
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3681
|
+
#
|
3682
|
+
# @overload close_issue(name: nil, etag: nil)
|
3683
|
+
# Pass arguments to `close_issue` via keyword arguments. Note that at
|
3684
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3685
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3686
|
+
#
|
3687
|
+
# @param name [::String]
|
3688
|
+
# Required. Name of the issue to close.
|
3689
|
+
# The format is
|
3690
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
|
3691
|
+
# @param etag [::String]
|
3692
|
+
# Optional. The current etag of the issue.
|
3693
|
+
# If the etag is provided and does not match the current etag of the issue,
|
3694
|
+
# closing will be blocked and an ABORTED error will be returned.
|
3695
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3696
|
+
# @yieldparam result [::Gapic::Operation]
|
3697
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3698
|
+
#
|
3699
|
+
# @return [::Gapic::Operation]
|
3700
|
+
#
|
3701
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3702
|
+
#
|
3703
|
+
# @example Basic example
|
3704
|
+
# require "google/cloud/secure_source_manager/v1"
|
3705
|
+
#
|
3706
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3707
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3708
|
+
#
|
3709
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3710
|
+
# request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new
|
3711
|
+
#
|
3712
|
+
# # Call the close_issue method.
|
3713
|
+
# result = client.close_issue request
|
3714
|
+
#
|
3715
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3716
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3717
|
+
# # Here is how to wait for a response.
|
3718
|
+
# result.wait_until_done! timeout: 60
|
3719
|
+
# if result.response?
|
3720
|
+
# p result.response
|
3721
|
+
# else
|
3722
|
+
# puts "No response received."
|
3723
|
+
# end
|
3724
|
+
#
|
3725
|
+
def close_issue request, options = nil
|
3726
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3727
|
+
|
3728
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest
|
3729
|
+
|
3730
|
+
# Converts hash and nil to an options object
|
3731
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3732
|
+
|
3733
|
+
# Customize the options with defaults
|
3734
|
+
call_metadata = @config.rpcs.close_issue.metadata.to_h
|
3735
|
+
|
3736
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3737
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3738
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3739
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3740
|
+
transports_version_send: [:rest]
|
3741
|
+
|
3742
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3743
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3744
|
+
|
3745
|
+
options.apply_defaults timeout: @config.rpcs.close_issue.timeout,
|
3746
|
+
metadata: call_metadata,
|
3747
|
+
retry_policy: @config.rpcs.close_issue.retry_policy
|
3748
|
+
|
3749
|
+
options.apply_defaults timeout: @config.timeout,
|
3750
|
+
metadata: @config.metadata,
|
3751
|
+
retry_policy: @config.retry_policy
|
3752
|
+
|
3753
|
+
@secure_source_manager_stub.close_issue request, options do |result, operation|
|
3754
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3755
|
+
yield result, operation if block_given?
|
3756
|
+
throw :response, result
|
3757
|
+
end
|
3758
|
+
rescue ::Gapic::Rest::Error => e
|
3759
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3760
|
+
end
|
3761
|
+
|
3762
|
+
##
|
3763
|
+
# Gets a pull request comment.
|
3764
|
+
#
|
3765
|
+
# @overload get_pull_request_comment(request, options = nil)
|
3766
|
+
# Pass arguments to `get_pull_request_comment` via a request object, either of type
|
3767
|
+
# {::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest} or an equivalent Hash.
|
3768
|
+
#
|
3769
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::Hash]
|
3770
|
+
# A request object representing the call parameters. Required. To specify no
|
3771
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3772
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3773
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3774
|
+
#
|
3775
|
+
# @overload get_pull_request_comment(name: nil)
|
3776
|
+
# Pass arguments to `get_pull_request_comment` via keyword arguments. Note that at
|
3777
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3778
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3779
|
+
#
|
3780
|
+
# @param name [::String]
|
3781
|
+
# Required. Name of the pull request comment to retrieve.
|
3782
|
+
# The format is
|
3783
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`.
|
3784
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3785
|
+
# @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequestComment]
|
3786
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3787
|
+
#
|
3788
|
+
# @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment]
|
3789
|
+
#
|
3790
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3791
|
+
#
|
3792
|
+
# @example Basic example
|
3793
|
+
# require "google/cloud/secure_source_manager/v1"
|
3794
|
+
#
|
3795
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3796
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3797
|
+
#
|
3798
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3799
|
+
# request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new
|
3800
|
+
#
|
3801
|
+
# # Call the get_pull_request_comment method.
|
3802
|
+
# result = client.get_pull_request_comment request
|
3803
|
+
#
|
3804
|
+
# # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment.
|
3805
|
+
# p result
|
3806
|
+
#
|
3807
|
+
def get_pull_request_comment request, options = nil
|
3808
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3809
|
+
|
3810
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest
|
3811
|
+
|
3812
|
+
# Converts hash and nil to an options object
|
3813
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3814
|
+
|
3815
|
+
# Customize the options with defaults
|
3816
|
+
call_metadata = @config.rpcs.get_pull_request_comment.metadata.to_h
|
3817
|
+
|
3818
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3819
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3820
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3821
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3822
|
+
transports_version_send: [:rest]
|
3823
|
+
|
3824
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3825
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3826
|
+
|
3827
|
+
options.apply_defaults timeout: @config.rpcs.get_pull_request_comment.timeout,
|
3828
|
+
metadata: call_metadata,
|
3829
|
+
retry_policy: @config.rpcs.get_pull_request_comment.retry_policy
|
3830
|
+
|
3831
|
+
options.apply_defaults timeout: @config.timeout,
|
3832
|
+
metadata: @config.metadata,
|
3833
|
+
retry_policy: @config.retry_policy
|
3834
|
+
|
3835
|
+
@secure_source_manager_stub.get_pull_request_comment request, options do |result, operation|
|
3836
|
+
yield result, operation if block_given?
|
3837
|
+
end
|
3838
|
+
rescue ::Gapic::Rest::Error => e
|
3839
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3840
|
+
end
|
3841
|
+
|
3842
|
+
##
|
3843
|
+
# Lists pull request comments.
|
3844
|
+
#
|
3845
|
+
# @overload list_pull_request_comments(request, options = nil)
|
3846
|
+
# Pass arguments to `list_pull_request_comments` via a request object, either of type
|
3847
|
+
# {::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest} or an equivalent Hash.
|
3848
|
+
#
|
3849
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::Hash]
|
3850
|
+
# A request object representing the call parameters. Required. To specify no
|
3851
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3852
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3853
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3854
|
+
#
|
3855
|
+
# @overload list_pull_request_comments(parent: nil, page_size: nil, page_token: nil)
|
3856
|
+
# Pass arguments to `list_pull_request_comments` via keyword arguments. Note that at
|
3857
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3858
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3859
|
+
#
|
3860
|
+
# @param parent [::String]
|
3861
|
+
# Required. The pull request in which to list pull request comments. Format:
|
3862
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
|
3863
|
+
# @param page_size [::Integer]
|
3864
|
+
# Optional. Requested page size. If unspecified, at most 100 pull request
|
3865
|
+
# comments will be returned. The maximum value is 100; values above 100 will
|
3866
|
+
# be coerced to 100.
|
3867
|
+
# @param page_token [::String]
|
3868
|
+
# Optional. A token identifying a page of results the server should return.
|
3869
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3870
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>]
|
3871
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3872
|
+
#
|
3873
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>]
|
3874
|
+
#
|
3875
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3876
|
+
#
|
3877
|
+
# @example Basic example
|
3878
|
+
# require "google/cloud/secure_source_manager/v1"
|
3879
|
+
#
|
3880
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3881
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3882
|
+
#
|
3883
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3884
|
+
# request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new
|
3885
|
+
#
|
3886
|
+
# # Call the list_pull_request_comments method.
|
3887
|
+
# result = client.list_pull_request_comments request
|
3888
|
+
#
|
3889
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3890
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3891
|
+
# result.each do |item|
|
3892
|
+
# # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.
|
3893
|
+
# p item
|
3894
|
+
# end
|
3895
|
+
#
|
3896
|
+
def list_pull_request_comments request, options = nil
|
3897
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3898
|
+
|
3899
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest
|
3900
|
+
|
3901
|
+
# Converts hash and nil to an options object
|
3902
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3903
|
+
|
3904
|
+
# Customize the options with defaults
|
3905
|
+
call_metadata = @config.rpcs.list_pull_request_comments.metadata.to_h
|
3906
|
+
|
3907
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3908
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3909
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3910
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
3911
|
+
transports_version_send: [:rest]
|
3912
|
+
|
3913
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3914
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3915
|
+
|
3916
|
+
options.apply_defaults timeout: @config.rpcs.list_pull_request_comments.timeout,
|
3917
|
+
metadata: call_metadata,
|
3918
|
+
retry_policy: @config.rpcs.list_pull_request_comments.retry_policy
|
3919
|
+
|
3920
|
+
options.apply_defaults timeout: @config.timeout,
|
3921
|
+
metadata: @config.metadata,
|
3922
|
+
retry_policy: @config.retry_policy
|
3923
|
+
|
3924
|
+
@secure_source_manager_stub.list_pull_request_comments request, options do |result, operation|
|
3925
|
+
result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_comments, "pull_request_comments", request, result, options
|
3926
|
+
yield result, operation if block_given?
|
3927
|
+
throw :response, result
|
3928
|
+
end
|
3929
|
+
rescue ::Gapic::Rest::Error => e
|
3930
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3931
|
+
end
|
3932
|
+
|
3933
|
+
##
|
3934
|
+
# Creates a pull request comment.
|
3935
|
+
#
|
3936
|
+
# @overload create_pull_request_comment(request, options = nil)
|
3937
|
+
# Pass arguments to `create_pull_request_comment` via a request object, either of type
|
3938
|
+
# {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest} or an equivalent Hash.
|
3939
|
+
#
|
3940
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash]
|
3941
|
+
# A request object representing the call parameters. Required. To specify no
|
3942
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3943
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3944
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3945
|
+
#
|
3946
|
+
# @overload create_pull_request_comment(parent: nil, pull_request_comment: nil)
|
3947
|
+
# Pass arguments to `create_pull_request_comment` via keyword arguments. Note that at
|
3948
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3949
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3950
|
+
#
|
3951
|
+
# @param parent [::String]
|
3952
|
+
# Required. The pull request in which to create the pull request comment.
|
3953
|
+
# Format:
|
3954
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
|
3955
|
+
# @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash]
|
3956
|
+
# Required. The pull request comment to create.
|
3957
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3958
|
+
# @yieldparam result [::Gapic::Operation]
|
3959
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3960
|
+
#
|
3961
|
+
# @return [::Gapic::Operation]
|
3962
|
+
#
|
3963
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3964
|
+
#
|
3965
|
+
# @example Basic example
|
3966
|
+
# require "google/cloud/secure_source_manager/v1"
|
3967
|
+
#
|
3968
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3969
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
3970
|
+
#
|
3971
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3972
|
+
# request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new
|
3973
|
+
#
|
3974
|
+
# # Call the create_pull_request_comment method.
|
3975
|
+
# result = client.create_pull_request_comment request
|
3976
|
+
#
|
3977
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
3978
|
+
# # check the status of an operation, cancel it, or wait for results.
|
3979
|
+
# # Here is how to wait for a response.
|
3980
|
+
# result.wait_until_done! timeout: 60
|
3981
|
+
# if result.response?
|
3982
|
+
# p result.response
|
3983
|
+
# else
|
3984
|
+
# puts "No response received."
|
3985
|
+
# end
|
3986
|
+
#
|
3987
|
+
def create_pull_request_comment request, options = nil
|
3988
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3989
|
+
|
3990
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest
|
3991
|
+
|
3992
|
+
# Converts hash and nil to an options object
|
3993
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3994
|
+
|
3995
|
+
# Customize the options with defaults
|
3996
|
+
call_metadata = @config.rpcs.create_pull_request_comment.metadata.to_h
|
3997
|
+
|
3998
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3999
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4000
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4001
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
4002
|
+
transports_version_send: [:rest]
|
4003
|
+
|
4004
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4005
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4006
|
+
|
4007
|
+
options.apply_defaults timeout: @config.rpcs.create_pull_request_comment.timeout,
|
4008
|
+
metadata: call_metadata,
|
4009
|
+
retry_policy: @config.rpcs.create_pull_request_comment.retry_policy
|
4010
|
+
|
4011
|
+
options.apply_defaults timeout: @config.timeout,
|
4012
|
+
metadata: @config.metadata,
|
4013
|
+
retry_policy: @config.retry_policy
|
4014
|
+
|
4015
|
+
@secure_source_manager_stub.create_pull_request_comment request, options do |result, operation|
|
4016
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4017
|
+
yield result, operation if block_given?
|
4018
|
+
throw :response, result
|
4019
|
+
end
|
4020
|
+
rescue ::Gapic::Rest::Error => e
|
4021
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4022
|
+
end
|
4023
|
+
|
4024
|
+
##
|
4025
|
+
# Updates a pull request comment.
|
4026
|
+
#
|
4027
|
+
# @overload update_pull_request_comment(request, options = nil)
|
4028
|
+
# Pass arguments to `update_pull_request_comment` via a request object, either of type
|
4029
|
+
# {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest} or an equivalent Hash.
|
4030
|
+
#
|
4031
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Hash]
|
4032
|
+
# A request object representing the call parameters. Required. To specify no
|
4033
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4034
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4035
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4036
|
+
#
|
4037
|
+
# @overload update_pull_request_comment(pull_request_comment: nil, update_mask: nil)
|
4038
|
+
# Pass arguments to `update_pull_request_comment` via keyword arguments. Note that at
|
4039
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4040
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4041
|
+
#
|
4042
|
+
# @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash]
|
4043
|
+
# Required. The pull request comment to update.
|
4044
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
4045
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
4046
|
+
# pull request comment resource by the update. Updatable fields are
|
4047
|
+
# `body`.
|
4048
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4049
|
+
# @yieldparam result [::Gapic::Operation]
|
4050
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4051
|
+
#
|
4052
|
+
# @return [::Gapic::Operation]
|
4053
|
+
#
|
4054
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4055
|
+
#
|
4056
|
+
# @example Basic example
|
4057
|
+
# require "google/cloud/secure_source_manager/v1"
|
4058
|
+
#
|
4059
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4060
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
4061
|
+
#
|
4062
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4063
|
+
# request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new
|
4064
|
+
#
|
4065
|
+
# # Call the update_pull_request_comment method.
|
4066
|
+
# result = client.update_pull_request_comment request
|
4067
|
+
#
|
4068
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4069
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4070
|
+
# # Here is how to wait for a response.
|
4071
|
+
# result.wait_until_done! timeout: 60
|
4072
|
+
# if result.response?
|
4073
|
+
# p result.response
|
4074
|
+
# else
|
4075
|
+
# puts "No response received."
|
4076
|
+
# end
|
4077
|
+
#
|
4078
|
+
def update_pull_request_comment request, options = nil
|
4079
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4080
|
+
|
4081
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest
|
4082
|
+
|
4083
|
+
# Converts hash and nil to an options object
|
4084
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4085
|
+
|
4086
|
+
# Customize the options with defaults
|
4087
|
+
call_metadata = @config.rpcs.update_pull_request_comment.metadata.to_h
|
4088
|
+
|
4089
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4090
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4091
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4092
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
4093
|
+
transports_version_send: [:rest]
|
4094
|
+
|
4095
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4096
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4097
|
+
|
4098
|
+
options.apply_defaults timeout: @config.rpcs.update_pull_request_comment.timeout,
|
4099
|
+
metadata: call_metadata,
|
4100
|
+
retry_policy: @config.rpcs.update_pull_request_comment.retry_policy
|
4101
|
+
|
4102
|
+
options.apply_defaults timeout: @config.timeout,
|
4103
|
+
metadata: @config.metadata,
|
4104
|
+
retry_policy: @config.retry_policy
|
4105
|
+
|
4106
|
+
@secure_source_manager_stub.update_pull_request_comment request, options do |result, operation|
|
4107
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4108
|
+
yield result, operation if block_given?
|
4109
|
+
throw :response, result
|
4110
|
+
end
|
4111
|
+
rescue ::Gapic::Rest::Error => e
|
4112
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4113
|
+
end
|
4114
|
+
|
4115
|
+
##
|
4116
|
+
# Deletes a pull request comment.
|
4117
|
+
#
|
4118
|
+
# @overload delete_pull_request_comment(request, options = nil)
|
4119
|
+
# Pass arguments to `delete_pull_request_comment` via a request object, either of type
|
4120
|
+
# {::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest} or an equivalent Hash.
|
4121
|
+
#
|
4122
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Hash]
|
4123
|
+
# A request object representing the call parameters. Required. To specify no
|
4124
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4125
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4126
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4127
|
+
#
|
4128
|
+
# @overload delete_pull_request_comment(name: nil)
|
4129
|
+
# Pass arguments to `delete_pull_request_comment` via keyword arguments. Note that at
|
4130
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4131
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4132
|
+
#
|
4133
|
+
# @param name [::String]
|
4134
|
+
# Required. Name of the pull request comment to delete.
|
4135
|
+
# The format is
|
4136
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`.
|
4137
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4138
|
+
# @yieldparam result [::Gapic::Operation]
|
4139
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4140
|
+
#
|
4141
|
+
# @return [::Gapic::Operation]
|
4142
|
+
#
|
4143
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4144
|
+
#
|
4145
|
+
# @example Basic example
|
4146
|
+
# require "google/cloud/secure_source_manager/v1"
|
4147
|
+
#
|
4148
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4149
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
4150
|
+
#
|
4151
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4152
|
+
# request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new
|
4153
|
+
#
|
4154
|
+
# # Call the delete_pull_request_comment method.
|
4155
|
+
# result = client.delete_pull_request_comment request
|
4156
|
+
#
|
4157
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4158
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4159
|
+
# # Here is how to wait for a response.
|
4160
|
+
# result.wait_until_done! timeout: 60
|
4161
|
+
# if result.response?
|
4162
|
+
# p result.response
|
4163
|
+
# else
|
4164
|
+
# puts "No response received."
|
4165
|
+
# end
|
4166
|
+
#
|
4167
|
+
def delete_pull_request_comment request, options = nil
|
4168
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4169
|
+
|
4170
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest
|
4171
|
+
|
4172
|
+
# Converts hash and nil to an options object
|
4173
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4174
|
+
|
4175
|
+
# Customize the options with defaults
|
4176
|
+
call_metadata = @config.rpcs.delete_pull_request_comment.metadata.to_h
|
4177
|
+
|
4178
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4179
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4180
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4181
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
4182
|
+
transports_version_send: [:rest]
|
4183
|
+
|
4184
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4185
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4186
|
+
|
4187
|
+
options.apply_defaults timeout: @config.rpcs.delete_pull_request_comment.timeout,
|
4188
|
+
metadata: call_metadata,
|
4189
|
+
retry_policy: @config.rpcs.delete_pull_request_comment.retry_policy
|
4190
|
+
|
4191
|
+
options.apply_defaults timeout: @config.timeout,
|
4192
|
+
metadata: @config.metadata,
|
4193
|
+
retry_policy: @config.retry_policy
|
4194
|
+
|
4195
|
+
@secure_source_manager_stub.delete_pull_request_comment request, options do |result, operation|
|
4196
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4197
|
+
yield result, operation if block_given?
|
4198
|
+
throw :response, result
|
4199
|
+
end
|
4200
|
+
rescue ::Gapic::Rest::Error => e
|
4201
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4202
|
+
end
|
4203
|
+
|
4204
|
+
##
|
4205
|
+
# Batch creates pull request comments.
|
4206
|
+
#
|
4207
|
+
# @overload batch_create_pull_request_comments(request, options = nil)
|
4208
|
+
# Pass arguments to `batch_create_pull_request_comments` via a request object, either of type
|
4209
|
+
# {::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest} or an equivalent Hash.
|
4210
|
+
#
|
4211
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Hash]
|
4212
|
+
# A request object representing the call parameters. Required. To specify no
|
4213
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4214
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4215
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4216
|
+
#
|
4217
|
+
# @overload batch_create_pull_request_comments(parent: nil, requests: nil)
|
4218
|
+
# Pass arguments to `batch_create_pull_request_comments` via keyword arguments. Note that at
|
4219
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4220
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4221
|
+
#
|
4222
|
+
# @param parent [::String]
|
4223
|
+
# Required. The pull request in which to create the pull request comments.
|
4224
|
+
# Format:
|
4225
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
|
4226
|
+
# @param requests [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash>]
|
4227
|
+
# Required. The request message specifying the resources to create. There
|
4228
|
+
# should be exactly one CreatePullRequestCommentRequest with CommentDetail
|
4229
|
+
# being REVIEW in the list, and no more than 100
|
4230
|
+
# CreatePullRequestCommentRequests with CommentDetail being CODE in the list
|
4231
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4232
|
+
# @yieldparam result [::Gapic::Operation]
|
4233
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4234
|
+
#
|
4235
|
+
# @return [::Gapic::Operation]
|
4236
|
+
#
|
4237
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4238
|
+
#
|
4239
|
+
# @example Basic example
|
4240
|
+
# require "google/cloud/secure_source_manager/v1"
|
4241
|
+
#
|
4242
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4243
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
4244
|
+
#
|
4245
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4246
|
+
# request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new
|
4247
|
+
#
|
4248
|
+
# # Call the batch_create_pull_request_comments method.
|
4249
|
+
# result = client.batch_create_pull_request_comments request
|
4250
|
+
#
|
4251
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4252
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4253
|
+
# # Here is how to wait for a response.
|
4254
|
+
# result.wait_until_done! timeout: 60
|
4255
|
+
# if result.response?
|
4256
|
+
# p result.response
|
4257
|
+
# else
|
4258
|
+
# puts "No response received."
|
4259
|
+
# end
|
4260
|
+
#
|
4261
|
+
def batch_create_pull_request_comments request, options = nil
|
4262
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4263
|
+
|
4264
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest
|
4265
|
+
|
4266
|
+
# Converts hash and nil to an options object
|
4267
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4268
|
+
|
4269
|
+
# Customize the options with defaults
|
4270
|
+
call_metadata = @config.rpcs.batch_create_pull_request_comments.metadata.to_h
|
4271
|
+
|
4272
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4273
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4274
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4275
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
4276
|
+
transports_version_send: [:rest]
|
4277
|
+
|
4278
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4279
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4280
|
+
|
4281
|
+
options.apply_defaults timeout: @config.rpcs.batch_create_pull_request_comments.timeout,
|
4282
|
+
metadata: call_metadata,
|
4283
|
+
retry_policy: @config.rpcs.batch_create_pull_request_comments.retry_policy
|
4284
|
+
|
4285
|
+
options.apply_defaults timeout: @config.timeout,
|
4286
|
+
metadata: @config.metadata,
|
4287
|
+
retry_policy: @config.retry_policy
|
4288
|
+
|
4289
|
+
@secure_source_manager_stub.batch_create_pull_request_comments request, options do |result, operation|
|
4290
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4291
|
+
yield result, operation if block_given?
|
4292
|
+
throw :response, result
|
4293
|
+
end
|
4294
|
+
rescue ::Gapic::Rest::Error => e
|
4295
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4296
|
+
end
|
4297
|
+
|
4298
|
+
##
|
4299
|
+
# Resolves pull request comments.
|
4300
|
+
#
|
4301
|
+
# @overload resolve_pull_request_comments(request, options = nil)
|
4302
|
+
# Pass arguments to `resolve_pull_request_comments` via a request object, either of type
|
4303
|
+
# {::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest} or an equivalent Hash.
|
4304
|
+
#
|
4305
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Hash]
|
4306
|
+
# A request object representing the call parameters. Required. To specify no
|
4307
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4308
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4309
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4310
|
+
#
|
4311
|
+
# @overload resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil)
|
4312
|
+
# Pass arguments to `resolve_pull_request_comments` via keyword arguments. Note that at
|
4313
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4314
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4315
|
+
#
|
4316
|
+
# @param parent [::String]
|
4317
|
+
# Required. The pull request in which to resolve the pull request comments.
|
4318
|
+
# Format:
|
4319
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
|
4320
|
+
# @param names [::Array<::String>]
|
4321
|
+
# Required. The names of the pull request comments to resolve. Format:
|
4322
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`
|
4323
|
+
# Only comments from the same threads are allowed in the same request.
|
4324
|
+
# @param auto_fill [::Boolean]
|
4325
|
+
# Optional. If set, at least one comment in a thread is required, rest of the
|
4326
|
+
# comments in the same thread will be automatically updated to resolved. If
|
4327
|
+
# unset, all comments in the same thread need be present.
|
4328
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4329
|
+
# @yieldparam result [::Gapic::Operation]
|
4330
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4331
|
+
#
|
4332
|
+
# @return [::Gapic::Operation]
|
4333
|
+
#
|
4334
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4335
|
+
#
|
4336
|
+
# @example Basic example
|
4337
|
+
# require "google/cloud/secure_source_manager/v1"
|
4338
|
+
#
|
4339
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4340
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
4341
|
+
#
|
4342
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4343
|
+
# request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new
|
4344
|
+
#
|
4345
|
+
# # Call the resolve_pull_request_comments method.
|
4346
|
+
# result = client.resolve_pull_request_comments request
|
4347
|
+
#
|
4348
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4349
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4350
|
+
# # Here is how to wait for a response.
|
4351
|
+
# result.wait_until_done! timeout: 60
|
4352
|
+
# if result.response?
|
4353
|
+
# p result.response
|
4354
|
+
# else
|
4355
|
+
# puts "No response received."
|
4356
|
+
# end
|
4357
|
+
#
|
4358
|
+
def resolve_pull_request_comments request, options = nil
|
4359
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4360
|
+
|
4361
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest
|
4362
|
+
|
4363
|
+
# Converts hash and nil to an options object
|
4364
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4365
|
+
|
4366
|
+
# Customize the options with defaults
|
4367
|
+
call_metadata = @config.rpcs.resolve_pull_request_comments.metadata.to_h
|
4368
|
+
|
4369
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4370
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4371
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4372
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
4373
|
+
transports_version_send: [:rest]
|
4374
|
+
|
4375
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4376
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4377
|
+
|
4378
|
+
options.apply_defaults timeout: @config.rpcs.resolve_pull_request_comments.timeout,
|
4379
|
+
metadata: call_metadata,
|
4380
|
+
retry_policy: @config.rpcs.resolve_pull_request_comments.retry_policy
|
4381
|
+
|
4382
|
+
options.apply_defaults timeout: @config.timeout,
|
4383
|
+
metadata: @config.metadata,
|
4384
|
+
retry_policy: @config.retry_policy
|
4385
|
+
|
4386
|
+
@secure_source_manager_stub.resolve_pull_request_comments request, options do |result, operation|
|
4387
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4388
|
+
yield result, operation if block_given?
|
4389
|
+
throw :response, result
|
4390
|
+
end
|
4391
|
+
rescue ::Gapic::Rest::Error => e
|
4392
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4393
|
+
end
|
4394
|
+
|
4395
|
+
##
|
4396
|
+
# Unresolves pull request comment.
|
4397
|
+
#
|
4398
|
+
# @overload unresolve_pull_request_comments(request, options = nil)
|
4399
|
+
# Pass arguments to `unresolve_pull_request_comments` via a request object, either of type
|
4400
|
+
# {::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest} or an equivalent Hash.
|
4401
|
+
#
|
4402
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Hash]
|
4403
|
+
# A request object representing the call parameters. Required. To specify no
|
4404
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4405
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4406
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4407
|
+
#
|
4408
|
+
# @overload unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil)
|
4409
|
+
# Pass arguments to `unresolve_pull_request_comments` via keyword arguments. Note that at
|
4410
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4411
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4412
|
+
#
|
4413
|
+
# @param parent [::String]
|
4414
|
+
# Required. The pull request in which to resolve the pull request comments.
|
4415
|
+
# Format:
|
4416
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
|
4417
|
+
# @param names [::Array<::String>]
|
4418
|
+
# Required. The names of the pull request comments to unresolve. Format:
|
4419
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`
|
4420
|
+
# Only comments from the same threads are allowed in the same request.
|
4421
|
+
# @param auto_fill [::Boolean]
|
4422
|
+
# Optional. If set, at least one comment in a thread is required, rest of the
|
4423
|
+
# comments in the same thread will be automatically updated to unresolved. If
|
4424
|
+
# unset, all comments in the same thread need be present.
|
4425
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4426
|
+
# @yieldparam result [::Gapic::Operation]
|
4427
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4428
|
+
#
|
4429
|
+
# @return [::Gapic::Operation]
|
4430
|
+
#
|
4431
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4432
|
+
#
|
4433
|
+
# @example Basic example
|
4434
|
+
# require "google/cloud/secure_source_manager/v1"
|
4435
|
+
#
|
4436
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4437
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
4438
|
+
#
|
4439
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4440
|
+
# request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new
|
4441
|
+
#
|
4442
|
+
# # Call the unresolve_pull_request_comments method.
|
4443
|
+
# result = client.unresolve_pull_request_comments request
|
4444
|
+
#
|
4445
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4446
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4447
|
+
# # Here is how to wait for a response.
|
4448
|
+
# result.wait_until_done! timeout: 60
|
4449
|
+
# if result.response?
|
4450
|
+
# p result.response
|
4451
|
+
# else
|
4452
|
+
# puts "No response received."
|
4453
|
+
# end
|
4454
|
+
#
|
4455
|
+
def unresolve_pull_request_comments request, options = nil
|
4456
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4457
|
+
|
4458
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest
|
4459
|
+
|
4460
|
+
# Converts hash and nil to an options object
|
4461
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4462
|
+
|
4463
|
+
# Customize the options with defaults
|
4464
|
+
call_metadata = @config.rpcs.unresolve_pull_request_comments.metadata.to_h
|
4465
|
+
|
4466
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4467
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4468
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4469
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
4470
|
+
transports_version_send: [:rest]
|
4471
|
+
|
4472
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4473
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4474
|
+
|
4475
|
+
options.apply_defaults timeout: @config.rpcs.unresolve_pull_request_comments.timeout,
|
4476
|
+
metadata: call_metadata,
|
4477
|
+
retry_policy: @config.rpcs.unresolve_pull_request_comments.retry_policy
|
4478
|
+
|
4479
|
+
options.apply_defaults timeout: @config.timeout,
|
4480
|
+
metadata: @config.metadata,
|
4481
|
+
retry_policy: @config.retry_policy
|
4482
|
+
|
4483
|
+
@secure_source_manager_stub.unresolve_pull_request_comments request, options do |result, operation|
|
4484
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4485
|
+
yield result, operation if block_given?
|
4486
|
+
throw :response, result
|
4487
|
+
end
|
4488
|
+
rescue ::Gapic::Rest::Error => e
|
4489
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4490
|
+
end
|
4491
|
+
|
4492
|
+
##
|
4493
|
+
# Creates an issue comment.
|
4494
|
+
#
|
4495
|
+
# @overload create_issue_comment(request, options = nil)
|
4496
|
+
# Pass arguments to `create_issue_comment` via a request object, either of type
|
4497
|
+
# {::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest} or an equivalent Hash.
|
4498
|
+
#
|
4499
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Hash]
|
4500
|
+
# A request object representing the call parameters. Required. To specify no
|
4501
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4502
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4503
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4504
|
+
#
|
4505
|
+
# @overload create_issue_comment(parent: nil, issue_comment: nil)
|
4506
|
+
# Pass arguments to `create_issue_comment` via keyword arguments. Note that at
|
4507
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4508
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4509
|
+
#
|
4510
|
+
# @param parent [::String]
|
4511
|
+
# Required. The issue in which to create the issue comment. Format:
|
4512
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
|
4513
|
+
# @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash]
|
4514
|
+
# Required. The issue comment to create.
|
4515
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4516
|
+
# @yieldparam result [::Gapic::Operation]
|
4517
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4518
|
+
#
|
4519
|
+
# @return [::Gapic::Operation]
|
4520
|
+
#
|
4521
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4522
|
+
#
|
4523
|
+
# @example Basic example
|
4524
|
+
# require "google/cloud/secure_source_manager/v1"
|
4525
|
+
#
|
4526
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4527
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
4528
|
+
#
|
4529
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4530
|
+
# request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new
|
4531
|
+
#
|
4532
|
+
# # Call the create_issue_comment method.
|
4533
|
+
# result = client.create_issue_comment request
|
4534
|
+
#
|
4535
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
4536
|
+
# # check the status of an operation, cancel it, or wait for results.
|
4537
|
+
# # Here is how to wait for a response.
|
4538
|
+
# result.wait_until_done! timeout: 60
|
4539
|
+
# if result.response?
|
4540
|
+
# p result.response
|
4541
|
+
# else
|
4542
|
+
# puts "No response received."
|
4543
|
+
# end
|
4544
|
+
#
|
4545
|
+
def create_issue_comment request, options = nil
|
4546
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4547
|
+
|
4548
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest
|
4549
|
+
|
4550
|
+
# Converts hash and nil to an options object
|
4551
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4552
|
+
|
4553
|
+
# Customize the options with defaults
|
4554
|
+
call_metadata = @config.rpcs.create_issue_comment.metadata.to_h
|
4555
|
+
|
4556
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4557
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4558
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4559
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
4560
|
+
transports_version_send: [:rest]
|
4561
|
+
|
4562
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4563
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4564
|
+
|
4565
|
+
options.apply_defaults timeout: @config.rpcs.create_issue_comment.timeout,
|
4566
|
+
metadata: call_metadata,
|
4567
|
+
retry_policy: @config.rpcs.create_issue_comment.retry_policy
|
4568
|
+
|
4569
|
+
options.apply_defaults timeout: @config.timeout,
|
4570
|
+
metadata: @config.metadata,
|
4571
|
+
retry_policy: @config.retry_policy
|
4572
|
+
|
4573
|
+
@secure_source_manager_stub.create_issue_comment request, options do |result, operation|
|
4574
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4575
|
+
yield result, operation if block_given?
|
4576
|
+
throw :response, result
|
4577
|
+
end
|
4578
|
+
rescue ::Gapic::Rest::Error => e
|
4579
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4580
|
+
end
|
4581
|
+
|
4582
|
+
##
|
4583
|
+
# Gets an issue comment.
|
4584
|
+
#
|
4585
|
+
# @overload get_issue_comment(request, options = nil)
|
4586
|
+
# Pass arguments to `get_issue_comment` via a request object, either of type
|
4587
|
+
# {::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest} or an equivalent Hash.
|
4588
|
+
#
|
4589
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::Hash]
|
4590
|
+
# A request object representing the call parameters. Required. To specify no
|
4591
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4592
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4593
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4594
|
+
#
|
4595
|
+
# @overload get_issue_comment(name: nil)
|
4596
|
+
# Pass arguments to `get_issue_comment` via keyword arguments. Note that at
|
4597
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4598
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4599
|
+
#
|
4600
|
+
# @param name [::String]
|
4601
|
+
# Required. Name of the issue comment to retrieve.
|
4602
|
+
# The format is
|
4603
|
+
# `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`.
|
4604
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4605
|
+
# @yieldparam result [::Google::Cloud::SecureSourceManager::V1::IssueComment]
|
4606
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4607
|
+
#
|
4608
|
+
# @return [::Google::Cloud::SecureSourceManager::V1::IssueComment]
|
4609
|
+
#
|
4610
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4611
|
+
#
|
4612
|
+
# @example Basic example
|
4613
|
+
# require "google/cloud/secure_source_manager/v1"
|
4614
|
+
#
|
4615
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4616
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
4617
|
+
#
|
4618
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4619
|
+
# request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new
|
4620
|
+
#
|
4621
|
+
# # Call the get_issue_comment method.
|
4622
|
+
# result = client.get_issue_comment request
|
4623
|
+
#
|
4624
|
+
# # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment.
|
4625
|
+
# p result
|
4626
|
+
#
|
4627
|
+
def get_issue_comment request, options = nil
|
4628
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4629
|
+
|
4630
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest
|
4631
|
+
|
4632
|
+
# Converts hash and nil to an options object
|
4633
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4634
|
+
|
4635
|
+
# Customize the options with defaults
|
4636
|
+
call_metadata = @config.rpcs.get_issue_comment.metadata.to_h
|
1506
4637
|
|
1507
4638
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1508
4639
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1513,15 +4644,15 @@ module Google
|
|
1513
4644
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1514
4645
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1515
4646
|
|
1516
|
-
options.apply_defaults timeout: @config.rpcs.
|
4647
|
+
options.apply_defaults timeout: @config.rpcs.get_issue_comment.timeout,
|
1517
4648
|
metadata: call_metadata,
|
1518
|
-
retry_policy: @config.rpcs.
|
4649
|
+
retry_policy: @config.rpcs.get_issue_comment.retry_policy
|
1519
4650
|
|
1520
4651
|
options.apply_defaults timeout: @config.timeout,
|
1521
4652
|
metadata: @config.metadata,
|
1522
4653
|
retry_policy: @config.retry_policy
|
1523
4654
|
|
1524
|
-
@secure_source_manager_stub.
|
4655
|
+
@secure_source_manager_stub.get_issue_comment request, options do |result, operation|
|
1525
4656
|
yield result, operation if block_given?
|
1526
4657
|
end
|
1527
4658
|
rescue ::Gapic::Rest::Error => e
|
@@ -1529,30 +4660,118 @@ module Google
|
|
1529
4660
|
end
|
1530
4661
|
|
1531
4662
|
##
|
1532
|
-
#
|
4663
|
+
# Lists comments in an issue.
|
1533
4664
|
#
|
1534
|
-
# @overload
|
1535
|
-
# Pass arguments to `
|
1536
|
-
# {::Google::Cloud::SecureSourceManager::V1::
|
4665
|
+
# @overload list_issue_comments(request, options = nil)
|
4666
|
+
# Pass arguments to `list_issue_comments` via a request object, either of type
|
4667
|
+
# {::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest} or an equivalent Hash.
|
1537
4668
|
#
|
1538
|
-
# @param request [::Google::Cloud::SecureSourceManager::V1::
|
4669
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::Hash]
|
1539
4670
|
# A request object representing the call parameters. Required. To specify no
|
1540
4671
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1541
4672
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1542
4673
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1543
4674
|
#
|
1544
|
-
# @overload
|
1545
|
-
# Pass arguments to `
|
4675
|
+
# @overload list_issue_comments(parent: nil, page_size: nil, page_token: nil)
|
4676
|
+
# Pass arguments to `list_issue_comments` via keyword arguments. Note that at
|
1546
4677
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1547
4678
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1548
4679
|
#
|
1549
|
-
# @param
|
1550
|
-
#
|
1551
|
-
#
|
1552
|
-
#
|
4680
|
+
# @param parent [::String]
|
4681
|
+
# Required. The issue in which to list the comments. Format:
|
4682
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
|
4683
|
+
# @param page_size [::Integer]
|
4684
|
+
# Optional. Requested page size. Server may return fewer items than
|
4685
|
+
# requested. If unspecified, server will pick an appropriate default.
|
4686
|
+
# @param page_token [::String]
|
4687
|
+
# Optional. A token identifying a page of results the server should return.
|
4688
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
4689
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>]
|
4690
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
4691
|
+
#
|
4692
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>]
|
4693
|
+
#
|
4694
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
4695
|
+
#
|
4696
|
+
# @example Basic example
|
4697
|
+
# require "google/cloud/secure_source_manager/v1"
|
4698
|
+
#
|
4699
|
+
# # Create a client object. The client can be reused for multiple calls.
|
4700
|
+
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
4701
|
+
#
|
4702
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
4703
|
+
# request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new
|
4704
|
+
#
|
4705
|
+
# # Call the list_issue_comments method.
|
4706
|
+
# result = client.list_issue_comments request
|
4707
|
+
#
|
4708
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
4709
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
4710
|
+
# result.each do |item|
|
4711
|
+
# # Each element is of type ::Google::Cloud::SecureSourceManager::V1::IssueComment.
|
4712
|
+
# p item
|
4713
|
+
# end
|
4714
|
+
#
|
4715
|
+
def list_issue_comments request, options = nil
|
4716
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
4717
|
+
|
4718
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest
|
4719
|
+
|
4720
|
+
# Converts hash and nil to an options object
|
4721
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
4722
|
+
|
4723
|
+
# Customize the options with defaults
|
4724
|
+
call_metadata = @config.rpcs.list_issue_comments.metadata.to_h
|
4725
|
+
|
4726
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4727
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4728
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4729
|
+
gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
|
4730
|
+
transports_version_send: [:rest]
|
4731
|
+
|
4732
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4733
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4734
|
+
|
4735
|
+
options.apply_defaults timeout: @config.rpcs.list_issue_comments.timeout,
|
4736
|
+
metadata: call_metadata,
|
4737
|
+
retry_policy: @config.rpcs.list_issue_comments.retry_policy
|
4738
|
+
|
4739
|
+
options.apply_defaults timeout: @config.timeout,
|
4740
|
+
metadata: @config.metadata,
|
4741
|
+
retry_policy: @config.retry_policy
|
4742
|
+
|
4743
|
+
@secure_source_manager_stub.list_issue_comments request, options do |result, operation|
|
4744
|
+
result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, "issue_comments", request, result, options
|
4745
|
+
yield result, operation if block_given?
|
4746
|
+
throw :response, result
|
4747
|
+
end
|
4748
|
+
rescue ::Gapic::Rest::Error => e
|
4749
|
+
raise ::Google::Cloud::Error.from_error(e)
|
4750
|
+
end
|
4751
|
+
|
4752
|
+
##
|
4753
|
+
# Updates an issue comment.
|
4754
|
+
#
|
4755
|
+
# @overload update_issue_comment(request, options = nil)
|
4756
|
+
# Pass arguments to `update_issue_comment` via a request object, either of type
|
4757
|
+
# {::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest} or an equivalent Hash.
|
4758
|
+
#
|
4759
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::Hash]
|
4760
|
+
# A request object representing the call parameters. Required. To specify no
|
4761
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
4762
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
4763
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
4764
|
+
#
|
4765
|
+
# @overload update_issue_comment(issue_comment: nil, update_mask: nil)
|
4766
|
+
# Pass arguments to `update_issue_comment` via keyword arguments. Note that at
|
4767
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
4768
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
4769
|
+
#
|
4770
|
+
# @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash]
|
4771
|
+
# Required. The issue comment to update.
|
1553
4772
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1554
|
-
#
|
1555
|
-
#
|
4773
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
4774
|
+
# issue comment resource by the update.
|
1556
4775
|
# The fields specified in the update_mask are relative to the resource, not
|
1557
4776
|
# the full request. A field will be overwritten if it is in the mask.
|
1558
4777
|
# The special value "*" means full replacement.
|
@@ -1571,10 +4790,10 @@ module Google
|
|
1571
4790
|
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1572
4791
|
#
|
1573
4792
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1574
|
-
# request = Google::Cloud::SecureSourceManager::V1::
|
4793
|
+
# request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new
|
1575
4794
|
#
|
1576
|
-
# # Call the
|
1577
|
-
# result = client.
|
4795
|
+
# # Call the update_issue_comment method.
|
4796
|
+
# result = client.update_issue_comment request
|
1578
4797
|
#
|
1579
4798
|
# # The returned object is of type Gapic::Operation. You can use it to
|
1580
4799
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -1586,16 +4805,16 @@ module Google
|
|
1586
4805
|
# puts "No response received."
|
1587
4806
|
# end
|
1588
4807
|
#
|
1589
|
-
def
|
4808
|
+
def update_issue_comment request, options = nil
|
1590
4809
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1591
4810
|
|
1592
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::
|
4811
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest
|
1593
4812
|
|
1594
4813
|
# Converts hash and nil to an options object
|
1595
4814
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1596
4815
|
|
1597
4816
|
# Customize the options with defaults
|
1598
|
-
call_metadata = @config.rpcs.
|
4817
|
+
call_metadata = @config.rpcs.update_issue_comment.metadata.to_h
|
1599
4818
|
|
1600
4819
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1601
4820
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1606,15 +4825,15 @@ module Google
|
|
1606
4825
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1607
4826
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1608
4827
|
|
1609
|
-
options.apply_defaults timeout: @config.rpcs.
|
4828
|
+
options.apply_defaults timeout: @config.rpcs.update_issue_comment.timeout,
|
1610
4829
|
metadata: call_metadata,
|
1611
|
-
retry_policy: @config.rpcs.
|
4830
|
+
retry_policy: @config.rpcs.update_issue_comment.retry_policy
|
1612
4831
|
|
1613
4832
|
options.apply_defaults timeout: @config.timeout,
|
1614
4833
|
metadata: @config.metadata,
|
1615
4834
|
retry_policy: @config.retry_policy
|
1616
4835
|
|
1617
|
-
@secure_source_manager_stub.
|
4836
|
+
@secure_source_manager_stub.update_issue_comment request, options do |result, operation|
|
1618
4837
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1619
4838
|
yield result, operation if block_given?
|
1620
4839
|
throw :response, result
|
@@ -1624,27 +4843,27 @@ module Google
|
|
1624
4843
|
end
|
1625
4844
|
|
1626
4845
|
##
|
1627
|
-
#
|
4846
|
+
# Deletes an issue comment.
|
1628
4847
|
#
|
1629
|
-
# @overload
|
1630
|
-
# Pass arguments to `
|
1631
|
-
# {::Google::Cloud::SecureSourceManager::V1::
|
4848
|
+
# @overload delete_issue_comment(request, options = nil)
|
4849
|
+
# Pass arguments to `delete_issue_comment` via a request object, either of type
|
4850
|
+
# {::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest} or an equivalent Hash.
|
1632
4851
|
#
|
1633
|
-
# @param request [::Google::Cloud::SecureSourceManager::V1::
|
4852
|
+
# @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::Hash]
|
1634
4853
|
# A request object representing the call parameters. Required. To specify no
|
1635
4854
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1636
4855
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1637
4856
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1638
4857
|
#
|
1639
|
-
# @overload
|
1640
|
-
# Pass arguments to `
|
4858
|
+
# @overload delete_issue_comment(name: nil)
|
4859
|
+
# Pass arguments to `delete_issue_comment` via keyword arguments. Note that at
|
1641
4860
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1642
4861
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1643
4862
|
#
|
1644
4863
|
# @param name [::String]
|
1645
|
-
#
|
1646
|
-
#
|
1647
|
-
#
|
4864
|
+
# Required. Name of the issue comment to delete.
|
4865
|
+
# The format is
|
4866
|
+
# `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`.
|
1648
4867
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1649
4868
|
# @yieldparam result [::Gapic::Operation]
|
1650
4869
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1660,10 +4879,10 @@ module Google
|
|
1660
4879
|
# client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
|
1661
4880
|
#
|
1662
4881
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1663
|
-
# request = Google::Cloud::SecureSourceManager::V1::
|
4882
|
+
# request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new
|
1664
4883
|
#
|
1665
|
-
# # Call the
|
1666
|
-
# result = client.
|
4884
|
+
# # Call the delete_issue_comment method.
|
4885
|
+
# result = client.delete_issue_comment request
|
1667
4886
|
#
|
1668
4887
|
# # The returned object is of type Gapic::Operation. You can use it to
|
1669
4888
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -1675,16 +4894,16 @@ module Google
|
|
1675
4894
|
# puts "No response received."
|
1676
4895
|
# end
|
1677
4896
|
#
|
1678
|
-
def
|
4897
|
+
def delete_issue_comment request, options = nil
|
1679
4898
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1680
4899
|
|
1681
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::
|
4900
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest
|
1682
4901
|
|
1683
4902
|
# Converts hash and nil to an options object
|
1684
4903
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1685
4904
|
|
1686
4905
|
# Customize the options with defaults
|
1687
|
-
call_metadata = @config.rpcs.
|
4906
|
+
call_metadata = @config.rpcs.delete_issue_comment.metadata.to_h
|
1688
4907
|
|
1689
4908
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1690
4909
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1695,15 +4914,15 @@ module Google
|
|
1695
4914
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1696
4915
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1697
4916
|
|
1698
|
-
options.apply_defaults timeout: @config.rpcs.
|
4917
|
+
options.apply_defaults timeout: @config.rpcs.delete_issue_comment.timeout,
|
1699
4918
|
metadata: call_metadata,
|
1700
|
-
retry_policy: @config.rpcs.
|
4919
|
+
retry_policy: @config.rpcs.delete_issue_comment.retry_policy
|
1701
4920
|
|
1702
4921
|
options.apply_defaults timeout: @config.timeout,
|
1703
4922
|
metadata: @config.metadata,
|
1704
4923
|
retry_policy: @config.retry_policy
|
1705
4924
|
|
1706
|
-
@secure_source_manager_stub.
|
4925
|
+
@secure_source_manager_stub.delete_issue_comment request, options do |result, operation|
|
1707
4926
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1708
4927
|
yield result, operation if block_given?
|
1709
4928
|
throw :response, result
|
@@ -1901,11 +5120,41 @@ module Google
|
|
1901
5120
|
#
|
1902
5121
|
attr_reader :create_repository
|
1903
5122
|
##
|
5123
|
+
# RPC-specific configuration for `update_repository`
|
5124
|
+
# @return [::Gapic::Config::Method]
|
5125
|
+
#
|
5126
|
+
attr_reader :update_repository
|
5127
|
+
##
|
1904
5128
|
# RPC-specific configuration for `delete_repository`
|
1905
5129
|
# @return [::Gapic::Config::Method]
|
1906
5130
|
#
|
1907
5131
|
attr_reader :delete_repository
|
1908
5132
|
##
|
5133
|
+
# RPC-specific configuration for `list_hooks`
|
5134
|
+
# @return [::Gapic::Config::Method]
|
5135
|
+
#
|
5136
|
+
attr_reader :list_hooks
|
5137
|
+
##
|
5138
|
+
# RPC-specific configuration for `get_hook`
|
5139
|
+
# @return [::Gapic::Config::Method]
|
5140
|
+
#
|
5141
|
+
attr_reader :get_hook
|
5142
|
+
##
|
5143
|
+
# RPC-specific configuration for `create_hook`
|
5144
|
+
# @return [::Gapic::Config::Method]
|
5145
|
+
#
|
5146
|
+
attr_reader :create_hook
|
5147
|
+
##
|
5148
|
+
# RPC-specific configuration for `update_hook`
|
5149
|
+
# @return [::Gapic::Config::Method]
|
5150
|
+
#
|
5151
|
+
attr_reader :update_hook
|
5152
|
+
##
|
5153
|
+
# RPC-specific configuration for `delete_hook`
|
5154
|
+
# @return [::Gapic::Config::Method]
|
5155
|
+
#
|
5156
|
+
attr_reader :delete_hook
|
5157
|
+
##
|
1909
5158
|
# RPC-specific configuration for `get_iam_policy_repo`
|
1910
5159
|
# @return [::Gapic::Config::Method]
|
1911
5160
|
#
|
@@ -1945,6 +5194,156 @@ module Google
|
|
1945
5194
|
# @return [::Gapic::Config::Method]
|
1946
5195
|
#
|
1947
5196
|
attr_reader :delete_branch_rule
|
5197
|
+
##
|
5198
|
+
# RPC-specific configuration for `create_pull_request`
|
5199
|
+
# @return [::Gapic::Config::Method]
|
5200
|
+
#
|
5201
|
+
attr_reader :create_pull_request
|
5202
|
+
##
|
5203
|
+
# RPC-specific configuration for `get_pull_request`
|
5204
|
+
# @return [::Gapic::Config::Method]
|
5205
|
+
#
|
5206
|
+
attr_reader :get_pull_request
|
5207
|
+
##
|
5208
|
+
# RPC-specific configuration for `list_pull_requests`
|
5209
|
+
# @return [::Gapic::Config::Method]
|
5210
|
+
#
|
5211
|
+
attr_reader :list_pull_requests
|
5212
|
+
##
|
5213
|
+
# RPC-specific configuration for `update_pull_request`
|
5214
|
+
# @return [::Gapic::Config::Method]
|
5215
|
+
#
|
5216
|
+
attr_reader :update_pull_request
|
5217
|
+
##
|
5218
|
+
# RPC-specific configuration for `merge_pull_request`
|
5219
|
+
# @return [::Gapic::Config::Method]
|
5220
|
+
#
|
5221
|
+
attr_reader :merge_pull_request
|
5222
|
+
##
|
5223
|
+
# RPC-specific configuration for `open_pull_request`
|
5224
|
+
# @return [::Gapic::Config::Method]
|
5225
|
+
#
|
5226
|
+
attr_reader :open_pull_request
|
5227
|
+
##
|
5228
|
+
# RPC-specific configuration for `close_pull_request`
|
5229
|
+
# @return [::Gapic::Config::Method]
|
5230
|
+
#
|
5231
|
+
attr_reader :close_pull_request
|
5232
|
+
##
|
5233
|
+
# RPC-specific configuration for `list_pull_request_file_diffs`
|
5234
|
+
# @return [::Gapic::Config::Method]
|
5235
|
+
#
|
5236
|
+
attr_reader :list_pull_request_file_diffs
|
5237
|
+
##
|
5238
|
+
# RPC-specific configuration for `fetch_tree`
|
5239
|
+
# @return [::Gapic::Config::Method]
|
5240
|
+
#
|
5241
|
+
attr_reader :fetch_tree
|
5242
|
+
##
|
5243
|
+
# RPC-specific configuration for `fetch_blob`
|
5244
|
+
# @return [::Gapic::Config::Method]
|
5245
|
+
#
|
5246
|
+
attr_reader :fetch_blob
|
5247
|
+
##
|
5248
|
+
# RPC-specific configuration for `create_issue`
|
5249
|
+
# @return [::Gapic::Config::Method]
|
5250
|
+
#
|
5251
|
+
attr_reader :create_issue
|
5252
|
+
##
|
5253
|
+
# RPC-specific configuration for `get_issue`
|
5254
|
+
# @return [::Gapic::Config::Method]
|
5255
|
+
#
|
5256
|
+
attr_reader :get_issue
|
5257
|
+
##
|
5258
|
+
# RPC-specific configuration for `list_issues`
|
5259
|
+
# @return [::Gapic::Config::Method]
|
5260
|
+
#
|
5261
|
+
attr_reader :list_issues
|
5262
|
+
##
|
5263
|
+
# RPC-specific configuration for `update_issue`
|
5264
|
+
# @return [::Gapic::Config::Method]
|
5265
|
+
#
|
5266
|
+
attr_reader :update_issue
|
5267
|
+
##
|
5268
|
+
# RPC-specific configuration for `delete_issue`
|
5269
|
+
# @return [::Gapic::Config::Method]
|
5270
|
+
#
|
5271
|
+
attr_reader :delete_issue
|
5272
|
+
##
|
5273
|
+
# RPC-specific configuration for `open_issue`
|
5274
|
+
# @return [::Gapic::Config::Method]
|
5275
|
+
#
|
5276
|
+
attr_reader :open_issue
|
5277
|
+
##
|
5278
|
+
# RPC-specific configuration for `close_issue`
|
5279
|
+
# @return [::Gapic::Config::Method]
|
5280
|
+
#
|
5281
|
+
attr_reader :close_issue
|
5282
|
+
##
|
5283
|
+
# RPC-specific configuration for `get_pull_request_comment`
|
5284
|
+
# @return [::Gapic::Config::Method]
|
5285
|
+
#
|
5286
|
+
attr_reader :get_pull_request_comment
|
5287
|
+
##
|
5288
|
+
# RPC-specific configuration for `list_pull_request_comments`
|
5289
|
+
# @return [::Gapic::Config::Method]
|
5290
|
+
#
|
5291
|
+
attr_reader :list_pull_request_comments
|
5292
|
+
##
|
5293
|
+
# RPC-specific configuration for `create_pull_request_comment`
|
5294
|
+
# @return [::Gapic::Config::Method]
|
5295
|
+
#
|
5296
|
+
attr_reader :create_pull_request_comment
|
5297
|
+
##
|
5298
|
+
# RPC-specific configuration for `update_pull_request_comment`
|
5299
|
+
# @return [::Gapic::Config::Method]
|
5300
|
+
#
|
5301
|
+
attr_reader :update_pull_request_comment
|
5302
|
+
##
|
5303
|
+
# RPC-specific configuration for `delete_pull_request_comment`
|
5304
|
+
# @return [::Gapic::Config::Method]
|
5305
|
+
#
|
5306
|
+
attr_reader :delete_pull_request_comment
|
5307
|
+
##
|
5308
|
+
# RPC-specific configuration for `batch_create_pull_request_comments`
|
5309
|
+
# @return [::Gapic::Config::Method]
|
5310
|
+
#
|
5311
|
+
attr_reader :batch_create_pull_request_comments
|
5312
|
+
##
|
5313
|
+
# RPC-specific configuration for `resolve_pull_request_comments`
|
5314
|
+
# @return [::Gapic::Config::Method]
|
5315
|
+
#
|
5316
|
+
attr_reader :resolve_pull_request_comments
|
5317
|
+
##
|
5318
|
+
# RPC-specific configuration for `unresolve_pull_request_comments`
|
5319
|
+
# @return [::Gapic::Config::Method]
|
5320
|
+
#
|
5321
|
+
attr_reader :unresolve_pull_request_comments
|
5322
|
+
##
|
5323
|
+
# RPC-specific configuration for `create_issue_comment`
|
5324
|
+
# @return [::Gapic::Config::Method]
|
5325
|
+
#
|
5326
|
+
attr_reader :create_issue_comment
|
5327
|
+
##
|
5328
|
+
# RPC-specific configuration for `get_issue_comment`
|
5329
|
+
# @return [::Gapic::Config::Method]
|
5330
|
+
#
|
5331
|
+
attr_reader :get_issue_comment
|
5332
|
+
##
|
5333
|
+
# RPC-specific configuration for `list_issue_comments`
|
5334
|
+
# @return [::Gapic::Config::Method]
|
5335
|
+
#
|
5336
|
+
attr_reader :list_issue_comments
|
5337
|
+
##
|
5338
|
+
# RPC-specific configuration for `update_issue_comment`
|
5339
|
+
# @return [::Gapic::Config::Method]
|
5340
|
+
#
|
5341
|
+
attr_reader :update_issue_comment
|
5342
|
+
##
|
5343
|
+
# RPC-specific configuration for `delete_issue_comment`
|
5344
|
+
# @return [::Gapic::Config::Method]
|
5345
|
+
#
|
5346
|
+
attr_reader :delete_issue_comment
|
1948
5347
|
|
1949
5348
|
# @private
|
1950
5349
|
def initialize parent_rpcs = nil
|
@@ -1962,8 +5361,20 @@ module Google
|
|
1962
5361
|
@get_repository = ::Gapic::Config::Method.new get_repository_config
|
1963
5362
|
create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository
|
1964
5363
|
@create_repository = ::Gapic::Config::Method.new create_repository_config
|
5364
|
+
update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository
|
5365
|
+
@update_repository = ::Gapic::Config::Method.new update_repository_config
|
1965
5366
|
delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository
|
1966
5367
|
@delete_repository = ::Gapic::Config::Method.new delete_repository_config
|
5368
|
+
list_hooks_config = parent_rpcs.list_hooks if parent_rpcs.respond_to? :list_hooks
|
5369
|
+
@list_hooks = ::Gapic::Config::Method.new list_hooks_config
|
5370
|
+
get_hook_config = parent_rpcs.get_hook if parent_rpcs.respond_to? :get_hook
|
5371
|
+
@get_hook = ::Gapic::Config::Method.new get_hook_config
|
5372
|
+
create_hook_config = parent_rpcs.create_hook if parent_rpcs.respond_to? :create_hook
|
5373
|
+
@create_hook = ::Gapic::Config::Method.new create_hook_config
|
5374
|
+
update_hook_config = parent_rpcs.update_hook if parent_rpcs.respond_to? :update_hook
|
5375
|
+
@update_hook = ::Gapic::Config::Method.new update_hook_config
|
5376
|
+
delete_hook_config = parent_rpcs.delete_hook if parent_rpcs.respond_to? :delete_hook
|
5377
|
+
@delete_hook = ::Gapic::Config::Method.new delete_hook_config
|
1967
5378
|
get_iam_policy_repo_config = parent_rpcs.get_iam_policy_repo if parent_rpcs.respond_to? :get_iam_policy_repo
|
1968
5379
|
@get_iam_policy_repo = ::Gapic::Config::Method.new get_iam_policy_repo_config
|
1969
5380
|
set_iam_policy_repo_config = parent_rpcs.set_iam_policy_repo if parent_rpcs.respond_to? :set_iam_policy_repo
|
@@ -1980,6 +5391,66 @@ module Google
|
|
1980
5391
|
@update_branch_rule = ::Gapic::Config::Method.new update_branch_rule_config
|
1981
5392
|
delete_branch_rule_config = parent_rpcs.delete_branch_rule if parent_rpcs.respond_to? :delete_branch_rule
|
1982
5393
|
@delete_branch_rule = ::Gapic::Config::Method.new delete_branch_rule_config
|
5394
|
+
create_pull_request_config = parent_rpcs.create_pull_request if parent_rpcs.respond_to? :create_pull_request
|
5395
|
+
@create_pull_request = ::Gapic::Config::Method.new create_pull_request_config
|
5396
|
+
get_pull_request_config = parent_rpcs.get_pull_request if parent_rpcs.respond_to? :get_pull_request
|
5397
|
+
@get_pull_request = ::Gapic::Config::Method.new get_pull_request_config
|
5398
|
+
list_pull_requests_config = parent_rpcs.list_pull_requests if parent_rpcs.respond_to? :list_pull_requests
|
5399
|
+
@list_pull_requests = ::Gapic::Config::Method.new list_pull_requests_config
|
5400
|
+
update_pull_request_config = parent_rpcs.update_pull_request if parent_rpcs.respond_to? :update_pull_request
|
5401
|
+
@update_pull_request = ::Gapic::Config::Method.new update_pull_request_config
|
5402
|
+
merge_pull_request_config = parent_rpcs.merge_pull_request if parent_rpcs.respond_to? :merge_pull_request
|
5403
|
+
@merge_pull_request = ::Gapic::Config::Method.new merge_pull_request_config
|
5404
|
+
open_pull_request_config = parent_rpcs.open_pull_request if parent_rpcs.respond_to? :open_pull_request
|
5405
|
+
@open_pull_request = ::Gapic::Config::Method.new open_pull_request_config
|
5406
|
+
close_pull_request_config = parent_rpcs.close_pull_request if parent_rpcs.respond_to? :close_pull_request
|
5407
|
+
@close_pull_request = ::Gapic::Config::Method.new close_pull_request_config
|
5408
|
+
list_pull_request_file_diffs_config = parent_rpcs.list_pull_request_file_diffs if parent_rpcs.respond_to? :list_pull_request_file_diffs
|
5409
|
+
@list_pull_request_file_diffs = ::Gapic::Config::Method.new list_pull_request_file_diffs_config
|
5410
|
+
fetch_tree_config = parent_rpcs.fetch_tree if parent_rpcs.respond_to? :fetch_tree
|
5411
|
+
@fetch_tree = ::Gapic::Config::Method.new fetch_tree_config
|
5412
|
+
fetch_blob_config = parent_rpcs.fetch_blob if parent_rpcs.respond_to? :fetch_blob
|
5413
|
+
@fetch_blob = ::Gapic::Config::Method.new fetch_blob_config
|
5414
|
+
create_issue_config = parent_rpcs.create_issue if parent_rpcs.respond_to? :create_issue
|
5415
|
+
@create_issue = ::Gapic::Config::Method.new create_issue_config
|
5416
|
+
get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue
|
5417
|
+
@get_issue = ::Gapic::Config::Method.new get_issue_config
|
5418
|
+
list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues
|
5419
|
+
@list_issues = ::Gapic::Config::Method.new list_issues_config
|
5420
|
+
update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue
|
5421
|
+
@update_issue = ::Gapic::Config::Method.new update_issue_config
|
5422
|
+
delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue
|
5423
|
+
@delete_issue = ::Gapic::Config::Method.new delete_issue_config
|
5424
|
+
open_issue_config = parent_rpcs.open_issue if parent_rpcs.respond_to? :open_issue
|
5425
|
+
@open_issue = ::Gapic::Config::Method.new open_issue_config
|
5426
|
+
close_issue_config = parent_rpcs.close_issue if parent_rpcs.respond_to? :close_issue
|
5427
|
+
@close_issue = ::Gapic::Config::Method.new close_issue_config
|
5428
|
+
get_pull_request_comment_config = parent_rpcs.get_pull_request_comment if parent_rpcs.respond_to? :get_pull_request_comment
|
5429
|
+
@get_pull_request_comment = ::Gapic::Config::Method.new get_pull_request_comment_config
|
5430
|
+
list_pull_request_comments_config = parent_rpcs.list_pull_request_comments if parent_rpcs.respond_to? :list_pull_request_comments
|
5431
|
+
@list_pull_request_comments = ::Gapic::Config::Method.new list_pull_request_comments_config
|
5432
|
+
create_pull_request_comment_config = parent_rpcs.create_pull_request_comment if parent_rpcs.respond_to? :create_pull_request_comment
|
5433
|
+
@create_pull_request_comment = ::Gapic::Config::Method.new create_pull_request_comment_config
|
5434
|
+
update_pull_request_comment_config = parent_rpcs.update_pull_request_comment if parent_rpcs.respond_to? :update_pull_request_comment
|
5435
|
+
@update_pull_request_comment = ::Gapic::Config::Method.new update_pull_request_comment_config
|
5436
|
+
delete_pull_request_comment_config = parent_rpcs.delete_pull_request_comment if parent_rpcs.respond_to? :delete_pull_request_comment
|
5437
|
+
@delete_pull_request_comment = ::Gapic::Config::Method.new delete_pull_request_comment_config
|
5438
|
+
batch_create_pull_request_comments_config = parent_rpcs.batch_create_pull_request_comments if parent_rpcs.respond_to? :batch_create_pull_request_comments
|
5439
|
+
@batch_create_pull_request_comments = ::Gapic::Config::Method.new batch_create_pull_request_comments_config
|
5440
|
+
resolve_pull_request_comments_config = parent_rpcs.resolve_pull_request_comments if parent_rpcs.respond_to? :resolve_pull_request_comments
|
5441
|
+
@resolve_pull_request_comments = ::Gapic::Config::Method.new resolve_pull_request_comments_config
|
5442
|
+
unresolve_pull_request_comments_config = parent_rpcs.unresolve_pull_request_comments if parent_rpcs.respond_to? :unresolve_pull_request_comments
|
5443
|
+
@unresolve_pull_request_comments = ::Gapic::Config::Method.new unresolve_pull_request_comments_config
|
5444
|
+
create_issue_comment_config = parent_rpcs.create_issue_comment if parent_rpcs.respond_to? :create_issue_comment
|
5445
|
+
@create_issue_comment = ::Gapic::Config::Method.new create_issue_comment_config
|
5446
|
+
get_issue_comment_config = parent_rpcs.get_issue_comment if parent_rpcs.respond_to? :get_issue_comment
|
5447
|
+
@get_issue_comment = ::Gapic::Config::Method.new get_issue_comment_config
|
5448
|
+
list_issue_comments_config = parent_rpcs.list_issue_comments if parent_rpcs.respond_to? :list_issue_comments
|
5449
|
+
@list_issue_comments = ::Gapic::Config::Method.new list_issue_comments_config
|
5450
|
+
update_issue_comment_config = parent_rpcs.update_issue_comment if parent_rpcs.respond_to? :update_issue_comment
|
5451
|
+
@update_issue_comment = ::Gapic::Config::Method.new update_issue_comment_config
|
5452
|
+
delete_issue_comment_config = parent_rpcs.delete_issue_comment if parent_rpcs.respond_to? :delete_issue_comment
|
5453
|
+
@delete_issue_comment = ::Gapic::Config::Method.new delete_issue_comment_config
|
1983
5454
|
|
1984
5455
|
yield self if block_given?
|
1985
5456
|
end
|