Class: NucleusApi::AllocationCompositionAggregatedVO
- Inherits:
-
Object
- Object
- NucleusApi::AllocationCompositionAggregatedVO
- Defined in:
- lib/nucleus_api/models/allocation_composition_aggregated_vo.rb
Instance Attribute Summary collapse
-
#allocation_composition_create_date ⇒ Object
Returns the value of attribute allocation_composition_create_date.
-
#allocation_composition_date ⇒ Object
Returns the value of attribute allocation_composition_date.
-
#allocation_composition_id ⇒ Object
Returns the value of attribute allocation_composition_id.
-
#allocation_composition_update_date ⇒ Object
Returns the value of attribute allocation_composition_update_date.
-
#model_category ⇒ Object
Returns the value of attribute model_category.
-
#model_current_weight ⇒ Object
Returns the value of attribute model_current_weight.
-
#model_description ⇒ Object
Returns the value of attribute model_description.
-
#model_holdings ⇒ Object
Returns the value of attribute model_holdings.
-
#model_id ⇒ Object
Returns the value of attribute model_id.
-
#model_name ⇒ Object
Returns the value of attribute model_name.
-
#model_secondary_id ⇒ Object
Returns the value of attribute model_secondary_id.
-
#model_strategic_weight ⇒ Object
Returns the value of attribute model_strategic_weight.
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
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserialized data.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AllocationCompositionAggregatedVO
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ AllocationCompositionAggregatedVO
Initializes the object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 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 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 79 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 } if attributes.has_key?(:'allocation_composition_create_date') self.allocation_composition_create_date = attributes[:'allocation_composition_create_date'] end if attributes.has_key?(:'allocation_composition_date') self.allocation_composition_date = attributes[:'allocation_composition_date'] end if attributes.has_key?(:'allocation_composition_id') self.allocation_composition_id = attributes[:'allocation_composition_id'] end if attributes.has_key?(:'allocation_composition_update_date') self.allocation_composition_update_date = attributes[:'allocation_composition_update_date'] end if attributes.has_key?(:'model_category') self.model_category = attributes[:'model_category'] end if attributes.has_key?(:'model_current_weight') self.model_current_weight = attributes[:'model_current_weight'] end if attributes.has_key?(:'model_description') self.model_description = attributes[:'model_description'] end if attributes.has_key?(:'model_holdings') if (value = attributes[:'model_holdings']).is_a?(Array) self.model_holdings = value end end if attributes.has_key?(:'model_id') self.model_id = attributes[:'model_id'] end if attributes.has_key?(:'model_name') self.model_name = attributes[:'model_name'] end if attributes.has_key?(:'model_secondary_id') self.model_secondary_id = attributes[:'model_secondary_id'] end if attributes.has_key?(:'model_strategic_weight') self.model_strategic_weight = attributes[:'model_strategic_weight'] end end |
Instance Attribute Details
#allocation_composition_create_date ⇒ Object
Returns the value of attribute allocation_composition_create_date.
17 18 19 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 17 def allocation_composition_create_date @allocation_composition_create_date end |
#allocation_composition_date ⇒ Object
Returns the value of attribute allocation_composition_date.
19 20 21 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 19 def allocation_composition_date @allocation_composition_date end |
#allocation_composition_id ⇒ Object
Returns the value of attribute allocation_composition_id.
21 22 23 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 21 def allocation_composition_id @allocation_composition_id end |
#allocation_composition_update_date ⇒ Object
Returns the value of attribute allocation_composition_update_date.
23 24 25 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 23 def allocation_composition_update_date @allocation_composition_update_date end |
#model_category ⇒ Object
Returns the value of attribute model_category.
25 26 27 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 25 def model_category @model_category end |
#model_current_weight ⇒ Object
Returns the value of attribute model_current_weight.
27 28 29 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 27 def model_current_weight @model_current_weight end |
#model_description ⇒ Object
Returns the value of attribute model_description.
29 30 31 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 29 def model_description @model_description end |
#model_holdings ⇒ Object
Returns the value of attribute model_holdings.
31 32 33 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 31 def model_holdings @model_holdings end |
#model_id ⇒ Object
Returns the value of attribute model_id.
33 34 35 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 33 def model_id @model_id end |
#model_name ⇒ Object
Returns the value of attribute model_name.
35 36 37 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 35 def model_name @model_name end |
#model_secondary_id ⇒ Object
Returns the value of attribute model_secondary_id.
37 38 39 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 37 def model_secondary_id @model_secondary_id end |
#model_strategic_weight ⇒ Object
Returns the value of attribute model_strategic_weight.
39 40 41 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 39 def model_strategic_weight @model_strategic_weight 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 57 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 42 def self.attribute_map { :'allocation_composition_create_date' => :'allocation_composition_create_date', :'allocation_composition_date' => :'allocation_composition_date', :'allocation_composition_id' => :'allocation_composition_id', :'allocation_composition_update_date' => :'allocation_composition_update_date', :'model_category' => :'model_category', :'model_current_weight' => :'model_current_weight', :'model_description' => :'model_description', :'model_holdings' => :'model_holdings', :'model_id' => :'model_id', :'model_name' => :'model_name', :'model_secondary_id' => :'model_secondary_id', :'model_strategic_weight' => :'model_strategic_weight' } end |
.swagger_types ⇒ Object
Attribute type mapping.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 60 def self.swagger_types { :'allocation_composition_create_date' => :'DateTime', :'allocation_composition_date' => :'Date', :'allocation_composition_id' => :'String', :'allocation_composition_update_date' => :'DateTime', :'model_category' => :'String', :'model_current_weight' => :'Float', :'model_description' => :'String', :'model_holdings' => :'Array<AllocationCompositionModelHoldingsVO>', :'model_id' => :'String', :'model_name' => :'String', :'model_secondary_id' => :'String', :'model_strategic_weight' => :'Float' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 151 def ==(o) return true if self.equal?(o) self.class == o.class && allocation_composition_create_date == o.allocation_composition_create_date && allocation_composition_date == o.allocation_composition_date && allocation_composition_id == o.allocation_composition_id && allocation_composition_update_date == o.allocation_composition_update_date && model_category == o.model_category && model_current_weight == o.model_current_weight && model_description == o.model_description && model_holdings == o.model_holdings && model_id == o.model_id && model_name == o.model_name && model_secondary_id == o.model_secondary_id && model_strategic_weight == o.model_strategic_weight end |
#_deserialize(type, value) ⇒ Object
Returns Deserialized data.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 202 def _deserialize(type, value) case type.to_sym when :DateTime (value) when :Date (value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = NucleusApi.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 268 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 183 def build_from_hash(attributes) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(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?(o) ⇒ Boolean
170 171 172 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 170 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
176 177 178 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 176 def hash [allocation_composition_create_date, allocation_composition_date, allocation_composition_id, allocation_composition_update_date, model_category, model_current_weight, model_description, model_holdings, model_id, model_name, model_secondary_id, model_strategic_weight].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
138 139 140 141 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 138 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
249 250 251 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 249 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
255 256 257 258 259 260 261 262 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 255 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
243 244 245 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 243 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
145 146 147 |
# File 'lib/nucleus_api/models/allocation_composition_aggregated_vo.rb', line 145 def valid? true end |