Class: Bandwidth::ConferenceRecordingMetadata

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb

Overview

ConferenceRecordingMetadata Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(account_id = nil, conference_id = nil, name = nil, recording_id = nil, duration = nil, channels = nil, start_time = nil, end_time = nil, file_format = nil, status = nil, media_url = nil) ⇒ ConferenceRecordingMetadata

Returns a new instance of ConferenceRecordingMetadata.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 77

def initialize( = nil,
               conference_id = nil,
               name = nil,
               recording_id = nil,
               duration = nil,
               channels = nil,
               start_time = nil,
               end_time = nil,
               file_format = nil,
               status = nil,
               media_url = nil)
  @account_id = 
  @conference_id = conference_id
  @name = name
  @recording_id = recording_id
  @duration = duration
  @channels = channels
  @start_time = start_time
  @end_time = end_time
  @file_format = file_format
  @status = status
  @media_url = media_url
end

Instance Attribute Details

#account_idString

TODO: Write general description for this method

Returns:

  • (String)


12
13
14
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 12

def 
  @account_id
end

#channelsInteger

Format is ISO-8601

Returns:

  • (Integer)


32
33
34
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 32

def channels
  @channels
end

#conference_idString

TODO: Write general description for this method

Returns:

  • (String)


16
17
18
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 16

def conference_id
  @conference_id
end

#durationString

Format is ISO-8601

Returns:

  • (String)


28
29
30
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 28

def duration
  @duration
end

#end_timeDateTime

Format is ISO-8601

Returns:

  • (DateTime)


40
41
42
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 40

def end_time
  @end_time
end

#file_formatFileFormatEnum

Format is ISO-8601

Returns:



44
45
46
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 44

def file_format
  @file_format
end

#media_urlString

The current status of the recording. Current possible values are ‘processing’, ‘partial’, ‘complete’, ‘deleted’, and ‘error’. Additional states may be added in the future, so your application must be tolerant of unknown values.

Returns:

  • (String)


58
59
60
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 58

def media_url
  @media_url
end

#nameString

TODO: Write general description for this method

Returns:

  • (String)


20
21
22
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 20

def name
  @name
end

#recording_idString

TODO: Write general description for this method

Returns:

  • (String)


24
25
26
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 24

def recording_id
  @recording_id
end

#start_timeDateTime

Format is ISO-8601

Returns:

  • (DateTime)


36
37
38
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 36

def start_time
  @start_time
end

#statusString

The current status of the recording. Current possible values are ‘processing’, ‘partial’, ‘complete’, ‘deleted’, and ‘error’. Additional states may be added in the future, so your application must be tolerant of unknown values.

Returns:

  • (String)


51
52
53
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 51

def status
  @status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 102

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash['accountId']
  conference_id = hash['conferenceId']
  name = hash['name']
  recording_id = hash['recordingId']
  duration = hash['duration']
  channels = hash['channels']
  start_time = DateTimeHelper.from_rfc3339(hash['startTime']) if
    hash['startTime']
  end_time = DateTimeHelper.from_rfc3339(hash['endTime']) if
    hash['endTime']
  file_format = hash['fileFormat']
  status = hash['status']
  media_url = hash['mediaUrl']

  # Create object from extracted values.
  ConferenceRecordingMetadata.new(,
                                  conference_id,
                                  name,
                                  recording_id,
                                  duration,
                                  channels,
                                  start_time,
                                  end_time,
                                  file_format,
                                  status,
                                  media_url)
end

.namesObject

A mapping from model property names to API property names.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 61

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_id'] = 'accountId'
  @_hash['conference_id'] = 'conferenceId'
  @_hash['name'] = 'name'
  @_hash['recording_id'] = 'recordingId'
  @_hash['duration'] = 'duration'
  @_hash['channels'] = 'channels'
  @_hash['start_time'] = 'startTime'
  @_hash['end_time'] = 'endTime'
  @_hash['file_format'] = 'fileFormat'
  @_hash['status'] = 'status'
  @_hash['media_url'] = 'mediaUrl'
  @_hash
end

Instance Method Details

#to_end_timeObject



138
139
140
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 138

def to_end_time
  DateTimeHelper.to_rfc3339(end_time)
end

#to_start_timeObject



134
135
136
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 134

def to_start_time
  DateTimeHelper.to_rfc3339(start_time)
end