Class: OCI::DatabaseMigration::Models::AdvisorCheckSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_migration/models/advisor_check_summary.rb

Overview

Pre-Migration extended advisor report summary.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AdvisorCheckSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



74
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
103
104
105
106
107
108
109
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 74

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.pass_results_total_count = attributes[:'passResultsTotalCount'] if attributes[:'passResultsTotalCount']

  raise 'You cannot provide both :passResultsTotalCount and :pass_results_total_count' if attributes.key?(:'passResultsTotalCount') && attributes.key?(:'pass_results_total_count')

  self.pass_results_total_count = attributes[:'pass_results_total_count'] if attributes[:'pass_results_total_count']

  self.informational_results_total_count = attributes[:'informationalResultsTotalCount'] if attributes[:'informationalResultsTotalCount']

  raise 'You cannot provide both :informationalResultsTotalCount and :informational_results_total_count' if attributes.key?(:'informationalResultsTotalCount') && attributes.key?(:'informational_results_total_count')

  self.informational_results_total_count = attributes[:'informational_results_total_count'] if attributes[:'informational_results_total_count']

  self.warning_results_total_count = attributes[:'warningResultsTotalCount'] if attributes[:'warningResultsTotalCount']

  raise 'You cannot provide both :warningResultsTotalCount and :warning_results_total_count' if attributes.key?(:'warningResultsTotalCount') && attributes.key?(:'warning_results_total_count')

  self.warning_results_total_count = attributes[:'warning_results_total_count'] if attributes[:'warning_results_total_count']

  self.blocker_results_total_count = attributes[:'blockerResultsTotalCount'] if attributes[:'blockerResultsTotalCount']

  raise 'You cannot provide both :blockerResultsTotalCount and :blocker_results_total_count' if attributes.key?(:'blockerResultsTotalCount') && attributes.key?(:'blocker_results_total_count')

  self.blocker_results_total_count = attributes[:'blocker_results_total_count'] if attributes[:'blocker_results_total_count']

  self.fatal_results_total_count = attributes[:'fatalResultsTotalCount'] if attributes[:'fatalResultsTotalCount']

  raise 'You cannot provide both :fatalResultsTotalCount and :fatal_results_total_count' if attributes.key?(:'fatalResultsTotalCount') && attributes.key?(:'fatal_results_total_count')

  self.fatal_results_total_count = attributes[:'fatal_results_total_count'] if attributes[:'fatal_results_total_count']
end

Instance Attribute Details

#blocker_results_total_countInteger

[Required] Number of BLOCKER results in the extended advisor report.

Returns:

  • (Integer)


30
31
32
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 30

def blocker_results_total_count
  @blocker_results_total_count
end

#fatal_results_total_countInteger

[Required] Number of FATAL results in the extended advisor report.

Returns:

  • (Integer)


35
36
37
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 35

def fatal_results_total_count
  @fatal_results_total_count
end

#informational_results_total_countInteger

[Required] Number of INFORMATIONAL results in the extended advisor report.

Returns:

  • (Integer)


20
21
22
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 20

def informational_results_total_count
  @informational_results_total_count
end

#pass_results_total_countInteger

[Required] Number of PASS results in the extended advisor report.

Returns:

  • (Integer)


15
16
17
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 15

def pass_results_total_count
  @pass_results_total_count
end

#warning_results_total_countInteger

[Required] Number of WARNING results in the extended advisor report.

Returns:

  • (Integer)


25
26
27
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 25

def warning_results_total_count
  @warning_results_total_count
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 38

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'pass_results_total_count': :'passResultsTotalCount',
    'informational_results_total_count': :'informationalResultsTotalCount',
    'warning_results_total_count': :'warningResultsTotalCount',
    'blocker_results_total_count': :'blockerResultsTotalCount',
    'fatal_results_total_count': :'fatalResultsTotalCount'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 51

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'pass_results_total_count': :'Integer',
    'informational_results_total_count': :'Integer',
    'warning_results_total_count': :'Integer',
    'blocker_results_total_count': :'Integer',
    'fatal_results_total_count': :'Integer'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



118
119
120
121
122
123
124
125
126
127
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 118

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    pass_results_total_count == other.pass_results_total_count &&
    informational_results_total_count == other.informational_results_total_count &&
    warning_results_total_count == other.warning_results_total_count &&
    blocker_results_total_count == other.blocker_results_total_count &&
    fatal_results_total_count == other.fatal_results_total_count
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 152

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


132
133
134
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 132

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



141
142
143
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 141

def hash
  [pass_results_total_count, informational_results_total_count, warning_results_total_count, blocker_results_total_count, fatal_results_total_count].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



185
186
187
188
189
190
191
192
193
194
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 185

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



179
180
181
# File 'lib/oci/database_migration/models/advisor_check_summary.rb', line 179

def to_s
  to_hash.to_s
end