class PureCloud::QueueConversationSocialExpressionEventTopicParticipant
Attributes
Public Class Methods
Attribute
mapping from ruby-style variable name to JSON key.
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 94 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', :'team_id' => :'teamId', :'purpose' => :'purpose', :'consult_participant_id' => :'consultParticipantId', :'address' => :'address', :'wrapup_required' => :'wrapupRequired', :'wrapup_expected' => :'wrapupExpected', :'wrapup_prompt' => :'wrapupPrompt', :'wrapup_timeout_ms' => :'wrapupTimeoutMs', :'wrapup' => :'wrapup', :'start_acw_time' => :'startAcwTime', :'end_acw_time' => :'endAcwTime', :'conversation_routing_data' => :'conversationRoutingData', :'alerting_timeout_ms' => :'alertingTimeoutMs', :'monitored_participant_id' => :'monitoredParticipantId', :'screen_recording_state' => :'screenRecordingState', :'flagged_reason' => :'flaggedReason', :'attributes' => :'attributes', :'calls' => :'calls', :'callbacks' => :'callbacks', :'chats' => :'chats', :'cobrowsesessions' => :'cobrowsesessions', :'emails' => :'emails', :'messages' => :'messages', :'screenshares' => :'screenshares', :'social_expressions' => :'socialExpressions', :'videos' => :'videos', :'additional_properties' => :'additionalProperties' } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 253 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} if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'connectedTime') self.connected_time = attributes[:'connectedTime'] end if attributes.has_key?(:'endTime') self.end_time = attributes[:'endTime'] end if attributes.has_key?(:'userId') self.user_id = attributes[:'userId'] end if attributes.has_key?(:'externalContactId') self.external_contact_id = attributes[:'externalContactId'] end if attributes.has_key?(:'externalOrganizationId') self.external_organization_id = attributes[:'externalOrganizationId'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'queueId') self.queue_id = attributes[:'queueId'] end if attributes.has_key?(:'groupId') self.group_id = attributes[:'groupId'] end if attributes.has_key?(:'teamId') self.team_id = attributes[:'teamId'] end if attributes.has_key?(:'purpose') self.purpose = attributes[:'purpose'] end if attributes.has_key?(:'consultParticipantId') self.consult_participant_id = attributes[:'consultParticipantId'] end if attributes.has_key?(:'address') self.address = attributes[:'address'] end if attributes.has_key?(:'wrapupRequired') self.wrapup_required = attributes[:'wrapupRequired'] end if attributes.has_key?(:'wrapupExpected') self.wrapup_expected = attributes[:'wrapupExpected'] end if attributes.has_key?(:'wrapupPrompt') self.wrapup_prompt = attributes[:'wrapupPrompt'] end if attributes.has_key?(:'wrapupTimeoutMs') self.wrapup_timeout_ms = attributes[:'wrapupTimeoutMs'] end if attributes.has_key?(:'wrapup') self.wrapup = attributes[:'wrapup'] end if attributes.has_key?(:'startAcwTime') self.start_acw_time = attributes[:'startAcwTime'] end if attributes.has_key?(:'endAcwTime') self.end_acw_time = attributes[:'endAcwTime'] end if attributes.has_key?(:'conversationRoutingData') self.conversation_routing_data = attributes[:'conversationRoutingData'] end if attributes.has_key?(:'alertingTimeoutMs') self.alerting_timeout_ms = attributes[:'alertingTimeoutMs'] end if attributes.has_key?(:'monitoredParticipantId') self.monitored_participant_id = attributes[:'monitoredParticipantId'] end if attributes.has_key?(:'screenRecordingState') self.screen_recording_state = attributes[:'screenRecordingState'] end if attributes.has_key?(:'flaggedReason') self.flagged_reason = attributes[:'flaggedReason'] end if attributes.has_key?(:'attributes') if (value = attributes[:'attributes']).is_a?(Array) self.attributes = value end end if attributes.has_key?(:'calls') if (value = attributes[:'calls']).is_a?(Array) self.calls = value end end if attributes.has_key?(:'callbacks') if (value = attributes[:'callbacks']).is_a?(Array) self.callbacks = value end end if attributes.has_key?(:'chats') if (value = attributes[:'chats']).is_a?(Array) self.chats = value end end if attributes.has_key?(:'cobrowsesessions') if (value = attributes[:'cobrowsesessions']).is_a?(Array) self.cobrowsesessions = value end end if attributes.has_key?(:'emails') if (value = attributes[:'emails']).is_a?(Array) self.emails = value end end if attributes.has_key?(:'messages') if (value = attributes[:'messages']).is_a?(Array) self.messages = value end end if attributes.has_key?(:'screenshares') if (value = attributes[:'screenshares']).is_a?(Array) self.screenshares = value end end if attributes.has_key?(:'socialExpressions') if (value = attributes[:'socialExpressions']).is_a?(Array) self.social_expressions = value end end if attributes.has_key?(:'videos') if (value = attributes[:'videos']).is_a?(Array) self.videos = value end end if attributes.has_key?(:'additionalProperties') self.additional_properties = attributes[:'additionalProperties'] end end
Attribute
type mapping.
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 173 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', :'team_id' => :'String', :'purpose' => :'String', :'consult_participant_id' => :'String', :'address' => :'String', :'wrapup_required' => :'BOOLEAN', :'wrapup_expected' => :'BOOLEAN', :'wrapup_prompt' => :'String', :'wrapup_timeout_ms' => :'Integer', :'wrapup' => :'QueueConversationSocialExpressionEventTopicWrapup', :'start_acw_time' => :'DateTime', :'end_acw_time' => :'DateTime', :'conversation_routing_data' => :'QueueConversationSocialExpressionEventTopicConversationRoutingData', :'alerting_timeout_ms' => :'Integer', :'monitored_participant_id' => :'String', :'screen_recording_state' => :'String', :'flagged_reason' => :'String', :'attributes' => :'Hash<String, String>', :'calls' => :'Array<QueueConversationSocialExpressionEventTopicCall>', :'callbacks' => :'Array<QueueConversationSocialExpressionEventTopicCallback>', :'chats' => :'Array<QueueConversationSocialExpressionEventTopicChat>', :'cobrowsesessions' => :'Array<QueueConversationSocialExpressionEventTopicCobrowse>', :'emails' => :'Array<QueueConversationSocialExpressionEventTopicEmail>', :'messages' => :'Array<QueueConversationSocialExpressionEventTopicMessage>', :'screenshares' => :'Array<QueueConversationSocialExpressionEventTopicScreenshare>', :'social_expressions' => :'Array<QueueConversationSocialExpressionEventTopicSocialExpression>', :'videos' => :'Array<QueueConversationSocialExpressionEventTopicVideo>', :'additional_properties' => :'Object' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 962 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 && team_id == o.team_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 && start_acw_time == o.start_acw_time && end_acw_time == o.end_acw_time && conversation_routing_data == o.conversation_routing_data && alerting_timeout_ms == o.alerting_timeout_ms && monitored_participant_id == o.monitored_participant_id && screen_recording_state == o.screen_recording_state && flagged_reason == o.flagged_reason && attributes == o.attributes && calls == o.calls && callbacks == o.callbacks && chats == o.chats && cobrowsesessions == o.cobrowsesessions && emails == o.emails && messages == o.messages && screenshares == o.screenshares && social_expressions == o.social_expressions && videos == o.videos && additional_properties == o.additional_properties end
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 1035 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
Method to output non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 1095 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 the object from hash
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 1016 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
@see the `==` method @param [Object] Object to be compared
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 1005 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 1011 def hash [id, connected_time, end_time, user_id, external_contact_id, external_organization_id, name, queue_id, group_id, team_id, purpose, consult_participant_id, address, wrapup_required, wrapup_expected, wrapup_prompt, wrapup_timeout_ms, wrapup, start_acw_time, end_acw_time, conversation_routing_data, alerting_timeout_ms, monitored_participant_id, screen_recording_state, flagged_reason, attributes, calls, callbacks, chats, cobrowsesessions, emails, messages, screenshares, social_expressions, videos, additional_properties].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properies with the reasons
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 608 def list_invalid_properties invalid_properties = Array.new return invalid_properties end
Custom attribute writer method checking allowed values (enum). @param [Object] screen_recording_state
Object to be assigned
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 889 def screen_recording_state=(screen_recording_state) allowed_values = ["REQUESTED", "ACTIVE", "PAUSED", "STOPPED", "ERROR", "TIMEOUT"] if screen_recording_state && !allowed_values.include?(screen_recording_state) fail ArgumentError, "invalid value for 'screen_recording_state', must be one of #{allowed_values}." end @screen_recording_state = screen_recording_state end
return the object in the form of hash
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 1083 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
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 1073 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb, line 617 def valid? allowed_values = ["REQUESTED", "ACTIVE", "PAUSED", "STOPPED", "ERROR", "TIMEOUT"] if @screen_recording_state && !allowed_values.include?(@screen_recording_state) return false end end