Class: Bandwidth::ConferenceRecordingMetadataResponse

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

Overview

ConferenceRecordingMetadataResponse 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) ⇒ ConferenceRecordingMetadataResponse

Returns a new instance of ConferenceRecordingMetadataResponse.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb', line 71

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_response.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_response.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_response.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_response.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_response.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_response.rb', line 44

def file_format
  @file_format
end

#media_urlString

Format is ISO-8601

Returns:

  • (String)


52
53
54
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb', line 52

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_response.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_response.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_response.rb', line 36

def start_time
  @start_time
end

#statusStatus1Enum

Format is ISO-8601

Returns:



48
49
50
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb', line 48

def status
  @status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb', line 96

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 = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
  end_time = APIHelper.rfc3339(hash['endTime']) if hash['endTime']
  file_format = hash['fileFormat']
  status = hash['status']
  media_url = hash['mediaUrl']

  # Create object from extracted values.
  ConferenceRecordingMetadataResponse.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.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb', line 55

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