Class: OCI::DatabaseMigration::Models::ParameterFileVersion
- Inherits:
-
Object
- Object
- OCI::DatabaseMigration::Models::ParameterFileVersion
- Defined in:
- lib/oci/database_migration/models/parameter_file_version.rb
Overview
Details of a parameter file
Constant Summary collapse
- KIND_ENUM =
[ KIND_EXTRACT = 'EXTRACT'.freeze, KIND_REPLICAT = 'REPLICAT'.freeze, KIND_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#content ⇒ String
[Required] The content in base64 encoded character string containing the value of the parameter file.
-
#description ⇒ String
Describes the current parameter file version.
-
#is_current ⇒ BOOLEAN
[Required] Return boolean true/false for the currently in-use parameter file (factory or a versioned file).
-
#is_factory ⇒ BOOLEAN
[Required] Return true/false for whether the parameter file is oracle provided (Factory).
-
#kind ⇒ String
[Required] Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT).
-
#name ⇒ String
[Required] A unique name associated with the current migration/job and extract/replicat name.
-
#time_created ⇒ DateTime
[Required] The time when this parameter file was applied on the process.
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 = {}) ⇒ ParameterFileVersion
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 = {}) ⇒ ParameterFileVersion
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 |
# File 'lib/oci/database_migration/models/parameter_file_version.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.name = attributes[:'name'] if attributes[:'name'] self.description = attributes[:'description'] if attributes[:'description'] self.is_current = attributes[:'isCurrent'] unless attributes[:'isCurrent'].nil? raise 'You cannot provide both :isCurrent and :is_current' if attributes.key?(:'isCurrent') && attributes.key?(:'is_current') self.is_current = attributes[:'is_current'] unless attributes[:'is_current'].nil? self.is_factory = attributes[:'isFactory'] unless attributes[:'isFactory'].nil? raise 'You cannot provide both :isFactory and :is_factory' if attributes.key?(:'isFactory') && attributes.key?(:'is_factory') self.is_factory = attributes[:'is_factory'] unless attributes[:'is_factory'].nil? self.kind = attributes[:'kind'] if attributes[:'kind'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.content = attributes[:'content'] if attributes[:'content'] end |
Instance Attribute Details
#content ⇒ String
[Required] The content in base64 encoded character string containing the value of the parameter file
45 46 47 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 45 def content @content end |
#description ⇒ String
Describes the current parameter file version
24 25 26 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 24 def description @description end |
#is_current ⇒ BOOLEAN
[Required] Return boolean true/false for the currently in-use parameter file (factory or a versioned file)
28 29 30 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 28 def is_current @is_current end |
#is_factory ⇒ BOOLEAN
[Required] Return true/false for whether the parameter file is oracle provided (Factory)
32 33 34 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 32 def is_factory @is_factory end |
#kind ⇒ String
[Required] Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT)
36 37 38 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 36 def kind @kind end |
#name ⇒ String
[Required] A unique name associated with the current migration/job and extract/replicat name
20 21 22 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 20 def name @name end |
#time_created ⇒ DateTime
[Required] The time when this parameter file was applied on the process
41 42 43 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 41 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 48 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'description': :'description', 'is_current': :'isCurrent', 'is_factory': :'isFactory', 'kind': :'kind', 'time_created': :'timeCreated', 'content': :'content' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 63 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'description': :'String', 'is_current': :'BOOLEAN', 'is_factory': :'BOOLEAN', 'kind': :'String', 'time_created': :'DateTime', 'content': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 143 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && description == other.description && is_current == other.is_current && is_factory == other.is_factory && kind == other.kind && time_created == other.time_created && content == other.content end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 179 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
159 160 161 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 159 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
168 169 170 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 168 def hash [name, description, is_current, is_factory, kind, time_created, content].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 212 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
206 207 208 |
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 206 def to_s to_hash.to_s end |