class PureCloud::AnalyticsSession
Attributes
Unique identifier of the active virtual agent assistant
Automatic Number
Identification (caller's number)
List of numbers to callback
Scheduled callback date/time. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
The name of the user requesting a call back
Describe side of the cobrowse (sharer or viewer)
A unique identifier for a PureCloud
Cobrowse room.
Direction
(Dialer) Unique identifier of the contact list that this contact belongs to
(Dialer) Result of the analysis
Dialed number identification service (number dialed by the calling party)
Unique identifier of the edge device
IVR
flow execution associated with this session
Type of flow out that occurred, e.g. voicemail, callback, or acd
Journey action ID
Journey action map ID
Journey action map version
ID of the journey customer
Type of the journey customer ID
ID of the journey customer session
Type of the journey customer session ID
Count of any media (images, files, etc) included in this session
Media endpoint stats associated with this session
The session media type
Message
type for messaging services such as sms
List of metrics for this session
The sessionID being monitored
(Dialer) Unique identifier of the outbound campaign
(Dialer) Unique identifier of the contact
(Dialer) Unique identifier of the contact list that this contact belongs to
A unique identifier for a peer
Proposed agents
The original voice protocol call ID, e.g. a SIP call ID
The source provider for the communication
Flag determining if an audio recording was started or not
Name, phone number, or email address of the remote party.
All routing types for requested/attempted routing methods.
Unique identifier for the room
A unique identifier for a script
List of segments for this session
Selected agent id
Selected agent GPR rank
Dialed number for the current session; this can be different from dnis, e.g. if the call was transferred
The unique identifier of this session
Flag determining if screenShare is started or not (true/false)
(Dialer) Whether the agent can skip the dialer contact
The number of seconds before PureCloud
begins the call for a call back. 0 disables automatic calling
Complete routing method
Direct Video
address
A unique identifier for a PureCloud
video room.
Public Class Methods
Attribute
mapping from ruby-style variable name to JSON key.
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 192 def self.attribute_map { :'media_type' => :'mediaType', :'session_id' => :'sessionId', :'address_other' => :'addressOther', :'address_self' => :'addressSelf', :'address_from' => :'addressFrom', :'address_to' => :'addressTo', :'message_type' => :'messageType', :'ani' => :'ani', :'direction' => :'direction', :'dnis' => :'dnis', :'session_dnis' => :'sessionDnis', :'outbound_campaign_id' => :'outboundCampaignId', :'outbound_contact_id' => :'outboundContactId', :'outbound_contact_list_id' => :'outboundContactListId', :'disposition_analyzer' => :'dispositionAnalyzer', :'disposition_name' => :'dispositionName', :'edge_id' => :'edgeId', :'remote_name_displayable' => :'remoteNameDisplayable', :'room_id' => :'roomId', :'monitored_session_id' => :'monitoredSessionId', :'monitored_participant_id' => :'monitoredParticipantId', :'callback_user_name' => :'callbackUserName', :'callback_numbers' => :'callbackNumbers', :'callback_scheduled_time' => :'callbackScheduledTime', :'script_id' => :'scriptId', :'peer_id' => :'peerId', :'skip_enabled' => :'skipEnabled', :'timeout_seconds' => :'timeoutSeconds', :'cobrowse_role' => :'cobrowseRole', :'cobrowse_room_id' => :'cobrowseRoomId', :'media_bridge_id' => :'mediaBridgeId', :'screen_share_address_self' => :'screenShareAddressSelf', :'sharing_screen' => :'sharingScreen', :'screen_share_room_id' => :'screenShareRoomId', :'video_room_id' => :'videoRoomId', :'video_address_self' => :'videoAddressSelf', :'segments' => :'segments', :'metrics' => :'metrics', :'flow' => :'flow', :'media_endpoint_stats' => :'mediaEndpointStats', :'recording' => :'recording', :'journey_customer_id' => :'journeyCustomerId', :'journey_customer_id_type' => :'journeyCustomerIdType', :'journey_customer_session_id' => :'journeyCustomerSessionId', :'journey_customer_session_id_type' => :'journeyCustomerSessionIdType', :'journey_action_id' => :'journeyActionId', :'journey_action_map_id' => :'journeyActionMapId', :'journey_action_map_version' => :'journeyActionMapVersion', :'protocol_call_id' => :'protocolCallId', :'provider' => :'provider', :'remote' => :'remote', :'media_count' => :'mediaCount', :'flow_out_type' => :'flowOutType', :'requested_routings' => :'requestedRoutings', :'used_routing' => :'usedRouting', :'selected_agent_id' => :'selectedAgentId', :'selected_agent_rank' => :'selectedAgentRank', :'agent_assistant_id' => :'agentAssistantId', :'proposed_agents' => :'proposedAgents' } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 443 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?(:'mediaType') self.media_type = attributes[:'mediaType'] end if attributes.has_key?(:'sessionId') self.session_id = attributes[:'sessionId'] end if attributes.has_key?(:'addressOther') self.address_other = attributes[:'addressOther'] end if attributes.has_key?(:'addressSelf') self.address_self = attributes[:'addressSelf'] end if attributes.has_key?(:'addressFrom') self.address_from = attributes[:'addressFrom'] end if attributes.has_key?(:'addressTo') self.address_to = attributes[:'addressTo'] end if attributes.has_key?(:'messageType') self.message_type = attributes[:'messageType'] end if attributes.has_key?(:'ani') self.ani = attributes[:'ani'] end if attributes.has_key?(:'direction') self.direction = attributes[:'direction'] end if attributes.has_key?(:'dnis') self.dnis = attributes[:'dnis'] end if attributes.has_key?(:'sessionDnis') self.session_dnis = attributes[:'sessionDnis'] end if attributes.has_key?(:'outboundCampaignId') self.outbound_campaign_id = attributes[:'outboundCampaignId'] end if attributes.has_key?(:'outboundContactId') self.outbound_contact_id = attributes[:'outboundContactId'] end if attributes.has_key?(:'outboundContactListId') self.outbound_contact_list_id = attributes[:'outboundContactListId'] end if attributes.has_key?(:'dispositionAnalyzer') self.disposition_analyzer = attributes[:'dispositionAnalyzer'] end if attributes.has_key?(:'dispositionName') self.disposition_name = attributes[:'dispositionName'] end if attributes.has_key?(:'edgeId') self.edge_id = attributes[:'edgeId'] end if attributes.has_key?(:'remoteNameDisplayable') self.remote_name_displayable = attributes[:'remoteNameDisplayable'] end if attributes.has_key?(:'roomId') self.room_id = attributes[:'roomId'] end if attributes.has_key?(:'monitoredSessionId') self.monitored_session_id = attributes[:'monitoredSessionId'] end if attributes.has_key?(:'monitoredParticipantId') self.monitored_participant_id = attributes[:'monitoredParticipantId'] end if attributes.has_key?(:'callbackUserName') self.callback_user_name = attributes[:'callbackUserName'] end if attributes.has_key?(:'callbackNumbers') if (value = attributes[:'callbackNumbers']).is_a?(Array) self.callback_numbers = value end end if attributes.has_key?(:'callbackScheduledTime') self.callback_scheduled_time = attributes[:'callbackScheduledTime'] end if attributes.has_key?(:'scriptId') self.script_id = attributes[:'scriptId'] end if attributes.has_key?(:'peerId') self.peer_id = attributes[:'peerId'] end if attributes.has_key?(:'skipEnabled') self.skip_enabled = attributes[:'skipEnabled'] end if attributes.has_key?(:'timeoutSeconds') self.timeout_seconds = attributes[:'timeoutSeconds'] end if attributes.has_key?(:'cobrowseRole') self.cobrowse_role = attributes[:'cobrowseRole'] end if attributes.has_key?(:'cobrowseRoomId') self.cobrowse_room_id = attributes[:'cobrowseRoomId'] end if attributes.has_key?(:'mediaBridgeId') self.media_bridge_id = attributes[:'mediaBridgeId'] end if attributes.has_key?(:'screenShareAddressSelf') self.screen_share_address_self = attributes[:'screenShareAddressSelf'] end if attributes.has_key?(:'sharingScreen') self.sharing_screen = attributes[:'sharingScreen'] end if attributes.has_key?(:'screenShareRoomId') self.screen_share_room_id = attributes[:'screenShareRoomId'] end if attributes.has_key?(:'videoRoomId') self.video_room_id = attributes[:'videoRoomId'] end if attributes.has_key?(:'videoAddressSelf') self.video_address_self = attributes[:'videoAddressSelf'] end if attributes.has_key?(:'segments') if (value = attributes[:'segments']).is_a?(Array) self.segments = value end end if attributes.has_key?(:'metrics') if (value = attributes[:'metrics']).is_a?(Array) self.metrics = value end end if attributes.has_key?(:'flow') self.flow = attributes[:'flow'] end if attributes.has_key?(:'mediaEndpointStats') if (value = attributes[:'mediaEndpointStats']).is_a?(Array) self.media_endpoint_stats = value end end if attributes.has_key?(:'recording') self.recording = attributes[:'recording'] end if attributes.has_key?(:'journeyCustomerId') self.journey_customer_id = attributes[:'journeyCustomerId'] end if attributes.has_key?(:'journeyCustomerIdType') self.journey_customer_id_type = attributes[:'journeyCustomerIdType'] end if attributes.has_key?(:'journeyCustomerSessionId') self.journey_customer_session_id = attributes[:'journeyCustomerSessionId'] end if attributes.has_key?(:'journeyCustomerSessionIdType') self.journey_customer_session_id_type = attributes[:'journeyCustomerSessionIdType'] end if attributes.has_key?(:'journeyActionId') self.journey_action_id = attributes[:'journeyActionId'] end if attributes.has_key?(:'journeyActionMapId') self.journey_action_map_id = attributes[:'journeyActionMapId'] end if attributes.has_key?(:'journeyActionMapVersion') self.journey_action_map_version = attributes[:'journeyActionMapVersion'] end if attributes.has_key?(:'protocolCallId') self.protocol_call_id = attributes[:'protocolCallId'] end if attributes.has_key?(:'provider') self.provider = attributes[:'provider'] end if attributes.has_key?(:'remote') self.remote = attributes[:'remote'] end if attributes.has_key?(:'mediaCount') self.media_count = attributes[:'mediaCount'] end if attributes.has_key?(:'flowOutType') self.flow_out_type = attributes[:'flowOutType'] end if attributes.has_key?(:'requestedRoutings') if (value = attributes[:'requestedRoutings']).is_a?(Array) self.requested_routings = value end end if attributes.has_key?(:'usedRouting') self.used_routing = attributes[:'usedRouting'] end if attributes.has_key?(:'selectedAgentId') self.selected_agent_id = attributes[:'selectedAgentId'] end if attributes.has_key?(:'selectedAgentRank') self.selected_agent_rank = attributes[:'selectedAgentRank'] end if attributes.has_key?(:'agentAssistantId') self.agent_assistant_id = attributes[:'agentAssistantId'] end if attributes.has_key?(:'proposedAgents') if (value = attributes[:'proposedAgents']).is_a?(Array) self.proposed_agents = value end end end
Attribute
type mapping.
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 317 def self.swagger_types { :'media_type' => :'String', :'session_id' => :'String', :'address_other' => :'String', :'address_self' => :'String', :'address_from' => :'String', :'address_to' => :'String', :'message_type' => :'String', :'ani' => :'String', :'direction' => :'String', :'dnis' => :'String', :'session_dnis' => :'String', :'outbound_campaign_id' => :'String', :'outbound_contact_id' => :'String', :'outbound_contact_list_id' => :'String', :'disposition_analyzer' => :'String', :'disposition_name' => :'String', :'edge_id' => :'String', :'remote_name_displayable' => :'String', :'room_id' => :'String', :'monitored_session_id' => :'String', :'monitored_participant_id' => :'String', :'callback_user_name' => :'String', :'callback_numbers' => :'Array<String>', :'callback_scheduled_time' => :'DateTime', :'script_id' => :'String', :'peer_id' => :'String', :'skip_enabled' => :'BOOLEAN', :'timeout_seconds' => :'Integer', :'cobrowse_role' => :'String', :'cobrowse_room_id' => :'String', :'media_bridge_id' => :'String', :'screen_share_address_self' => :'String', :'sharing_screen' => :'BOOLEAN', :'screen_share_room_id' => :'String', :'video_room_id' => :'String', :'video_address_self' => :'String', :'segments' => :'Array<AnalyticsConversationSegment>', :'metrics' => :'Array<AnalyticsSessionMetric>', :'flow' => :'AnalyticsFlow', :'media_endpoint_stats' => :'Array<AnalyticsMediaEndpointStat>', :'recording' => :'BOOLEAN', :'journey_customer_id' => :'String', :'journey_customer_id_type' => :'String', :'journey_customer_session_id' => :'String', :'journey_customer_session_id_type' => :'String', :'journey_action_id' => :'String', :'journey_action_map_id' => :'String', :'journey_action_map_version' => :'String', :'protocol_call_id' => :'String', :'provider' => :'String', :'remote' => :'String', :'media_count' => :'Integer', :'flow_out_type' => :'String', :'requested_routings' => :'Array<String>', :'used_routing' => :'String', :'selected_agent_id' => :'String', :'selected_agent_rank' => :'Integer', :'agent_assistant_id' => :'String', :'proposed_agents' => :'Array<AnalyticsProposedAgent>' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 1600 def ==(o) return true if self.equal?(o) self.class == o.class && media_type == o.media_type && session_id == o.session_id && address_other == o.address_other && address_self == o.address_self && address_from == o.address_from && address_to == o.address_to && message_type == o.message_type && ani == o.ani && direction == o.direction && dnis == o.dnis && session_dnis == o.session_dnis && outbound_campaign_id == o.outbound_campaign_id && outbound_contact_id == o.outbound_contact_id && outbound_contact_list_id == o.outbound_contact_list_id && disposition_analyzer == o.disposition_analyzer && disposition_name == o.disposition_name && edge_id == o.edge_id && remote_name_displayable == o.remote_name_displayable && room_id == o.room_id && monitored_session_id == o.monitored_session_id && monitored_participant_id == o.monitored_participant_id && callback_user_name == o.callback_user_name && callback_numbers == o.callback_numbers && callback_scheduled_time == o.callback_scheduled_time && script_id == o.script_id && peer_id == o.peer_id && skip_enabled == o.skip_enabled && timeout_seconds == o.timeout_seconds && cobrowse_role == o.cobrowse_role && cobrowse_room_id == o.cobrowse_room_id && media_bridge_id == o.media_bridge_id && screen_share_address_self == o.screen_share_address_self && sharing_screen == o.sharing_screen && screen_share_room_id == o.screen_share_room_id && video_room_id == o.video_room_id && video_address_self == o.video_address_self && segments == o.segments && metrics == o.metrics && flow == o.flow && media_endpoint_stats == o.media_endpoint_stats && recording == o.recording && journey_customer_id == o.journey_customer_id && journey_customer_id_type == o.journey_customer_id_type && journey_customer_session_id == o.journey_customer_session_id && journey_customer_session_id_type == o.journey_customer_session_id_type && journey_action_id == o.journey_action_id && journey_action_map_id == o.journey_action_map_id && journey_action_map_version == o.journey_action_map_version && protocol_call_id == o.protocol_call_id && provider == o.provider && remote == o.remote && media_count == o.media_count && flow_out_type == o.flow_out_type && requested_routings == o.requested_routings && used_routing == o.used_routing && selected_agent_id == o.selected_agent_id && selected_agent_rank == o.selected_agent_rank && agent_assistant_id == o.agent_assistant_id && proposed_agents == o.proposed_agents end
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 1696 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/analytics_session.rb, line 1756 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/analytics_session.rb, line 1677 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
Custom attribute writer method checking allowed values (enum). @param [Object] direction Object to be assigned
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 1328 def direction=(direction) allowed_values = ["inbound", "outbound"] if direction && !allowed_values.include?(direction) fail ArgumentError, "invalid value for 'direction', must be one of #{allowed_values}." end @direction = direction end
@see the `==` method @param [Object] Object to be compared
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 1666 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 1672 def hash [media_type, session_id, address_other, address_self, address_from, address_to, message_type, ani, direction, dnis, session_dnis, outbound_campaign_id, outbound_contact_id, outbound_contact_list_id, disposition_analyzer, disposition_name, edge_id, remote_name_displayable, room_id, monitored_session_id, monitored_participant_id, callback_user_name, callback_numbers, callback_scheduled_time, script_id, peer_id, skip_enabled, timeout_seconds, cobrowse_role, cobrowse_room_id, media_bridge_id, screen_share_address_self, sharing_screen, screen_share_room_id, video_room_id, video_address_self, segments, metrics, flow, media_endpoint_stats, recording, journey_customer_id, journey_customer_id_type, journey_customer_session_id, journey_customer_session_id_type, journey_action_id, journey_action_map_id, journey_action_map_version, protocol_call_id, provider, remote, media_count, flow_out_type, requested_routings, used_routing, selected_agent_id, selected_agent_rank, agent_assistant_id, proposed_agents].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/analytics_session.rb, line 997 def list_invalid_properties invalid_properties = Array.new return invalid_properties end
Custom attribute writer method checking allowed values (enum). @param [Object] media_type
Object to be assigned
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 1270 def media_type=(media_type) allowed_values = ["voice", "chat", "email", "callback", "cobrowse", "video", "screenshare", "message"] if media_type && !allowed_values.include?(media_type) fail ArgumentError, "invalid value for 'media_type', must be one of #{allowed_values}." end @media_type = media_type end
Custom attribute writer method checking allowed values (enum). @param [Object] message_type
Object to be assigned
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 1309 def message_type=(message_type) allowed_values = ["sms", "facebook", "twitter", "line"] if message_type && !allowed_values.include?(message_type) fail ArgumentError, "invalid value for 'message_type', must be one of #{allowed_values}." end @message_type = message_type end
return the object in the form of hash
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 1744 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/analytics_session.rb, line 1734 def to_s to_hash.to_s end
Custom attribute writer method checking allowed values (enum). @param [Object] used_routing
Object to be assigned
# File lib/purecloudplatformclientv2/models/analytics_session.rb, line 1567 def used_routing=(used_routing) allowed_values = ["Predictive", "Preferred", "Manual", "Last", "Bullseye", "Standard"] if used_routing && !allowed_values.include?(used_routing) fail ArgumentError, "invalid value for 'used_routing', must be one of #{allowed_values}." end @used_routing = used_routing 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/analytics_session.rb, line 1006 def valid? allowed_values = ["voice", "chat", "email", "callback", "cobrowse", "video", "screenshare", "message"] if @media_type && !allowed_values.include?(@media_type) return false end allowed_values = ["sms", "facebook", "twitter", "line"] if @message_type && !allowed_values.include?(@message_type) return false end allowed_values = ["inbound", "outbound"] if @direction && !allowed_values.include?(@direction) return false end allowed_values = ["Predictive", "Preferred", "Manual", "Last", "Bullseye", "Standard"] if @used_routing && !allowed_values.include?(@used_routing) return false end end