Class: Verizon::PosConfidenceEllipse
- Defined in:
- lib/verizon/models/pos_confidence_ellipse.rb
Overview
PosConfidenceEllipse Model.
Instance Attribute Summary collapse
-
#semi_major_confidence ⇒ Integer
TODO: Write general description for this method.
-
#semi_major_orientation ⇒ Integer
TODO: Write general description for this method.
-
#semi_minor_confidence ⇒ Integer
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(semi_major_confidence = nil, semi_minor_confidence = nil, semi_major_orientation = nil) ⇒ PosConfidenceEllipse
constructor
A new instance of PosConfidenceEllipse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(semi_major_confidence = nil, semi_minor_confidence = nil, semi_major_orientation = nil) ⇒ PosConfidenceEllipse
Returns a new instance of PosConfidenceEllipse.
43 44 45 46 47 48 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 43 def initialize(semi_major_confidence = nil, semi_minor_confidence = nil, semi_major_orientation = nil) @semi_major_confidence = semi_major_confidence @semi_minor_confidence = semi_minor_confidence @semi_major_orientation = semi_major_orientation end |
Instance Attribute Details
#semi_major_confidence ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 14 def semi_major_confidence @semi_major_confidence end |
#semi_major_orientation ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 22 def semi_major_orientation @semi_major_orientation end |
#semi_minor_confidence ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 18 def semi_minor_confidence @semi_minor_confidence end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 51 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. semi_major_confidence = hash.key?('semiMajorConfidence') ? hash['semiMajorConfidence'] : nil semi_minor_confidence = hash.key?('semiMinorConfidence') ? hash['semiMinorConfidence'] : nil semi_major_orientation = hash.key?('semiMajorOrientation') ? hash['semiMajorOrientation'] : nil # Create object from extracted values. PosConfidenceEllipse.new(semi_major_confidence, semi_minor_confidence, semi_major_orientation) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['semi_major_confidence'] = 'semiMajorConfidence' @_hash['semi_minor_confidence'] = 'semiMinorConfidence' @_hash['semi_major_orientation'] = 'semiMajorOrientation' @_hash end |
.nullables ⇒ Object
An array for nullable fields
39 40 41 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 39 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 34 def self.optionals [] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 70 def self.validate(value) if value.instance_of? self return ( APIHelper.valid_type?(value.semi_major_confidence, ->(val) { val.instance_of? Integer }) and APIHelper.valid_type?(value.semi_minor_confidence, ->(val) { val.instance_of? Integer }) and APIHelper.valid_type?(value.semi_major_orientation, ->(val) { val.instance_of? Integer }) ) end return false unless value.instance_of? Hash ( APIHelper.valid_type?(value['semiMajorConfidence'], ->(val) { val.instance_of? Integer }) and APIHelper.valid_type?(value['semiMinorConfidence'], ->(val) { val.instance_of? Integer }) and APIHelper.valid_type?(value['semiMajorOrientation'], ->(val) { val.instance_of? Integer }) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
102 103 104 105 106 107 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 102 def inspect class_name = self.class.name.split('::').last "<#{class_name} semi_major_confidence: #{@semi_major_confidence.inspect},"\ " semi_minor_confidence: #{@semi_minor_confidence.inspect}, semi_major_orientation:"\ " #{@semi_major_orientation.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
95 96 97 98 99 |
# File 'lib/verizon/models/pos_confidence_ellipse.rb', line 95 def to_s class_name = self.class.name.split('::').last "<#{class_name} semi_major_confidence: #{@semi_major_confidence}, semi_minor_confidence:"\ " #{@semi_minor_confidence}, semi_major_orientation: #{@semi_major_orientation}>" end |