Class: Bandwidth::ConferenceRecordingMetadata
- Defined in:
- lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb
Overview
ConferenceRecordingMetadata Model.
Instance Attribute Summary collapse
-
#account_id ⇒ String
TODO: Write general description for this method.
-
#channels ⇒ Integer
Format is ISO-8601.
-
#conference_id ⇒ String
TODO: Write general description for this method.
-
#duration ⇒ String
Format is ISO-8601.
-
#end_time ⇒ DateTime
Format is ISO-8601.
-
#file_format ⇒ FileFormatEnum
Format is ISO-8601.
-
#media_url ⇒ String
The current status of the recording.
-
#name ⇒ String
TODO: Write general description for this method.
-
#recording_id ⇒ String
TODO: Write general description for this method.
-
#start_time ⇒ DateTime
Format is ISO-8601.
-
#status ⇒ String
The current status of the recording.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#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
constructor
A new instance of ConferenceRecordingMetadata.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
- #to_end_time ⇒ Object
- #to_start_time ⇒ Object
Methods inherited from BaseModel
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.
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.rb', line 102 def 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) @account_id = account_id unless account_id == SKIP @conference_id = conference_id unless conference_id == SKIP @name = name unless name == SKIP @recording_id = recording_id unless recording_id == SKIP @duration = duration unless duration == SKIP @channels = channels unless channels == SKIP @start_time = start_time unless start_time == SKIP @end_time = end_time unless end_time == SKIP @file_format = file_format unless file_format == SKIP @status = status unless status == SKIP @media_url = media_url unless media_url == SKIP end |
Instance Attribute Details
#account_id ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 15 def account_id @account_id end |
#channels ⇒ Integer
Format is ISO-8601
35 36 37 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 35 def channels @channels end |
#conference_id ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 19 def conference_id @conference_id end |
#duration ⇒ String
Format is ISO-8601
31 32 33 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 31 def duration @duration end |
#end_time ⇒ DateTime
Format is ISO-8601
43 44 45 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 43 def end_time @end_time end |
#file_format ⇒ FileFormatEnum
Format is ISO-8601
47 48 49 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 47 def file_format @file_format end |
#media_url ⇒ String
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.
61 62 63 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 61 def media_url @media_url end |
#name ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 23 def name @name end |
#recording_id ⇒ String
TODO: Write general description for this method
27 28 29 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 27 def recording_id @recording_id end |
#start_time ⇒ DateTime
Format is ISO-8601
39 40 41 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 39 def start_time @start_time end |
#status ⇒ String
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.
54 55 56 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 54 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 127 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('accountId') ? hash['accountId'] : SKIP conference_id = hash.key?('conferenceId') ? hash['conferenceId'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP recording_id = hash.key?('recordingId') ? hash['recordingId'] : SKIP duration = hash.key?('duration') ? hash['duration'] : SKIP channels = hash.key?('channels') ? hash['channels'] : SKIP start_time = if hash.key?('startTime') (DateTimeHelper.from_rfc3339(hash['startTime']) if hash['startTime']) else SKIP end end_time = if hash.key?('endTime') (DateTimeHelper.from_rfc3339(hash['endTime']) if hash['endTime']) else SKIP end file_format = hash.key?('fileFormat') ? hash['fileFormat'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP media_url = hash.key?('mediaUrl') ? hash['mediaUrl'] : SKIP # Create object from extracted values. ConferenceRecordingMetadata.new(account_id, conference_id, name, recording_id, duration, channels, start_time, end_time, file_format, status, media_url) end |
.names ⇒ Object
A mapping from model property names to API property names.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 64 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
#nullables ⇒ Object
An array for nullable fields
98 99 100 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 98 def nullables [] end |
#optionals ⇒ Object
An array for optional fields
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 81 def optionals %w[ account_id conference_id name recording_id duration channels start_time end_time file_format status media_url ] end |
#to_end_time ⇒ Object
169 170 171 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 169 def to_end_time DateTimeHelper.to_rfc3339(end_time) end |
#to_start_time ⇒ Object
165 166 167 |
# File 'lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb', line 165 def to_start_time DateTimeHelper.to_rfc3339(start_time) end |