shared/output/gapic/templates/showcase/lib/google/showcase/v1beta1/messaging/operations.rb
##
# Lists operations that match the specified filter in the request. If the
# server doesn't support this method, it returns `UNIMPLEMENTED`.
#
# NOTE: the `name` binding allows API services to override the binding
# to use different resource name schemes, such as `users/*/operations`. To
# override the binding, API services can add a binding such as
# `"/v1/{name=users/*}/operations"` to their service configuration.
# For backwards compatibility, the default name includes the operations
# collection id, however overriding users must ensure the name binding
# is the parent resource, without the operations collection id.
#
# @overload list_operations(request, options = nil)
#   Pass arguments to `list_operations` via a request object, either of type
#   {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
#
#   @param request [::Google::Longrunning::ListOperationsRequest, ::Hash]
#     A request object representing the call parameters. Required. To specify no
#     parameters, or to keep all the default parameter values, pass an empty Hash.
#   @param options [::Gapic::CallOptions, ::Hash]
#     Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
# @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
#   Pass arguments to `list_operations` via keyword arguments. Note that at
#   least one keyword argument is required. To specify no parameters, or to keep all
#   the default parameter values, pass an empty Hash as a request object (see above).
#
#   @param name [::String]
#     The name of the operation's parent resource.
#   @param filter [::String]
#     The standard list filter.
#   @param page_size [::Integer]
#     The standard list page size.
#   @param page_token [::String]
#     The standard list page token.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
# @yieldparam operation [::GRPC::ActiveCall::Operation]
#
# @return [::Gapic::PagedEnumerable<::Gapic::Operation>]
#
# @raise [::GRPC::BadStatus] if the RPC is aborted.
#
Lists operations that match the specified filter in the request. If the
server doesn't support this method, it returns `UNIMPLEMENTED`.

the `name` binding allows API services to override the binding
to use different resource name schemes, such as `users/operations`. To
override the binding, API services can add a binding such as
`"/v1/{name=users}/operations"` to their service configuration.
For backwards compatibility, the default name includes the operations
collection id, however overriding users must ensure the name binding
is the parent resource, without the operations collection id.
Lists operations that match the specified filter in the request . If the server doesn ' t support this method it returns ` UNIMPLEMENTED ` . the ` name ` binding allows API services to override the binding to use different resource name schemes such as ` users / operations ` . To override the binding API services can add a binding such as ` " / v1 / { name = users } / operations " ` to their service configuration . For backwards compatibility the default name includes the operations collection id however overriding users must ensure the name binding is the parent resource without the operations collection id .
def list_operations request, options = nil
            raise ::ArgumentError, "request must be provided" if request.nil?
            request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest
            options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
            metadata = @config.rpcs.list_operations.metadata.to_h
            metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
              lib_name: @config.lib_name, lib_version: @config.lib_version,
              gapic_version: ::Google::Showcase::VERSION
            metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
            header_params = {}
            if request.name
              header_params["name"] = request.name
            end
            request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
            metadata[:"x-goog-request-params"] ||= request_params_header
            options.apply_defaults timeout:      @config.rpcs.list_operations.timeout,
                                   metadata:     metadata,
                                   retry_policy: @config.rpcs.list_operations.retry_policy
            options.apply_defaults timeout:      @config.timeout,
                                   metadata:     @config.metadata,
                                   retry_policy: @config.retry_policy
            @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
              wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
              response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation,
                                                      options, format_resource: wrap_lro_operation
              yield response, operation if block_given?
              return response
            end
          end
def list_operations request , options = nil raise :: ArgumentError , "request must be provided" if request . nil? request = :: Gapic :: Protobuf . coerce request , to : :: Google :: Longrunning :: ListOperationsRequest options = :: Gapic :: CallOptions . new ( ** options . to_h ) if options . respond_to? :to_h metadata = @config . rpcs . list_operations . metadata . to_h metadata [ :" x-goog-api-client " ] ||= :: Gapic :: Headers . x_goog_api_client lib_name : @config . lib_name , lib_version : @config . lib_version , gapic_version : :: Google :: Showcase :: VERSION metadata [ :" x-goog-user-project " ] = @quota_project_id if @quota_project_id header_params = { } if request . name header_params [ "name" ] = request . name end request_params_header = header_params . map { | k , v | "#{k}=#{v}" } . join ( "&" ) metadata [ :" x-goog-request-params " ] ||= request_params_header options . apply_defaults timeout : @config . rpcs . list_operations . timeout , metadata : metadata , retry_policy : @config . rpcs . list_operations . retry_policy options . apply_defaults timeout : @config . timeout , metadata : @config . metadata , retry_policy : @config . retry_policy @operations_stub . call_rpc :list_operations , request , options : options do | response , operation | wrap_lro_operation = -> ( op_response ) { :: Gapic :: Operation . new op_response , @operations_client } response = :: Gapic :: PagedEnumerable . new @operations_stub , :list_operations , request , response , operation , options , format_resource : wrap_lro_operation yield response , operation if block_given? return response end end
Lists operations that match the specified filter in the request.
Lists operations that match the specified filter in the request .
# Converts hash and nil to an options object # Customize the options with defaults # Set x-goog-api-client and x-goog-user-project headers
None
::Gapic::PagedEnumerable<::Gapic::Operation>
[::GRPC::BadStatus] if the RPC is aborted.
[ :: GRPC :: BadStatus ] if the RPC is aborted .
request
<not_specific>
options
<not_specific>
]
<not_specific>
Access the result along with the RPC operation
Access the result along with the RPC operation
<not_specific>
None
overload
list_operations(request, options = nil) Pass arguments to `list_operations` via a request object, either of type {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
list_operations ( request options = nil ) Pass arguments to ` list_operations ` via a request object either of type { :: Google :: Longrunning :: ListOperationsRequest } or an equivalent Hash . @param request [ :: Google :: Longrunning :: ListOperationsRequest :: Hash ] A request object representing the call parameters . Required . To specify no parameters or to keep all the default parameter values pass an empty Hash . @param options [ :: Gapic :: CallOptions :: Hash ] Overrides the default settings for this call e . g timeout retries etc . Optional .
overload
None