# bandwidth # # This file was automatically generated by APIMATIC v2.0 # ( https://apimatic.io ). module Bandwidth # BandwidthMessage Model. class BandwidthMessage < BaseModel # TODO: Write general description for this method # @return [String] attr_accessor :id # TODO: Write general description for this method # @return [String] attr_accessor :owner # TODO: Write general description for this method # @return [String] attr_accessor :application_id # TODO: Write general description for this method # @return [String] attr_accessor :time # TODO: Write general description for this method # @return [Integer] attr_accessor :segment_count # TODO: Write general description for this method # @return [String] attr_accessor :direction # TODO: Write general description for this method # @return [List of String] attr_accessor :to # TODO: Write general description for this method # @return [String] attr_accessor :from # TODO: Write general description for this method # @return [List of String] attr_accessor :media # TODO: Write general description for this method # @return [String] attr_accessor :text # TODO: Write general description for this method # @return [String] attr_accessor :tag # A mapping from model property names to API property names. def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['owner'] = 'owner' @_hash['application_id'] = 'applicationId' @_hash['time'] = 'time' @_hash['segment_count'] = 'segmentCount' @_hash['direction'] = 'direction' @_hash['to'] = 'to' @_hash['from'] = 'from' @_hash['media'] = 'media' @_hash['text'] = 'text' @_hash['tag'] = 'tag' @_hash end def initialize(id = nil, owner = nil, application_id = nil, time = nil, segment_count = nil, direction = nil, to = nil, from = nil, media = nil, text = nil, tag = nil) @id = id @owner = owner @application_id = application_id @time = time @segment_count = segment_count @direction = direction @to = to @from = from @media = media @text = text @tag = tag 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['id'] owner = hash['owner'] application_id = hash['applicationId'] time = hash['time'] segment_count = hash['segmentCount'] direction = hash['direction'] to = hash['to'] from = hash['from'] media = hash['media'] text = hash['text'] tag = hash['tag'] # Create object from extracted values. BandwidthMessage.new(id, owner, application_id, time, segment_count, direction, to, from, media, text, tag) end end end