Class: Google::Cloud::Trace::ResultSet
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Cloud::Trace::ResultSet
 
 
- Includes:
 - Enumerable
 
- Defined in:
 - lib/google/cloud/trace/result_set.rb
 
Overview
ResultSet represents the results of a list_traces request. It is
an enumerable of the traces found, plus information about the request
and a token to get the next page of results.
Instance Attribute Summary collapse
- 
  
    
      #end_time  ⇒ Time? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The
end_timequery parameter. - 
  
    
      #filter  ⇒ String? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The
filterquery parameter. - 
  
    
      #next_page_token  ⇒ String? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The token to pass to
list_tracesto get the next page, or nil if this is the last page. - 
  
    
      #order_by  ⇒ String? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The
order_byquery parameter. - 
  
    
      #page_size  ⇒ Integer? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The
page_sizequery parameter. - 
  
    
      #page_token  ⇒ String? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The page token used to obtain this page of results.
 - 
  
    
      #project  ⇒ String 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The project ID string.
 - 
  
    
      #start_time  ⇒ Time? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The
start_timequery parameter. - 
  
    
      #view  ⇒ Symbol? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The
viewquery parameter. 
Instance Method Summary collapse
- 
  
    
      #each(&block)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
An
eachmethod that supports the Enumerable module. - 
  
    
      #next_page  ⇒ Google::Cloud::Trace::ResultSet 
    
    
  
  
  
  
  
  
  
  
  
    
Queries the service for the next page of results and returns a new ResultSet for that page.
 - 
  
    
      #results_pending?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    
Returns true if at least one more page of results can be retrieved.
 - 
  
    
      #size  ⇒ Integer 
    
    
  
  
  
  
  
  
  
  
  
    
Returns the number of traces in this page of results.
 
Instance Attribute Details
#end_time ⇒ Time? (readonly)
The end_time query parameter.
      120 121 122  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 120 def end_time @end_time end  | 
  
#filter ⇒ String? (readonly)
The filter query parameter.
      127 128 129  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 127 def filter @filter end  | 
  
#next_page_token ⇒ String? (readonly)
The token to pass to list_traces to get the next page, or nil if
this is the last page.
      92 93 94  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 92 def next_page_token @next_page_token end  | 
  
#order_by ⇒ String? (readonly)
The order_by query parameter.
      134 135 136  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 134 def order_by @order_by end  | 
  
#page_size ⇒ Integer? (readonly)
The page_size query parameter.
      106 107 108  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 106 def page_size @page_size end  | 
  
#page_token ⇒ String? (readonly)
The page token used to obtain this page of results.
      141 142 143  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 141 def page_token @page_token end  | 
  
#project ⇒ String (readonly)
The project ID string.
      84 85 86  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 84 def project @project end  | 
  
#start_time ⇒ Time? (readonly)
The start_time query parameter.
      113 114 115  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 113 def start_time @start_time end  | 
  
#view ⇒ Symbol? (readonly)
The view query parameter.
      99 100 101  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 99 def view @view end  | 
  
Instance Method Details
#each(&block) ⇒ Object
An each method that supports the Enumerable module. Iterates over
the results and yields each, as a TraceRecord
object, to the given block. If no block is provided, returns an
Enumerator.
      61 62 63  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 61 def each &block @results.each(&block) end  | 
  
#next_page ⇒ Google::Cloud::Trace::ResultSet
Queries the service for the next page of results and returns a new
ResultSet for that page. Returns nil if there are no more results.
      158 159 160 161 162 163 164 165 166 167  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 158 def next_page return nil unless results_pending? service.list_traces \ project, start_time, end_time, filter: filter, order_by: order_by, view: view, page_size: page_size, page_token: next_page_token end  | 
  
#results_pending? ⇒ Boolean
Returns true if at least one more page of results can be retrieved.
      148 149 150  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 148 def results_pending? !next_page_token.nil? end  | 
  
#size ⇒ Integer
Returns the number of traces in this page of results.
      70 71 72  | 
    
      # File 'lib/google/cloud/trace/result_set.rb', line 70 def size @results.size end  |