Class: OCI::Sch::Models::ConnectorPlugin
- Inherits:
-
Object
- Object
- OCI::Sch::Models::ConnectorPlugin
- Defined in:
- lib/oci/sch/models/connector_plugin.rb
Overview
A service source or service target used to create a connector. Example connector plugins include the Queue 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
Direct Known Subclasses
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
-
#display_name ⇒ String
[Required] A user-friendly name.
-
#estimated_throughput ⇒ String
The estimated throughput range (LOW, MEDIUM, HIGH).
-
#kind ⇒ String
[Required] The plugin type discriminator.
-
#lifecycle_state ⇒ String
[Required] The current state of the service connector.
-
#name ⇒ String
[Required] The service to be called by the connector plugin.
-
#schema ⇒ String
Gets the specified connector plugin configuration information in OpenAPI specification format.
-
#time_created ⇒ DateTime
[Required] The date and time when this plugin became available.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.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.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ConnectorPlugin
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ConnectorPlugin
Initializes the object
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 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 137 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'] self.schema = attributes[:'schema'] if attributes[:'schema'] end |
Instance Attribute Details
#display_name ⇒ String
[Required] A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information.
71 72 73 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 71 def display_name @display_name end |
#estimated_throughput ⇒ String
The estimated throughput range (LOW, MEDIUM, HIGH).
60 61 62 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 60 def estimated_throughput @estimated_throughput end |
#kind ⇒ String
[Required] The plugin type discriminator.
42 43 44 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 42 def kind @kind end |
#lifecycle_state ⇒ String
[Required] The current state of the service connector.
65 66 67 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 65 def lifecycle_state @lifecycle_state end |
#name ⇒ String
[Required] The service to be called by the connector plugin. Example: QueueSource
48 49 50 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 48 def name @name end |
#schema ⇒ String
Gets the specified connector plugin configuration information in OpenAPI specification format.
76 77 78 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 76 def schema @schema end |
#time_created ⇒ DateTime
[Required] The date and time when this plugin became available. Format is defined by RFC3339. Example: 2023-09-09T21:10:29.600Z
55 56 57 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 55 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 79 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'kind': :'kind', 'name': :'name', 'time_created': :'timeCreated', 'estimated_throughput': :'estimatedThroughput', 'lifecycle_state': :'lifecycleState', 'display_name': :'displayName', 'schema': :'schema' # 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.
113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 113 def self.get_subtype(object_hash) type = object_hash[:'kind'] # rubocop:disable Style/SymbolLiteral return 'OCI::Sch::Models::TargetConnectorPlugin' if type == 'TARGET' return 'OCI::Sch::Models::SourceConnectorPlugin' if type == 'SOURCE' # TODO: Log a warning when the subtype is not found. 'OCI::Sch::Models::ConnectorPlugin' end |
.swagger_types ⇒ Object
Attribute type mapping.
94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 94 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'kind': :'String', 'name': :'String', 'time_created': :'DateTime', 'estimated_throughput': :'String', 'lifecycle_state': :'String', 'display_name': :'String', 'schema': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 222 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 && schema == other.schema end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 258 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
238 239 240 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 238 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
247 248 249 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 247 def hash [kind, name, time_created, estimated_throughput, lifecycle_state, display_name, schema].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
291 292 293 294 295 296 297 298 299 300 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 291 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_s ⇒ String
Returns the string representation of the object
285 286 287 |
# File 'lib/oci/sch/models/connector_plugin.rb', line 285 def to_s to_hash.to_s end |