Class: OCI::Oda::Models::CreateOSSChannelResult

Inherits:
CreateChannelResult show all
Defined in:
lib/oci/oda/models/create_oss_channel_result.rb

Overview

The configuration for an Oracle Streaming Service (OSS) channel.

Constant Summary

Constants inherited from CreateChannelResult

OCI::Oda::Models::CreateChannelResult::CATEGORY_ENUM, OCI::Oda::Models::CreateChannelResult::LIFECYCLE_STATE_ENUM, OCI::Oda::Models::CreateChannelResult::TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from CreateChannelResult

#category, #defined_tags, #description, #freeform_tags, #id, #lifecycle_state, #name, #session_expiry_duration_in_milliseconds, #time_created, #time_updated, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CreateChannelResult

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ CreateOSSChannelResult

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id proprety

  • :name (String)

    The value to assign to the #name proprety

  • :description (String)

    The value to assign to the #description proprety

  • :category (String)

    The value to assign to the #category proprety

  • :session_expiry_duration_in_milliseconds (Integer)

    The value to assign to the #session_expiry_duration_in_milliseconds proprety

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state proprety

  • :time_created (DateTime)

    The value to assign to the #time_created proprety

  • :time_updated (DateTime)

    The value to assign to the #time_updated proprety

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags proprety

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

    The value to assign to the #defined_tags proprety

  • :event_sink_bot_ids (Array<String>)

    The value to assign to the #event_sink_bot_ids property

  • :inbound_message_topic (String)

    The value to assign to the #inbound_message_topic property

  • :outbound_message_topic (String)

    The value to assign to the #outbound_message_topic property

  • :bootstrap_servers (String)

    The value to assign to the #bootstrap_servers property

  • :security_protocol (String)

    The value to assign to the #security_protocol property

  • :sasl_mechanism (String)

    The value to assign to the #sasl_mechanism property

  • :tenancy_name (String)

    The value to assign to the #tenancy_name property

  • :user_name (String)

    The value to assign to the #user_name property

  • :stream_pool_id (String)

    The value to assign to the #stream_pool_id property



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

  self.outbound_message_topic = 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.outbound_message_topic = 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_serversString

[Required] The Oracle Streaming Service bootstrap servers.

Returns:

  • (String)


26
27
28
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 26

def bootstrap_servers
  @bootstrap_servers
end

#event_sink_bot_idsArray<String>

The IDs of the Skills and Digital Assistants that the Channel is routed to.

Returns:

  • (Array<String>)


14
15
16
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 14

def event_sink_bot_ids
  @event_sink_bot_ids
end

#inbound_message_topicString

[Required] The topic inbound messages are received on.

Returns:

  • (String)


18
19
20
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 18

def inbound_message_topic
  @inbound_message_topic
end

#outbound_message_topicString

[Required] The topic outbound messages are sent on.

Returns:

  • (String)


22
23
24
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 22

def outbound_message_topic
  @outbound_message_topic
end

#sasl_mechanismString

[Required] The SASL mechanmism to use when conecting to the Oracle Streaming Service. See Oracle Streaming Service documentation for a list of valid values.

Returns:

  • (String)


34
35
36
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 34

def sasl_mechanism
  @sasl_mechanism
end

#security_protocolString

[Required] The security protocol to use when conecting to the Oracle Streaming Service. See Oracle Streaming Service documentation for a list of valid values.

Returns:

  • (String)


30
31
32
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 30

def security_protocol
  @security_protocol
end

#stream_pool_idString

[Required] The stream pool OCI to use when connecting to the Oracle Streaming Service.

Returns:

  • (String)


46
47
48
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 46

def stream_pool_id
  @stream_pool_id
end

#tenancy_nameString

[Required] The tenancy to use when connecting to the Oracle Streaming Service.

Returns:

  • (String)


38
39
40
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 38

def tenancy_name
  @tenancy_name
end

#user_nameString

[Required] The user name to use when connecting to the Oracle Streaming Service.

Returns:

  • (String)


42
43
44
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 42

def user_name
  @user_name
end

Class Method Details

.attribute_mapObject

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/create_oss_channel_result.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_typesObject

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/create_oss_channel_result.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.

Parameters:

  • other (Object)

    the other object to be compared



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/create_oss_channel_result.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 &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    event_sink_bot_ids == other.event_sink_bot_ids &&
    inbound_message_topic == other.inbound_message_topic &&
    outbound_message_topic == other.outbound_message_topic &&
    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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



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/create_oss_channel_result.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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


230
231
232
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 230

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



239
240
241
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 239

def hash
  [id, name, description, category, type, session_expiry_duration_in_milliseconds, lifecycle_state, time_created, time_updated, freeform_tags, defined_tags, event_sink_bot_ids, inbound_message_topic, outbound_message_topic, bootstrap_servers, security_protocol, sasl_mechanism, tenancy_name, user_name, stream_pool_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



283
284
285
286
287
288
289
290
291
292
# File 'lib/oci/oda/models/create_oss_channel_result.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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



277
278
279
# File 'lib/oci/oda/models/create_oss_channel_result.rb', line 277

def to_s
  to_hash.to_s
end