Class: OCI::Oda::Models::OSSChannel
- Defined in:
- lib/oci/oda/models/oss_channel.rb
Overview
The configuration for an Oracle Streaming Service (OSS) channel.
Constant Summary
Constants inherited from Channel
Channel::CATEGORY_ENUM, Channel::LIFECYCLE_STATE_ENUM, Channel::TYPE_ENUM
Instance Attribute Summary collapse
-
#bootstrap_servers ⇒ String
[Required] The Oracle Streaming Service bootstrap servers.
-
#event_sink_bot_ids ⇒ Array<String>
The IDs of the Skills and Digital Assistants that the Channel is routed to.
-
#inbound_message_topic ⇒ String
[Required] The topic inbound messages are received on.
-
#outbound_message_topic ⇒ String
[Required] The topic outbound messages are sent on.
-
#sasl_mechanism ⇒ String
[Required] The SASL mechanmism to use when conecting to the Oracle Streaming Service.
-
#security_protocol ⇒ String
[Required] The security protocol to use when conecting to the Oracle Streaming Service.
-
#stream_pool_id ⇒ String
[Required] The stream pool OCI to use when connecting to the Oracle Streaming Service.
-
#tenancy_name ⇒ String
[Required] The tenancy to use when connecting to the Oracle Streaming Service.
-
#user_name ⇒ String
[Required] The user name to use when connecting to the Oracle Streaming Service.
Attributes inherited from Channel
#category, #defined_tags, #description, #freeform_tags, #id, #lifecycle_state, #name, #session_expiry_duration_in_milliseconds, #time_created, #time_updated, #type
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.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 = {}) ⇒ OSSChannel
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.
Methods inherited from Channel
Constructor Details
#initialize(attributes = {}) ⇒ OSSChannel
Initializes the object
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 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/oda/models/oss_channel.rb', line 129 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'OSS' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.event_sink_bot_ids = attributes[:'eventSinkBotIds'] if attributes[:'eventSinkBotIds'] raise 'You cannot provide both :eventSinkBotIds and :event_sink_bot_ids' if attributes.key?(:'eventSinkBotIds') && attributes.key?(:'event_sink_bot_ids') self.event_sink_bot_ids = attributes[:'event_sink_bot_ids'] if attributes[:'event_sink_bot_ids'] self. = attributes[:'inboundMessageTopic'] if attributes[:'inboundMessageTopic'] raise 'You cannot provide both :inboundMessageTopic and :inbound_message_topic' if attributes.key?(:'inboundMessageTopic') && attributes.key?(:'inbound_message_topic') self. = attributes[:'inbound_message_topic'] if attributes[:'inbound_message_topic'] self. = attributes[:'outboundMessageTopic'] if attributes[:'outboundMessageTopic'] raise 'You cannot provide both :outboundMessageTopic and :outbound_message_topic' if attributes.key?(:'outboundMessageTopic') && attributes.key?(:'outbound_message_topic') self. = attributes[:'outbound_message_topic'] if attributes[:'outbound_message_topic'] self.bootstrap_servers = attributes[:'bootstrapServers'] if attributes[:'bootstrapServers'] raise 'You cannot provide both :bootstrapServers and :bootstrap_servers' if attributes.key?(:'bootstrapServers') && attributes.key?(:'bootstrap_servers') self.bootstrap_servers = attributes[:'bootstrap_servers'] if attributes[:'bootstrap_servers'] self.security_protocol = attributes[:'securityProtocol'] if attributes[:'securityProtocol'] raise 'You cannot provide both :securityProtocol and :security_protocol' if attributes.key?(:'securityProtocol') && attributes.key?(:'security_protocol') self.security_protocol = attributes[:'security_protocol'] if attributes[:'security_protocol'] self.sasl_mechanism = attributes[:'saslMechanism'] if attributes[:'saslMechanism'] raise 'You cannot provide both :saslMechanism and :sasl_mechanism' if attributes.key?(:'saslMechanism') && attributes.key?(:'sasl_mechanism') self.sasl_mechanism = attributes[:'sasl_mechanism'] if attributes[:'sasl_mechanism'] self.tenancy_name = attributes[:'tenancyName'] if attributes[:'tenancyName'] raise 'You cannot provide both :tenancyName and :tenancy_name' if attributes.key?(:'tenancyName') && attributes.key?(:'tenancy_name') self.tenancy_name = attributes[:'tenancy_name'] if attributes[:'tenancy_name'] self.user_name = attributes[:'userName'] if attributes[:'userName'] raise 'You cannot provide both :userName and :user_name' if attributes.key?(:'userName') && attributes.key?(:'user_name') self.user_name = attributes[:'user_name'] if attributes[:'user_name'] self.stream_pool_id = attributes[:'streamPoolId'] if attributes[:'streamPoolId'] raise 'You cannot provide both :streamPoolId and :stream_pool_id' if attributes.key?(:'streamPoolId') && attributes.key?(:'stream_pool_id') self.stream_pool_id = attributes[:'stream_pool_id'] if attributes[:'stream_pool_id'] end |
Instance Attribute Details
#bootstrap_servers ⇒ String
[Required] The Oracle Streaming Service bootstrap servers.
26 27 28 |
# File 'lib/oci/oda/models/oss_channel.rb', line 26 def bootstrap_servers @bootstrap_servers end |
#event_sink_bot_ids ⇒ Array<String>
The IDs of the Skills and Digital Assistants that the Channel is routed to.
14 15 16 |
# File 'lib/oci/oda/models/oss_channel.rb', line 14 def event_sink_bot_ids @event_sink_bot_ids end |
#inbound_message_topic ⇒ String
[Required] The topic inbound messages are received on.
18 19 20 |
# File 'lib/oci/oda/models/oss_channel.rb', line 18 def @inbound_message_topic end |
#outbound_message_topic ⇒ String
[Required] The topic outbound messages are sent on.
22 23 24 |
# File 'lib/oci/oda/models/oss_channel.rb', line 22 def @outbound_message_topic end |
#sasl_mechanism ⇒ String
[Required] The SASL mechanmism to use when conecting to the Oracle Streaming Service. See Oracle Streaming Service documentation for a list of valid values.
34 35 36 |
# File 'lib/oci/oda/models/oss_channel.rb', line 34 def sasl_mechanism @sasl_mechanism end |
#security_protocol ⇒ String
[Required] The security protocol to use when conecting to the Oracle Streaming Service. See Oracle Streaming Service documentation for a list of valid values.
30 31 32 |
# File 'lib/oci/oda/models/oss_channel.rb', line 30 def security_protocol @security_protocol end |
#stream_pool_id ⇒ String
[Required] The stream pool OCI to use when connecting to the Oracle Streaming Service.
46 47 48 |
# File 'lib/oci/oda/models/oss_channel.rb', line 46 def stream_pool_id @stream_pool_id end |
#tenancy_name ⇒ String
[Required] The tenancy to use when connecting to the Oracle Streaming Service.
38 39 40 |
# File 'lib/oci/oda/models/oss_channel.rb', line 38 def tenancy_name @tenancy_name end |
#user_name ⇒ String
[Required] The user name to use when connecting to the Oracle Streaming Service.
42 43 44 |
# File 'lib/oci/oda/models/oss_channel.rb', line 42 def user_name @user_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oci/oda/models/oss_channel.rb', line 49 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'name': :'name', 'description': :'description', 'category': :'category', 'type': :'type', 'session_expiry_duration_in_milliseconds': :'sessionExpiryDurationInMilliseconds', 'lifecycle_state': :'lifecycleState', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'event_sink_bot_ids': :'eventSinkBotIds', 'inbound_message_topic': :'inboundMessageTopic', 'outbound_message_topic': :'outboundMessageTopic', 'bootstrap_servers': :'bootstrapServers', 'security_protocol': :'securityProtocol', 'sasl_mechanism': :'saslMechanism', 'tenancy_name': :'tenancyName', 'user_name': :'userName', 'stream_pool_id': :'streamPoolId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/oda/models/oss_channel.rb', line 77 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'name': :'String', 'description': :'String', 'category': :'String', 'type': :'String', 'session_expiry_duration_in_milliseconds': :'Integer', 'lifecycle_state': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'event_sink_bot_ids': :'Array<String>', 'inbound_message_topic': :'String', 'outbound_message_topic': :'String', 'bootstrap_servers': :'String', 'security_protocol': :'String', 'sasl_mechanism': :'String', 'tenancy_name': :'String', 'user_name': :'String', 'stream_pool_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/oda/models/oss_channel.rb', line 201 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && name == other.name && description == other.description && category == other.category && type == other.type && session_expiry_duration_in_milliseconds == other.session_expiry_duration_in_milliseconds && lifecycle_state == other.lifecycle_state && time_created == other.time_created && time_updated == other.time_updated && == other. && == other. && event_sink_bot_ids == other.event_sink_bot_ids && == other. && == other. && bootstrap_servers == other.bootstrap_servers && security_protocol == other.security_protocol && sasl_mechanism == other.sasl_mechanism && tenancy_name == other.tenancy_name && user_name == other.user_name && stream_pool_id == other.stream_pool_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/oci/oda/models/oss_channel.rb', line 250 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
230 231 232 |
# File 'lib/oci/oda/models/oss_channel.rb', line 230 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
239 240 241 |
# File 'lib/oci/oda/models/oss_channel.rb', line 239 def hash [id, name, description, category, type, session_expiry_duration_in_milliseconds, lifecycle_state, time_created, time_updated, , , event_sink_bot_ids, , , bootstrap_servers, security_protocol, sasl_mechanism, tenancy_name, user_name, stream_pool_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
283 284 285 286 287 288 289 290 291 292 |
# File 'lib/oci/oda/models/oss_channel.rb', line 283 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
277 278 279 |
# File 'lib/oci/oda/models/oss_channel.rb', line 277 def to_s to_hash.to_s end |