class PureCloud::ConversationNotificationParticipant
Attributes
additional_properties[RW]
address[RW]
attributes[RW]
callbacks[RW]
calls[RW]
chats[RW]
cobrowsesessions[RW]
connected_time[RW]
consult_participant_id[RW]
emails[RW]
end_time[RW]
external_contact_id[RW]
external_organization_id[RW]
group_id[RW]
id[RW]
monitored_participant_id[RW]
name[RW]
purpose[RW]
queue_id[RW]
user_id[RW]
videos[RW]
wrapup[RW]
wrapup_expected[RW]
wrapup_prompt[RW]
wrapup_required[RW]
wrapup_timeout_ms[RW]
Public Class Methods
attribute_map()
click to toggle source
Attribute
mapping from ruby-style variable name to JSON key.
# File lib/purecloud/models/conversation_notification_participant.rb, line 78 def self.attribute_map { :'id' => :'id', :'connected_time' => :'connectedTime', :'end_time' => :'endTime', :'user_id' => :'userId', :'external_contact_id' => :'externalContactId', :'external_organization_id' => :'externalOrganizationId', :'name' => :'name', :'queue_id' => :'queueId', :'group_id' => :'groupId', :'purpose' => :'purpose', :'consult_participant_id' => :'consultParticipantId', :'address' => :'address', :'wrapup_required' => :'wrapupRequired', :'wrapup_expected' => :'wrapupExpected', :'wrapup_prompt' => :'wrapupPrompt', :'wrapup_timeout_ms' => :'wrapupTimeoutMs', :'wrapup' => :'wrapup', :'monitored_participant_id' => :'monitoredParticipantId', :'attributes' => :'attributes', :'calls' => :'calls', :'callbacks' => :'callbacks', :'chats' => :'chats', :'cobrowsesessions' => :'cobrowsesessions', :'emails' => :'emails', :'screenshares' => :'screenshares', :'social_expressions' => :'socialExpressions', :'videos' => :'videos', :'additional_properties' => :'additionalProperties' } end
new(attributes = {})
click to toggle source
# File lib/purecloud/models/conversation_notification_participant.rb, line 175 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'connectedTime'] self.connected_time = attributes[:'connectedTime'] end if attributes[:'endTime'] self.end_time = attributes[:'endTime'] end if attributes[:'userId'] self.user_id = attributes[:'userId'] end if attributes[:'externalContactId'] self.external_contact_id = attributes[:'externalContactId'] end if attributes[:'externalOrganizationId'] self.external_organization_id = attributes[:'externalOrganizationId'] end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'queueId'] self.queue_id = attributes[:'queueId'] end if attributes[:'groupId'] self.group_id = attributes[:'groupId'] end if attributes[:'purpose'] self.purpose = attributes[:'purpose'] end if attributes[:'consultParticipantId'] self.consult_participant_id = attributes[:'consultParticipantId'] end if attributes[:'address'] self.address = attributes[:'address'] end if attributes[:'wrapupRequired'] self.wrapup_required = attributes[:'wrapupRequired'] end if attributes[:'wrapupExpected'] self.wrapup_expected = attributes[:'wrapupExpected'] end if attributes[:'wrapupPrompt'] self.wrapup_prompt = attributes[:'wrapupPrompt'] end if attributes[:'wrapupTimeoutMs'] self.wrapup_timeout_ms = attributes[:'wrapupTimeoutMs'] end if attributes[:'wrapup'] self.wrapup = attributes[:'wrapup'] end if attributes[:'monitoredParticipantId'] self.monitored_participant_id = attributes[:'monitoredParticipantId'] end if attributes[:'attributes'] if (value = attributes[:'attributes']).is_a?(Array) self.attributes = value end end if attributes[:'calls'] if (value = attributes[:'calls']).is_a?(Array) self.calls = value end end if attributes[:'callbacks'] if (value = attributes[:'callbacks']).is_a?(Array) self.callbacks = value end end if attributes[:'chats'] if (value = attributes[:'chats']).is_a?(Array) self.chats = value end end if attributes[:'cobrowsesessions'] if (value = attributes[:'cobrowsesessions']).is_a?(Array) self.cobrowsesessions = value end end if attributes[:'emails'] if (value = attributes[:'emails']).is_a?(Array) self.emails = value end end if attributes[:'screenshares'] if (value = attributes[:'screenshares']).is_a?(Array) self.screenshares = value end end if attributes[:'socialExpressions'] if (value = attributes[:'socialExpressions']).is_a?(Array) self.social_expressions = value end end if attributes[:'videos'] if (value = attributes[:'videos']).is_a?(Array) self.videos = value end end if attributes[:'additionalProperties'] self.additional_properties = attributes[:'additionalProperties'] end end
swagger_types()
click to toggle source
Attribute
type mapping.
# File lib/purecloud/models/conversation_notification_participant.rb, line 141 def self.swagger_types { :'id' => :'String', :'connected_time' => :'DateTime', :'end_time' => :'DateTime', :'user_id' => :'String', :'external_contact_id' => :'String', :'external_organization_id' => :'String', :'name' => :'String', :'queue_id' => :'String', :'group_id' => :'String', :'purpose' => :'String', :'consult_participant_id' => :'String', :'address' => :'String', :'wrapup_required' => :'BOOLEAN', :'wrapup_expected' => :'BOOLEAN', :'wrapup_prompt' => :'String', :'wrapup_timeout_ms' => :'Integer', :'wrapup' => :'ConversationNotificationWrapup', :'monitored_participant_id' => :'String', :'attributes' => :'Hash<String, String>', :'calls' => :'Array<ConversationNotificationCalls>', :'callbacks' => :'Array<ConversationNotificationCallbacks>', :'chats' => :'Array<ConversationNotificationChats>', :'cobrowsesessions' => :'Array<ConversationNotificationCobrowsesessions>', :'emails' => :'Array<ConversationNotificationEmails>', :'screenshares' => :'Array<ConversationNotificationScreenshares>', :'social_expressions' => :'Array<ConversationNotificationSocialExpressions>', :'videos' => :'Array<ConversationNotificationVideos>', :'additional_properties' => :'Object' } end
Public Instance Methods
==(o)
click to toggle source
Check equality by comparing each attribute.
# File lib/purecloud/models/conversation_notification_participant.rb, line 315 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && connected_time == o.connected_time && end_time == o.end_time && user_id == o.user_id && external_contact_id == o.external_contact_id && external_organization_id == o.external_organization_id && name == o.name && queue_id == o.queue_id && group_id == o.group_id && purpose == o.purpose && consult_participant_id == o.consult_participant_id && address == o.address && wrapup_required == o.wrapup_required && wrapup_expected == o.wrapup_expected && wrapup_prompt == o.wrapup_prompt && wrapup_timeout_ms == o.wrapup_timeout_ms && wrapup == o.wrapup && monitored_participant_id == o.monitored_participant_id && attributes == o.attributes && calls == o.calls && callbacks == o.callbacks && chats == o.chats && cobrowsesessions == o.cobrowsesessions && emails == o.emails && screenshares == o.screenshares && social_expressions == o.social_expressions && videos == o.videos && additional_properties == o.additional_properties end
_deserialize(type, value)
click to toggle source
# File lib/purecloud/models/conversation_notification_participant.rb, line 378 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /^(true|t|yes|y|1)$/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model _model = Object.const_get("PureCloud").const_get(type).new _model.build_from_hash(value) end end
_to_hash(value)
click to toggle source
Method to output non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
# File lib/purecloud/models/conversation_notification_participant.rb, line 438 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
build_from_hash(attributes)
click to toggle source
build the object from hash
# File lib/purecloud/models/conversation_notification_participant.rb, line 359 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 if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) else #TODO show warning in debug mode end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) else # data not found in attributes(hash), not an issue as the data can be optional end end self end
eql?(o)
click to toggle source
@see the `==` method
# File lib/purecloud/models/conversation_notification_participant.rb, line 349 def eql?(o) self == o end
hash()
click to toggle source
Calculate hash code according to all attributes.
# File lib/purecloud/models/conversation_notification_participant.rb, line 354 def hash [id, connected_time, end_time, user_id, external_contact_id, external_organization_id, name, queue_id, group_id, purpose, consult_participant_id, address, wrapup_required, wrapup_expected, wrapup_prompt, wrapup_timeout_ms, wrapup, monitored_participant_id, attributes, calls, callbacks, chats, cobrowsesessions, emails, screenshares, social_expressions, videos, additional_properties].hash end
to_body()
click to toggle source
to_hash()
click to toggle source
return the object in the form of hash
# File lib/purecloud/models/conversation_notification_participant.rb, line 426 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end
to_s()
click to toggle source
# File lib/purecloud/models/conversation_notification_participant.rb, line 416 def to_s to_hash.to_s end