text: # coding: utf-8
  
  """
      The Blue Alliance API v3
  
      # Overview    Information and statistics about FIRST Robotics Competition teams and events.   # Authentication   All endpoints require an Auth Key to be passed in the header `X-TBA-Auth-Key`. If you do not have an auth key yet, you can obtain one from your [Account Page](/account).    A `User-Agent` header may need to be set to prevent a 403 Unauthorized error.  # noqa: E501
  
      OpenAPI spec version: 3.04.1
      
      Generated by: https://github.com/swagger-api/swagger-codegen.git
  """
  
  
  from __future__ import absolute_import
  
  import re  # noqa: F401
  
  # python 2 and python 3 compatibility library
  import six
  
  from swagger_client.api_client import ApiClient
  
  
  class DistrictApi(object):
      """NOTE: This class is auto generated by the swagger code generator program.
  
      Do not edit the class manually.
      Ref: https://github.com/swagger-api/swagger-codegen
      """
  
      def __init__(self, api_client=None):
          if api_client is None:
              api_client = ApiClient()
          self.api_client = api_client
  
      def get_district_events(self, district_key, **kwargs):  # noqa: E501
          """get_district_events  # noqa: E501
  
          Gets a list of events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_events(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[Event]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_district_events_with_http_info(district_key, **kwargs)  # noqa: E501
          else:
              (data) = self.get_district_events_with_http_info(district_key, **kwargs)  # noqa: E501
              return data
  
      def get_district_events_with_http_info(self, district_key, **kwargs):  # noqa: E501
          """get_district_events  # noqa: E501
  
          Gets a list of events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_events_with_http_info(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[Event]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['district_key', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_district_events" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'district_key' is set
          if ('district_key' not in params or
                  params['district_key'] is None):
              raise ValueError("Missing the required parameter `district_key` when calling `get_district_events`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'district_key' in params:
              path_params['district_key'] = params['district_key']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/district/{district_key}/events', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[Event]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_district_events_keys(self, district_key, **kwargs):  # noqa: E501
          """get_district_events_keys  # noqa: E501
  
          Gets a list of event keys for events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_events_keys(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[str]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_district_events_keys_with_http_info(district_key, **kwargs)  # noqa: E501
          else:
              (data) = self.get_district_events_keys_with_http_info(district_key, **kwargs)  # noqa: E501
              return data
  
      def get_district_events_keys_with_http_info(self, district_key, **kwargs):  # noqa: E501
          """get_district_events_keys  # noqa: E501
  
          Gets a list of event keys for events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_events_keys_with_http_info(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[str]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['district_key', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_district_events_keys" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'district_key' is set
          if ('district_key' not in params or
                  params['district_key'] is None):
              raise ValueError("Missing the required parameter `district_key` when calling `get_district_events_keys`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'district_key' in params:
              path_params['district_key'] = params['district_key']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/district/{district_key}/events/keys', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[str]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_district_events_simple(self, district_key, **kwargs):  # noqa: E501
          """get_district_events_simple  # noqa: E501
  
          Gets a short-form list of events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_events_simple(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[EventSimple]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_district_events_simple_with_http_info(district_key, **kwargs)  # noqa: E501
          else:
              (data) = self.get_district_events_simple_with_http_info(district_key, **kwargs)  # noqa: E501
              return data
  
      def get_district_events_simple_with_http_info(self, district_key, **kwargs):  # noqa: E501
          """get_district_events_simple  # noqa: E501
  
          Gets a short-form list of events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_events_simple_with_http_info(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[EventSimple]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['district_key', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_district_events_simple" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'district_key' is set
          if ('district_key' not in params or
                  params['district_key'] is None):
              raise ValueError("Missing the required parameter `district_key` when calling `get_district_events_simple`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'district_key' in params:
              path_params['district_key'] = params['district_key']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/district/{district_key}/events/simple', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[EventSimple]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_district_rankings(self, district_key, **kwargs):  # noqa: E501
          """get_district_rankings  # noqa: E501
  
          Gets a list of team district rankings for the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_rankings(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[DistrictRanking]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_district_rankings_with_http_info(district_key, **kwargs)  # noqa: E501
          else:
              (data) = self.get_district_rankings_with_http_info(district_key, **kwargs)  # noqa: E501
              return data
  
      def get_district_rankings_with_http_info(self, district_key, **kwargs):  # noqa: E501
          """get_district_rankings  # noqa: E501
  
          Gets a list of team district rankings for the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_rankings_with_http_info(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[DistrictRanking]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['district_key', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_district_rankings" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'district_key' is set
          if ('district_key' not in params or
                  params['district_key'] is None):
              raise ValueError("Missing the required parameter `district_key` when calling `get_district_rankings`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'district_key' in params:
              path_params['district_key'] = params['district_key']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/district/{district_key}/rankings', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[DistrictRanking]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_district_teams(self, district_key, **kwargs):  # noqa: E501
          """get_district_teams  # noqa: E501
  
          Gets a list of `Team` objects that competed in events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_teams(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[Team]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_district_teams_with_http_info(district_key, **kwargs)  # noqa: E501
          else:
              (data) = self.get_district_teams_with_http_info(district_key, **kwargs)  # noqa: E501
              return data
  
      def get_district_teams_with_http_info(self, district_key, **kwargs):  # noqa: E501
          """get_district_teams  # noqa: E501
  
          Gets a list of `Team` objects that competed in events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_teams_with_http_info(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[Team]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['district_key', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_district_teams" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'district_key' is set
          if ('district_key' not in params or
                  params['district_key'] is None):
              raise ValueError("Missing the required parameter `district_key` when calling `get_district_teams`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'district_key' in params:
              path_params['district_key'] = params['district_key']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/district/{district_key}/teams', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[Team]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_district_teams_keys(self, district_key, **kwargs):  # noqa: E501
          """get_district_teams_keys  # noqa: E501
  
          Gets a list of `Team` objects that competed in events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_teams_keys(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[str]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_district_teams_keys_with_http_info(district_key, **kwargs)  # noqa: E501
          else:
              (data) = self.get_district_teams_keys_with_http_info(district_key, **kwargs)  # noqa: E501
              return data
  
      def get_district_teams_keys_with_http_info(self, district_key, **kwargs):  # noqa: E501
          """get_district_teams_keys  # noqa: E501
  
          Gets a list of `Team` objects that competed in events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_teams_keys_with_http_info(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[str]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['district_key', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_district_teams_keys" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'district_key' is set
          if ('district_key' not in params or
                  params['district_key'] is None):
              raise ValueError("Missing the required parameter `district_key` when calling `get_district_teams_keys`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'district_key' in params:
              path_params['district_key'] = params['district_key']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/district/{district_key}/teams/keys', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[str]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_district_teams_simple(self, district_key, **kwargs):  # noqa: E501
          """get_district_teams_simple  # noqa: E501
  
          Gets a short-form list of `Team` objects that competed in events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_teams_simple(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[TeamSimple]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_district_teams_simple_with_http_info(district_key, **kwargs)  # noqa: E501
          else:
              (data) = self.get_district_teams_simple_with_http_info(district_key, **kwargs)  # noqa: E501
              return data
  
      def get_district_teams_simple_with_http_info(self, district_key, **kwargs):  # noqa: E501
          """get_district_teams_simple  # noqa: E501
  
          Gets a short-form list of `Team` objects that competed in events in the given district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_district_teams_simple_with_http_info(district_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str district_key: TBA District Key, eg `2016fim` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[TeamSimple]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['district_key', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_district_teams_simple" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'district_key' is set
          if ('district_key' not in params or
                  params['district_key'] is None):
              raise ValueError("Missing the required parameter `district_key` when calling `get_district_teams_simple`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'district_key' in params:
              path_params['district_key'] = params['district_key']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/district/{district_key}/teams/simple', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[TeamSimple]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_districts_by_year(self, year, **kwargs):  # noqa: E501
          """get_districts_by_year  # noqa: E501
  
          Gets a list of districts and their corresponding district key, for the given year.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_districts_by_year(year, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int year: Competition Year (or Season). Must be 4 digits. (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[DistrictList]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_districts_by_year_with_http_info(year, **kwargs)  # noqa: E501
          else:
              (data) = self.get_districts_by_year_with_http_info(year, **kwargs)  # noqa: E501
              return data
  
      def get_districts_by_year_with_http_info(self, year, **kwargs):  # noqa: E501
          """get_districts_by_year  # noqa: E501
  
          Gets a list of districts and their corresponding district key, for the given year.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_districts_by_year_with_http_info(year, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param int year: Competition Year (or Season). Must be 4 digits. (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[DistrictList]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['year', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_districts_by_year" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'year' is set
          if ('year' not in params or
                  params['year'] is None):
              raise ValueError("Missing the required parameter `year` when calling `get_districts_by_year`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'year' in params:
              path_params['year'] = params['year']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/districts/{year}', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[DistrictList]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_event_district_points(self, event_key, **kwargs):  # noqa: E501
          """get_event_district_points  # noqa: E501
  
          Gets a list of team rankings for the Event.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_event_district_points(event_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str event_key: TBA Event Key, eg `2016nytr` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: EventDistrictPoints
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_event_district_points_with_http_info(event_key, **kwargs)  # noqa: E501
          else:
              (data) = self.get_event_district_points_with_http_info(event_key, **kwargs)  # noqa: E501
              return data
  
      def get_event_district_points_with_http_info(self, event_key, **kwargs):  # noqa: E501
          """get_event_district_points  # noqa: E501
  
          Gets a list of team rankings for the Event.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_event_district_points_with_http_info(event_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str event_key: TBA Event Key, eg `2016nytr` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: EventDistrictPoints
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['event_key', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_event_district_points" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'event_key' is set
          if ('event_key' not in params or
                  params['event_key'] is None):
              raise ValueError("Missing the required parameter `event_key` when calling `get_event_district_points`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'event_key' in params:
              path_params['event_key'] = params['event_key']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/event/{event_key}/district_points', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='EventDistrictPoints',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_team_districts(self, team_key, **kwargs):  # noqa: E501
          """get_team_districts  # noqa: E501
  
          Gets an array of districts representing each year the team was in a district. Will return an empty array if the team was never in a district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_team_districts(team_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str team_key: TBA Team Key, eg `frc254` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[DistrictList]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_team_districts_with_http_info(team_key, **kwargs)  # noqa: E501
          else:
              (data) = self.get_team_districts_with_http_info(team_key, **kwargs)  # noqa: E501
              return data
  
      def get_team_districts_with_http_info(self, team_key, **kwargs):  # noqa: E501
          """get_team_districts  # noqa: E501
  
          Gets an array of districts representing each year the team was in a district. Will return an empty array if the team was never in a district.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.get_team_districts_with_http_info(team_key, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str team_key: TBA Team Key, eg `frc254` (required)
          :param str if_modified_since: Value of the `Last-Modified` header in the most recently cached response by the client.
          :return: list[DistrictList]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['team_key', 'if_modified_since']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_team_districts" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'team_key' is set
          if ('team_key' not in params or
                  params['team_key'] is None):
              raise ValueError("Missing the required parameter `team_key` when calling `get_team_districts`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'team_key' in params:
              path_params['team_key'] = params['team_key']  # noqa: E501
  
          query_params = []
  
          header_params = {}
          if 'if_modified_since' in params:
              header_params['If-Modified-Since'] = params['if_modified_since']  # noqa: E501
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['apiKey']  # noqa: E501
  
          return self.api_client.call_api(
              '/team/{team_key}/districts', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[DistrictList]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  