def main(client, report_type):
  # Initialize appropriate service.
  report_definition_service = client.GetService(
      'ReportDefinitionService', version='v201603')

  # Get report fields.
  fields = report_definition_service.getReportFields(report_type)

  # Display results.
  print 'Report type \'%s\' contains the following fields:' % report_type
  for field in fields:
    print ' - %s (%s)' % (field['fieldName'], field['fieldType'])
    if 'enumValues' in field:
      print '  := [%s]' % ', '.join(field['enumValues'])
dataset/ETHPy150Open googleads/googleads-python-lib/examples/adwords/v201603/reporting/get_report_fields.py/main/original