Class: OCI::GoldenGate::Models::TrailFileSummary

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

Overview

Summary of the TrailFiles.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ TrailFileSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :trail_file_id (String)

    The value to assign to the #trail_file_id property

  • :display_name (String)

    The value to assign to the #display_name property

  • :size_in_bytes (Integer)

    The value to assign to the #size_in_bytes property

  • :time_last_updated (DateTime)

    The value to assign to the #time_last_updated property

  • :number_of_sequences (Integer)

    The value to assign to the #number_of_sequences property

  • :min_sequence_number (String)

    The value to assign to the #min_sequence_number property

  • :max_sequence_number (String)

    The value to assign to the #max_sequence_number property

  • :producer (String)

    The value to assign to the #producer property

  • :consumers (Array<String>)

    The value to assign to the #consumers 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
149
150
151
152
153
154
155
156
157
158
# File 'lib/oci/golden_gate/models/trail_file_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.trail_file_id = attributes[:'trailFileId'] if attributes[:'trailFileId']

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

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

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

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

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

  self.time_last_updated = attributes[:'timeLastUpdated'] if attributes[:'timeLastUpdated']

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

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

  self.number_of_sequences = attributes[:'numberOfSequences'] if attributes[:'numberOfSequences']

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

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

  self.min_sequence_number = attributes[:'minSequenceNumber'] if attributes[:'minSequenceNumber']

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

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

  self.max_sequence_number = attributes[:'maxSequenceNumber'] if attributes[:'maxSequenceNumber']

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

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

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

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

Instance Attribute Details

#consumersArray<String>

array of consumer process names

Returns:

  • (Array<String>)


56
57
58
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 56

def consumers
  @consumers
end

#display_nameString

An object's Display Name.

Returns:

  • (String)


20
21
22
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 20

def display_name
  @display_name
end

#max_sequence_numberString

Maximum sequence number

Returns:

  • (String)


46
47
48
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 46

def max_sequence_number
  @max_sequence_number
end

#min_sequence_numberString

Minimum sequence number

Returns:

  • (String)


41
42
43
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 41

def min_sequence_number
  @min_sequence_number
end

#number_of_sequencesInteger

Number of sequences for a specific trail file

Returns:

  • (Integer)


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

def number_of_sequences
  @number_of_sequences
end

#producerString

Producer Process Name if any.

Returns:

  • (String)


51
52
53
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 51

def producer
  @producer
end

#size_in_bytesInteger

The size of the backup stored in object storage (in bytes)

Returns:

  • (Integer)


25
26
27
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 25

def size_in_bytes
  @size_in_bytes
end

#time_last_updatedDateTime

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

Returns:

  • (DateTime)


31
32
33
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 31

def time_last_updated
  @time_last_updated
end

#trail_file_idString

[Required] The TrailFile Id.

Returns:

  • (String)


15
16
17
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 15

def trail_file_id
  @trail_file_id
end

Class Method Details

.attribute_mapObject

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



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 59

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'trail_file_id': :'trailFileId',
    'display_name': :'displayName',
    'size_in_bytes': :'sizeInBytes',
    'time_last_updated': :'timeLastUpdated',
    'number_of_sequences': :'numberOfSequences',
    'min_sequence_number': :'minSequenceNumber',
    'max_sequence_number': :'maxSequenceNumber',
    'producer': :'producer',
    'consumers': :'consumers'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 76

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'trail_file_id': :'String',
    'display_name': :'String',
    'size_in_bytes': :'Integer',
    'time_last_updated': :'DateTime',
    'number_of_sequences': :'Integer',
    'min_sequence_number': :'String',
    'max_sequence_number': :'String',
    'producer': :'String',
    'consumers': :'Array<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



167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 167

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

  self.class == other.class &&
    trail_file_id == other.trail_file_id &&
    display_name == other.display_name &&
    size_in_bytes == other.size_in_bytes &&
    time_last_updated == other.time_last_updated &&
    number_of_sequences == other.number_of_sequences &&
    min_sequence_number == other.min_sequence_number &&
    max_sequence_number == other.max_sequence_number &&
    producer == other.producer &&
    consumers == other.consumers
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



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 205

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


185
186
187
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 185

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



194
195
196
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 194

def hash
  [trail_file_id, display_name, size_in_bytes, time_last_updated, number_of_sequences, min_sequence_number, max_sequence_number, producer, consumers].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



238
239
240
241
242
243
244
245
246
247
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 238

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



232
233
234
# File 'lib/oci/golden_gate/models/trail_file_summary.rb', line 232

def to_s
  to_hash.to_s
end