google-cloud-secure_source_manager-v1 2.1.0 → 2.2.1

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.
@@ -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
- # **Host: Data Plane**
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
- # securesourcemanager.googleapis.com (Control Plane API), this field is
683
- # required. When listing repositories via *.sourcemanager.dev (Data Plane
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
- # **Host: Data Plane**
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
- # Deletes a Repository.
929
- #
930
- # **Host: Data Plane**
910
+ # Updates the metadata of a repository.
931
911
  #
932
- # @overload delete_repository(request, options = nil)
933
- # Pass arguments to `delete_repository` via a request object, either of type
934
- # {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash.
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::DeleteRepositoryRequest, ::Hash]
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 delete_repository(name: nil, allow_missing: nil)
943
- # Pass arguments to `delete_repository` via keyword arguments. Note that at
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 name [::String]
948
- # Required. Name of the repository to delete.
949
- # The format is
950
- # projects/\\{project_number}/locations/\\{location_id}/repositories/\\{repository_id}.
951
- # @param allow_missing [::Boolean]
952
- # Optional. If set to true, and the repository is not found, the request will
953
- # succeed but no action will be taken on the server.
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::DeleteRepositoryRequest.new
953
+ # request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new
970
954
  #
971
- # # Call the delete_repository method.
972
- # result = client.delete_repository request
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 delete_repository request, options = nil
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::DeleteRepositoryRequest
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.delete_repository.metadata.to_h
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.delete_repository.timeout,
988
+ options.apply_defaults timeout: @config.rpcs.update_repository.timeout,
1005
989
  metadata: call_metadata,
1006
- retry_policy: @config.rpcs.delete_repository.retry_policy
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.delete_repository request, options do |result, operation|
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
- # Get IAM policy for a repository.
1006
+ # Deletes a Repository.
1023
1007
  #
1024
- # @overload get_iam_policy_repo(request, options = nil)
1025
- # Pass arguments to `get_iam_policy_repo` via a request object, either of type
1026
- # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
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::Iam::V1::GetIamPolicyRequest, ::Hash]
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 get_iam_policy_repo(resource: nil, options: nil)
1035
- # Pass arguments to `get_iam_policy_repo` via keyword arguments. Note that at
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 resource [::String]
1040
- # REQUIRED: The resource for which the policy is being requested.
1041
- # See the operation documentation for the appropriate value for this field.
1042
- # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
1043
- # OPTIONAL: A `GetPolicyOptions` object for specifying options to
1044
- # `GetIamPolicy`.
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 [::Google::Iam::V1::Policy]
1031
+ # @yieldparam result [::Gapic::Operation]
1047
1032
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1048
1033
  #
1049
- # @return [::Google::Iam::V1::Policy]
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::Iam::V1::GetIamPolicyRequest.new
1045
+ # request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new
1061
1046
  #
1062
- # # Call the get_iam_policy_repo method.
1063
- # result = client.get_iam_policy_repo request
1047
+ # # Call the delete_repository method.
1048
+ # result = client.delete_repository request
1064
1049
  #
1065
- # # The returned object is of type Google::Iam::V1::Policy.
1066
- # p result
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 get_iam_policy_repo request, options = nil
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::Iam::V1::GetIamPolicyRequest
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.get_iam_policy_repo.metadata.to_h
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.get_iam_policy_repo.timeout,
1080
+ options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
1089
1081
  metadata: call_metadata,
1090
- retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy
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.get_iam_policy_repo request, options do |result, operation|
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
- # Set IAM policy on a repository.
1098
+ # Lists hooks in a given repository.
1105
1099
  #
1106
- # @overload set_iam_policy_repo(request, options = nil)
1107
- # Pass arguments to `set_iam_policy_repo` via a request object, either of type
1108
- # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
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::Iam::V1::SetIamPolicyRequest, ::Hash]
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 set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil)
1117
- # Pass arguments to `set_iam_policy_repo` via keyword arguments. Note that at
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 resource [::String]
1122
- # REQUIRED: The resource for which the policy is being specified.
1123
- # See the operation documentation for the appropriate value for this field.
1124
- # @param policy [::Google::Iam::V1::Policy, ::Hash]
1125
- # REQUIRED: The complete policy to be applied to the `resource`. The size of
1126
- # the policy is limited to a few 10s of KB. An empty policy is a
1127
- # valid policy but certain Cloud Platform services (such as Projects)
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::Iam::V1::Policy]
1123
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>]
1137
1124
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1138
1125
  #
1139
- # @return [::Google::Iam::V1::Policy]
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::Iam::V1::SetIamPolicyRequest.new
1137
+ # request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new
1151
1138
  #
1152
- # # Call the set_iam_policy_repo method.
1153
- # result = client.set_iam_policy_repo request
1139
+ # # Call the list_hooks method.
1140
+ # result = client.list_hooks request
1154
1141
  #
1155
- # # The returned object is of type Google::Iam::V1::Policy.
1156
- # p result
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 set_iam_policy_repo request, options = nil
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::Iam::V1::SetIamPolicyRequest
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.set_iam_policy_repo.metadata.to_h
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.set_iam_policy_repo.timeout,
1169
+ options.apply_defaults timeout: @config.rpcs.list_hooks.timeout,
1179
1170
  metadata: call_metadata,
1180
- retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy
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.set_iam_policy_repo request, options do |result, operation|
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
- # Test IAM permissions on a repository.
1195
- # IAM permission checks are not required on this method.
1187
+ # Gets metadata of a hook.
1196
1188
  #
1197
- # @overload test_iam_permissions_repo(request, options = nil)
1198
- # Pass arguments to `test_iam_permissions_repo` via a request object, either of type
1199
- # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
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::Iam::V1::TestIamPermissionsRequest, ::Hash]
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 test_iam_permissions_repo(resource: nil, permissions: nil)
1208
- # Pass arguments to `test_iam_permissions_repo` via keyword arguments. Note that at
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 resource [::String]
1213
- # REQUIRED: The resource for which the policy detail is being requested.
1214
- # See the operation documentation for the appropriate value for this field.
1215
- # @param permissions [::Array<::String>]
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::Iam::V1::TestIamPermissionsResponse]
1209
+ # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Hook]
1222
1210
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1223
1211
  #
1224
- # @return [::Google::Iam::V1::TestIamPermissionsResponse]
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::Iam::V1::TestIamPermissionsRequest.new
1223
+ # request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new
1236
1224
  #
1237
- # # Call the test_iam_permissions_repo method.
1238
- # result = client.test_iam_permissions_repo request
1225
+ # # Call the get_hook method.
1226
+ # result = client.get_hook request
1239
1227
  #
1240
- # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
1228
+ # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook.
1241
1229
  # p result
1242
1230
  #
1243
- def test_iam_permissions_repo request, options = nil
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::Iam::V1::TestIamPermissionsRequest
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.test_iam_permissions_repo.metadata.to_h
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.test_iam_permissions_repo.timeout,
1251
+ options.apply_defaults timeout: @config.rpcs.get_hook.timeout,
1264
1252
  metadata: call_metadata,
1265
- retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy
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.test_iam_permissions_repo request, options do |result, operation|
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
- # CreateBranchRule creates a branch rule in a given repository.
1267
+ # Creates a new hook in a given repository.
1280
1268
  #
1281
- # @overload create_branch_rule(request, options = nil)
1282
- # Pass arguments to `create_branch_rule` via a request object, either of type
1283
- # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash.
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::CreateBranchRuleRequest, ::Hash]
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 create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil)
1292
- # Pass arguments to `create_branch_rule` via keyword arguments. Note that at
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
- # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash]
1298
- # @param branch_rule_id [::String]
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::CreateBranchRuleRequest.new
1310
+ # request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new
1315
1311
  #
1316
- # # Call the create_branch_rule method.
1317
- # result = client.create_branch_rule request
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 create_branch_rule request, options = nil
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::CreateBranchRuleRequest
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.create_branch_rule.metadata.to_h
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.create_branch_rule.timeout,
1345
+ options.apply_defaults timeout: @config.rpcs.create_hook.timeout,
1350
1346
  metadata: call_metadata,
1351
- retry_policy: @config.rpcs.create_branch_rule.retry_policy
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.create_branch_rule request, options do |result, operation|
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
- # ListBranchRules lists branch rules in a given repository.
1363
+ # Updates the metadata of a hook.
1368
1364
  #
1369
- # @overload list_branch_rules(request, options = nil)
1370
- # Pass arguments to `list_branch_rules` via a request object, either of type
1371
- # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash.
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::ListBranchRulesRequest, ::Hash]
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 list_branch_rules(parent: nil, page_size: nil, page_token: nil)
1380
- # Pass arguments to `list_branch_rules` via keyword arguments. Note that at
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 parent [::String]
1385
- # @param page_size [::Integer]
1386
- # @param page_token [::String]
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::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>]
1389
+ # @yieldparam result [::Gapic::Operation]
1389
1390
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1390
1391
  #
1391
- # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>]
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::ListBranchRulesRequest.new
1403
+ # request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new
1403
1404
  #
1404
- # # Call the list_branch_rules method.
1405
- # result = client.list_branch_rules request
1405
+ # # Call the update_hook method.
1406
+ # result = client.update_hook request
1406
1407
  #
1407
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1408
- # # over elements, and API calls will be issued to fetch pages as needed.
1409
- # result.each do |item|
1410
- # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::BranchRule.
1411
- # p item
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 list_branch_rules request, options = nil
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::ListBranchRulesRequest
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.list_branch_rules.metadata.to_h
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.list_branch_rules.timeout,
1438
+ options.apply_defaults timeout: @config.rpcs.update_hook.timeout,
1435
1439
  metadata: call_metadata,
1436
- retry_policy: @config.rpcs.list_branch_rules.retry_policy
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.list_branch_rules request, options do |result, operation|
1443
- result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, "branch_rules", request, result, options
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
- # GetBranchRule gets a branch rule.
1456
+ # Deletes a Hook.
1453
1457
  #
1454
- # @overload get_branch_rule(request, options = nil)
1455
- # Pass arguments to `get_branch_rule` via a request object, either of type
1456
- # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash.
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::GetBranchRuleRequest, ::Hash]
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 get_branch_rule(name: nil)
1465
- # Pass arguments to `get_branch_rule` via keyword arguments. Note that at
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 repository to retrieve.
1474
+ # Required. Name of the hook to delete.
1471
1475
  # The format is
1472
- # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`.
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 [::Google::Cloud::SecureSourceManager::V1::BranchRule]
1478
+ # @yieldparam result [::Gapic::Operation]
1475
1479
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
1476
1480
  #
1477
- # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule]
1481
+ # @return [::Gapic::Operation]
1478
1482
  #
1479
1483
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1480
1484
  #
@@ -1485,24 +1489,3165 @@ 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::GetBranchRuleRequest.new
1492
+ # request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new
1489
1493
  #
1490
- # # Call the get_branch_rule method.
1491
- # result = client.get_branch_rule request
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
- def get_branch_rule request, options = nil
1497
- raise ::ArgumentError, "request must be provided" if request.nil?
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. This function is used to create a single
3935
+ # PullRequestComment of type Comment, or a single PullRequestComment of type
3936
+ # Code that's replying to another PullRequestComment of type Code. Use
3937
+ # BatchCreatePullRequestComments to create multiple PullRequestComments for
3938
+ # code reviews.
3939
+ #
3940
+ # @overload create_pull_request_comment(request, options = nil)
3941
+ # Pass arguments to `create_pull_request_comment` via a request object, either of type
3942
+ # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest} or an equivalent Hash.
3943
+ #
3944
+ # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash]
3945
+ # A request object representing the call parameters. Required. To specify no
3946
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3947
+ # @param options [::Gapic::CallOptions, ::Hash]
3948
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3949
+ #
3950
+ # @overload create_pull_request_comment(parent: nil, pull_request_comment: nil)
3951
+ # Pass arguments to `create_pull_request_comment` via keyword arguments. Note that at
3952
+ # least one keyword argument is required. To specify no parameters, or to keep all
3953
+ # the default parameter values, pass an empty Hash as a request object (see above).
3954
+ #
3955
+ # @param parent [::String]
3956
+ # Required. The pull request in which to create the pull request comment.
3957
+ # Format:
3958
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
3959
+ # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash]
3960
+ # Required. The pull request comment to create.
3961
+ # @yield [result, operation] Access the result along with the TransportOperation object
3962
+ # @yieldparam result [::Gapic::Operation]
3963
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3964
+ #
3965
+ # @return [::Gapic::Operation]
3966
+ #
3967
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3968
+ #
3969
+ # @example Basic example
3970
+ # require "google/cloud/secure_source_manager/v1"
3971
+ #
3972
+ # # Create a client object. The client can be reused for multiple calls.
3973
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
3974
+ #
3975
+ # # Create a request. To set request fields, pass in keyword arguments.
3976
+ # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new
3977
+ #
3978
+ # # Call the create_pull_request_comment method.
3979
+ # result = client.create_pull_request_comment request
3980
+ #
3981
+ # # The returned object is of type Gapic::Operation. You can use it to
3982
+ # # check the status of an operation, cancel it, or wait for results.
3983
+ # # Here is how to wait for a response.
3984
+ # result.wait_until_done! timeout: 60
3985
+ # if result.response?
3986
+ # p result.response
3987
+ # else
3988
+ # puts "No response received."
3989
+ # end
3990
+ #
3991
+ def create_pull_request_comment request, options = nil
3992
+ raise ::ArgumentError, "request must be provided" if request.nil?
3993
+
3994
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest
3995
+
3996
+ # Converts hash and nil to an options object
3997
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3998
+
3999
+ # Customize the options with defaults
4000
+ call_metadata = @config.rpcs.create_pull_request_comment.metadata.to_h
4001
+
4002
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4003
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4004
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4005
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
4006
+ transports_version_send: [:rest]
4007
+
4008
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4009
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4010
+
4011
+ options.apply_defaults timeout: @config.rpcs.create_pull_request_comment.timeout,
4012
+ metadata: call_metadata,
4013
+ retry_policy: @config.rpcs.create_pull_request_comment.retry_policy
4014
+
4015
+ options.apply_defaults timeout: @config.timeout,
4016
+ metadata: @config.metadata,
4017
+ retry_policy: @config.retry_policy
4018
+
4019
+ @secure_source_manager_stub.create_pull_request_comment request, options do |result, operation|
4020
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4021
+ yield result, operation if block_given?
4022
+ throw :response, result
4023
+ end
4024
+ rescue ::Gapic::Rest::Error => e
4025
+ raise ::Google::Cloud::Error.from_error(e)
4026
+ end
4027
+
4028
+ ##
4029
+ # Updates a pull request comment.
4030
+ #
4031
+ # @overload update_pull_request_comment(request, options = nil)
4032
+ # Pass arguments to `update_pull_request_comment` via a request object, either of type
4033
+ # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest} or an equivalent Hash.
4034
+ #
4035
+ # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Hash]
4036
+ # A request object representing the call parameters. Required. To specify no
4037
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4038
+ # @param options [::Gapic::CallOptions, ::Hash]
4039
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4040
+ #
4041
+ # @overload update_pull_request_comment(pull_request_comment: nil, update_mask: nil)
4042
+ # Pass arguments to `update_pull_request_comment` via keyword arguments. Note that at
4043
+ # least one keyword argument is required. To specify no parameters, or to keep all
4044
+ # the default parameter values, pass an empty Hash as a request object (see above).
4045
+ #
4046
+ # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash]
4047
+ # Required. The pull request comment to update.
4048
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4049
+ # Optional. Field mask is used to specify the fields to be overwritten in the
4050
+ # pull request comment resource by the update. Updatable fields are
4051
+ # `body`.
4052
+ # @yield [result, operation] Access the result along with the TransportOperation object
4053
+ # @yieldparam result [::Gapic::Operation]
4054
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4055
+ #
4056
+ # @return [::Gapic::Operation]
4057
+ #
4058
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4059
+ #
4060
+ # @example Basic example
4061
+ # require "google/cloud/secure_source_manager/v1"
4062
+ #
4063
+ # # Create a client object. The client can be reused for multiple calls.
4064
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
4065
+ #
4066
+ # # Create a request. To set request fields, pass in keyword arguments.
4067
+ # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new
4068
+ #
4069
+ # # Call the update_pull_request_comment method.
4070
+ # result = client.update_pull_request_comment request
4071
+ #
4072
+ # # The returned object is of type Gapic::Operation. You can use it to
4073
+ # # check the status of an operation, cancel it, or wait for results.
4074
+ # # Here is how to wait for a response.
4075
+ # result.wait_until_done! timeout: 60
4076
+ # if result.response?
4077
+ # p result.response
4078
+ # else
4079
+ # puts "No response received."
4080
+ # end
4081
+ #
4082
+ def update_pull_request_comment request, options = nil
4083
+ raise ::ArgumentError, "request must be provided" if request.nil?
4084
+
4085
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest
4086
+
4087
+ # Converts hash and nil to an options object
4088
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4089
+
4090
+ # Customize the options with defaults
4091
+ call_metadata = @config.rpcs.update_pull_request_comment.metadata.to_h
4092
+
4093
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4094
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4095
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4096
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
4097
+ transports_version_send: [:rest]
4098
+
4099
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4100
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4101
+
4102
+ options.apply_defaults timeout: @config.rpcs.update_pull_request_comment.timeout,
4103
+ metadata: call_metadata,
4104
+ retry_policy: @config.rpcs.update_pull_request_comment.retry_policy
4105
+
4106
+ options.apply_defaults timeout: @config.timeout,
4107
+ metadata: @config.metadata,
4108
+ retry_policy: @config.retry_policy
4109
+
4110
+ @secure_source_manager_stub.update_pull_request_comment request, options do |result, operation|
4111
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4112
+ yield result, operation if block_given?
4113
+ throw :response, result
4114
+ end
4115
+ rescue ::Gapic::Rest::Error => e
4116
+ raise ::Google::Cloud::Error.from_error(e)
4117
+ end
4118
+
4119
+ ##
4120
+ # Deletes a pull request comment.
4121
+ #
4122
+ # @overload delete_pull_request_comment(request, options = nil)
4123
+ # Pass arguments to `delete_pull_request_comment` via a request object, either of type
4124
+ # {::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest} or an equivalent Hash.
4125
+ #
4126
+ # @param request [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Hash]
4127
+ # A request object representing the call parameters. Required. To specify no
4128
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4129
+ # @param options [::Gapic::CallOptions, ::Hash]
4130
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4131
+ #
4132
+ # @overload delete_pull_request_comment(name: nil)
4133
+ # Pass arguments to `delete_pull_request_comment` via keyword arguments. Note that at
4134
+ # least one keyword argument is required. To specify no parameters, or to keep all
4135
+ # the default parameter values, pass an empty Hash as a request object (see above).
4136
+ #
4137
+ # @param name [::String]
4138
+ # Required. Name of the pull request comment to delete.
4139
+ # The format is
4140
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`.
4141
+ # @yield [result, operation] Access the result along with the TransportOperation object
4142
+ # @yieldparam result [::Gapic::Operation]
4143
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4144
+ #
4145
+ # @return [::Gapic::Operation]
4146
+ #
4147
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4148
+ #
4149
+ # @example Basic example
4150
+ # require "google/cloud/secure_source_manager/v1"
4151
+ #
4152
+ # # Create a client object. The client can be reused for multiple calls.
4153
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
4154
+ #
4155
+ # # Create a request. To set request fields, pass in keyword arguments.
4156
+ # request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new
4157
+ #
4158
+ # # Call the delete_pull_request_comment method.
4159
+ # result = client.delete_pull_request_comment request
4160
+ #
4161
+ # # The returned object is of type Gapic::Operation. You can use it to
4162
+ # # check the status of an operation, cancel it, or wait for results.
4163
+ # # Here is how to wait for a response.
4164
+ # result.wait_until_done! timeout: 60
4165
+ # if result.response?
4166
+ # p result.response
4167
+ # else
4168
+ # puts "No response received."
4169
+ # end
4170
+ #
4171
+ def delete_pull_request_comment request, options = nil
4172
+ raise ::ArgumentError, "request must be provided" if request.nil?
4173
+
4174
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest
4175
+
4176
+ # Converts hash and nil to an options object
4177
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4178
+
4179
+ # Customize the options with defaults
4180
+ call_metadata = @config.rpcs.delete_pull_request_comment.metadata.to_h
4181
+
4182
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4183
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4184
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4185
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
4186
+ transports_version_send: [:rest]
4187
+
4188
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4189
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4190
+
4191
+ options.apply_defaults timeout: @config.rpcs.delete_pull_request_comment.timeout,
4192
+ metadata: call_metadata,
4193
+ retry_policy: @config.rpcs.delete_pull_request_comment.retry_policy
4194
+
4195
+ options.apply_defaults timeout: @config.timeout,
4196
+ metadata: @config.metadata,
4197
+ retry_policy: @config.retry_policy
4198
+
4199
+ @secure_source_manager_stub.delete_pull_request_comment request, options do |result, operation|
4200
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4201
+ yield result, operation if block_given?
4202
+ throw :response, result
4203
+ end
4204
+ rescue ::Gapic::Rest::Error => e
4205
+ raise ::Google::Cloud::Error.from_error(e)
4206
+ end
4207
+
4208
+ ##
4209
+ # Batch creates pull request comments. This function is used to create
4210
+ # multiple PullRequestComments for code review. There needs to be exactly one
4211
+ # PullRequestComment of type Review, and at most 100 PullRequestComments of
4212
+ # type Code per request. The Postition of the code comments must be unique
4213
+ # within the request.
4214
+ #
4215
+ # @overload batch_create_pull_request_comments(request, options = nil)
4216
+ # Pass arguments to `batch_create_pull_request_comments` via a request object, either of type
4217
+ # {::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest} or an equivalent Hash.
4218
+ #
4219
+ # @param request [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Hash]
4220
+ # A request object representing the call parameters. Required. To specify no
4221
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4222
+ # @param options [::Gapic::CallOptions, ::Hash]
4223
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4224
+ #
4225
+ # @overload batch_create_pull_request_comments(parent: nil, requests: nil)
4226
+ # Pass arguments to `batch_create_pull_request_comments` via keyword arguments. Note that at
4227
+ # least one keyword argument is required. To specify no parameters, or to keep all
4228
+ # the default parameter values, pass an empty Hash as a request object (see above).
4229
+ #
4230
+ # @param parent [::String]
4231
+ # Required. The pull request in which to create the pull request comments.
4232
+ # Format:
4233
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
4234
+ # @param requests [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash>]
4235
+ # Required. The request message specifying the resources to create. There
4236
+ # should be exactly one CreatePullRequestCommentRequest with CommentDetail
4237
+ # being REVIEW in the list, and no more than 100
4238
+ # CreatePullRequestCommentRequests with CommentDetail being CODE in the list
4239
+ # @yield [result, operation] Access the result along with the TransportOperation object
4240
+ # @yieldparam result [::Gapic::Operation]
4241
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4242
+ #
4243
+ # @return [::Gapic::Operation]
4244
+ #
4245
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4246
+ #
4247
+ # @example Basic example
4248
+ # require "google/cloud/secure_source_manager/v1"
4249
+ #
4250
+ # # Create a client object. The client can be reused for multiple calls.
4251
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
4252
+ #
4253
+ # # Create a request. To set request fields, pass in keyword arguments.
4254
+ # request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new
4255
+ #
4256
+ # # Call the batch_create_pull_request_comments method.
4257
+ # result = client.batch_create_pull_request_comments request
4258
+ #
4259
+ # # The returned object is of type Gapic::Operation. You can use it to
4260
+ # # check the status of an operation, cancel it, or wait for results.
4261
+ # # Here is how to wait for a response.
4262
+ # result.wait_until_done! timeout: 60
4263
+ # if result.response?
4264
+ # p result.response
4265
+ # else
4266
+ # puts "No response received."
4267
+ # end
4268
+ #
4269
+ def batch_create_pull_request_comments request, options = nil
4270
+ raise ::ArgumentError, "request must be provided" if request.nil?
4271
+
4272
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest
4273
+
4274
+ # Converts hash and nil to an options object
4275
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4276
+
4277
+ # Customize the options with defaults
4278
+ call_metadata = @config.rpcs.batch_create_pull_request_comments.metadata.to_h
4279
+
4280
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4281
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4282
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4283
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
4284
+ transports_version_send: [:rest]
4285
+
4286
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4287
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4288
+
4289
+ options.apply_defaults timeout: @config.rpcs.batch_create_pull_request_comments.timeout,
4290
+ metadata: call_metadata,
4291
+ retry_policy: @config.rpcs.batch_create_pull_request_comments.retry_policy
4292
+
4293
+ options.apply_defaults timeout: @config.timeout,
4294
+ metadata: @config.metadata,
4295
+ retry_policy: @config.retry_policy
4296
+
4297
+ @secure_source_manager_stub.batch_create_pull_request_comments request, options do |result, operation|
4298
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4299
+ yield result, operation if block_given?
4300
+ throw :response, result
4301
+ end
4302
+ rescue ::Gapic::Rest::Error => e
4303
+ raise ::Google::Cloud::Error.from_error(e)
4304
+ end
4305
+
4306
+ ##
4307
+ # Resolves pull request comments. A list of PullRequestComment names must be
4308
+ # provided. The PullRequestComment names must be in the same conversation
4309
+ # thread. If auto_fill is set, all comments in the conversation thread will
4310
+ # be resolved.
4311
+ #
4312
+ # @overload resolve_pull_request_comments(request, options = nil)
4313
+ # Pass arguments to `resolve_pull_request_comments` via a request object, either of type
4314
+ # {::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest} or an equivalent Hash.
4315
+ #
4316
+ # @param request [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Hash]
4317
+ # A request object representing the call parameters. Required. To specify no
4318
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4319
+ # @param options [::Gapic::CallOptions, ::Hash]
4320
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4321
+ #
4322
+ # @overload resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil)
4323
+ # Pass arguments to `resolve_pull_request_comments` via keyword arguments. Note that at
4324
+ # least one keyword argument is required. To specify no parameters, or to keep all
4325
+ # the default parameter values, pass an empty Hash as a request object (see above).
4326
+ #
4327
+ # @param parent [::String]
4328
+ # Required. The pull request in which to resolve the pull request comments.
4329
+ # Format:
4330
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
4331
+ # @param names [::Array<::String>]
4332
+ # Required. The names of the pull request comments to resolve. Format:
4333
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`
4334
+ # Only comments from the same threads are allowed in the same request.
4335
+ # @param auto_fill [::Boolean]
4336
+ # Optional. If set, at least one comment in a thread is required, rest of the
4337
+ # comments in the same thread will be automatically updated to resolved. If
4338
+ # unset, all comments in the same thread need be present.
4339
+ # @yield [result, operation] Access the result along with the TransportOperation object
4340
+ # @yieldparam result [::Gapic::Operation]
4341
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4342
+ #
4343
+ # @return [::Gapic::Operation]
4344
+ #
4345
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4346
+ #
4347
+ # @example Basic example
4348
+ # require "google/cloud/secure_source_manager/v1"
4349
+ #
4350
+ # # Create a client object. The client can be reused for multiple calls.
4351
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
4352
+ #
4353
+ # # Create a request. To set request fields, pass in keyword arguments.
4354
+ # request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new
4355
+ #
4356
+ # # Call the resolve_pull_request_comments method.
4357
+ # result = client.resolve_pull_request_comments request
4358
+ #
4359
+ # # The returned object is of type Gapic::Operation. You can use it to
4360
+ # # check the status of an operation, cancel it, or wait for results.
4361
+ # # Here is how to wait for a response.
4362
+ # result.wait_until_done! timeout: 60
4363
+ # if result.response?
4364
+ # p result.response
4365
+ # else
4366
+ # puts "No response received."
4367
+ # end
4368
+ #
4369
+ def resolve_pull_request_comments request, options = nil
4370
+ raise ::ArgumentError, "request must be provided" if request.nil?
4371
+
4372
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest
4373
+
4374
+ # Converts hash and nil to an options object
4375
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4376
+
4377
+ # Customize the options with defaults
4378
+ call_metadata = @config.rpcs.resolve_pull_request_comments.metadata.to_h
4379
+
4380
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4381
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4382
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4383
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
4384
+ transports_version_send: [:rest]
4385
+
4386
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4387
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4388
+
4389
+ options.apply_defaults timeout: @config.rpcs.resolve_pull_request_comments.timeout,
4390
+ metadata: call_metadata,
4391
+ retry_policy: @config.rpcs.resolve_pull_request_comments.retry_policy
4392
+
4393
+ options.apply_defaults timeout: @config.timeout,
4394
+ metadata: @config.metadata,
4395
+ retry_policy: @config.retry_policy
4396
+
4397
+ @secure_source_manager_stub.resolve_pull_request_comments request, options do |result, operation|
4398
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4399
+ yield result, operation if block_given?
4400
+ throw :response, result
4401
+ end
4402
+ rescue ::Gapic::Rest::Error => e
4403
+ raise ::Google::Cloud::Error.from_error(e)
4404
+ end
4405
+
4406
+ ##
4407
+ # Unresolves pull request comments. A list of PullRequestComment names must
4408
+ # be provided. The PullRequestComment names must be in the same conversation
4409
+ # thread. If auto_fill is set, all comments in the conversation thread will
4410
+ # be unresolved.
4411
+ #
4412
+ # @overload unresolve_pull_request_comments(request, options = nil)
4413
+ # Pass arguments to `unresolve_pull_request_comments` via a request object, either of type
4414
+ # {::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest} or an equivalent Hash.
4415
+ #
4416
+ # @param request [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Hash]
4417
+ # A request object representing the call parameters. Required. To specify no
4418
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4419
+ # @param options [::Gapic::CallOptions, ::Hash]
4420
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4421
+ #
4422
+ # @overload unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil)
4423
+ # Pass arguments to `unresolve_pull_request_comments` via keyword arguments. Note that at
4424
+ # least one keyword argument is required. To specify no parameters, or to keep all
4425
+ # the default parameter values, pass an empty Hash as a request object (see above).
4426
+ #
4427
+ # @param parent [::String]
4428
+ # Required. The pull request in which to resolve the pull request comments.
4429
+ # Format:
4430
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
4431
+ # @param names [::Array<::String>]
4432
+ # Required. The names of the pull request comments to unresolve. Format:
4433
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`
4434
+ # Only comments from the same threads are allowed in the same request.
4435
+ # @param auto_fill [::Boolean]
4436
+ # Optional. If set, at least one comment in a thread is required, rest of the
4437
+ # comments in the same thread will be automatically updated to unresolved. If
4438
+ # unset, all comments in the same thread need be present.
4439
+ # @yield [result, operation] Access the result along with the TransportOperation object
4440
+ # @yieldparam result [::Gapic::Operation]
4441
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4442
+ #
4443
+ # @return [::Gapic::Operation]
4444
+ #
4445
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4446
+ #
4447
+ # @example Basic example
4448
+ # require "google/cloud/secure_source_manager/v1"
4449
+ #
4450
+ # # Create a client object. The client can be reused for multiple calls.
4451
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
4452
+ #
4453
+ # # Create a request. To set request fields, pass in keyword arguments.
4454
+ # request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new
4455
+ #
4456
+ # # Call the unresolve_pull_request_comments method.
4457
+ # result = client.unresolve_pull_request_comments request
4458
+ #
4459
+ # # The returned object is of type Gapic::Operation. You can use it to
4460
+ # # check the status of an operation, cancel it, or wait for results.
4461
+ # # Here is how to wait for a response.
4462
+ # result.wait_until_done! timeout: 60
4463
+ # if result.response?
4464
+ # p result.response
4465
+ # else
4466
+ # puts "No response received."
4467
+ # end
4468
+ #
4469
+ def unresolve_pull_request_comments request, options = nil
4470
+ raise ::ArgumentError, "request must be provided" if request.nil?
4471
+
4472
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest
4473
+
4474
+ # Converts hash and nil to an options object
4475
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4476
+
4477
+ # Customize the options with defaults
4478
+ call_metadata = @config.rpcs.unresolve_pull_request_comments.metadata.to_h
4479
+
4480
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4481
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4482
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4483
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
4484
+ transports_version_send: [:rest]
4485
+
4486
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4487
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4488
+
4489
+ options.apply_defaults timeout: @config.rpcs.unresolve_pull_request_comments.timeout,
4490
+ metadata: call_metadata,
4491
+ retry_policy: @config.rpcs.unresolve_pull_request_comments.retry_policy
4492
+
4493
+ options.apply_defaults timeout: @config.timeout,
4494
+ metadata: @config.metadata,
4495
+ retry_policy: @config.retry_policy
4496
+
4497
+ @secure_source_manager_stub.unresolve_pull_request_comments request, options do |result, operation|
4498
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4499
+ yield result, operation if block_given?
4500
+ throw :response, result
4501
+ end
4502
+ rescue ::Gapic::Rest::Error => e
4503
+ raise ::Google::Cloud::Error.from_error(e)
4504
+ end
4505
+
4506
+ ##
4507
+ # Creates an issue comment.
4508
+ #
4509
+ # @overload create_issue_comment(request, options = nil)
4510
+ # Pass arguments to `create_issue_comment` via a request object, either of type
4511
+ # {::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest} or an equivalent Hash.
4512
+ #
4513
+ # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Hash]
4514
+ # A request object representing the call parameters. Required. To specify no
4515
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4516
+ # @param options [::Gapic::CallOptions, ::Hash]
4517
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4518
+ #
4519
+ # @overload create_issue_comment(parent: nil, issue_comment: nil)
4520
+ # Pass arguments to `create_issue_comment` via keyword arguments. Note that at
4521
+ # least one keyword argument is required. To specify no parameters, or to keep all
4522
+ # the default parameter values, pass an empty Hash as a request object (see above).
4523
+ #
4524
+ # @param parent [::String]
4525
+ # Required. The issue in which to create the issue comment. Format:
4526
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
4527
+ # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash]
4528
+ # Required. The issue comment to create.
4529
+ # @yield [result, operation] Access the result along with the TransportOperation object
4530
+ # @yieldparam result [::Gapic::Operation]
4531
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4532
+ #
4533
+ # @return [::Gapic::Operation]
4534
+ #
4535
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4536
+ #
4537
+ # @example Basic example
4538
+ # require "google/cloud/secure_source_manager/v1"
4539
+ #
4540
+ # # Create a client object. The client can be reused for multiple calls.
4541
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
4542
+ #
4543
+ # # Create a request. To set request fields, pass in keyword arguments.
4544
+ # request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new
4545
+ #
4546
+ # # Call the create_issue_comment method.
4547
+ # result = client.create_issue_comment request
4548
+ #
4549
+ # # The returned object is of type Gapic::Operation. You can use it to
4550
+ # # check the status of an operation, cancel it, or wait for results.
4551
+ # # Here is how to wait for a response.
4552
+ # result.wait_until_done! timeout: 60
4553
+ # if result.response?
4554
+ # p result.response
4555
+ # else
4556
+ # puts "No response received."
4557
+ # end
4558
+ #
4559
+ def create_issue_comment request, options = nil
4560
+ raise ::ArgumentError, "request must be provided" if request.nil?
4561
+
4562
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest
4563
+
4564
+ # Converts hash and nil to an options object
4565
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4566
+
4567
+ # Customize the options with defaults
4568
+ call_metadata = @config.rpcs.create_issue_comment.metadata.to_h
4569
+
4570
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4571
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4572
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4573
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
4574
+ transports_version_send: [:rest]
4575
+
4576
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4577
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4578
+
4579
+ options.apply_defaults timeout: @config.rpcs.create_issue_comment.timeout,
4580
+ metadata: call_metadata,
4581
+ retry_policy: @config.rpcs.create_issue_comment.retry_policy
4582
+
4583
+ options.apply_defaults timeout: @config.timeout,
4584
+ metadata: @config.metadata,
4585
+ retry_policy: @config.retry_policy
4586
+
4587
+ @secure_source_manager_stub.create_issue_comment request, options do |result, operation|
4588
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4589
+ yield result, operation if block_given?
4590
+ throw :response, result
4591
+ end
4592
+ rescue ::Gapic::Rest::Error => e
4593
+ raise ::Google::Cloud::Error.from_error(e)
4594
+ end
4595
+
4596
+ ##
4597
+ # Gets an issue comment.
4598
+ #
4599
+ # @overload get_issue_comment(request, options = nil)
4600
+ # Pass arguments to `get_issue_comment` via a request object, either of type
4601
+ # {::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest} or an equivalent Hash.
4602
+ #
4603
+ # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::Hash]
4604
+ # A request object representing the call parameters. Required. To specify no
4605
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4606
+ # @param options [::Gapic::CallOptions, ::Hash]
4607
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4608
+ #
4609
+ # @overload get_issue_comment(name: nil)
4610
+ # Pass arguments to `get_issue_comment` via keyword arguments. Note that at
4611
+ # least one keyword argument is required. To specify no parameters, or to keep all
4612
+ # the default parameter values, pass an empty Hash as a request object (see above).
4613
+ #
4614
+ # @param name [::String]
4615
+ # Required. Name of the issue comment to retrieve.
4616
+ # The format is
4617
+ # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`.
4618
+ # @yield [result, operation] Access the result along with the TransportOperation object
4619
+ # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::IssueComment]
4620
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4621
+ #
4622
+ # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment]
4623
+ #
4624
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4625
+ #
4626
+ # @example Basic example
4627
+ # require "google/cloud/secure_source_manager/v1"
4628
+ #
4629
+ # # Create a client object. The client can be reused for multiple calls.
4630
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
4631
+ #
4632
+ # # Create a request. To set request fields, pass in keyword arguments.
4633
+ # request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new
4634
+ #
4635
+ # # Call the get_issue_comment method.
4636
+ # result = client.get_issue_comment request
4637
+ #
4638
+ # # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment.
4639
+ # p result
4640
+ #
4641
+ def get_issue_comment request, options = nil
4642
+ raise ::ArgumentError, "request must be provided" if request.nil?
4643
+
4644
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest
4645
+
4646
+ # Converts hash and nil to an options object
4647
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4648
+
4649
+ # Customize the options with defaults
4650
+ call_metadata = @config.rpcs.get_issue_comment.metadata.to_h
1506
4651
 
1507
4652
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1508
4653
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1513,15 +4658,15 @@ module Google
1513
4658
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1514
4659
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1515
4660
 
1516
- options.apply_defaults timeout: @config.rpcs.get_branch_rule.timeout,
4661
+ options.apply_defaults timeout: @config.rpcs.get_issue_comment.timeout,
1517
4662
  metadata: call_metadata,
1518
- retry_policy: @config.rpcs.get_branch_rule.retry_policy
4663
+ retry_policy: @config.rpcs.get_issue_comment.retry_policy
1519
4664
 
1520
4665
  options.apply_defaults timeout: @config.timeout,
1521
4666
  metadata: @config.metadata,
1522
4667
  retry_policy: @config.retry_policy
1523
4668
 
1524
- @secure_source_manager_stub.get_branch_rule request, options do |result, operation|
4669
+ @secure_source_manager_stub.get_issue_comment request, options do |result, operation|
1525
4670
  yield result, operation if block_given?
1526
4671
  end
1527
4672
  rescue ::Gapic::Rest::Error => e
@@ -1529,30 +4674,118 @@ module Google
1529
4674
  end
1530
4675
 
1531
4676
  ##
1532
- # UpdateBranchRule updates a branch rule.
4677
+ # Lists comments in an issue.
1533
4678
  #
1534
- # @overload update_branch_rule(request, options = nil)
1535
- # Pass arguments to `update_branch_rule` via a request object, either of type
1536
- # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash.
4679
+ # @overload list_issue_comments(request, options = nil)
4680
+ # Pass arguments to `list_issue_comments` via a request object, either of type
4681
+ # {::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest} or an equivalent Hash.
1537
4682
  #
1538
- # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Hash]
4683
+ # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::Hash]
1539
4684
  # A request object representing the call parameters. Required. To specify no
1540
4685
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1541
4686
  # @param options [::Gapic::CallOptions, ::Hash]
1542
4687
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1543
4688
  #
1544
- # @overload update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil)
1545
- # Pass arguments to `update_branch_rule` via keyword arguments. Note that at
4689
+ # @overload list_issue_comments(parent: nil, page_size: nil, page_token: nil)
4690
+ # Pass arguments to `list_issue_comments` via keyword arguments. Note that at
1546
4691
  # least one keyword argument is required. To specify no parameters, or to keep all
1547
4692
  # the default parameter values, pass an empty Hash as a request object (see above).
1548
4693
  #
1549
- # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash]
1550
- # @param validate_only [::Boolean]
1551
- # Optional. If set, validate the request and preview the review, but do not
1552
- # actually post it. (https://google.aip.dev/163, for declarative friendly)
4694
+ # @param parent [::String]
4695
+ # Required. The issue in which to list the comments. Format:
4696
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
4697
+ # @param page_size [::Integer]
4698
+ # Optional. Requested page size. Server may return fewer items than
4699
+ # requested. If unspecified, server will pick an appropriate default.
4700
+ # @param page_token [::String]
4701
+ # Optional. A token identifying a page of results the server should return.
4702
+ # @yield [result, operation] Access the result along with the TransportOperation object
4703
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>]
4704
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4705
+ #
4706
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>]
4707
+ #
4708
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4709
+ #
4710
+ # @example Basic example
4711
+ # require "google/cloud/secure_source_manager/v1"
4712
+ #
4713
+ # # Create a client object. The client can be reused for multiple calls.
4714
+ # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
4715
+ #
4716
+ # # Create a request. To set request fields, pass in keyword arguments.
4717
+ # request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new
4718
+ #
4719
+ # # Call the list_issue_comments method.
4720
+ # result = client.list_issue_comments request
4721
+ #
4722
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4723
+ # # over elements, and API calls will be issued to fetch pages as needed.
4724
+ # result.each do |item|
4725
+ # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::IssueComment.
4726
+ # p item
4727
+ # end
4728
+ #
4729
+ def list_issue_comments request, options = nil
4730
+ raise ::ArgumentError, "request must be provided" if request.nil?
4731
+
4732
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest
4733
+
4734
+ # Converts hash and nil to an options object
4735
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4736
+
4737
+ # Customize the options with defaults
4738
+ call_metadata = @config.rpcs.list_issue_comments.metadata.to_h
4739
+
4740
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4741
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4742
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4743
+ gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION,
4744
+ transports_version_send: [:rest]
4745
+
4746
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4747
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4748
+
4749
+ options.apply_defaults timeout: @config.rpcs.list_issue_comments.timeout,
4750
+ metadata: call_metadata,
4751
+ retry_policy: @config.rpcs.list_issue_comments.retry_policy
4752
+
4753
+ options.apply_defaults timeout: @config.timeout,
4754
+ metadata: @config.metadata,
4755
+ retry_policy: @config.retry_policy
4756
+
4757
+ @secure_source_manager_stub.list_issue_comments request, options do |result, operation|
4758
+ result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, "issue_comments", request, result, options
4759
+ yield result, operation if block_given?
4760
+ throw :response, result
4761
+ end
4762
+ rescue ::Gapic::Rest::Error => e
4763
+ raise ::Google::Cloud::Error.from_error(e)
4764
+ end
4765
+
4766
+ ##
4767
+ # Updates an issue comment.
4768
+ #
4769
+ # @overload update_issue_comment(request, options = nil)
4770
+ # Pass arguments to `update_issue_comment` via a request object, either of type
4771
+ # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest} or an equivalent Hash.
4772
+ #
4773
+ # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::Hash]
4774
+ # A request object representing the call parameters. Required. To specify no
4775
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4776
+ # @param options [::Gapic::CallOptions, ::Hash]
4777
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4778
+ #
4779
+ # @overload update_issue_comment(issue_comment: nil, update_mask: nil)
4780
+ # Pass arguments to `update_issue_comment` via keyword arguments. Note that at
4781
+ # least one keyword argument is required. To specify no parameters, or to keep all
4782
+ # the default parameter values, pass an empty Hash as a request object (see above).
4783
+ #
4784
+ # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash]
4785
+ # Required. The issue comment to update.
1553
4786
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1554
- # Required. Field mask is used to specify the fields to be overwritten in the
1555
- # branchRule resource by the update.
4787
+ # Optional. Field mask is used to specify the fields to be overwritten in the
4788
+ # issue comment resource by the update.
1556
4789
  # The fields specified in the update_mask are relative to the resource, not
1557
4790
  # the full request. A field will be overwritten if it is in the mask.
1558
4791
  # The special value "*" means full replacement.
@@ -1571,10 +4804,10 @@ module Google
1571
4804
  # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
1572
4805
  #
1573
4806
  # # Create a request. To set request fields, pass in keyword arguments.
1574
- # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new
4807
+ # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new
1575
4808
  #
1576
- # # Call the update_branch_rule method.
1577
- # result = client.update_branch_rule request
4809
+ # # Call the update_issue_comment method.
4810
+ # result = client.update_issue_comment request
1578
4811
  #
1579
4812
  # # The returned object is of type Gapic::Operation. You can use it to
1580
4813
  # # check the status of an operation, cancel it, or wait for results.
@@ -1586,16 +4819,16 @@ module Google
1586
4819
  # puts "No response received."
1587
4820
  # end
1588
4821
  #
1589
- def update_branch_rule request, options = nil
4822
+ def update_issue_comment request, options = nil
1590
4823
  raise ::ArgumentError, "request must be provided" if request.nil?
1591
4824
 
1592
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest
4825
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest
1593
4826
 
1594
4827
  # Converts hash and nil to an options object
1595
4828
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1596
4829
 
1597
4830
  # Customize the options with defaults
1598
- call_metadata = @config.rpcs.update_branch_rule.metadata.to_h
4831
+ call_metadata = @config.rpcs.update_issue_comment.metadata.to_h
1599
4832
 
1600
4833
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1601
4834
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1606,15 +4839,15 @@ module Google
1606
4839
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1607
4840
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1608
4841
 
1609
- options.apply_defaults timeout: @config.rpcs.update_branch_rule.timeout,
4842
+ options.apply_defaults timeout: @config.rpcs.update_issue_comment.timeout,
1610
4843
  metadata: call_metadata,
1611
- retry_policy: @config.rpcs.update_branch_rule.retry_policy
4844
+ retry_policy: @config.rpcs.update_issue_comment.retry_policy
1612
4845
 
1613
4846
  options.apply_defaults timeout: @config.timeout,
1614
4847
  metadata: @config.metadata,
1615
4848
  retry_policy: @config.retry_policy
1616
4849
 
1617
- @secure_source_manager_stub.update_branch_rule request, options do |result, operation|
4850
+ @secure_source_manager_stub.update_issue_comment request, options do |result, operation|
1618
4851
  result = ::Gapic::Operation.new result, @operations_client, options: options
1619
4852
  yield result, operation if block_given?
1620
4853
  throw :response, result
@@ -1624,27 +4857,27 @@ module Google
1624
4857
  end
1625
4858
 
1626
4859
  ##
1627
- # DeleteBranchRule deletes a branch rule.
4860
+ # Deletes an issue comment.
1628
4861
  #
1629
- # @overload delete_branch_rule(request, options = nil)
1630
- # Pass arguments to `delete_branch_rule` via a request object, either of type
1631
- # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash.
4862
+ # @overload delete_issue_comment(request, options = nil)
4863
+ # Pass arguments to `delete_issue_comment` via a request object, either of type
4864
+ # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest} or an equivalent Hash.
1632
4865
  #
1633
- # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Hash]
4866
+ # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::Hash]
1634
4867
  # A request object representing the call parameters. Required. To specify no
1635
4868
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1636
4869
  # @param options [::Gapic::CallOptions, ::Hash]
1637
4870
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1638
4871
  #
1639
- # @overload delete_branch_rule(name: nil, allow_missing: nil)
1640
- # Pass arguments to `delete_branch_rule` via keyword arguments. Note that at
4872
+ # @overload delete_issue_comment(name: nil)
4873
+ # Pass arguments to `delete_issue_comment` via keyword arguments. Note that at
1641
4874
  # least one keyword argument is required. To specify no parameters, or to keep all
1642
4875
  # the default parameter values, pass an empty Hash as a request object (see above).
1643
4876
  #
1644
4877
  # @param name [::String]
1645
- # @param allow_missing [::Boolean]
1646
- # Optional. If set to true, and the branch rule is not found, the request
1647
- # will succeed but no action will be taken on the server.
4878
+ # Required. Name of the issue comment to delete.
4879
+ # The format is
4880
+ # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`.
1648
4881
  # @yield [result, operation] Access the result along with the TransportOperation object
1649
4882
  # @yieldparam result [::Gapic::Operation]
1650
4883
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1660,10 +4893,10 @@ module Google
1660
4893
  # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new
1661
4894
  #
1662
4895
  # # Create a request. To set request fields, pass in keyword arguments.
1663
- # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new
4896
+ # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new
1664
4897
  #
1665
- # # Call the delete_branch_rule method.
1666
- # result = client.delete_branch_rule request
4898
+ # # Call the delete_issue_comment method.
4899
+ # result = client.delete_issue_comment request
1667
4900
  #
1668
4901
  # # The returned object is of type Gapic::Operation. You can use it to
1669
4902
  # # check the status of an operation, cancel it, or wait for results.
@@ -1675,16 +4908,16 @@ module Google
1675
4908
  # puts "No response received."
1676
4909
  # end
1677
4910
  #
1678
- def delete_branch_rule request, options = nil
4911
+ def delete_issue_comment request, options = nil
1679
4912
  raise ::ArgumentError, "request must be provided" if request.nil?
1680
4913
 
1681
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest
4914
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest
1682
4915
 
1683
4916
  # Converts hash and nil to an options object
1684
4917
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1685
4918
 
1686
4919
  # Customize the options with defaults
1687
- call_metadata = @config.rpcs.delete_branch_rule.metadata.to_h
4920
+ call_metadata = @config.rpcs.delete_issue_comment.metadata.to_h
1688
4921
 
1689
4922
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1690
4923
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1695,15 +4928,15 @@ module Google
1695
4928
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1696
4929
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1697
4930
 
1698
- options.apply_defaults timeout: @config.rpcs.delete_branch_rule.timeout,
4931
+ options.apply_defaults timeout: @config.rpcs.delete_issue_comment.timeout,
1699
4932
  metadata: call_metadata,
1700
- retry_policy: @config.rpcs.delete_branch_rule.retry_policy
4933
+ retry_policy: @config.rpcs.delete_issue_comment.retry_policy
1701
4934
 
1702
4935
  options.apply_defaults timeout: @config.timeout,
1703
4936
  metadata: @config.metadata,
1704
4937
  retry_policy: @config.retry_policy
1705
4938
 
1706
- @secure_source_manager_stub.delete_branch_rule request, options do |result, operation|
4939
+ @secure_source_manager_stub.delete_issue_comment request, options do |result, operation|
1707
4940
  result = ::Gapic::Operation.new result, @operations_client, options: options
1708
4941
  yield result, operation if block_given?
1709
4942
  throw :response, result
@@ -1901,11 +5134,41 @@ module Google
1901
5134
  #
1902
5135
  attr_reader :create_repository
1903
5136
  ##
5137
+ # RPC-specific configuration for `update_repository`
5138
+ # @return [::Gapic::Config::Method]
5139
+ #
5140
+ attr_reader :update_repository
5141
+ ##
1904
5142
  # RPC-specific configuration for `delete_repository`
1905
5143
  # @return [::Gapic::Config::Method]
1906
5144
  #
1907
5145
  attr_reader :delete_repository
1908
5146
  ##
5147
+ # RPC-specific configuration for `list_hooks`
5148
+ # @return [::Gapic::Config::Method]
5149
+ #
5150
+ attr_reader :list_hooks
5151
+ ##
5152
+ # RPC-specific configuration for `get_hook`
5153
+ # @return [::Gapic::Config::Method]
5154
+ #
5155
+ attr_reader :get_hook
5156
+ ##
5157
+ # RPC-specific configuration for `create_hook`
5158
+ # @return [::Gapic::Config::Method]
5159
+ #
5160
+ attr_reader :create_hook
5161
+ ##
5162
+ # RPC-specific configuration for `update_hook`
5163
+ # @return [::Gapic::Config::Method]
5164
+ #
5165
+ attr_reader :update_hook
5166
+ ##
5167
+ # RPC-specific configuration for `delete_hook`
5168
+ # @return [::Gapic::Config::Method]
5169
+ #
5170
+ attr_reader :delete_hook
5171
+ ##
1909
5172
  # RPC-specific configuration for `get_iam_policy_repo`
1910
5173
  # @return [::Gapic::Config::Method]
1911
5174
  #
@@ -1945,6 +5208,156 @@ module Google
1945
5208
  # @return [::Gapic::Config::Method]
1946
5209
  #
1947
5210
  attr_reader :delete_branch_rule
5211
+ ##
5212
+ # RPC-specific configuration for `create_pull_request`
5213
+ # @return [::Gapic::Config::Method]
5214
+ #
5215
+ attr_reader :create_pull_request
5216
+ ##
5217
+ # RPC-specific configuration for `get_pull_request`
5218
+ # @return [::Gapic::Config::Method]
5219
+ #
5220
+ attr_reader :get_pull_request
5221
+ ##
5222
+ # RPC-specific configuration for `list_pull_requests`
5223
+ # @return [::Gapic::Config::Method]
5224
+ #
5225
+ attr_reader :list_pull_requests
5226
+ ##
5227
+ # RPC-specific configuration for `update_pull_request`
5228
+ # @return [::Gapic::Config::Method]
5229
+ #
5230
+ attr_reader :update_pull_request
5231
+ ##
5232
+ # RPC-specific configuration for `merge_pull_request`
5233
+ # @return [::Gapic::Config::Method]
5234
+ #
5235
+ attr_reader :merge_pull_request
5236
+ ##
5237
+ # RPC-specific configuration for `open_pull_request`
5238
+ # @return [::Gapic::Config::Method]
5239
+ #
5240
+ attr_reader :open_pull_request
5241
+ ##
5242
+ # RPC-specific configuration for `close_pull_request`
5243
+ # @return [::Gapic::Config::Method]
5244
+ #
5245
+ attr_reader :close_pull_request
5246
+ ##
5247
+ # RPC-specific configuration for `list_pull_request_file_diffs`
5248
+ # @return [::Gapic::Config::Method]
5249
+ #
5250
+ attr_reader :list_pull_request_file_diffs
5251
+ ##
5252
+ # RPC-specific configuration for `fetch_tree`
5253
+ # @return [::Gapic::Config::Method]
5254
+ #
5255
+ attr_reader :fetch_tree
5256
+ ##
5257
+ # RPC-specific configuration for `fetch_blob`
5258
+ # @return [::Gapic::Config::Method]
5259
+ #
5260
+ attr_reader :fetch_blob
5261
+ ##
5262
+ # RPC-specific configuration for `create_issue`
5263
+ # @return [::Gapic::Config::Method]
5264
+ #
5265
+ attr_reader :create_issue
5266
+ ##
5267
+ # RPC-specific configuration for `get_issue`
5268
+ # @return [::Gapic::Config::Method]
5269
+ #
5270
+ attr_reader :get_issue
5271
+ ##
5272
+ # RPC-specific configuration for `list_issues`
5273
+ # @return [::Gapic::Config::Method]
5274
+ #
5275
+ attr_reader :list_issues
5276
+ ##
5277
+ # RPC-specific configuration for `update_issue`
5278
+ # @return [::Gapic::Config::Method]
5279
+ #
5280
+ attr_reader :update_issue
5281
+ ##
5282
+ # RPC-specific configuration for `delete_issue`
5283
+ # @return [::Gapic::Config::Method]
5284
+ #
5285
+ attr_reader :delete_issue
5286
+ ##
5287
+ # RPC-specific configuration for `open_issue`
5288
+ # @return [::Gapic::Config::Method]
5289
+ #
5290
+ attr_reader :open_issue
5291
+ ##
5292
+ # RPC-specific configuration for `close_issue`
5293
+ # @return [::Gapic::Config::Method]
5294
+ #
5295
+ attr_reader :close_issue
5296
+ ##
5297
+ # RPC-specific configuration for `get_pull_request_comment`
5298
+ # @return [::Gapic::Config::Method]
5299
+ #
5300
+ attr_reader :get_pull_request_comment
5301
+ ##
5302
+ # RPC-specific configuration for `list_pull_request_comments`
5303
+ # @return [::Gapic::Config::Method]
5304
+ #
5305
+ attr_reader :list_pull_request_comments
5306
+ ##
5307
+ # RPC-specific configuration for `create_pull_request_comment`
5308
+ # @return [::Gapic::Config::Method]
5309
+ #
5310
+ attr_reader :create_pull_request_comment
5311
+ ##
5312
+ # RPC-specific configuration for `update_pull_request_comment`
5313
+ # @return [::Gapic::Config::Method]
5314
+ #
5315
+ attr_reader :update_pull_request_comment
5316
+ ##
5317
+ # RPC-specific configuration for `delete_pull_request_comment`
5318
+ # @return [::Gapic::Config::Method]
5319
+ #
5320
+ attr_reader :delete_pull_request_comment
5321
+ ##
5322
+ # RPC-specific configuration for `batch_create_pull_request_comments`
5323
+ # @return [::Gapic::Config::Method]
5324
+ #
5325
+ attr_reader :batch_create_pull_request_comments
5326
+ ##
5327
+ # RPC-specific configuration for `resolve_pull_request_comments`
5328
+ # @return [::Gapic::Config::Method]
5329
+ #
5330
+ attr_reader :resolve_pull_request_comments
5331
+ ##
5332
+ # RPC-specific configuration for `unresolve_pull_request_comments`
5333
+ # @return [::Gapic::Config::Method]
5334
+ #
5335
+ attr_reader :unresolve_pull_request_comments
5336
+ ##
5337
+ # RPC-specific configuration for `create_issue_comment`
5338
+ # @return [::Gapic::Config::Method]
5339
+ #
5340
+ attr_reader :create_issue_comment
5341
+ ##
5342
+ # RPC-specific configuration for `get_issue_comment`
5343
+ # @return [::Gapic::Config::Method]
5344
+ #
5345
+ attr_reader :get_issue_comment
5346
+ ##
5347
+ # RPC-specific configuration for `list_issue_comments`
5348
+ # @return [::Gapic::Config::Method]
5349
+ #
5350
+ attr_reader :list_issue_comments
5351
+ ##
5352
+ # RPC-specific configuration for `update_issue_comment`
5353
+ # @return [::Gapic::Config::Method]
5354
+ #
5355
+ attr_reader :update_issue_comment
5356
+ ##
5357
+ # RPC-specific configuration for `delete_issue_comment`
5358
+ # @return [::Gapic::Config::Method]
5359
+ #
5360
+ attr_reader :delete_issue_comment
1948
5361
 
1949
5362
  # @private
1950
5363
  def initialize parent_rpcs = nil
@@ -1962,8 +5375,20 @@ module Google
1962
5375
  @get_repository = ::Gapic::Config::Method.new get_repository_config
1963
5376
  create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository
1964
5377
  @create_repository = ::Gapic::Config::Method.new create_repository_config
5378
+ update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository
5379
+ @update_repository = ::Gapic::Config::Method.new update_repository_config
1965
5380
  delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository
1966
5381
  @delete_repository = ::Gapic::Config::Method.new delete_repository_config
5382
+ list_hooks_config = parent_rpcs.list_hooks if parent_rpcs.respond_to? :list_hooks
5383
+ @list_hooks = ::Gapic::Config::Method.new list_hooks_config
5384
+ get_hook_config = parent_rpcs.get_hook if parent_rpcs.respond_to? :get_hook
5385
+ @get_hook = ::Gapic::Config::Method.new get_hook_config
5386
+ create_hook_config = parent_rpcs.create_hook if parent_rpcs.respond_to? :create_hook
5387
+ @create_hook = ::Gapic::Config::Method.new create_hook_config
5388
+ update_hook_config = parent_rpcs.update_hook if parent_rpcs.respond_to? :update_hook
5389
+ @update_hook = ::Gapic::Config::Method.new update_hook_config
5390
+ delete_hook_config = parent_rpcs.delete_hook if parent_rpcs.respond_to? :delete_hook
5391
+ @delete_hook = ::Gapic::Config::Method.new delete_hook_config
1967
5392
  get_iam_policy_repo_config = parent_rpcs.get_iam_policy_repo if parent_rpcs.respond_to? :get_iam_policy_repo
1968
5393
  @get_iam_policy_repo = ::Gapic::Config::Method.new get_iam_policy_repo_config
1969
5394
  set_iam_policy_repo_config = parent_rpcs.set_iam_policy_repo if parent_rpcs.respond_to? :set_iam_policy_repo
@@ -1980,6 +5405,66 @@ module Google
1980
5405
  @update_branch_rule = ::Gapic::Config::Method.new update_branch_rule_config
1981
5406
  delete_branch_rule_config = parent_rpcs.delete_branch_rule if parent_rpcs.respond_to? :delete_branch_rule
1982
5407
  @delete_branch_rule = ::Gapic::Config::Method.new delete_branch_rule_config
5408
+ create_pull_request_config = parent_rpcs.create_pull_request if parent_rpcs.respond_to? :create_pull_request
5409
+ @create_pull_request = ::Gapic::Config::Method.new create_pull_request_config
5410
+ get_pull_request_config = parent_rpcs.get_pull_request if parent_rpcs.respond_to? :get_pull_request
5411
+ @get_pull_request = ::Gapic::Config::Method.new get_pull_request_config
5412
+ list_pull_requests_config = parent_rpcs.list_pull_requests if parent_rpcs.respond_to? :list_pull_requests
5413
+ @list_pull_requests = ::Gapic::Config::Method.new list_pull_requests_config
5414
+ update_pull_request_config = parent_rpcs.update_pull_request if parent_rpcs.respond_to? :update_pull_request
5415
+ @update_pull_request = ::Gapic::Config::Method.new update_pull_request_config
5416
+ merge_pull_request_config = parent_rpcs.merge_pull_request if parent_rpcs.respond_to? :merge_pull_request
5417
+ @merge_pull_request = ::Gapic::Config::Method.new merge_pull_request_config
5418
+ open_pull_request_config = parent_rpcs.open_pull_request if parent_rpcs.respond_to? :open_pull_request
5419
+ @open_pull_request = ::Gapic::Config::Method.new open_pull_request_config
5420
+ close_pull_request_config = parent_rpcs.close_pull_request if parent_rpcs.respond_to? :close_pull_request
5421
+ @close_pull_request = ::Gapic::Config::Method.new close_pull_request_config
5422
+ list_pull_request_file_diffs_config = parent_rpcs.list_pull_request_file_diffs if parent_rpcs.respond_to? :list_pull_request_file_diffs
5423
+ @list_pull_request_file_diffs = ::Gapic::Config::Method.new list_pull_request_file_diffs_config
5424
+ fetch_tree_config = parent_rpcs.fetch_tree if parent_rpcs.respond_to? :fetch_tree
5425
+ @fetch_tree = ::Gapic::Config::Method.new fetch_tree_config
5426
+ fetch_blob_config = parent_rpcs.fetch_blob if parent_rpcs.respond_to? :fetch_blob
5427
+ @fetch_blob = ::Gapic::Config::Method.new fetch_blob_config
5428
+ create_issue_config = parent_rpcs.create_issue if parent_rpcs.respond_to? :create_issue
5429
+ @create_issue = ::Gapic::Config::Method.new create_issue_config
5430
+ get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue
5431
+ @get_issue = ::Gapic::Config::Method.new get_issue_config
5432
+ list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues
5433
+ @list_issues = ::Gapic::Config::Method.new list_issues_config
5434
+ update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue
5435
+ @update_issue = ::Gapic::Config::Method.new update_issue_config
5436
+ delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue
5437
+ @delete_issue = ::Gapic::Config::Method.new delete_issue_config
5438
+ open_issue_config = parent_rpcs.open_issue if parent_rpcs.respond_to? :open_issue
5439
+ @open_issue = ::Gapic::Config::Method.new open_issue_config
5440
+ close_issue_config = parent_rpcs.close_issue if parent_rpcs.respond_to? :close_issue
5441
+ @close_issue = ::Gapic::Config::Method.new close_issue_config
5442
+ get_pull_request_comment_config = parent_rpcs.get_pull_request_comment if parent_rpcs.respond_to? :get_pull_request_comment
5443
+ @get_pull_request_comment = ::Gapic::Config::Method.new get_pull_request_comment_config
5444
+ list_pull_request_comments_config = parent_rpcs.list_pull_request_comments if parent_rpcs.respond_to? :list_pull_request_comments
5445
+ @list_pull_request_comments = ::Gapic::Config::Method.new list_pull_request_comments_config
5446
+ create_pull_request_comment_config = parent_rpcs.create_pull_request_comment if parent_rpcs.respond_to? :create_pull_request_comment
5447
+ @create_pull_request_comment = ::Gapic::Config::Method.new create_pull_request_comment_config
5448
+ update_pull_request_comment_config = parent_rpcs.update_pull_request_comment if parent_rpcs.respond_to? :update_pull_request_comment
5449
+ @update_pull_request_comment = ::Gapic::Config::Method.new update_pull_request_comment_config
5450
+ delete_pull_request_comment_config = parent_rpcs.delete_pull_request_comment if parent_rpcs.respond_to? :delete_pull_request_comment
5451
+ @delete_pull_request_comment = ::Gapic::Config::Method.new delete_pull_request_comment_config
5452
+ batch_create_pull_request_comments_config = parent_rpcs.batch_create_pull_request_comments if parent_rpcs.respond_to? :batch_create_pull_request_comments
5453
+ @batch_create_pull_request_comments = ::Gapic::Config::Method.new batch_create_pull_request_comments_config
5454
+ resolve_pull_request_comments_config = parent_rpcs.resolve_pull_request_comments if parent_rpcs.respond_to? :resolve_pull_request_comments
5455
+ @resolve_pull_request_comments = ::Gapic::Config::Method.new resolve_pull_request_comments_config
5456
+ unresolve_pull_request_comments_config = parent_rpcs.unresolve_pull_request_comments if parent_rpcs.respond_to? :unresolve_pull_request_comments
5457
+ @unresolve_pull_request_comments = ::Gapic::Config::Method.new unresolve_pull_request_comments_config
5458
+ create_issue_comment_config = parent_rpcs.create_issue_comment if parent_rpcs.respond_to? :create_issue_comment
5459
+ @create_issue_comment = ::Gapic::Config::Method.new create_issue_comment_config
5460
+ get_issue_comment_config = parent_rpcs.get_issue_comment if parent_rpcs.respond_to? :get_issue_comment
5461
+ @get_issue_comment = ::Gapic::Config::Method.new get_issue_comment_config
5462
+ list_issue_comments_config = parent_rpcs.list_issue_comments if parent_rpcs.respond_to? :list_issue_comments
5463
+ @list_issue_comments = ::Gapic::Config::Method.new list_issue_comments_config
5464
+ update_issue_comment_config = parent_rpcs.update_issue_comment if parent_rpcs.respond_to? :update_issue_comment
5465
+ @update_issue_comment = ::Gapic::Config::Method.new update_issue_comment_config
5466
+ delete_issue_comment_config = parent_rpcs.delete_issue_comment if parent_rpcs.respond_to? :delete_issue_comment
5467
+ @delete_issue_comment = ::Gapic::Config::Method.new delete_issue_comment_config
1983
5468
 
1984
5469
  yield self if block_given?
1985
5470
  end