Class: OCI::LogAnalytics::Models::QueryAggregation
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::QueryAggregation
- Defined in:
- lib/oci/log_analytics/models/query_aggregation.rb
Overview
Query results.
Instance Attribute Summary collapse
-
#are_partial_results ⇒ BOOLEAN
True if query did not complete processing all data.
-
#columns ⇒ Array<OCI::LogAnalytics::Models::AbstractColumn>
Query result columns.
-
#fields ⇒ Array<OCI::LogAnalytics::Models::AbstractColumn>
Query result fields.
-
#is_content_hidden ⇒ BOOLEAN
True if the data returned by query is hidden.
-
#items ⇒ Array<Hash<String, Object>>
Query result data.
-
#partial_result_reason ⇒ String
Explanation of why results may be partial.
-
#percent_complete ⇒ Integer
[Required] Percentage progress completion of the query.
-
#query_execution_time_in_ms ⇒ Integer
Time ellapsed executing query in milli-seconds.
-
#total_count ⇒ Integer
Number of rows query retrieved.
-
#total_matched_count ⇒ Integer
Number of rows matched by query.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ QueryAggregation
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ QueryAggregation
Initializes the object
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 114 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.total_count = attributes[:'totalCount'] if attributes[:'totalCount'] raise 'You cannot provide both :totalCount and :total_count' if attributes.key?(:'totalCount') && attributes.key?(:'total_count') self.total_count = attributes[:'total_count'] if attributes[:'total_count'] self.total_matched_count = attributes[:'totalMatchedCount'] if attributes[:'totalMatchedCount'] raise 'You cannot provide both :totalMatchedCount and :total_matched_count' if attributes.key?(:'totalMatchedCount') && attributes.key?(:'total_matched_count') self.total_matched_count = attributes[:'total_matched_count'] if attributes[:'total_matched_count'] self.are_partial_results = attributes[:'arePartialResults'] unless attributes[:'arePartialResults'].nil? raise 'You cannot provide both :arePartialResults and :are_partial_results' if attributes.key?(:'arePartialResults') && attributes.key?(:'are_partial_results') self.are_partial_results = attributes[:'are_partial_results'] unless attributes[:'are_partial_results'].nil? self.partial_result_reason = attributes[:'partialResultReason'] if attributes[:'partialResultReason'] raise 'You cannot provide both :partialResultReason and :partial_result_reason' if attributes.key?(:'partialResultReason') && attributes.key?(:'partial_result_reason') self.partial_result_reason = attributes[:'partial_result_reason'] if attributes[:'partial_result_reason'] self.is_content_hidden = attributes[:'isContentHidden'] unless attributes[:'isContentHidden'].nil? raise 'You cannot provide both :isContentHidden and :is_content_hidden' if attributes.key?(:'isContentHidden') && attributes.key?(:'is_content_hidden') self.is_content_hidden = attributes[:'is_content_hidden'] unless attributes[:'is_content_hidden'].nil? self.columns = attributes[:'columns'] if attributes[:'columns'] self.fields = attributes[:'fields'] if attributes[:'fields'] self.items = attributes[:'items'] if attributes[:'items'] self.query_execution_time_in_ms = attributes[:'queryExecutionTimeInMs'] if attributes[:'queryExecutionTimeInMs'] raise 'You cannot provide both :queryExecutionTimeInMs and :query_execution_time_in_ms' if attributes.key?(:'queryExecutionTimeInMs') && attributes.key?(:'query_execution_time_in_ms') self.query_execution_time_in_ms = attributes[:'query_execution_time_in_ms'] if attributes[:'query_execution_time_in_ms'] self.percent_complete = attributes[:'percentComplete'] if attributes[:'percentComplete'] raise 'You cannot provide both :percentComplete and :percent_complete' if attributes.key?(:'percentComplete') && attributes.key?(:'percent_complete') self.percent_complete = attributes[:'percent_complete'] if attributes[:'percent_complete'] end |
Instance Attribute Details
#are_partial_results ⇒ BOOLEAN
True if query did not complete processing all data.
25 26 27 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 25 def are_partial_results @are_partial_results end |
#columns ⇒ Array<OCI::LogAnalytics::Models::AbstractColumn>
Query result columns
40 41 42 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 40 def columns @columns end |
#fields ⇒ Array<OCI::LogAnalytics::Models::AbstractColumn>
Query result fields
45 46 47 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 45 def fields @fields end |
#is_content_hidden ⇒ BOOLEAN
True if the data returned by query is hidden.
35 36 37 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 35 def is_content_hidden @is_content_hidden end |
#items ⇒ Array<Hash<String, Object>>
Query result data
50 51 52 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 50 def items @items end |
#partial_result_reason ⇒ String
Explanation of why results may be partial. Only set if arePartialResults is true.
30 31 32 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 30 def partial_result_reason @partial_result_reason end |
#percent_complete ⇒ Integer
[Required] Percentage progress completion of the query.
60 61 62 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 60 def percent_complete @percent_complete end |
#query_execution_time_in_ms ⇒ Integer
Time ellapsed executing query in milli-seconds.
55 56 57 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 55 def query_execution_time_in_ms @query_execution_time_in_ms end |
#total_count ⇒ Integer
Number of rows query retrieved. Up to maxTotalCount limit.
15 16 17 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 15 def total_count @total_count end |
#total_matched_count ⇒ Integer
Number of rows matched by query.
20 21 22 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 20 def total_matched_count @total_matched_count end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 63 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'total_count': :'totalCount', 'total_matched_count': :'totalMatchedCount', 'are_partial_results': :'arePartialResults', 'partial_result_reason': :'partialResultReason', 'is_content_hidden': :'isContentHidden', 'columns': :'columns', 'fields': :'fields', 'items': :'items', 'query_execution_time_in_ms': :'queryExecutionTimeInMs', 'percent_complete': :'percentComplete' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 81 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'total_count': :'Integer', 'total_matched_count': :'Integer', 'are_partial_results': :'BOOLEAN', 'partial_result_reason': :'String', 'is_content_hidden': :'BOOLEAN', 'columns': :'Array<OCI::LogAnalytics::Models::AbstractColumn>', 'fields': :'Array<OCI::LogAnalytics::Models::AbstractColumn>', 'items': :'Array<Hash<String, Object>>', 'query_execution_time_in_ms': :'Integer', 'percent_complete': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 176 def ==(other) return true if equal?(other) self.class == other.class && total_count == other.total_count && total_matched_count == other.total_matched_count && are_partial_results == other.are_partial_results && partial_result_reason == other.partial_result_reason && is_content_hidden == other.is_content_hidden && columns == other.columns && fields == other.fields && items == other.items && query_execution_time_in_ms == other.query_execution_time_in_ms && percent_complete == other.percent_complete end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 215 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
195 196 197 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 195 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
204 205 206 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 204 def hash [total_count, total_matched_count, are_partial_results, partial_result_reason, is_content_hidden, columns, fields, items, query_execution_time_in_ms, percent_complete].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
248 249 250 251 252 253 254 255 256 257 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 248 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
242 243 244 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 242 def to_s to_hash.to_s end |