Class: OCI::DatabaseMigration::Models::AdvisorReportCheckSummary

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

Overview

Pre-Migration extended advisor report check item.

Constant Summary collapse

RESULT_TYPE_ENUM =
[
  RESULT_TYPE_FATAL = 'FATAL'.freeze,
  RESULT_TYPE_BLOCKER = 'BLOCKER'.freeze,
  RESULT_TYPE_WARNING = 'WARNING'.freeze,
  RESULT_TYPE_INFORMATIONAL = 'INFORMATIONAL'.freeze,
  RESULT_TYPE_PASS = 'PASS'.freeze,
  RESULT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AdvisorReportCheckSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 138

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

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

  self.result_type = attributes[:'resultType'] if attributes[:'resultType']

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

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

  self.is_reviewed = attributes[:'isReviewed'] unless attributes[:'isReviewed'].nil?

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

  self.is_reviewed = attributes[:'is_reviewed'] unless attributes[:'is_reviewed'].nil?

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

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

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

  self.fixup_script_location = attributes[:'fixupScriptLocation'] if attributes[:'fixupScriptLocation']

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

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

  self.is_exclusion_allowed = attributes[:'isExclusionAllowed'] unless attributes[:'isExclusionAllowed'].nil?

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

  self.is_exclusion_allowed = attributes[:'is_exclusion_allowed'] unless attributes[:'is_exclusion_allowed'].nil?

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

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

  self.object_count = attributes[:'objectCount'] if attributes[:'objectCount']

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

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

Instance Attribute Details

#actionString

[Required] Fixing the issue.

Returns:

  • (String)


55
56
57
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 55

def action
  @action
end

#columnsArray<OCI::DatabaseMigration::Models::AdvisorReportCheckColumn>

[Required] Array of the column of the objects table.



73
74
75
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 73

def columns
  @columns
end

#display_nameString

[Required] Pre-Migration u0441heck display name.

Returns:

  • (String)


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

def display_name
  @display_name
end

#fixup_script_locationString

The path to the fixup script for this check.

Returns:

  • (String)


60
61
62
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 60

def fixup_script_location
  @fixup_script_location
end

#impactString

[Required] Impact of the issue on data migration.

Returns:

  • (String)


50
51
52
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 50

def impact
  @impact
end

#is_exclusion_allowedBOOLEAN

[Required] If false, objects cannot be excluded from migration.

Returns:

  • (BOOLEAN)


65
66
67
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 65

def is_exclusion_allowed
  @is_exclusion_allowed
end

#is_reviewedBOOLEAN

[Required] User flag for advisor report check.

Returns:

  • (BOOLEAN)


40
41
42
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 40

def is_reviewed
  @is_reviewed
end

#issueString

[Required] Description of the issue.

Returns:

  • (String)


45
46
47
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 45

def issue
  @issue
end

#keyString

[Required] Pre-Migration u0441heck id.

Returns:

  • (String)


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

def key
  @key
end

#metadataOCI::DatabaseMigration::Models::ObjectMetadata



68
69
70
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 68

def 
  @metadata
end

#object_countInteger

[Required] Number of database objects to migrate.

Returns:

  • (Integer)


78
79
80
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 78

def object_count
  @object_count
end

#result_typeString

[Required] Pre-Migration advisor result.

Returns:

  • (String)


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

def result_type
  @result_type
end

Class Method Details

.attribute_mapObject

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



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 81

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'display_name': :'displayName',
    'result_type': :'resultType',
    'is_reviewed': :'isReviewed',
    'issue': :'issue',
    'impact': :'impact',
    'action': :'action',
    'fixup_script_location': :'fixupScriptLocation',
    'is_exclusion_allowed': :'isExclusionAllowed',
    'metadata': :'metadata',
    'columns': :'columns',
    'object_count': :'objectCount'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 101

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'display_name': :'String',
    'result_type': :'String',
    'is_reviewed': :'BOOLEAN',
    'issue': :'String',
    'impact': :'String',
    'action': :'String',
    'fixup_script_location': :'String',
    'is_exclusion_allowed': :'BOOLEAN',
    'metadata': :'OCI::DatabaseMigration::Models::ObjectMetadata',
    'columns': :'Array<OCI::DatabaseMigration::Models::AdvisorReportCheckColumn>',
    'object_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



213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 213

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

  self.class == other.class &&
    key == other.key &&
    display_name == other.display_name &&
    result_type == other.result_type &&
    is_reviewed == other.is_reviewed &&
    issue == other.issue &&
    impact == other.impact &&
    action == other.action &&
    fixup_script_location == other.fixup_script_location &&
    is_exclusion_allowed == other.is_exclusion_allowed &&
     == other. &&
    columns == other.columns &&
    object_count == other.object_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



254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 254

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


234
235
236
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 234

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



243
244
245
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 243

def hash
  [key, display_name, result_type, is_reviewed, issue, impact, action, fixup_script_location, is_exclusion_allowed, , columns, object_count].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



287
288
289
290
291
292
293
294
295
296
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 287

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



281
282
283
# File 'lib/oci/database_migration/models/advisor_report_check_summary.rb', line 281

def to_s
  to_hash.to_s
end