Query the list of field for a report type
 @param [ReportDefinition::ReportTypes] a value of
500769
def report_fields(report_type)
      soap_message = service.report_definition.report_fields(credentials, report_type)
      add_counters(soap_message.counters)
      els = soap_message.response.xpath("//getReportFieldsResponse/rval")
      els.map do |el|
        ReportField.from_element(el)
      end
    end
526558
private static <E> TypeInformation<?>[] extractTypeInfos(PojoTypeInfo<E> pojoTypeInfo, String[] fieldNames) {
		Preconditions.checkNotNull(pojoTypeInfo);
		Preconditions.checkNotNull(fieldNames);
		Preconditions.checkArgument(pojoTypeInfo.getArity() >= fieldNames.length);
		TypeInformation<?>[] fieldTypes = new TypeInformation<?>[fieldNames.length];
		for (int i = 0; i < fieldNames.length; ++i) {
			String fieldName = fieldNames[i];
			Preconditions.checkNotNull(fieldName, "The field can't be null");
			int fieldPos = pojoTypeInfo.getFieldIndex(fieldName);
			Preconditions.checkArgument(fieldPos >= 0,
				String.format("Field %s is not a member of POJO type %s",
					fieldName, pojoTypeInfo.getTypeClass().getName()));
			fieldTypes[i] = pojoTypeInfo.getTypeAt(fieldPos);
		}

		return fieldTypes;
	}
365663
def list_reports
      r = execute(make_xml('ReportListingRequest'))
      reports = []
      if r.success
        r.res.elements.each('//ReportConfigSummary') do |report|
          reports << ReportConfigSummary.parse(report)
        end
      end
      reports
    end
412588
def query(value)
      if !(value = type_cast(value))
        false
      elsif number?
        !value.zero?
      else
        !value.blank?
      end
    end
419392
def list_objects
      objects = @model_class.method(:list).arity == 0 ? @model_class.list : @model_class.list(true)
      objects.map { |obj| Array(obj).find { |o| o.kind_of?(@model_class) } }
    end
864412
def get_field_list(fields, schema):
  
  # If the fields weren't supplied get them from the schema.
  if schema:
    all_fields = [f['name'] for f in schema._bq_schema if f['type'] != 'RECORD']

  if isinstance(fields, list):
    if schema:
      # validate fields exist
      for f in fields:
        if f not in all_fields:
          raise Exception('Cannot find field %s in given schema' % f)
    return fields
  if isinstance(fields, basestring) and fields != '*':
    if schema:
      # validate fields exist
      for f in fields.split(','):
        if f not in all_fields:
          raise Exception('Cannot find field %s in given schema' % f)
      return fields.split(',')
  if not schema:
    return []
  return all_fields
900446
def queryTypesDescriptions(self, types):
        
        types = list(types)
        if types:
            types_descs = self.describeSObjects(types)
        else:
            types_descs = []
        return dict(map(lambda t, d: (t, d), types, types_descs))
1036322
function report(type, state, params)
{
  var reporter = defaultReporter;

  // get rest of arguments
  params  = Array.prototype.slice.call(arguments, 1);

  // `init` and `done` types don't have command associated with them
  if (['init', 'done'].indexOf(type) == -1)
  {
    // second (1) position is for command
    // if command present get string representation of it
    params[1] = stringifyCommand(state, params[1]);
  }

  if (state && state.options && state.options.reporter)
  {
    reporter = state.options.reporter;
  }

  reporter[type].apply(null, params);
}
36058
def getFilteredRecords( dbid, fieldNames, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil )
      filteredRecords = []
      iterateFilteredRecords(dbid, fieldNames, query, qid, qname, clist, slist, fmt, options){ |filteredRecord| 
         filteredRecords << filteredRecord 
      }
      filteredRecords
   end
957553
def _parse_fields(self, result, field_name):
        
        field_list = []
        for key, value in result.get('schema', {}).get(field_name, {}).items():
            if key not in field_list:
                field_list.append(key)
        return field_list
1170603
def get_custom_fields(project_id, issue_type=nil)
      h = {"project_id" => project_id}
      if issue_type.instance_of? String
        h["issue_type"] = issue_type
      elsif issue_type.instance_of? Integer
        h["issue_type_id"] = isuissue_type
      end
      self.call("backlog.getCustomFields", h).map {|custom_field|
        Backlog::Object::CustomField.new(custom_field)
      }
    end
564690
def _GetAFF4AttributeForReportType(report_type
                                  ):
  """"""
  if report_type == rdf_stats.ClientGraphSeries.ReportType.GRR_VERSION:
    return aff4_stats.ClientFleetStats.SchemaCls.GRRVERSION_HISTOGRAM
  elif report_type == rdf_stats.ClientGraphSeries.ReportType.OS_TYPE:
    return aff4_stats.ClientFleetStats.SchemaCls.OS_HISTOGRAM
  elif report_type == rdf_stats.ClientGraphSeries.ReportType.OS_RELEASE:
    return aff4_stats.ClientFleetStats.SchemaCls.RELEASE_HISTOGRAM
  elif report_type == rdf_stats.ClientGraphSeries.ReportType.N_DAY_ACTIVE:
    return aff4_stats.ClientFleetStats.SchemaCls.LAST_CONTACTED_HISTOGRAM
  else:
    raise ValueError("Unknown report type %s." % report_type)
814058
function showFields (data, version, fields) {
  var o = {}
  ;[data,version].forEach(function (s) {
    Object.keys(s).forEach(function (k) {
      o[k] = s[k]
    })
  })
  return search(o, fields.split("."), version._id, fields)
}
1264870
def fields(filter=nil)
      unless filter
        # Since we're returning the FieldMap object, which the caller
        # may mutate, we precautionarily mark dirty -- unless it's frozen
        # immutable.
        @fields.clean = false unless @fields.frozen?
        return @fields
      end
      @fields.reindex unless @fields.clean
      flds = []
      if filter.is_a?(String) && @fields.tags[filter]
        @fields.tags[filter].each do |idx|
          flds << @fields[idx]
        end
      elsif filter.is_a?(Array) || filter.is_a?(Range)
        @fields.each_by_tag(filter) do |tag|
          flds << tag
        end
      end
      flds
    end
661056
def call(report)
      breadcrumbs = report.configuration.breadcrumbs.to_a
      report.breadcrumbs = breadcrumbs unless breadcrumbs.empty?
      @next.call(report)
    end
1107381
def desc
      fsym = FieldSymbol.new(self, respond_to?(:desc?) ? !desc? : true)
      fsym.type = respond_to?(:type) ? type : nil
      fsym
    end
721981
def get_field_list(fields, schema):
  
  # If the fields weren't supplied get them from the schema.
  if isinstance(fields, list):
    return fields
  if isinstance(fields, basestring) and fields != '*':
    return fields.split(',')
  if not schema:
    return []
  return [f['name'] for f in schema._bq_schema if f['type'] != 'RECORD']