Class: OCI::ApmTraces::Models::QueryResultRowTypeSummary
- Inherits:
-
Object
- Object
- OCI::ApmTraces::Models::QueryResultRowTypeSummary
- Defined in:
- lib/oci/apm_traces/models/query_result_row_type_summary.rb
Overview
Summary of the datatype, unit and related metadata of an individual row element of a query result row that is returned.
Instance Attribute Summary collapse
-
#data_type ⇒ String
Datatype of the query result row element.
-
#display_name ⇒ String
Alias name if an alias is used for the query result row element or an assigned display name from the query language in some default cases.
-
#expression ⇒ String
Actual show expression in the user typed query that produced this column.
-
#query_result_row_type_summaries ⇒ Array<OCI::ApmTraces::Models::QueryResultRowTypeSummary>
A query result row type summary object that represents a nested table structure.
-
#unit ⇒ String
Granular unit in which the query result row element's data is represented.
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 = {}) ⇒ QueryResultRowTypeSummary
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 = {}) ⇒ QueryResultRowTypeSummary
Initializes the object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 75 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.data_type = attributes[:'dataType'] if attributes[:'dataType'] raise 'You cannot provide both :dataType and :data_type' if attributes.key?(:'dataType') && attributes.key?(:'data_type') self.data_type = attributes[:'data_type'] if attributes[:'data_type'] self.unit = attributes[:'unit'] if attributes[:'unit'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.expression = attributes[:'expression'] if attributes[:'expression'] self.query_result_row_type_summaries = attributes[:'queryResultRowTypeSummaries'] if attributes[:'queryResultRowTypeSummaries'] raise 'You cannot provide both :queryResultRowTypeSummaries and :query_result_row_type_summaries' if attributes.key?(:'queryResultRowTypeSummaries') && attributes.key?(:'query_result_row_type_summaries') self.query_result_row_type_summaries = attributes[:'query_result_row_type_summaries'] if attributes[:'query_result_row_type_summaries'] end |
Instance Attribute Details
#data_type ⇒ String
Datatype of the query result row element.
15 16 17 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 15 def data_type @data_type end |
#display_name ⇒ String
Alias name if an alias is used for the query result row element or an assigned display name from the query language in some default cases.
26 27 28 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 26 def display_name @display_name end |
#expression ⇒ String
Actual show expression in the user typed query that produced this column.
31 32 33 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 31 def expression @expression end |
#query_result_row_type_summaries ⇒ Array<OCI::ApmTraces::Models::QueryResultRowTypeSummary>
A query result row type summary object that represents a nested table structure.
36 37 38 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 36 def query_result_row_type_summaries @query_result_row_type_summaries end |
#unit ⇒ String
Granular unit in which the query result row element's data is represented.
20 21 22 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 20 def unit @unit end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 39 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'data_type': :'dataType', 'unit': :'unit', 'display_name': :'displayName', 'expression': :'expression', 'query_result_row_type_summaries': :'queryResultRowTypeSummaries' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 52 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'data_type': :'String', 'unit': :'String', 'display_name': :'String', 'expression': :'String', 'query_result_row_type_summaries': :'Array<OCI::ApmTraces::Models::QueryResultRowTypeSummary>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 111 def ==(other) return true if equal?(other) self.class == other.class && data_type == other.data_type && unit == other.unit && display_name == other.display_name && expression == other.expression && query_result_row_type_summaries == other.query_result_row_type_summaries end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
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/apm_traces/models/query_result_row_type_summary.rb', line 145 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
125 126 127 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 125 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
134 135 136 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 134 def hash [data_type, unit, display_name, expression, query_result_row_type_summaries].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 178 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
172 173 174 |
# File 'lib/oci/apm_traces/models/query_result_row_type_summary.rb', line 172 def to_s to_hash.to_s end |