# bandwidth # # This file was automatically generated by APIMATIC v2.0 # ( https://apimatic.io ). require 'date' module Bandwidth # ConferenceRecordingMetadata Model. class ConferenceRecordingMetadata < BaseModel # TODO: Write general description for this method # @return [String] attr_accessor :account_id # TODO: Write general description for this method # @return [String] attr_accessor :conference_id # TODO: Write general description for this method # @return [String] attr_accessor :name # TODO: Write general description for this method # @return [String] attr_accessor :recording_id # Format is ISO-8601 # @return [String] attr_accessor :duration # Format is ISO-8601 # @return [Integer] attr_accessor :channels # Format is ISO-8601 # @return [DateTime] attr_accessor :start_time # Format is ISO-8601 # @return [DateTime] attr_accessor :end_time # Format is ISO-8601 # @return [FileFormatEnum] attr_accessor :file_format # 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. # @return [String] attr_accessor :status # 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. # @return [String] attr_accessor :media_url # A mapping from model property names to API property names. 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 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 @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 # Creates an instance of the object from a hash. def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = 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(account_id, conference_id, name, recording_id, duration, channels, start_time, end_time, file_format, status, media_url) end def to_start_time DateTimeHelper.to_rfc3339(start_time) end def to_end_time DateTimeHelper.to_rfc3339(end_time) end end end