Class: OCI::DatabaseMigration::Models::AdvisorReport
- Inherits:
-
Object
- Object
- OCI::DatabaseMigration::Models::AdvisorReport
- Defined in:
- lib/oci/database_migration/models/advisor_report.rb
Overview
Pre-Migration advisor report details.
Constant Summary collapse
- RESULT_ENUM =
[ RESULT_FATAL = 'FATAL'.freeze, RESULT_BLOCKER = 'BLOCKER'.freeze, RESULT_WARNING = 'WARNING'.freeze, RESULT_INFORMATIONAL = 'INFORMATIONAL'.freeze, RESULT_PASS = 'PASS'.freeze, RESULT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#number_of_fatal ⇒ Integer
[Required] Number of Fatal results in the advisor report.
-
#number_of_fatal_blockers ⇒ Integer
[Required] Number of Fatal Blocker results in the advisor report.
-
#number_of_informational_results ⇒ Integer
[Required] Number of Informational results in the advisor report.
-
#number_of_warnings ⇒ Integer
[Required] Number of Warning results in the advisor report.
- #report_location_details ⇒ OCI::DatabaseMigration::Models::AdvisorReportLocationDetails
-
#result ⇒ String
[Required] Pre-Migration advisor result.
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 = {}) ⇒ AdvisorReport
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 = {}) ⇒ AdvisorReport
Initializes the object
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 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 90 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.report_location_details = attributes[:'reportLocationDetails'] if attributes[:'reportLocationDetails'] raise 'You cannot provide both :reportLocationDetails and :report_location_details' if attributes.key?(:'reportLocationDetails') && attributes.key?(:'report_location_details') self.report_location_details = attributes[:'report_location_details'] if attributes[:'report_location_details'] self.result = attributes[:'result'] if attributes[:'result'] self.number_of_fatal = attributes[:'numberOfFatal'] if attributes[:'numberOfFatal'] raise 'You cannot provide both :numberOfFatal and :number_of_fatal' if attributes.key?(:'numberOfFatal') && attributes.key?(:'number_of_fatal') self.number_of_fatal = attributes[:'number_of_fatal'] if attributes[:'number_of_fatal'] self.number_of_fatal_blockers = attributes[:'numberOfFatalBlockers'] if attributes[:'numberOfFatalBlockers'] raise 'You cannot provide both :numberOfFatalBlockers and :number_of_fatal_blockers' if attributes.key?(:'numberOfFatalBlockers') && attributes.key?(:'number_of_fatal_blockers') self.number_of_fatal_blockers = attributes[:'number_of_fatal_blockers'] if attributes[:'number_of_fatal_blockers'] self.number_of_warnings = attributes[:'numberOfWarnings'] if attributes[:'numberOfWarnings'] raise 'You cannot provide both :numberOfWarnings and :number_of_warnings' if attributes.key?(:'numberOfWarnings') && attributes.key?(:'number_of_warnings') self.number_of_warnings = attributes[:'number_of_warnings'] if attributes[:'number_of_warnings'] self.number_of_informational_results = attributes[:'numberOfInformationalResults'] if attributes[:'numberOfInformationalResults'] raise 'You cannot provide both :numberOfInformationalResults and :number_of_informational_results' if attributes.key?(:'numberOfInformationalResults') && attributes.key?(:'number_of_informational_results') self.number_of_informational_results = attributes[:'number_of_informational_results'] if attributes[:'number_of_informational_results'] end |
Instance Attribute Details
#number_of_fatal ⇒ Integer
[Required] Number of Fatal results in the advisor report.
33 34 35 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 33 def number_of_fatal @number_of_fatal end |
#number_of_fatal_blockers ⇒ Integer
[Required] Number of Fatal Blocker results in the advisor report.
38 39 40 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 38 def number_of_fatal_blockers @number_of_fatal_blockers end |
#number_of_informational_results ⇒ Integer
[Required] Number of Informational results in the advisor report.
48 49 50 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 48 def number_of_informational_results @number_of_informational_results end |
#number_of_warnings ⇒ Integer
[Required] Number of Warning results in the advisor report.
43 44 45 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 43 def number_of_warnings @number_of_warnings end |
#report_location_details ⇒ OCI::DatabaseMigration::Models::AdvisorReportLocationDetails
23 24 25 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 23 def report_location_details @report_location_details end |
#result ⇒ String
[Required] Pre-Migration advisor result.
28 29 30 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 28 def result @result end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 51 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'report_location_details': :'reportLocationDetails', 'result': :'result', 'number_of_fatal': :'numberOfFatal', 'number_of_fatal_blockers': :'numberOfFatalBlockers', 'number_of_warnings': :'numberOfWarnings', 'number_of_informational_results': :'numberOfInformationalResults' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 65 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'report_location_details': :'OCI::DatabaseMigration::Models::AdvisorReportLocationDetails', 'result': :'String', 'number_of_fatal': :'Integer', 'number_of_fatal_blockers': :'Integer', 'number_of_warnings': :'Integer', 'number_of_informational_results': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 149 def ==(other) return true if equal?(other) self.class == other.class && report_location_details == other.report_location_details && result == other.result && number_of_fatal == other.number_of_fatal && number_of_fatal_blockers == other.number_of_fatal_blockers && number_of_warnings == other.number_of_warnings && number_of_informational_results == other.number_of_informational_results end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 184 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
164 165 166 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 164 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
173 174 175 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 173 def hash [report_location_details, result, number_of_fatal, number_of_fatal_blockers, number_of_warnings, number_of_informational_results].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 217 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
211 212 213 |
# File 'lib/oci/database_migration/models/advisor_report.rb', line 211 def to_s to_hash.to_s end |