# frozen_string_literal: true # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/securitycenter/v2/securitycenter_service_pb" module Google module Cloud module SecurityCenter module V2 module SecurityCenter module Rest ## # REST service stub for the SecurityCenter service. # Service stub contains baseline method implementations # including transcoding, making the REST call, and deserialing the response. # class ServiceStub def initialize endpoint:, endpoint_template:, universe_domain:, credentials: # These require statements are intentionally placed here to initialize # the REST modules only when it's required. require "gapic/rest" @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, endpoint_template: endpoint_template, universe_domain: universe_domain, credentials: credentials, numeric_enums: true, raise_faraday_errors: false end ## # The effective universe domain # # @return [String] # def universe_domain @client_stub.universe_domain end ## # The effective endpoint # # @return [String] # def endpoint @client_stub.endpoint end ## # Baseline implementation for the batch_create_resource_value_configs REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] # A result object deserialized from the server's reply def batch_create_resource_value_configs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_resource_value_configs_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the bulk_mute_findings REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply def bulk_mute_findings request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_bulk_mute_findings_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the create_big_query_export REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] # A result object deserialized from the server's reply def create_big_query_export request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_big_query_export_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the create_finding REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::Finding] # A result object deserialized from the server's reply def create_finding request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_finding_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the create_mute_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] # A result object deserialized from the server's reply def create_mute_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_mute_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the create_notification_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] # A result object deserialized from the server's reply def create_notification_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the create_source REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::Source] # A result object deserialized from the server's reply def create_source request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_source_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::Source.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the delete_big_query_export REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply def delete_big_query_export request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_big_query_export_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the delete_mute_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply def delete_mute_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_mute_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the delete_notification_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply def delete_notification_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the delete_resource_value_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply def delete_resource_value_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_resource_value_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_big_query_export REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] # A result object deserialized from the server's reply def get_big_query_export request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_big_query_export_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_simulation REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Simulation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::Simulation] # A result object deserialized from the server's reply def get_simulation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_simulation_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::Simulation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_valued_resource REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ValuedResource] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] # A result object deserialized from the server's reply def get_valued_resource request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_valued_resource_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ValuedResource.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_iam_policy REST call # # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Iam::V1::Policy] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Iam::V1::Policy] # A result object deserialized from the server's reply def get_iam_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_mute_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] # A result object deserialized from the server's reply def get_mute_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_mute_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_notification_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] # A result object deserialized from the server's reply def get_notification_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_resource_value_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] # A result object deserialized from the server's reply def get_resource_value_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_value_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_source REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSourceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::Source] # A result object deserialized from the server's reply def get_source request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_source_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::Source.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the group_findings REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse] # A result object deserialized from the server's reply def group_findings request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_group_findings_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_attack_paths REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse] # A result object deserialized from the server's reply def list_attack_paths request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_attack_paths_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_big_query_exports REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse] # A result object deserialized from the server's reply def list_big_query_exports request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_big_query_exports_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_findings REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListFindingsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ListFindingsResponse] # A result object deserialized from the server's reply def list_findings request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_mute_configs REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse] # A result object deserialized from the server's reply def list_mute_configs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_mute_configs_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_notification_configs REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse] # A result object deserialized from the server's reply def list_notification_configs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_configs_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_resource_value_configs REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse] # A result object deserialized from the server's reply def list_resource_value_configs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_value_configs_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_sources REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListSourcesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ListSourcesResponse] # A result object deserialized from the server's reply def list_sources request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_sources_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_valued_resources REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse] # A result object deserialized from the server's reply def list_valued_resources request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_valued_resources_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_finding_state REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::Finding] # A result object deserialized from the server's reply def set_finding_state request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_finding_state_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_iam_policy REST call # # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Iam::V1::Policy] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Iam::V1::Policy] # A result object deserialized from the server's reply def set_iam_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_mute REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetMuteRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::Finding] # A result object deserialized from the server's reply def set_mute request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_mute_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the test_iam_permissions REST call # # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Iam::V1::TestIamPermissionsResponse] # A result object deserialized from the server's reply def test_iam_permissions request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_big_query_export REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] # A result object deserialized from the server's reply def update_big_query_export request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_big_query_export_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_external_system REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ExternalSystem] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] # A result object deserialized from the server's reply def update_external_system request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_external_system_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ExternalSystem.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_finding REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::Finding] # A result object deserialized from the server's reply def update_finding request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_finding_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_mute_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] # A result object deserialized from the server's reply def update_mute_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_mute_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_notification_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] # A result object deserialized from the server's reply def update_notification_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_resource_value_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] # A result object deserialized from the server's reply def update_resource_value_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_resource_value_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_security_marks REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::SecurityMarks] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] # A result object deserialized from the server's reply def update_security_marks request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_security_marks_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::SecurityMarks.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_source REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::SecurityCenter::V2::Source] # A result object deserialized from the server's reply def update_source request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_source_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::SecurityCenter::V2::Source.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # @private # # GRPC transcoding helper method for the batch_create_resource_value_configs REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_batch_create_resource_value_configs_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/resourceValueConfigs:batchCreate", body: "*", matches: [ ["parent", %r{^organizations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the bulk_mute_findings REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_bulk_mute_findings_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:bulkMute", body: "*", matches: [ ["parent", %r{^organizations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:bulkMute", body: "*", matches: [ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:bulkMute", body: "*", matches: [ ["parent", %r{^folders/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:bulkMute", body: "*", matches: [ ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:bulkMute", body: "*", matches: [ ["parent", %r{^projects/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:bulkMute", body: "*", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_big_query_export REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_create_big_query_export_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/bigQueryExports", body: "big_query_export", matches: [ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/bigQueryExports", body: "big_query_export", matches: [ ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/bigQueryExports", body: "big_query_export", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_finding REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_create_finding_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings", body: "finding", matches: [ ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings", body: "finding", matches: [ ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_mute_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_create_mute_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/muteConfigs", body: "mute_config", matches: [ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/muteConfigs", body: "mute_config", matches: [ ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/muteConfigs", body: "mute_config", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/muteConfigs", body: "mute_config", matches: [ ["parent", %r{^organizations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/muteConfigs", body: "mute_config", matches: [ ["parent", %r{^folders/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/muteConfigs", body: "mute_config", matches: [ ["parent", %r{^projects/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_notification_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_create_notification_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/notificationConfigs", body: "notification_config", matches: [ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/notificationConfigs", body: "notification_config", matches: [ ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/notificationConfigs", body: "notification_config", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_source REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_create_source_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/sources", body: "source", matches: [ ["parent", %r{^organizations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_big_query_export REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_delete_big_query_export_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_mute_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_delete_mute_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_notification_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_delete_notification_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_resource_value_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_delete_resource_value_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_big_query_export REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_big_query_export_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_simulation REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_simulation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_valued_resource REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_valued_resource_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_iam_policy REST call # # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_iam_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{resource}:getIamPolicy", body: "*", matches: [ ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_mute_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_mute_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_notification_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_notification_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_resource_value_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_resource_value_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_source REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSourceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_source_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{name}", matches: [ ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the group_findings REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_group_findings_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:group", body: "*", matches: [ ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:group", body: "*", matches: [ ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:group", body: "*", matches: [ ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:group", body: "*", matches: [ ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:group", body: "*", matches: [ ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{parent}/findings:group", body: "*", matches: [ ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_attack_paths REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_attack_paths_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/attackPaths", matches: [ ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/attackPaths", matches: [ ["parent", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/attackPaths", matches: [ ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_big_query_exports REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_big_query_exports_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/bigQueryExports", matches: [ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/bigQueryExports", matches: [ ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/bigQueryExports", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_findings REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_findings_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/findings", matches: [ ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/findings", matches: [ ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/findings", matches: [ ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/findings", matches: [ ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/findings", matches: [ ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/findings", matches: [ ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_mute_configs REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_mute_configs_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/muteConfigs", matches: [ ["parent", %r{^organizations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/muteConfigs", matches: [ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/muteConfigs", matches: [ ["parent", %r{^folders/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/muteConfigs", matches: [ ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/muteConfigs", matches: [ ["parent", %r{^projects/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/muteConfigs", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_notification_configs REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_notification_configs_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/notificationConfigs", matches: [ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/notificationConfigs", matches: [ ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/notificationConfigs", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_resource_value_configs REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_resource_value_configs_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/resourceValueConfigs", matches: [ ["parent", %r{^organizations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_sources REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_sources_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/sources", matches: [ ["parent", %r{^organizations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/sources", matches: [ ["parent", %r{^folders/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/sources", matches: [ ["parent", %r{^projects/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_valued_resources REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_valued_resources_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/valuedResources", matches: [ ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v2/{parent}/valuedResources", matches: [ ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_finding_state REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_finding_state_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setState", body: "*", matches: [ ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setState", body: "*", matches: [ ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setState", body: "*", matches: [ ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setState", body: "*", matches: [ ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setState", body: "*", matches: [ ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setState", body: "*", matches: [ ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_iam_policy REST call # # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_iam_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{resource}:setIamPolicy", body: "*", matches: [ ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_mute REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetMuteRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_mute_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setMute", body: "*", matches: [ ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setMute", body: "*", matches: [ ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setMute", body: "*", matches: [ ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setMute", body: "*", matches: [ ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setMute", body: "*", matches: [ ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v2/{name}:setMute", body: "*", matches: [ ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the test_iam_permissions REST call # # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_test_iam_permissions_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v2/{resource}:testIamPermissions", body: "*", matches: [ ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_big_query_export REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_big_query_export_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v2/{big_query_export.name}", body: "big_query_export", matches: [ ["big_query_export.name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{big_query_export.name}", body: "big_query_export", matches: [ ["big_query_export.name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{big_query_export.name}", body: "big_query_export", matches: [ ["big_query_export.name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_external_system REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_external_system_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v2/{external_system.name}", body: "external_system", matches: [ ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{external_system.name}", body: "external_system", matches: [ ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{external_system.name}", body: "external_system", matches: [ ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{external_system.name}", body: "external_system", matches: [ ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{external_system.name}", body: "external_system", matches: [ ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{external_system.name}", body: "external_system", matches: [ ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_finding REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_finding_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v2/{finding.name}", body: "finding", matches: [ ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{finding.name}", body: "finding", matches: [ ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{finding.name}", body: "finding", matches: [ ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{finding.name}", body: "finding", matches: [ ["finding.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{finding.name}", body: "finding", matches: [ ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{finding.name}", body: "finding", matches: [ ["finding.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_mute_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_mute_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v2/{mute_config.name}", body: "mute_config", matches: [ ["mute_config.name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{mute_config.name}", body: "mute_config", matches: [ ["mute_config.name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{mute_config.name}", body: "mute_config", matches: [ ["mute_config.name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{mute_config.name}", body: "mute_config", matches: [ ["mute_config.name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{mute_config.name}", body: "mute_config", matches: [ ["mute_config.name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{mute_config.name}", body: "mute_config", matches: [ ["mute_config.name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_notification_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_notification_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v2/{notification_config.name}", body: "notification_config", matches: [ ["notification_config.name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{notification_config.name}", body: "notification_config", matches: [ ["notification_config.name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{notification_config.name}", body: "notification_config", matches: [ ["notification_config.name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_resource_value_config REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_resource_value_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v2/{resource_value_config.name}", body: "resource_value_config", matches: [ ["resource_value_config.name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_security_marks REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_security_marks_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v2/{security_marks.name}", body: "security_marks", matches: [ ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{security_marks.name}", body: "security_marks", matches: [ ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{security_marks.name}", body: "security_marks", matches: [ ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{security_marks.name}", body: "security_marks", matches: [ ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{security_marks.name}", body: "security_marks", matches: [ ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{security_marks.name}", body: "security_marks", matches: [ ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{security_marks.name}", body: "security_marks", matches: [ ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{security_marks.name}", body: "security_marks", matches: [ ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v2/{security_marks.name}", body: "security_marks", matches: [ ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_source REST call # # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_source_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v2/{source.name}", body: "source", matches: [ ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end end end end end end end end