class PureCloud::AnalyticsConversationSegment
Attributes
audio_muted[RW]
conference[RW]
destination_conversation_id[RW]
destination_session_id[RW]
disconnect_type[RW]
error_code[RW]
group_id[RW]
properties[RW]
q850_response_codes[RW]
queue_id[RW]
requested_language_id[RW]
requested_routing_skill_ids[RW]
requested_routing_user_ids[RW]
segment_end[RW]
Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
segment_start[RW]
Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
segment_type[RW]
sip_response_codes[RW]
source_conversation_id[RW]
source_session_id[RW]
subject[RW]
video_muted[RW]
wrap_up_code[RW]
wrap_up_note[RW]
Public Class Methods
attribute_map()
click to toggle source
Attribute
mapping from ruby-style variable name to JSON key.
# File lib/purecloud/models/analytics_conversation_segment.rb, line 72 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', :'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
# File lib/purecloud/models/analytics_conversation_segment.rb, line 157 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[:'segmentStart'] self.segment_start = attributes[:'segmentStart'] end if attributes[:'segmentEnd'] self.segment_end = attributes[:'segmentEnd'] end if attributes[:'queueId'] self.queue_id = attributes[:'queueId'] end if attributes[:'wrapUpCode'] self.wrap_up_code = attributes[:'wrapUpCode'] end if attributes[:'wrapUpNote'] self.wrap_up_note = attributes[:'wrapUpNote'] end if attributes[:'wrapUpTags'] if (value = attributes[:'wrapUpTags']).is_a?(Array) self.wrap_up_tags = value end end if attributes[:'errorCode'] self.error_code = attributes[:'errorCode'] end if attributes[:'disconnectType'] self.disconnect_type = attributes[:'disconnectType'] end if attributes[:'segmentType'] self.segment_type = attributes[:'segmentType'] end if attributes[:'requestedRoutingUserIds'] if (value = attributes[:'requestedRoutingUserIds']).is_a?(Array) self.requested_routing_user_ids = value end end if attributes[:'requestedRoutingSkillIds'] if (value = attributes[:'requestedRoutingSkillIds']).is_a?(Array) self.requested_routing_skill_ids = value end end if attributes[:'requestedLanguageId'] self.requested_language_id = attributes[:'requestedLanguageId'] end if attributes[:'properties'] if (value = attributes[:'properties']).is_a?(Array) self.properties = value end end if attributes[:'sourceConversationId'] self.source_conversation_id = attributes[:'sourceConversationId'] end if attributes[:'destinationConversationId'] self.destination_conversation_id = attributes[:'destinationConversationId'] end if attributes[:'sourceSessionId'] self.source_session_id = attributes[:'sourceSessionId'] end if attributes[:'destinationSessionId'] self.destination_session_id = attributes[:'destinationSessionId'] end if attributes[:'sipResponseCodes'] if (value = attributes[:'sipResponseCodes']).is_a?(Array) self.sip_response_codes = value end end if attributes[:'q850ResponseCodes'] if (value = attributes[:'q850ResponseCodes']).is_a?(Array) self.q850_response_codes = value end end if attributes[:'conference'] self.conference = attributes[:'conference'] end if attributes[:'groupId'] self.group_id = attributes[:'groupId'] end if attributes[:'subject'] self.subject = attributes[:'subject'] end if attributes[:'audioMuted'] self.audio_muted = attributes[:'audioMuted'] end if attributes[:'videoMuted'] self.video_muted = attributes[:'videoMuted'] end end
swagger_types()
click to toggle source
Attribute
type mapping.
# File lib/purecloud/models/analytics_conversation_segment.rb, line 127 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', :'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
Check equality by comparing each attribute.
# File lib/purecloud/models/analytics_conversation_segment.rb, line 293 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 && 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/purecloud/models/analytics_conversation_segment.rb, line 352 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/analytics_conversation_segment.rb, line 412 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/analytics_conversation_segment.rb, line 333 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).
# File lib/purecloud/models/analytics_conversation_segment.rb, line 275 def disconnect_type=(disconnect_type) allowed_values = ["endpoint", "client", "system", "transfer", "error", "peer", "other", "spam", "transportFailure", "conferenceTransfer", "consultTransfer", "forwardTransfer", "timeout", "noAnswerTransfer", "notAvailableTransfer"] if disconnect_type && !allowed_values.include?(disconnect_type) fail "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
# File lib/purecloud/models/analytics_conversation_segment.rb, line 323 def eql?(o) self == o end
hash()
click to toggle source
Calculate hash code according to all attributes.
# File lib/purecloud/models/analytics_conversation_segment.rb, line 328 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, 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
segment_type=(segment_type)
click to toggle source
Custom attribute writer method checking allowed values (enum).
# File lib/purecloud/models/analytics_conversation_segment.rb, line 284 def segment_type=(segment_type) allowed_values = ["unknown", "alert", "system", "delay", "hold", "interact", "ivr", "dialing", "wrapup", "voicemail", "scheduled"] if segment_type && !allowed_values.include?(segment_type) fail "invalid value for 'segment_type', must be one of #{allowed_values}" end @segment_type = segment_type 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/analytics_conversation_segment.rb, line 400 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/analytics_conversation_segment.rb, line 390 def to_s to_hash.to_s end