Class: OCI::Sch::Models::ConnectorPluginSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/sch/models/connector_plugin_summary.rb

Overview

Summary information for a connector plugin. Example connector plugins include the Streaming source and the Notifications target. For more information about flows defined by connectors, see Overview of Connector Hub. For configuration instructions, see Creating a Connector.

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

Constant Summary collapse

KIND_ENUM =
[
  KIND_SOURCE = 'SOURCE'.freeze,
  KIND_TARGET = 'TARGET'.freeze,
  KIND_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ESTIMATED_THROUGHPUT_ENUM =
[
  ESTIMATED_THROUGHPUT_LOW = 'LOW'.freeze,
  ESTIMATED_THROUGHPUT_MEDIUM = 'MEDIUM'.freeze,
  ESTIMATED_THROUGHPUT_HIGH = 'HIGH'.freeze,
  ESTIMATED_THROUGHPUT_UNKNOWN = 'UNKNOWN'.freeze,
  ESTIMATED_THROUGHPUT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_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 = {}) ⇒ ConnectorPluginSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :kind (String)

    The value to assign to the #kind property

  • :name (String)

    The value to assign to the #name property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :estimated_throughput (String)

    The value to assign to the #estimated_throughput property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :display_name (String)

    The value to assign to the #display_name property



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
159
160
161
162
163
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 128

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

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

  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.estimated_throughput = attributes[:'estimatedThroughput'] if attributes[:'estimatedThroughput']
  self.estimated_throughput = "UNKNOWN" if estimated_throughput.nil? && !attributes.key?(:'estimatedThroughput') # rubocop:disable Style/StringLiterals

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

  self.estimated_throughput = attributes[:'estimated_throughput'] if attributes[:'estimated_throughput']
  self.estimated_throughput = "UNKNOWN" if estimated_throughput.nil? && !attributes.key?(:'estimatedThroughput') && !attributes.key?(:'estimated_throughput') # rubocop:disable Style/StringLiterals

  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.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']
end

Instance Attribute Details

#display_nameString

[Required] A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information.

Returns:

  • (String)


70
71
72
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 70

def display_name
  @display_name
end

#estimated_throughputString

The estimated throughput range (LOW, MEDIUM, HIGH).

Returns:

  • (String)


59
60
61
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 59

def estimated_throughput
  @estimated_throughput
end

#kindString

[Required] The plugin type discriminator.

Returns:

  • (String)


42
43
44
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 42

def kind
  @kind
end

#lifecycle_stateString

[Required] The current state of the service connector.

Returns:

  • (String)


64
65
66
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 64

def lifecycle_state
  @lifecycle_state
end

#nameString

[Required] The service to be called by the connector plugin.

Returns:

  • (String)


47
48
49
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 47

def name
  @name
end

#time_createdDateTime

[Required] The date and time when this plugin became available. Format is defined by RFC3339. Example: 2023-09-10T21:10:29.600Z

Returns:

  • (DateTime)


54
55
56
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 54

def time_created
  @time_created
end

Class Method Details

.attribute_mapObject

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



73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 73

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'kind': :'kind',
    'name': :'name',
    'time_created': :'timeCreated',
    'estimated_throughput': :'estimatedThroughput',
    'lifecycle_state': :'lifecycleState',
    'display_name': :'displayName'
    # 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.



105
106
107
108
109
110
111
112
113
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 105

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

  return 'OCI::Sch::Models::SourceConnectorPluginSummary' if type == 'SOURCE'
  return 'OCI::Sch::Models::TargetConnectorPluginSummary' if type == 'TARGET'

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

.swagger_typesObject

Attribute type mapping.



87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 87

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'kind': :'String',
    'name': :'String',
    'time_created': :'DateTime',
    'estimated_throughput': :'String',
    'lifecycle_state': :'String',
    'display_name': :'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



211
212
213
214
215
216
217
218
219
220
221
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 211

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

  self.class == other.class &&
    kind == other.kind &&
    name == other.name &&
    time_created == other.time_created &&
    estimated_throughput == other.estimated_throughput &&
    lifecycle_state == other.lifecycle_state &&
    display_name == other.display_name
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



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 246

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


226
227
228
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 226

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



235
236
237
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 235

def hash
  [kind, name, time_created, estimated_throughput, lifecycle_state, display_name].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



279
280
281
282
283
284
285
286
287
288
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 279

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



273
274
275
# File 'lib/oci/sch/models/connector_plugin_summary.rb', line 273

def to_s
  to_hash.to_s
end