Class: Google::Apis::CloudassetV1::QueryResult

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudasset_v1/classes.rb,
lib/google/apis/cloudasset_v1/representations.rb,
lib/google/apis/cloudasset_v1/representations.rb

Overview

Execution results of the query. The result is formatted as rows represented by BigQuery compatible [schema]. When pagination is necessary, it will contains the page token to retrieve the results of following pages.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryResult

Returns a new instance of QueryResult.



5088
5089
5090
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5088

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#next_page_tokenString

Token to retrieve the next page of the results. Corresponds to the JSON property nextPageToken

Returns:

  • (String)


5071
5072
5073
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5071

def next_page_token
  @next_page_token
end

#rowsArray<Hash<String,Object>>

Each row hold a query result in the format of Struct. Corresponds to the JSON property rows

Returns:

  • (Array<Hash<String,Object>>)


5076
5077
5078
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5076

def rows
  @rows
end

#schemaGoogle::Apis::CloudassetV1::TableSchema

BigQuery Compatible table schema. Corresponds to the JSON property schema



5081
5082
5083
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5081

def schema
  @schema
end

#total_rowsFixnum

Total rows of the whole query results. Corresponds to the JSON property totalRows

Returns:

  • (Fixnum)


5086
5087
5088
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5086

def total_rows
  @total_rows
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5093
5094
5095
5096
5097
5098
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5093

def update!(**args)
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
  @rows = args[:rows] if args.key?(:rows)
  @schema = args[:schema] if args.key?(:schema)
  @total_rows = args[:total_rows] if args.key?(:total_rows)
end