class TencentCloud::Common::AbstractModel
def flat(obj)
def flat(obj) case obj when AbstractModel params = nil keys = obj.instance_variables keys.each do |k| value = obj.instance_variable_get k key = k.to_s.split('@').at 1 next unless value r = flat(value) unless r.nil? params ||= {} params[key] = r end end params when Array arr = nil obj.each do |v| r = flat(v) unless r.nil? arr ||= [] arr << r end end arr else obj end end