Class: OCI::DatabaseMigration::Models::AssessorAction
- Inherits:
-
Object
- Object
- OCI::DatabaseMigration::Models::AssessorAction
- Defined in:
- lib/oci/database_migration/models/assessor_action.rb
Overview
Assessor Action
Constant Summary collapse
- NAME_ENUM =
[ NAME_RUN = 'RUN'.freeze, NAME_CONFIGURE = 'CONFIGURE'.freeze, NAME_CONFIGURE_MIGRATION = 'CONFIGURE_MIGRATION'.freeze, NAME_CREATE_MIGRATION = 'CREATE_MIGRATION'.freeze, NAME_UPDATE_MIGRATION = 'UPDATE_MIGRATION'.freeze, NAME_RECHECK = 'RECHECK'.freeze, NAME_RUN_SQL = 'RUN_SQL'.freeze, NAME_DOWNLOAD_SQL = 'DOWNLOAD_SQL'.freeze, NAME_DOWNLOAD_LOG = 'DOWNLOAD_LOG'.freeze, NAME_CONFIRM = 'CONFIRM'.freeze, NAME_MANAGE = 'MANAGE'.freeze, NAME_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#description ⇒ String
A user-friendly description.
-
#display_name ⇒ String
[Required] A user-friendly name.
-
#is_disabled ⇒ BOOLEAN
[Required] Defines if the action is enabled or disabled.
-
#name ⇒ String
[Required] The Assessor Action Name.
-
#resource_id ⇒ String
The OCID of the resource being referenced.
-
#title ⇒ String
[Required] The Assessor Action Title.
- #user_defined_properties ⇒ OCI::DatabaseMigration::Models::UserDefinedProperties
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 = {}) ⇒ AssessorAction
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 = {}) ⇒ AssessorAction
Initializes the object
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 135 136 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 101 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.name = attributes[:'name'] if attributes[:'name'] 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.title = attributes[:'title'] if attributes[:'title'] self.description = attributes[:'description'] if attributes[:'description'] self.is_disabled = attributes[:'isDisabled'] unless attributes[:'isDisabled'].nil? raise 'You cannot provide both :isDisabled and :is_disabled' if attributes.key?(:'isDisabled') && attributes.key?(:'is_disabled') self.is_disabled = attributes[:'is_disabled'] unless attributes[:'is_disabled'].nil? self.user_defined_properties = attributes[:'userDefinedProperties'] if attributes[:'userDefinedProperties'] raise 'You cannot provide both :userDefinedProperties and :user_defined_properties' if attributes.key?(:'userDefinedProperties') && attributes.key?(:'user_defined_properties') self.user_defined_properties = attributes[:'user_defined_properties'] if attributes[:'user_defined_properties'] self.resource_id = attributes[:'resourceId'] if attributes[:'resourceId'] raise 'You cannot provide both :resourceId and :resource_id' if attributes.key?(:'resourceId') && attributes.key?(:'resource_id') self.resource_id = attributes[:'resource_id'] if attributes[:'resource_id'] end |
Instance Attribute Details
#description ⇒ String
A user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.
45 46 47 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 45 def description @description end |
#display_name ⇒ String
[Required] A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
35 36 37 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 35 def display_name @display_name end |
#is_disabled ⇒ BOOLEAN
[Required] Defines if the action is enabled or disabled.
49 50 51 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 49 def is_disabled @is_disabled end |
#name ⇒ String
[Required] The Assessor Action Name.
29 30 31 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 29 def name @name end |
#resource_id ⇒ String
The OCID of the resource being referenced.
56 57 58 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 56 def resource_id @resource_id end |
#title ⇒ String
[Required] The Assessor Action Title.
39 40 41 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 39 def title @title end |
#user_defined_properties ⇒ OCI::DatabaseMigration::Models::UserDefinedProperties
52 53 54 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 52 def user_defined_properties @user_defined_properties end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 59 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'display_name': :'displayName', 'title': :'title', 'description': :'description', 'is_disabled': :'isDisabled', 'user_defined_properties': :'userDefinedProperties', 'resource_id': :'resourceId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 74 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'display_name': :'String', 'title': :'String', 'description': :'String', 'is_disabled': :'BOOLEAN', 'user_defined_properties': :'OCI::DatabaseMigration::Models::UserDefinedProperties', 'resource_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 158 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && display_name == other.display_name && title == other.title && description == other.description && is_disabled == other.is_disabled && user_defined_properties == other.user_defined_properties && resource_id == other.resource_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 194 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
174 175 176 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 174 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
183 184 185 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 183 def hash [name, display_name, title, description, is_disabled, user_defined_properties, resource_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 227 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
221 222 223 |
# File 'lib/oci/database_migration/models/assessor_action.rb', line 221 def to_s to_hash.to_s end |