# bandwidth # # This file was automatically generated by APIMATIC v2.0 # ( https://apimatic.io ). module Bandwidth # TranscriptionMetadata Model. class TranscriptionMetadata < BaseModel SKIP = Object.new private_constant :SKIP # TODO: Write general description for this method # @return [String] attr_accessor :id # The current status of the transcription. Current values are 'none', # 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and # 'file-size-too-small'. 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 transcription. Current values are 'none', # 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and # 'file-size-too-small'. Additional states may be added in the future, so # your application must be tolerant of unknown values. # @return [String] attr_accessor :completed_time # The current status of the transcription. Current values are 'none', # 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and # 'file-size-too-small'. Additional states may be added in the future, so # your application must be tolerant of unknown values. # @return [String] attr_accessor :url # A mapping from model property names to API property names. def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['status'] = 'status' @_hash['completed_time'] = 'completedTime' @_hash['url'] = 'url' @_hash end # An array for optional fields def optionals %w[ id status completed_time url ] end # An array for nullable fields def nullables [] end def initialize(id = nil, status = nil, completed_time = nil, url = nil) @id = id unless id == SKIP @status = status unless status == SKIP @completed_time = completed_time unless completed_time == SKIP @url = url unless url == SKIP end # Creates an instance of the object from a hash. def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP completed_time = hash.key?('completedTime') ? hash['completedTime'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP # Create object from extracted values. TranscriptionMetadata.new(id, status, completed_time, url) end end end