Class: OCI::GoldenGate::Models::Pipeline

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

Overview

Represents the metadata details of a pipeline in the same compartment.

This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class

Direct Known Subclasses

ZeroEtlPipeline

Constant Summary collapse

RECIPE_TYPE_ENUM =
[
  RECIPE_TYPE_ZERO_ETL = 'ZERO_ETL'.freeze,
  RECIPE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LICENSE_MODEL_ENUM =
[
  LICENSE_MODEL_LICENSE_INCLUDED = 'LICENSE_INCLUDED'.freeze,
  LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze,
  LICENSE_MODEL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_SUB_STATE_ENUM =
[
  LIFECYCLE_SUB_STATE_STARTING = 'STARTING'.freeze,
  LIFECYCLE_SUB_STATE_STOPPING = 'STOPPING'.freeze,
  LIFECYCLE_SUB_STATE_STOPPED = 'STOPPED'.freeze,
  LIFECYCLE_SUB_STATE_MOVING = 'MOVING'.freeze,
  LIFECYCLE_SUB_STATE_RUNNING = 'RUNNING'.freeze,
  LIFECYCLE_SUB_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Pipeline

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/oci/golden_gate/models/pipeline.rb', line 249

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

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

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

  self.id = attributes[:'id'] if attributes[:'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.description = attributes[:'description'] if attributes[:'description']

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

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

  self.license_model = attributes[:'licenseModel'] if attributes[:'licenseModel']

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

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

  self.cpu_core_count = attributes[:'cpuCoreCount'] if attributes[:'cpuCoreCount']

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

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

  self.is_auto_scaling_enabled = attributes[:'isAutoScalingEnabled'] unless attributes[:'isAutoScalingEnabled'].nil?

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

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

  self.source_connection_details = attributes[:'sourceConnectionDetails'] if attributes[:'sourceConnectionDetails']

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

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

  self.target_connection_details = attributes[:'targetConnectionDetails'] if attributes[:'targetConnectionDetails']

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

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

  self.pipeline_diagnostic_data = attributes[:'pipelineDiagnosticData'] if attributes[:'pipelineDiagnosticData']

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

  self.system_tags = attributes[:'systemTags'] if attributes[:'systemTags']

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

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.lifecycle_sub_state = attributes[:'lifecycleSubState'] if attributes[:'lifecycleSubState']

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

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

  self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']

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

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

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

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

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

Instance Attribute Details

#compartment_idString

[Required] The OCID of the compartment being referenced.

Returns:

  • (String)


68
69
70
# File 'lib/oci/golden_gate/models/pipeline.rb', line 68

def compartment_id
  @compartment_id
end

#cpu_core_countInteger

[Required] The Minimum number of OCPUs to be made available for this Deployment.

Returns:

  • (Integer)


78
79
80
# File 'lib/oci/golden_gate/models/pipeline.rb', line 78

def cpu_core_count
  @cpu_core_count
end

#defined_tagsHash<String, Hash<String, Object>>

Tags defined for this resource. Each key is predefined and scoped to a namespace.

Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


109
110
111
# File 'lib/oci/golden_gate/models/pipeline.rb', line 109

def defined_tags
  @defined_tags
end

#descriptionString

Metadata about this specific object.

Returns:

  • (String)


63
64
65
# File 'lib/oci/golden_gate/models/pipeline.rb', line 63

def description
  @description
end

#display_nameString

[Required] An object's Display Name.

Returns:

  • (String)


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

def display_name
  @display_name
end

#freeform_tagsHash<String, String>

A simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only.

Example: {\"bar-key\": \"value\"}

Returns:

  • (Hash<String, String>)


102
103
104
# File 'lib/oci/golden_gate/models/pipeline.rb', line 102

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the pipeline. This option applies when retrieving a pipeline.

Returns:

  • (String)


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

def id
  @id
end

#is_auto_scaling_enabledBOOLEAN

[Required] Indicates if auto scaling is enabled for the Deployment's CPU core count.

Returns:

  • (BOOLEAN)


83
84
85
# File 'lib/oci/golden_gate/models/pipeline.rb', line 83

def is_auto_scaling_enabled
  @is_auto_scaling_enabled
end

#license_modelString

[Required] The Oracle license model that applies to a Deployment.

Returns:

  • (String)


73
74
75
# File 'lib/oci/golden_gate/models/pipeline.rb', line 73

def license_model
  @license_model
end

#lifecycle_detailsString

Describes the object's current state in detail. For example, it can be used to provide actionable information for a resource in a Failed state.

Returns:

  • (String)


138
139
140
# File 'lib/oci/golden_gate/models/pipeline.rb', line 138

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] Lifecycle state of the pipeline.

Returns:

  • (String)


127
128
129
# File 'lib/oci/golden_gate/models/pipeline.rb', line 127

def lifecycle_state
  @lifecycle_state
end

#lifecycle_sub_stateString

Possible lifecycle substates when retrieving a pipeline.

Returns:

  • (String)


132
133
134
# File 'lib/oci/golden_gate/models/pipeline.rb', line 132

def lifecycle_sub_state
  @lifecycle_sub_state
end

#locksArray<OCI::GoldenGate::Models::ResourceLock>

Locks associated with this resource.



122
123
124
# File 'lib/oci/golden_gate/models/pipeline.rb', line 122

def locks
  @locks
end

#pipeline_diagnostic_dataOCI::GoldenGate::Models::PipelineDiagnosticData



94
95
96
# File 'lib/oci/golden_gate/models/pipeline.rb', line 94

def pipeline_diagnostic_data
  @pipeline_diagnostic_data
end

#recipe_typeString

[Required] The type of the recipe

Returns:

  • (String)


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

def recipe_type
  @recipe_type
end

#source_connection_detailsOCI::GoldenGate::Models::SourcePipelineConnectionDetails

This attribute is required.



87
88
89
# File 'lib/oci/golden_gate/models/pipeline.rb', line 87

def source_connection_details
  @source_connection_details
end

#system_tagsHash<String, Hash<String, Object>>

The system tags associated with this resource, if any. The system tags are set by Oracle Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags.

Example: {orcl-cloud: {free-tier-retain: true}}

Returns:

  • (Hash<String, Hash<String, Object>>)


118
119
120
# File 'lib/oci/golden_gate/models/pipeline.rb', line 118

def system_tags
  @system_tags
end

#target_connection_detailsOCI::GoldenGate::Models::TargetPipelineConnectionDetails

This attribute is required.



91
92
93
# File 'lib/oci/golden_gate/models/pipeline.rb', line 91

def target_connection_details
  @target_connection_details
end

#time_createdDateTime

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

Returns:

  • (DateTime)


144
145
146
# File 'lib/oci/golden_gate/models/pipeline.rb', line 144

def time_created
  @time_created
end

#time_updatedDateTime

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

Returns:

  • (DateTime)


150
151
152
# File 'lib/oci/golden_gate/models/pipeline.rb', line 150

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/oci/golden_gate/models/pipeline.rb', line 153

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'recipe_type': :'recipeType',
    'id': :'id',
    'display_name': :'displayName',
    'description': :'description',
    'compartment_id': :'compartmentId',
    'license_model': :'licenseModel',
    'cpu_core_count': :'cpuCoreCount',
    'is_auto_scaling_enabled': :'isAutoScalingEnabled',
    'source_connection_details': :'sourceConnectionDetails',
    'target_connection_details': :'targetConnectionDetails',
    'pipeline_diagnostic_data': :'pipelineDiagnosticData',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'system_tags': :'systemTags',
    'locks': :'locks',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_sub_state': :'lifecycleSubState',
    'lifecycle_details': :'lifecycleDetails',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated'
    # rubocop:enable Style/SymbolLiteral
  }
end

.get_subtype(object_hash) ⇒ Object

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.



213
214
215
216
217
218
219
220
# File 'lib/oci/golden_gate/models/pipeline.rb', line 213

def self.get_subtype(object_hash)
  type = object_hash[:'recipeType'] # rubocop:disable Style/SymbolLiteral

  return 'OCI::GoldenGate::Models::ZeroEtlPipeline' if type == 'ZERO_ETL'

  # TODO: Log a warning when the subtype is not found.
  'OCI::GoldenGate::Models::Pipeline'
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'recipe_type': :'String',
    'id': :'String',
    'display_name': :'String',
    'description': :'String',
    'compartment_id': :'String',
    'license_model': :'String',
    'cpu_core_count': :'Integer',
    'is_auto_scaling_enabled': :'BOOLEAN',
    'source_connection_details': :'OCI::GoldenGate::Models::SourcePipelineConnectionDetails',
    'target_connection_details': :'OCI::GoldenGate::Models::TargetPipelineConnectionDetails',
    'pipeline_diagnostic_data': :'OCI::GoldenGate::Models::PipelineDiagnosticData',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'system_tags': :'Hash<String, Hash<String, Object>>',
    'locks': :'Array<OCI::GoldenGate::Models::ResourceLock>',
    'lifecycle_state': :'String',
    'lifecycle_sub_state': :'String',
    'lifecycle_details': :'String',
    'time_created': :'DateTime',
    'time_updated': :'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



423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# File 'lib/oci/golden_gate/models/pipeline.rb', line 423

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

  self.class == other.class &&
    recipe_type == other.recipe_type &&
    id == other.id &&
    display_name == other.display_name &&
    description == other.description &&
    compartment_id == other.compartment_id &&
    license_model == other.license_model &&
    cpu_core_count == other.cpu_core_count &&
    is_auto_scaling_enabled == other.is_auto_scaling_enabled &&
    source_connection_details == other.source_connection_details &&
    target_connection_details == other.target_connection_details &&
    pipeline_diagnostic_data == other.pipeline_diagnostic_data &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    system_tags == other.system_tags &&
    locks == other.locks &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_sub_state == other.lifecycle_sub_state &&
    lifecycle_details == other.lifecycle_details &&
    time_created == other.time_created &&
    time_updated == other.time_updated
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



472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'lib/oci/golden_gate/models/pipeline.rb', line 472

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


452
453
454
# File 'lib/oci/golden_gate/models/pipeline.rb', line 452

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



461
462
463
# File 'lib/oci/golden_gate/models/pipeline.rb', line 461

def hash
  [recipe_type, id, display_name, description, compartment_id, license_model, cpu_core_count, is_auto_scaling_enabled, source_connection_details, target_connection_details, pipeline_diagnostic_data, freeform_tags, defined_tags, system_tags, locks, lifecycle_state, lifecycle_sub_state, lifecycle_details, time_created, time_updated].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



505
506
507
508
509
510
511
512
513
514
# File 'lib/oci/golden_gate/models/pipeline.rb', line 505

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



499
500
501
# File 'lib/oci/golden_gate/models/pipeline.rb', line 499

def to_s
  to_hash.to_s
end