Class: OCI::DataConnectivity::Models::AttributeProfileResult
- Inherits:
-
Object
- Object
- OCI::DataConnectivity::Models::AttributeProfileResult
- Defined in:
- lib/oci/data_connectivity/models/attribute_profile_result.rb
Overview
A summary of profiling results of a specefic attribute. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
Instance Attribute Summary collapse
- #distinct_count ⇒ OCI::DataConnectivity::Models::ProfileStat
- #duplicate_count ⇒ OCI::DataConnectivity::Models::ProfileStat
- #max ⇒ OCI::DataConnectivity::Models::ProfileStat
- #min ⇒ OCI::DataConnectivity::Models::ProfileStat
-
#name ⇒ String
Name of attribute.
- #null_count ⇒ OCI::DataConnectivity::Models::ProfileStat
-
#type ⇒ Object
Type of attribute.
- #unique_count ⇒ OCI::DataConnectivity::Models::ProfileStat
-
#value_frequencies ⇒ Array<OCI::DataConnectivity::Models::ObjectFreqStat>
Top N value frequencies for the column as described already in profile config topNValueFrequency property.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
.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 = {}) ⇒ AttributeProfileResult
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 = {}) ⇒ AttributeProfileResult
Initializes the object
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 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 107 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.type = attributes[:'type'] if attributes[:'type'] self.name = attributes[:'name'] if attributes[:'name'] self.min = attributes[:'min'] if attributes[:'min'] self.max = attributes[:'max'] if attributes[:'max'] self.null_count = attributes[:'nullCount'] if attributes[:'nullCount'] raise 'You cannot provide both :nullCount and :null_count' if attributes.key?(:'nullCount') && attributes.key?(:'null_count') self.null_count = attributes[:'null_count'] if attributes[:'null_count'] self.distinct_count = attributes[:'distinctCount'] if attributes[:'distinctCount'] raise 'You cannot provide both :distinctCount and :distinct_count' if attributes.key?(:'distinctCount') && attributes.key?(:'distinct_count') self.distinct_count = attributes[:'distinct_count'] if attributes[:'distinct_count'] self.unique_count = attributes[:'uniqueCount'] if attributes[:'uniqueCount'] raise 'You cannot provide both :uniqueCount and :unique_count' if attributes.key?(:'uniqueCount') && attributes.key?(:'unique_count') self.unique_count = attributes[:'unique_count'] if attributes[:'unique_count'] self.duplicate_count = attributes[:'duplicateCount'] if attributes[:'duplicateCount'] raise 'You cannot provide both :duplicateCount and :duplicate_count' if attributes.key?(:'duplicateCount') && attributes.key?(:'duplicate_count') self.duplicate_count = attributes[:'duplicate_count'] if attributes[:'duplicate_count'] self.value_frequencies = attributes[:'valueFrequencies'] if attributes[:'valueFrequencies'] raise 'You cannot provide both :valueFrequencies and :value_frequencies' if attributes.key?(:'valueFrequencies') && attributes.key?(:'value_frequencies') self.value_frequencies = attributes[:'value_frequencies'] if attributes[:'value_frequencies'] end |
Instance Attribute Details
#distinct_count ⇒ OCI::DataConnectivity::Models::ProfileStat
29 30 31 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 29 def distinct_count @distinct_count end |
#duplicate_count ⇒ OCI::DataConnectivity::Models::ProfileStat
35 36 37 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 35 def duplicate_count @duplicate_count end |
#max ⇒ OCI::DataConnectivity::Models::ProfileStat
23 24 25 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 23 def max @max end |
#min ⇒ OCI::DataConnectivity::Models::ProfileStat
20 21 22 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 20 def min @min end |
#name ⇒ String
Name of attribute
17 18 19 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 17 def name @name end |
#null_count ⇒ OCI::DataConnectivity::Models::ProfileStat
26 27 28 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 26 def null_count @null_count end |
#type ⇒ Object
Type of attribute
13 14 15 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 13 def type @type end |
#unique_count ⇒ OCI::DataConnectivity::Models::ProfileStat
32 33 34 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 32 def unique_count @unique_count end |
#value_frequencies ⇒ Array<OCI::DataConnectivity::Models::ObjectFreqStat>
Top N value frequencies for the column as described already in profile config topNValueFrequency property.
39 40 41 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 39 def value_frequencies @value_frequencies end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 42 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'name': :'name', 'min': :'min', 'max': :'max', 'null_count': :'nullCount', 'distinct_count': :'distinctCount', 'unique_count': :'uniqueCount', 'duplicate_count': :'duplicateCount', 'value_frequencies': :'valueFrequencies' # rubocop:enable Style/SymbolLiteral } end |
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
80 81 82 83 84 85 86 87 88 89 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 80 def self.get_subtype(object_hash) type = object_hash[:'type'] # rubocop:disable Style/SymbolLiteral return 'OCI::DataConnectivity::Models::StringAttribute' if type == 'STRING' return 'OCI::DataConnectivity::Models::NumericAttribute' if type == 'NUMERIC' return 'OCI::DataConnectivity::Models::DateAttribute' if type == 'DATE_TIME' # TODO: Log a warning when the subtype is not found. 'OCI::DataConnectivity::Models::AttributeProfileResult' end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'Object', 'name': :'String', 'min': :'OCI::DataConnectivity::Models::ProfileStat', 'max': :'OCI::DataConnectivity::Models::ProfileStat', 'null_count': :'OCI::DataConnectivity::Models::ProfileStat', 'distinct_count': :'OCI::DataConnectivity::Models::ProfileStat', 'unique_count': :'OCI::DataConnectivity::Models::ProfileStat', 'duplicate_count': :'OCI::DataConnectivity::Models::ProfileStat', 'value_frequencies': :'Array<OCI::DataConnectivity::Models::ObjectFreqStat>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 159 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && name == other.name && min == other.min && max == other.max && null_count == other.null_count && distinct_count == other.distinct_count && unique_count == other.unique_count && duplicate_count == other.duplicate_count && value_frequencies == other.value_frequencies end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 197 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
177 178 179 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 177 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
186 187 188 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 186 def hash [type, name, min, max, null_count, distinct_count, unique_count, duplicate_count, value_frequencies].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
230 231 232 233 234 235 236 237 238 239 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 230 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
224 225 226 |
# File 'lib/oci/data_connectivity/models/attribute_profile_result.rb', line 224 def to_s to_hash.to_s end |