Class: OCI::GoldenGate::Models::DeploymentVersionSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/golden_gate/models/deployment_version_summary.rb

Overview

The summary data of a specific deployment version.

Constant Summary collapse

DEPLOYMENT_TYPE_ENUM =
[
  DEPLOYMENT_TYPE_OGG = 'OGG'.freeze,
  DEPLOYMENT_TYPE_DATABASE_ORACLE = 'DATABASE_ORACLE'.freeze,
  DEPLOYMENT_TYPE_BIGDATA = 'BIGDATA'.freeze,
  DEPLOYMENT_TYPE_DATABASE_MICROSOFT_SQLSERVER = 'DATABASE_MICROSOFT_SQLSERVER'.freeze,
  DEPLOYMENT_TYPE_DATABASE_MYSQL = 'DATABASE_MYSQL'.freeze,
  DEPLOYMENT_TYPE_DATABASE_POSTGRESQL = 'DATABASE_POSTGRESQL'.freeze,
  DEPLOYMENT_TYPE_DATABASE_DB2_ZOS = 'DATABASE_DB2ZOS'.freeze,
  DEPLOYMENT_TYPE_DATA_TRANSFORMS = 'DATA_TRANSFORMS'.freeze,
  DEPLOYMENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
RELEASE_TYPE_ENUM =
[
  RELEASE_TYPE_MAJOR = 'MAJOR'.freeze,
  RELEASE_TYPE_BUNDLE = 'BUNDLE'.freeze,
  RELEASE_TYPE_MINOR = 'MINOR'.freeze,
  RELEASE_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 = {}) ⇒ DeploymentVersionSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :ogg_version (String)

    The value to assign to the #ogg_version property

  • :deployment_type (String)

    The value to assign to the #deployment_type property

  • :time_released (DateTime)

    The value to assign to the #time_released property

  • :release_type (String)

    The value to assign to the #release_type property

  • :is_security_fix (BOOLEAN)

    The value to assign to the #is_security_fix property

  • :time_supported_until (DateTime)

    The value to assign to the #time_supported_until property



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
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 106

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

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

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

  self.deployment_type = attributes[:'deploymentType'] if attributes[:'deploymentType']

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

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

  self.time_released = attributes[:'timeReleased'] if attributes[:'timeReleased']

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

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

  self.release_type = attributes[:'releaseType'] if attributes[:'releaseType']

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

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

  self.is_security_fix = attributes[:'isSecurityFix'] unless attributes[:'isSecurityFix'].nil?

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

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

  self.time_supported_until = attributes[:'timeSupportedUntil'] if attributes[:'timeSupportedUntil']

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

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

Instance Attribute Details

#deployment_typeString

[Required] The type of deployment, which can be any one of the Allowed values. NOTE: Use of the value 'OGG' is maintained for backward compatibility purposes. Its use is discouraged in favor of 'DATABASE_ORACLE'.

Returns:

  • (String)


42
43
44
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 42

def deployment_type
  @deployment_type
end

#is_security_fixBOOLEAN

Indicates if OGG release contains security fix.

Returns:

  • (BOOLEAN)


58
59
60
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 58

def is_security_fix
  @is_security_fix
end

#ogg_versionString

[Required] Version of OGG

Returns:

  • (String)


35
36
37
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 35

def ogg_version
  @ogg_version
end

#release_typeString

The type of release.

Returns:

  • (String)


53
54
55
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 53

def release_type
  @release_type
end

#time_releasedDateTime

The time the resource was released. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z.

Returns:

  • (DateTime)


48
49
50
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 48

def time_released
  @time_released
end

#time_supported_untilDateTime

The time until OGG version is supported. After this date has passed OGG version will not be available anymore. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z.

Returns:

  • (DateTime)


64
65
66
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 64

def time_supported_until
  @time_supported_until
end

Class Method Details

.attribute_mapObject

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



67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 67

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'ogg_version': :'oggVersion',
    'deployment_type': :'deploymentType',
    'time_released': :'timeReleased',
    'release_type': :'releaseType',
    'is_security_fix': :'isSecurityFix',
    'time_supported_until': :'timeSupportedUntil'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 81

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'ogg_version': :'String',
    'deployment_type': :'String',
    'time_released': :'DateTime',
    'release_type': :'String',
    'is_security_fix': :'BOOLEAN',
    'time_supported_until': :'DateTime'
    # 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



182
183
184
185
186
187
188
189
190
191
192
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 182

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

  self.class == other.class &&
    ogg_version == other.ogg_version &&
    deployment_type == other.deployment_type &&
    time_released == other.time_released &&
    release_type == other.release_type &&
    is_security_fix == other.is_security_fix &&
    time_supported_until == other.time_supported_until
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



217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 217

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


197
198
199
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 197

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



206
207
208
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 206

def hash
  [ogg_version, deployment_type, time_released, release_type, is_security_fix, time_supported_until].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



250
251
252
253
254
255
256
257
258
259
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 250

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



244
245
246
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 244

def to_s
  to_hash.to_s
end