Class: OCI::Oda::Models::UpdateOSSChannelDetails

Inherits:
UpdateChannelDetails show all
Defined in:
lib/oci/oda/models/update_oss_channel_details.rb

Overview

Properties to update an Oracle Streaming Service (OSS) channel.

Constant Summary

Constants inherited from UpdateChannelDetails

OCI::Oda::Models::UpdateChannelDetails::TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from UpdateChannelDetails

#defined_tags, #description, #freeform_tags, #name, #session_expiry_duration_in_milliseconds, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from UpdateChannelDetails

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ UpdateOSSChannelDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :name (String)

    The value to assign to the #name proprety

  • :description (String)

    The value to assign to the #description proprety

  • :session_expiry_duration_in_milliseconds (Integer)

    The value to assign to the #session_expiry_duration_in_milliseconds 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

  • :auth_token (String)

    The value to assign to the #auth_token property



121
122
123
124
125
126
127
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
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
# File 'lib/oci/oda/models/update_oss_channel_details.rb', line 121

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

  self.auth_token = attributes[:'authToken'] if attributes[:'authToken']

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

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

Instance Attribute Details

#auth_tokenString

The authentication token to use when connecting to the Oracle Streaming Service.

Returns:

  • (String)


50
51
52
# File 'lib/oci/oda/models/update_oss_channel_details.rb', line 50

def auth_token
  @auth_token
end

#bootstrap_serversString

The Oracle Streaming Service bootstrap servers.

Returns:

  • (String)


26
27
28
# File 'lib/oci/oda/models/update_oss_channel_details.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/update_oss_channel_details.rb', line 14

def event_sink_bot_ids
  @event_sink_bot_ids
end

#inbound_message_topicString

The topic inbound messages are received on.

Returns:

  • (String)


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

def inbound_message_topic
  @inbound_message_topic
end

#outbound_message_topicString

The topic outbound messages are sent on.

Returns:

  • (String)


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

def outbound_message_topic
  @outbound_message_topic
end

#sasl_mechanismString

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/update_oss_channel_details.rb', line 34

def sasl_mechanism
  @sasl_mechanism
end

#security_protocolString

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/update_oss_channel_details.rb', line 30

def security_protocol
  @security_protocol
end

#stream_pool_idString

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

Returns:

  • (String)


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

def stream_pool_id
  @stream_pool_id
end

#tenancy_nameString

The tenancy to use when connecting to the Oracle Streaming Service.

Returns:

  • (String)


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

def tenancy_name
  @tenancy_name
end

#user_nameString

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

Returns:

  • (String)


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

def user_name
  @user_name
end

Class Method Details

.attribute_mapObject

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



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/update_oss_channel_details.rb', line 53

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'name',
    'description': :'description',
    'type': :'type',
    'session_expiry_duration_in_milliseconds': :'sessionExpiryDurationInMilliseconds',
    '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',
    'auth_token': :'authToken'
    # 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
# File 'lib/oci/oda/models/update_oss_channel_details.rb', line 77

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'name': :'String',
    'description': :'String',
    'type': :'String',
    'session_expiry_duration_in_milliseconds': :'Integer',
    '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',
    'auth_token': :'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



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/oci/oda/models/update_oss_channel_details.rb', line 199

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

  self.class == other.class &&
    name == other.name &&
    description == other.description &&
    type == other.type &&
    session_expiry_duration_in_milliseconds == other.session_expiry_duration_in_milliseconds &&
    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 &&
    auth_token == other.auth_token
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



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

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


224
225
226
# File 'lib/oci/oda/models/update_oss_channel_details.rb', line 224

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



233
234
235
# File 'lib/oci/oda/models/update_oss_channel_details.rb', line 233

def hash
  [name, description, type, session_expiry_duration_in_milliseconds, 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, auth_token].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



277
278
279
280
281
282
283
284
285
286
# File 'lib/oci/oda/models/update_oss_channel_details.rb', line 277

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



271
272
273
# File 'lib/oci/oda/models/update_oss_channel_details.rb', line 271

def to_s
  to_hash.to_s
end