Class: OCI::GoldenGate::Models::PipelineRunningProcessSummary

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

Overview

Each replication process and their summary details.

Constant Summary collapse

PROCESS_TYPE_ENUM =
[
  PROCESS_TYPE_EXTRACT = 'EXTRACT'.freeze,
  PROCESS_TYPE_REPLICAT = 'REPLICAT'.freeze,
  PROCESS_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
STATUS_ENUM =
[
  STATUS_STOPPED = 'STOPPED'.freeze,
  STATUS_RUNNING = 'RUNNING'.freeze,
  STATUS_ERROR = 'ERROR'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PipelineRunningProcessSummary

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

  • :process_type (String)

    The value to assign to the #process_type property

  • :status (String)

    The value to assign to the #status property

  • :last_record_lag_in_seconds (Float)

    The value to assign to the #last_record_lag_in_seconds property

  • :time_last_processed (DateTime)

    The value to assign to the #time_last_processed property



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

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

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

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

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

  self.last_record_lag_in_seconds = attributes[:'lastRecordLagInSeconds'] if attributes[:'lastRecordLagInSeconds']

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

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

  self.time_last_processed = attributes[:'timeLastProcessed'] if attributes[:'timeLastProcessed']

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

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

Instance Attribute Details

#last_record_lag_in_secondsFloat

[Required] The latency, in seconds, of a process running in a replication. This option applies when retrieving running processes.

Returns:

  • (Float)


44
45
46
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 44

def last_record_lag_in_seconds
  @last_record_lag_in_seconds
end

#nameString

[Required] An object's Display Name.

Returns:

  • (String)


29
30
31
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 29

def name
  @name
end

#process_typeString

[Required] The type of process running in a replication. For example, Extract or Replicat. This option applies when retrieving running processes.

Returns:

  • (String)


34
35
36
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 34

def process_type
  @process_type
end

#statusString

[Required] The status of the Extract or Replicat process. This option applies when retrieving running processes.

Returns:

  • (String)


39
40
41
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 39

def status
  @status
end

#time_last_processedDateTime

[Required] The date and time the last record was processed by an Extract or Replicat. This option applies when retrieving running processes. The format is defined by RFC3339, such as 2024-07-25T21:10:29.600Z.

Returns:

  • (DateTime)


50
51
52
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 50

def time_last_processed
  @time_last_processed
end

Class Method Details

.attribute_mapObject

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



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 53

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'name',
    'process_type': :'processType',
    'status': :'status',
    'last_record_lag_in_seconds': :'lastRecordLagInSeconds',
    'time_last_processed': :'timeLastProcessed'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'String',
    'process_type': :'String',
    'status': :'String',
    'last_record_lag_in_seconds': :'Float',
    'time_last_processed': :'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



151
152
153
154
155
156
157
158
159
160
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 151

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

  self.class == other.class &&
    name == other.name &&
    process_type == other.process_type &&
    status == other.status &&
    last_record_lag_in_seconds == other.last_record_lag_in_seconds &&
    time_last_processed == other.time_last_processed
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



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 185

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


165
166
167
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 165

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



174
175
176
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 174

def hash
  [name, process_type, status, last_record_lag_in_seconds, time_last_processed].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



218
219
220
221
222
223
224
225
226
227
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 218

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



212
213
214
# File 'lib/oci/golden_gate/models/pipeline_running_process_summary.rb', line 212

def to_s
  to_hash.to_s
end