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_GGSA = 'GGSA'.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



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
148
# File 'lib/oci/golden_gate/models/deployment_version_summary.rb', line 107

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)


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

def deployment_type
  @deployment_type
end

#is_security_fixBOOLEAN

Indicates if OGG release contains security fix.

Returns:

  • (BOOLEAN)


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

def is_security_fix
  @is_security_fix
end

#ogg_versionString

[Required] Version of OGG

Returns:

  • (String)


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

def ogg_version
  @ogg_version
end

#release_typeString

The type of release.

Returns:

  • (String)


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

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)


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

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)


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

def time_supported_until
  @time_supported_until
end

Class Method Details

.attribute_mapObject

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



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

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.



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

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



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

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



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

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


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

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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

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



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

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



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

def to_s
  to_hash.to_s
end