class PureCloud::AnalyticsConversationSegment

Attributes

audio_muted[RW]
conference[RW]

Indicates whether the segment was a conference

destination_conversation_id[RW]
destination_session_id[RW]
disconnect_type[RW]

A description of the event that disconnected the segment

error_code[RW]
group_id[RW]
properties[RW]
q850_response_codes[RW]
queue_id[RW]

Queue identifier

requested_language_id[RW]

A unique identifier for the language requested for an interaction.

requested_routing_skill_ids[RW]
requested_routing_user_ids[RW]
scored_agents[RW]
segment_end[RW]

The timestamp when this segment ended. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ

segment_start[RW]

The timestamp when this segment began. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ

segment_type[RW]

The activity taking place for the participant in the segment

sip_response_codes[RW]
source_conversation_id[RW]
source_session_id[RW]
subject[RW]
video_muted[RW]
wrap_up_code[RW]

Wrapup Code id

wrap_up_note[RW]

Note entered by an agent during after-call work

wrap_up_tags[RW]

Public Class Methods

attribute_map() click to toggle source

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

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 81
def self.attribute_map
  {
    
    :'segment_start' => :'segmentStart',
    
    :'segment_end' => :'segmentEnd',
    
    :'queue_id' => :'queueId',
    
    :'wrap_up_code' => :'wrapUpCode',
    
    :'wrap_up_note' => :'wrapUpNote',
    
    :'wrap_up_tags' => :'wrapUpTags',
    
    :'error_code' => :'errorCode',
    
    :'disconnect_type' => :'disconnectType',
    
    :'segment_type' => :'segmentType',
    
    :'requested_routing_user_ids' => :'requestedRoutingUserIds',
    
    :'requested_routing_skill_ids' => :'requestedRoutingSkillIds',
    
    :'requested_language_id' => :'requestedLanguageId',
    
    :'scored_agents' => :'scoredAgents',
    
    :'properties' => :'properties',
    
    :'source_conversation_id' => :'sourceConversationId',
    
    :'destination_conversation_id' => :'destinationConversationId',
    
    :'source_session_id' => :'sourceSessionId',
    
    :'destination_session_id' => :'destinationSessionId',
    
    :'sip_response_codes' => :'sipResponseCodes',
    
    :'q850_response_codes' => :'q850ResponseCodes',
    
    :'conference' => :'conference',
    
    :'group_id' => :'groupId',
    
    :'subject' => :'subject',
    
    :'audio_muted' => :'audioMuted',
    
    :'video_muted' => :'videoMuted'
    
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 196
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?(:'segmentStart')
    
    
    self.segment_start = attributes[:'segmentStart']
    
  
  end

  
  if attributes.has_key?(:'segmentEnd')
    
    
    self.segment_end = attributes[:'segmentEnd']
    
  
  end

  
  if attributes.has_key?(:'queueId')
    
    
    self.queue_id = attributes[:'queueId']
    
  
  end

  
  if attributes.has_key?(:'wrapUpCode')
    
    
    self.wrap_up_code = attributes[:'wrapUpCode']
    
  
  end

  
  if attributes.has_key?(:'wrapUpNote')
    
    
    self.wrap_up_note = attributes[:'wrapUpNote']
    
  
  end

  
  if attributes.has_key?(:'wrapUpTags')
    
    if (value = attributes[:'wrapUpTags']).is_a?(Array)
      self.wrap_up_tags = value
    end
    
    
  
  end

  
  if attributes.has_key?(:'errorCode')
    
    
    self.error_code = attributes[:'errorCode']
    
  
  end

  
  if attributes.has_key?(:'disconnectType')
    
    
    self.disconnect_type = attributes[:'disconnectType']
    
  
  end

  
  if attributes.has_key?(:'segmentType')
    
    
    self.segment_type = attributes[:'segmentType']
    
  
  end

  
  if attributes.has_key?(:'requestedRoutingUserIds')
    
    if (value = attributes[:'requestedRoutingUserIds']).is_a?(Array)
      self.requested_routing_user_ids = value
    end
    
    
  
  end

  
  if attributes.has_key?(:'requestedRoutingSkillIds')
    
    if (value = attributes[:'requestedRoutingSkillIds']).is_a?(Array)
      self.requested_routing_skill_ids = value
    end
    
    
  
  end

  
  if attributes.has_key?(:'requestedLanguageId')
    
    
    self.requested_language_id = attributes[:'requestedLanguageId']
    
  
  end

  
  if attributes.has_key?(:'scoredAgents')
    
    if (value = attributes[:'scoredAgents']).is_a?(Array)
      self.scored_agents = value
    end
    
    
  
  end

  
  if attributes.has_key?(:'properties')
    
    if (value = attributes[:'properties']).is_a?(Array)
      self.properties = value
    end
    
    
  
  end

  
  if attributes.has_key?(:'sourceConversationId')
    
    
    self.source_conversation_id = attributes[:'sourceConversationId']
    
  
  end

  
  if attributes.has_key?(:'destinationConversationId')
    
    
    self.destination_conversation_id = attributes[:'destinationConversationId']
    
  
  end

  
  if attributes.has_key?(:'sourceSessionId')
    
    
    self.source_session_id = attributes[:'sourceSessionId']
    
  
  end

  
  if attributes.has_key?(:'destinationSessionId')
    
    
    self.destination_session_id = attributes[:'destinationSessionId']
    
  
  end

  
  if attributes.has_key?(:'sipResponseCodes')
    
    if (value = attributes[:'sipResponseCodes']).is_a?(Array)
      self.sip_response_codes = value
    end
    
    
  
  end

  
  if attributes.has_key?(:'q850ResponseCodes')
    
    if (value = attributes[:'q850ResponseCodes']).is_a?(Array)
      self.q850_response_codes = value
    end
    
    
  
  end

  
  if attributes.has_key?(:'conference')
    
    
    self.conference = attributes[:'conference']
    
  
  end

  
  if attributes.has_key?(:'groupId')
    
    
    self.group_id = attributes[:'groupId']
    
  
  end

  
  if attributes.has_key?(:'subject')
    
    
    self.subject = attributes[:'subject']
    
  
  end

  
  if attributes.has_key?(:'audioMuted')
    
    
    self.audio_muted = attributes[:'audioMuted']
    
  
  end

  
  if attributes.has_key?(:'videoMuted')
    
    
    self.video_muted = attributes[:'videoMuted']
    
  
  end

  
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 138
def self.swagger_types
  {
    
    :'segment_start' => :'DateTime',
    
    :'segment_end' => :'DateTime',
    
    :'queue_id' => :'String',
    
    :'wrap_up_code' => :'String',
    
    :'wrap_up_note' => :'String',
    
    :'wrap_up_tags' => :'Array<String>',
    
    :'error_code' => :'String',
    
    :'disconnect_type' => :'String',
    
    :'segment_type' => :'String',
    
    :'requested_routing_user_ids' => :'Array<String>',
    
    :'requested_routing_skill_ids' => :'Array<String>',
    
    :'requested_language_id' => :'String',
    
    :'scored_agents' => :'Array<AnalyticsScoredAgent>',
    
    :'properties' => :'Array<AnalyticsProperty>',
    
    :'source_conversation_id' => :'String',
    
    :'destination_conversation_id' => :'String',
    
    :'source_session_id' => :'String',
    
    :'destination_session_id' => :'String',
    
    :'sip_response_codes' => :'Array<Integer>',
    
    :'q850_response_codes' => :'Array<Integer>',
    
    :'conference' => :'BOOLEAN',
    
    :'group_id' => :'String',
    
    :'subject' => :'String',
    
    :'audio_muted' => :'BOOLEAN',
    
    :'video_muted' => :'BOOLEAN'
    
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 715
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      segment_start == o.segment_start &&
      segment_end == o.segment_end &&
      queue_id == o.queue_id &&
      wrap_up_code == o.wrap_up_code &&
      wrap_up_note == o.wrap_up_note &&
      wrap_up_tags == o.wrap_up_tags &&
      error_code == o.error_code &&
      disconnect_type == o.disconnect_type &&
      segment_type == o.segment_type &&
      requested_routing_user_ids == o.requested_routing_user_ids &&
      requested_routing_skill_ids == o.requested_routing_skill_ids &&
      requested_language_id == o.requested_language_id &&
      scored_agents == o.scored_agents &&
      properties == o.properties &&
      source_conversation_id == o.source_conversation_id &&
      destination_conversation_id == o.destination_conversation_id &&
      source_session_id == o.source_session_id &&
      destination_session_id == o.destination_session_id &&
      sip_response_codes == o.sip_response_codes &&
      q850_response_codes == o.q850_response_codes &&
      conference == o.conference &&
      group_id == o.group_id &&
      subject == o.subject &&
      audio_muted == o.audio_muted &&
      video_muted == o.video_muted
end
_deserialize(type, value) click to toggle source
# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 777
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/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 837
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/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 758
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
disconnect_type=(disconnect_type) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] disconnect_type Object to be assigned

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 608
def disconnect_type=(disconnect_type)
  allowed_values = ["endpoint", "client", "system", "transfer", "error", "peer", "other", "spam", "transportFailure", "conferenceTransfer", "consultTransfer", "forwardTransfer", "timeout", "noAnswerTransfer", "notAvailableTransfer", "uncallable"]
  if disconnect_type && !allowed_values.include?(disconnect_type)
    fail ArgumentError, "invalid value for 'disconnect_type', must be one of #{allowed_values}."
  end
  @disconnect_type = disconnect_type
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 747
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 753
def hash
  [segment_start, segment_end, queue_id, wrap_up_code, wrap_up_note, wrap_up_tags, error_code, disconnect_type, segment_type, requested_routing_user_ids, requested_routing_skill_ids, requested_language_id, scored_agents, properties, source_conversation_id, destination_conversation_id, source_session_id, destination_session_id, sip_response_codes, q850_response_codes, conference, group_id, subject, audio_muted, video_muted].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properies with the reasons

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 446
def list_invalid_properties
  invalid_properties = Array.new
  
  
  return invalid_properties
end
segment_type=(segment_type) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] segment_type Object to be assigned

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 622
def segment_type=(segment_type)
  allowed_values = ["unknown", "alert", "system", "delay", "hold", "interact", "ivr", "dialing", "wrapup", "voicemail", "scheduled", "contacting", "transmitting", "converting", "uploading", "sharing"]
  if segment_type && !allowed_values.include?(segment_type)
    fail ArgumentError, "invalid value for 'segment_type', must be one of #{allowed_values}."
  end
  @segment_type = segment_type
end
to_body() click to toggle source

to_body is an alias to to_body (backward compatibility))

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 820
def to_body
  to_hash
end
to_hash() click to toggle source

return the object in the form of hash

# File lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 825
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/purecloudplatformclientv2/models/analytics_conversation_segment.rb, line 815
def to_s
  to_hash.to_s
end
valid?() click to toggle source

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_conversation_segment.rb, line 455
def valid?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  allowed_values = ["endpoint", "client", "system", "transfer", "error", "peer", "other", "spam", "transportFailure", "conferenceTransfer", "consultTransfer", "forwardTransfer", "timeout", "noAnswerTransfer", "notAvailableTransfer", "uncallable"]
  if @disconnect_type && !allowed_values.include?(@disconnect_type)
    return false
  end
  
  
  
  
  
  allowed_values = ["unknown", "alert", "system", "delay", "hold", "interact", "ivr", "dialing", "wrapup", "voicemail", "scheduled", "contacting", "transmitting", "converting", "uploading", "sharing"]
  if @segment_type && !allowed_values.include?(@segment_type)
    return false
  end
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
end