text: # coding: utf-8
  
  """
      VPlex REST API
  
      A definition for the next-gen VPlex API  # noqa: E501
  
      OpenAPI spec version: 0.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 vplexapi.api_client import ApiClient
  
  
  class DirectorApi(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_director(self, name, **kwargs):  # noqa: E501
          """Return a Director matching the provided name  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async=True
          >>> thread = api.get_director(name, async=True)
          >>> result = thread.get()
  
          :param async bool
          :param str name: The name of a specific instance of the resource (required)
          :param str fields: Select which fields are included in the response. 'name' is always included. See FieldSelectionExpression for details. 
          :return: Director
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async'):
              return self.get_director_with_http_info(name, **kwargs)  # noqa: E501
          else:
              (data) = self.get_director_with_http_info(name, **kwargs)  # noqa: E501
              return data
  
      def get_director_with_http_info(self, name, **kwargs):  # noqa: E501
          """Return a Director matching the provided name  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async=True
          >>> thread = api.get_director_with_http_info(name, async=True)
          >>> result = thread.get()
  
          :param async bool
          :param str name: The name of a specific instance of the resource (required)
          :param str fields: Select which fields are included in the response. 'name' is always included. See FieldSelectionExpression for details. 
          :return: Director
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['name', 'fields']  # noqa: E501
          all_params.append('async')
          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_director" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'name' is set
          if ('name' not in params or
                  params['name'] is None):
              raise ValueError("Missing the required parameter `name` when calling `get_director`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'name' in params:
              path_params['name'] = params['name']  # noqa: E501
  
          query_params = []
          if 'fields' in params:
              query_params.append(('fields', params['fields']))  # noqa: E501
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # Authentication setting
          auth_settings = ['basicAuth', 'jwtAuth']  # noqa: E501
  
          return self.api_client.call_api(
              '/directors/{name}', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Director',  # noqa: E501
              auth_settings=auth_settings,
              async=params.get('async'),
              _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_directors(self, **kwargs):  # noqa: E501
          """Returns a list of the available directors  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async=True
          >>> thread = api.get_directors(async=True)
          >>> result = thread.get()
  
          :param async bool
          :param int offset: Index of the first element to include in paginated results.<br> <b>'limit' must also be specified.</b>
          :param int limit: <p>Maximum number of elements to include in paginated results.<br> <b>'offset' must also be specified.<b>
          :param str sort_by: Specify the field priority order and direction for sorting.  See SortingOrderExpression for details. 
          :param str fields: Select which fields are included in the response. 'name' is always included. See FieldSelectionExpression for details. 
          :param str health_state: Filter results by health_state. See LexicalQueryExpression for details.
          :param str operational_status: Filter results by operational_status. See LexicalQueryExpression for details.
          :param int cluster_id: Filter results by cluster_id.
          :return: list[Director]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async'):
              return self.get_directors_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.get_directors_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def get_directors_with_http_info(self, **kwargs):  # noqa: E501
          """Returns a list of the available directors  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async=True
          >>> thread = api.get_directors_with_http_info(async=True)
          >>> result = thread.get()
  
          :param async bool
          :param int offset: Index of the first element to include in paginated results.<br> <b>'limit' must also be specified.</b>
          :param int limit: <p>Maximum number of elements to include in paginated results.<br> <b>'offset' must also be specified.<b>
          :param str sort_by: Specify the field priority order and direction for sorting.  See SortingOrderExpression for details. 
          :param str fields: Select which fields are included in the response. 'name' is always included. See FieldSelectionExpression for details. 
          :param str health_state: Filter results by health_state. See LexicalQueryExpression for details.
          :param str operational_status: Filter results by operational_status. See LexicalQueryExpression for details.
          :param int cluster_id: Filter results by cluster_id.
          :return: list[Director]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['offset', 'limit', 'sort_by', 'fields', 'health_state', 'operational_status', 'cluster_id']  # noqa: E501
          all_params.append('async')
          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_directors" % key
                  )
              params[key] = val
          del params['kwargs']
  
          if 'offset' in params and params['offset'] < 0:  # noqa: E501
              raise ValueError("Invalid value for parameter `offset` when calling `get_directors`, must be a value greater than or equal to `0`")  # noqa: E501
          if 'limit' in params and params['limit'] > 100:  # noqa: E501
              raise ValueError("Invalid value for parameter `limit` when calling `get_directors`, must be a value less than or equal to `100`")  # noqa: E501
          if 'limit' in params and params['limit'] < 1:  # noqa: E501
              raise ValueError("Invalid value for parameter `limit` when calling `get_directors`, must be a value greater than or equal to `1`")  # noqa: E501
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
          if 'offset' in params:
              query_params.append(('offset', params['offset']))  # noqa: E501
          if 'limit' in params:
              query_params.append(('limit', params['limit']))  # noqa: E501
          if 'sort_by' in params:
              query_params.append(('sort_by', params['sort_by']))  # noqa: E501
          if 'fields' in params:
              query_params.append(('fields', params['fields']))  # noqa: E501
          if 'health_state' in params:
              query_params.append(('health_state', params['health_state']))  # noqa: E501
          if 'operational_status' in params:
              query_params.append(('operational_status', params['operational_status']))  # noqa: E501
          if 'cluster_id' in params:
              query_params.append(('cluster_id', params['cluster_id']))  # noqa: E501
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # Authentication setting
          auth_settings = ['basicAuth', 'jwtAuth']  # noqa: E501
  
          return self.api_client.call_api(
              '/directors', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[Director]',  # noqa: E501
              auth_settings=auth_settings,
              async=params.get('async'),
              _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)
  