class Comet::BrowseOffice365ObjectsResponse

def from_hash(obj)

Parameters:
  • obj (Hash) -- The complete object as a Ruby hash
def from_hash(obj)
  raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
  obj.each do |k, v|
    case k
    when 'Status'
      raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
      @status = v
    when 'Message'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
      @message = v
    when 'Objects'
      if v.nil?
        @objects = []
      else
        @objects = Array.new(v.length)
        v.each_with_index do |v1, i1|
          @objects[i1] = Comet::Office365ObjectInfo.new
          @objects[i1].from_hash(v1)
        end
      end
    else
      @unknown_json_fields[k] = v
    end
  end
end