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.
-
#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
105 106 107 108 109 110 111 112 113 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 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 105 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.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.
24 25 26 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 24 def are_partial_results @are_partial_results end |
#columns ⇒ Array<OCI::LogAnalytics::Models::AbstractColumn>
Query result columns
34 35 36 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 34 def columns @columns end |
#fields ⇒ Array<OCI::LogAnalytics::Models::AbstractColumn>
Query result fields
39 40 41 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 39 def fields @fields end |
#items ⇒ Array<Hash<String, Object>>
Query result data
44 45 46 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 44 def items @items end |
#partial_result_reason ⇒ String
Explanation of why results may be partial. Only set if arePartialResults is true.
29 30 31 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 29 def partial_result_reason @partial_result_reason end |
#percent_complete ⇒ Integer
[Required] Percentage progress completion of the query.
54 55 56 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 54 def percent_complete @percent_complete end |
#query_execution_time_in_ms ⇒ Integer
Time ellapsed executing query in milli-seconds.
49 50 51 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 49 def query_execution_time_in_ms @query_execution_time_in_ms end |
#total_count ⇒ Integer
Number of rows query retrieved. Up to maxTotalCount limit.
14 15 16 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 14 def total_count @total_count end |
#total_matched_count ⇒ Integer
Number of rows matched by query.
19 20 21 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 19 def total_matched_count @total_matched_count end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 57 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'total_count': :'totalCount', 'total_matched_count': :'totalMatchedCount', 'are_partial_results': :'arePartialResults', 'partial_result_reason': :'partialResultReason', '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.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 74 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'total_count': :'Integer', 'total_matched_count': :'Integer', 'are_partial_results': :'BOOLEAN', 'partial_result_reason': :'String', '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.
161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 161 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 && 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
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 199 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
179 180 181 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 179 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
188 189 190 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 188 def hash [total_count, total_matched_count, are_partial_results, partial_result_reason, columns, fields, items, query_execution_time_in_ms, percent_complete].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 232 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
226 227 228 |
# File 'lib/oci/log_analytics/models/query_aggregation.rb', line 226 def to_s to_hash.to_s end |