Class: OCI::DatabaseMigration::Models::ParameterFileVersion

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ParameterFileVersion

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :name (String)

    The value to assign to the #name property

  • :description (String)

    The value to assign to the #description property

  • :is_current (BOOLEAN)

    The value to assign to the #is_current property

  • :is_factory (BOOLEAN)

    The value to assign to the #is_factory property

  • :kind (String)

    The value to assign to the #kind property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :content (String)

    The value to assign to the #content property



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

#contentString

[Required] The content in base64 encoded character string containing the value of the parameter file

Returns:

  • (String)


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

def content
  @content
end

#descriptionString

Describes the current parameter file version

Returns:

  • (String)


24
25
26
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 24

def description
  @description
end

#is_currentBOOLEAN

[Required] Return boolean true/false for the currently in-use parameter file (factory or a versioned file)

Returns:

  • (BOOLEAN)


28
29
30
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 28

def is_current
  @is_current
end

#is_factoryBOOLEAN

[Required] Return true/false for whether the parameter file is oracle provided (Factory)

Returns:

  • (BOOLEAN)


32
33
34
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 32

def is_factory
  @is_factory
end

#kindString

[Required] Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT)

Returns:

  • (String)


36
37
38
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 36

def kind
  @kind
end

#nameString

[Required] A unique name associated with the current migration/job and extract/replicat name

Returns:

  • (String)


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

def name
  @name
end

#time_createdDateTime

[Required] The time when this parameter file was applied on the process

Returns:

  • (DateTime)


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_mapObject

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_typesObject

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.

Parameters:

  • other (Object)

    the other object to be compared



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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


159
160
161
# File 'lib/oci/database_migration/models/parameter_file_version.rb', line 159

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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_hashHash

Returns the object in the form of hash

Returns:

  • (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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation 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