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.
-
#recalls ⇒ Array<OCI::LogAnalytics::Models::RecallDefinition>
List of recalls in the query.
- #time_filter ⇒ OCI::LogAnalytics::Models::TimeRange
-
#total_count ⇒ Integer
Number of rows query retrieved.
-
#total_group_count ⇒ Integer
Number of groups created by query.
-
#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
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 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 136 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.total_group_count = attributes[:'totalGroupCount'] if attributes[:'totalGroupCount'] raise 'You cannot provide both :totalGroupCount and :total_group_count' if attributes.key?(:'totalGroupCount') && attributes.key?(:'total_group_count') self.total_group_count = attributes[:'total_group_count'] if attributes[:'total_group_count'] self.time_filter = attributes[:'timeFilter'] if attributes[:'timeFilter'] raise 'You cannot provide both :timeFilter and :time_filter' if attributes.key?(:'timeFilter') && attributes.key?(:'time_filter') self.time_filter = attributes[:'time_filter'] if attributes[:'time_filter'] self.recalls = attributes[:'recalls'] if attributes[:'recalls'] 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.
38 39 40 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 38 def are_partial_results @are_partial_results end |
#columns ⇒ Array<OCI::LogAnalytics::Models::AbstractColumn>
Query result columns
53 54 55 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 53 def columns @columns end |
#fields ⇒ Array<OCI::LogAnalytics::Models::AbstractColumn>
Query result fields
58 59 60 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 58 def fields @fields end |
#is_content_hidden ⇒ BOOLEAN
True if the data returned by query is hidden.
48 49 50 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 48 def is_content_hidden @is_content_hidden end |
#items ⇒ Array<Hash<String, Object>>
Query result data
63 64 65 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 63 def items @items end |
#partial_result_reason ⇒ String
Explanation of why results may be partial. Only set if arePartialResults is true.
43 44 45 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 43 def partial_result_reason @partial_result_reason end |
#percent_complete ⇒ Integer
[Required] Percentage progress completion of the query.
73 74 75 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 73 def percent_complete @percent_complete end |
#query_execution_time_in_ms ⇒ Integer
Time ellapsed executing query in milli-seconds.
68 69 70 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 68 def query_execution_time_in_ms @query_execution_time_in_ms end |
#recalls ⇒ Array<OCI::LogAnalytics::Models::RecallDefinition>
List of recalls in the query.
33 34 35 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 33 def recalls @recalls end |
#time_filter ⇒ OCI::LogAnalytics::Models::TimeRange
28 29 30 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 28 def time_filter @time_filter 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_group_count ⇒ Integer
Number of groups created by query.
25 26 27 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 25 def total_group_count @total_group_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.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 76 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'total_count': :'totalCount', 'total_matched_count': :'totalMatchedCount', 'total_group_count': :'totalGroupCount', 'time_filter': :'timeFilter', 'recalls': :'recalls', '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.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 97 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'total_count': :'Integer', 'total_matched_count': :'Integer', 'total_group_count': :'Integer', 'time_filter': :'OCI::LogAnalytics::Models::TimeRange', 'recalls': :'Array<OCI::LogAnalytics::Models::RecallDefinition>', '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.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 212 def ==(other) return true if equal?(other) self.class == other.class && total_count == other.total_count && total_matched_count == other.total_matched_count && total_group_count == other.total_group_count && time_filter == other.time_filter && recalls == other.recalls && 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
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 254 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
234 235 236 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 234 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
243 244 245 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 243 def hash [total_count, total_matched_count, total_group_count, time_filter, recalls, 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
287 288 289 290 291 292 293 294 295 296 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 287 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
281 282 283 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 281 def to_s to_hash.to_s end |