text: # coding: utf-8
  
  """
      Galaxy 3.2 API (wip)
  
      Galaxy 3.2 API (wip)  # noqa: E501
  
      The version of the OpenAPI document: 1.2.0
      Generated by: https://openapi-generator.tech
  """
  
  
  from __future__ import absolute_import
  
  import re  # noqa: F401
  
  # python 2 and python 3 compatibility library
  import six
  
  from openapi_client.api_client import ApiClient
  from openapi_client.exceptions import (
      ApiTypeError,
      ApiValueError
  )
  
  
  class ClientMazerApi(object):
      """NOTE: This class is auto generated by OpenAPI Generator
      Ref: https://openapi-generator.tech
  
      Do not edit the class manually.
      """
  
      def __init__(self, api_client=None):
          if api_client is None:
              api_client = ApiClient()
          self.api_client = api_client
  
      def download_artifact_by_filename(self, filename, **kwargs):  # noqa: E501
          """Download the collection artifact  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.download_artifact_by_filename(filename, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str filename: CollectionVersion artifact filename (required)
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: file
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          return self.download_artifact_by_filename_with_http_info(filename, **kwargs)  # noqa: E501
  
      def download_artifact_by_filename_with_http_info(self, filename, **kwargs):  # noqa: E501
          """Download the collection artifact  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.download_artifact_by_filename_with_http_info(filename, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str filename: CollectionVersion artifact filename (required)
          :param _return_http_data_only: response data without head status code
                                         and headers
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: tuple(file, status_code(int), headers(HTTPHeaderDict))
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['filename']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          for key, val in six.iteritems(local_var_params['kwargs']):
              if key not in all_params:
                  raise ApiTypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method download_artifact_by_filename" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'filename' is set
          if ('filename' not in local_var_params or
                  local_var_params['filename'] is None):
              raise ApiValueError("Missing the required parameter `filename` when calling `download_artifact_by_filename`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'filename' in local_var_params:
              path_params['filename'] = local_var_params['filename']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/octet-stream'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/download/{filename}', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='file',  # noqa: E501
              auth_settings=auth_settings,
              async_req=local_var_params.get('async_req'),
              _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
              _preload_content=local_var_params.get('_preload_content', True),
              _request_timeout=local_var_params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_collection_by_namespace_name(self, namespace, name, **kwargs):  # noqa: E501
          """Get a Collection by namespace and name  # 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_collection_by_namespace_name(namespace, name, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str namespace: The collection namespace (required)
          :param str name: The collection name (required)
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: Collection
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          return self.get_collection_by_namespace_name_with_http_info(namespace, name, **kwargs)  # noqa: E501
  
      def get_collection_by_namespace_name_with_http_info(self, namespace, name, **kwargs):  # noqa: E501
          """Get a Collection by namespace and name  # 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_collection_by_namespace_name_with_http_info(namespace, name, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str namespace: The collection namespace (required)
          :param str name: The collection name (required)
          :param _return_http_data_only: response data without head status code
                                         and headers
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: tuple(Collection, status_code(int), headers(HTTPHeaderDict))
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['namespace', 'name']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          for key, val in six.iteritems(local_var_params['kwargs']):
              if key not in all_params:
                  raise ApiTypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_collection_by_namespace_name" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'namespace' is set
          if ('namespace' not in local_var_params or
                  local_var_params['namespace'] is None):
              raise ApiValueError("Missing the required parameter `namespace` when calling `get_collection_by_namespace_name`")  # noqa: E501
          # verify the required parameter 'name' is set
          if ('name' not in local_var_params or
                  local_var_params['name'] is None):
              raise ApiValueError("Missing the required parameter `name` when calling `get_collection_by_namespace_name`")  # noqa: E501
  
          if 'name' in local_var_params and not re.search(r'^(?!.*__)[a-z]+[0-9a-z_]*$\'', local_var_params['name']):  # noqa: E501
              raise ApiValueError("Invalid value for parameter `name` when calling `get_collection_by_namespace_name`, must conform to the pattern `/^(?!.*__)[a-z]+[0-9a-z_]*$'/`")  # noqa: E501
          collection_formats = {}
  
          path_params = {}
          if 'namespace' in local_var_params:
              path_params['namespace'] = local_var_params['namespace']  # noqa: E501
          if 'name' in local_var_params:
              path_params['name'] = local_var_params['name']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          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 = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/v2/collections/{namespace}/{name}/', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='Collection',  # noqa: E501
              auth_settings=auth_settings,
              async_req=local_var_params.get('async_req'),
              _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
              _preload_content=local_var_params.get('_preload_content', True),
              _request_timeout=local_var_params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_collection_version(self, namespace, name, version, **kwargs):  # noqa: E501
          """Get a CollectionVersion by namespace, name, and version  # 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_collection_version(namespace, name, version, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str namespace: The collection namespace (required)
          :param str name: The collection name (required)
          :param str version: A Semantic Version string (required)
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: CollectionVersion
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          return self.get_collection_version_with_http_info(namespace, name, version, **kwargs)  # noqa: E501
  
      def get_collection_version_with_http_info(self, namespace, name, version, **kwargs):  # noqa: E501
          """Get a CollectionVersion by namespace, name, and version  # 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_collection_version_with_http_info(namespace, name, version, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str namespace: The collection namespace (required)
          :param str name: The collection name (required)
          :param str version: A Semantic Version string (required)
          :param _return_http_data_only: response data without head status code
                                         and headers
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: tuple(CollectionVersion, status_code(int), headers(HTTPHeaderDict))
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['namespace', 'name', 'version']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          for key, val in six.iteritems(local_var_params['kwargs']):
              if key not in all_params:
                  raise ApiTypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_collection_version" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'namespace' is set
          if ('namespace' not in local_var_params or
                  local_var_params['namespace'] is None):
              raise ApiValueError("Missing the required parameter `namespace` when calling `get_collection_version`")  # noqa: E501
          # verify the required parameter 'name' is set
          if ('name' not in local_var_params or
                  local_var_params['name'] is None):
              raise ApiValueError("Missing the required parameter `name` when calling `get_collection_version`")  # noqa: E501
          # verify the required parameter 'version' is set
          if ('version' not in local_var_params or
                  local_var_params['version'] is None):
              raise ApiValueError("Missing the required parameter `version` when calling `get_collection_version`")  # noqa: E501
  
          if 'name' in local_var_params and not re.search(r'^(?!.*__)[a-z]+[0-9a-z_]*$\'', local_var_params['name']):  # noqa: E501
              raise ApiValueError("Invalid value for parameter `name` when calling `get_collection_version`, must conform to the pattern `/^(?!.*__)[a-z]+[0-9a-z_]*$'/`")  # noqa: E501
          if 'version' in local_var_params and not re.search(r'^((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$', local_var_params['version']):  # noqa: E501
              raise ApiValueError("Invalid value for parameter `version` when calling `get_collection_version`, must conform to the pattern `/^((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$/`")  # noqa: E501
          collection_formats = {}
  
          path_params = {}
          if 'namespace' in local_var_params:
              path_params['namespace'] = local_var_params['namespace']  # noqa: E501
          if 'name' in local_var_params:
              path_params['name'] = local_var_params['name']  # noqa: E501
          if 'version' in local_var_params:
              path_params['version'] = local_var_params['version']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          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 = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/v2/collections/{namespace}/{name}/versions/{version}/', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='CollectionVersion',  # noqa: E501
              auth_settings=auth_settings,
              async_req=local_var_params.get('async_req'),
              _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
              _preload_content=local_var_params.get('_preload_content', True),
              _request_timeout=local_var_params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def get_collection_version_artifact(self, namespace, name, version, **kwargs):  # noqa: E501
          """Get Artifact details for a Collection by namespace, name, and version  # 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_collection_version_artifact(namespace, name, version, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str namespace: The collection namespace (required)
          :param str name: The collection name (required)
          :param str version: A Semantic Version string (required)
          :param str search: Term to search for
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: CollectionVersionArtifactDetail
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          return self.get_collection_version_artifact_with_http_info(namespace, name, version, **kwargs)  # noqa: E501
  
      def get_collection_version_artifact_with_http_info(self, namespace, name, version, **kwargs):  # noqa: E501
          """Get Artifact details for a Collection by namespace, name, and version  # 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_collection_version_artifact_with_http_info(namespace, name, version, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str namespace: The collection namespace (required)
          :param str name: The collection name (required)
          :param str version: A Semantic Version string (required)
          :param str search: Term to search for
          :param _return_http_data_only: response data without head status code
                                         and headers
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: tuple(CollectionVersionArtifactDetail, status_code(int), headers(HTTPHeaderDict))
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['namespace', 'name', 'version', 'search']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          for key, val in six.iteritems(local_var_params['kwargs']):
              if key not in all_params:
                  raise ApiTypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_collection_version_artifact" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'namespace' is set
          if ('namespace' not in local_var_params or
                  local_var_params['namespace'] is None):
              raise ApiValueError("Missing the required parameter `namespace` when calling `get_collection_version_artifact`")  # noqa: E501
          # verify the required parameter 'name' is set
          if ('name' not in local_var_params or
                  local_var_params['name'] is None):
              raise ApiValueError("Missing the required parameter `name` when calling `get_collection_version_artifact`")  # noqa: E501
          # verify the required parameter 'version' is set
          if ('version' not in local_var_params or
                  local_var_params['version'] is None):
              raise ApiValueError("Missing the required parameter `version` when calling `get_collection_version_artifact`")  # noqa: E501
  
          if 'name' in local_var_params and not re.search(r'^(?!.*__)[a-z]+[0-9a-z_]*$\'', local_var_params['name']):  # noqa: E501
              raise ApiValueError("Invalid value for parameter `name` when calling `get_collection_version_artifact`, must conform to the pattern `/^(?!.*__)[a-z]+[0-9a-z_]*$'/`")  # noqa: E501
          if 'version' in local_var_params and not re.search(r'^((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$', local_var_params['version']):  # noqa: E501
              raise ApiValueError("Invalid value for parameter `version` when calling `get_collection_version_artifact`, must conform to the pattern `/^((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$/`")  # noqa: E501
          collection_formats = {}
  
          path_params = {}
          if 'namespace' in local_var_params:
              path_params['namespace'] = local_var_params['namespace']  # noqa: E501
          if 'name' in local_var_params:
              path_params['name'] = local_var_params['name']  # noqa: E501
          if 'version' in local_var_params:
              path_params['version'] = local_var_params['version']  # noqa: E501
  
          query_params = []
          if 'search' in local_var_params:
              query_params.append(('search', local_var_params['search']))  # noqa: E501
  
          header_params = {}
  
          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 = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/v2/collections/{namespace}/{name}/versions/{version}/artifact/', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='CollectionVersionArtifactDetail',  # noqa: E501
              auth_settings=auth_settings,
              async_req=local_var_params.get('async_req'),
              _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
              _preload_content=local_var_params.get('_preload_content', True),
              _request_timeout=local_var_params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def import_collection_version_artifact(self, **kwargs):  # noqa: E501
          """Create a new CollectionVersion by importing a collection artifact  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.import_collection_version_artifact(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param CollectionVersionArtifactData collection_version_artifact_data: A multipart/form encoded payload including the binary collection artifact file contents and it's sha256sum
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: CollectionCreationResult
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          return self.import_collection_version_artifact_with_http_info(**kwargs)  # noqa: E501
  
      def import_collection_version_artifact_with_http_info(self, **kwargs):  # noqa: E501
          """Create a new CollectionVersion by importing a collection artifact  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.import_collection_version_artifact_with_http_info(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param CollectionVersionArtifactData collection_version_artifact_data: A multipart/form encoded payload including the binary collection artifact file contents and it's sha256sum
          :param _return_http_data_only: response data without head status code
                                         and headers
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: tuple(CollectionCreationResult, status_code(int), headers(HTTPHeaderDict))
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['collection_version_artifact_data']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          for key, val in six.iteritems(local_var_params['kwargs']):
              if key not in all_params:
                  raise ApiTypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method import_collection_version_artifact" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'collection_version_artifact_data' in local_var_params:
              body_params = local_var_params['collection_version_artifact_data']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json'])  # noqa: E501
  
          # HTTP header `Content-Type`
          header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
              ['multipart/form-data'])  # noqa: E501
  
          # Authentication setting
          auth_settings = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/v2/collections/', 'POST',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='CollectionCreationResult',  # noqa: E501
              auth_settings=auth_settings,
              async_req=local_var_params.get('async_req'),
              _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
              _preload_content=local_var_params.get('_preload_content', True),
              _request_timeout=local_var_params.get('_request_timeout'),
              collection_formats=collection_formats)
  
      def list_collection_versions_by_namespace_name(self, namespace, name, **kwargs):  # noqa: E501
          """Get a list of CollectionVersions for a Collection by namespace and name  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.list_collection_versions_by_namespace_name(namespace, name, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str namespace: The collection namespace (required)
          :param str name: The collection name (required)
          :param int page: Page number within the paginated result set.
          :param int page_size: Number of results to return per page.
          :param str search: Term to search for
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: CollectionVersionsPage
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          return self.list_collection_versions_by_namespace_name_with_http_info(namespace, name, **kwargs)  # noqa: E501
  
      def list_collection_versions_by_namespace_name_with_http_info(self, namespace, name, **kwargs):  # noqa: E501
          """Get a list of CollectionVersions for a Collection by namespace and name  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.list_collection_versions_by_namespace_name_with_http_info(namespace, name, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool: execute request asynchronously
          :param str namespace: The collection namespace (required)
          :param str name: The collection name (required)
          :param int page: Page number within the paginated result set.
          :param int page_size: Number of results to return per page.
          :param str search: Term to search for
          :param _return_http_data_only: response data without head status code
                                         and headers
          :param _preload_content: if False, the urllib3.HTTPResponse object will
                                   be returned without reading/decoding response
                                   data. Default is True.
          :param _request_timeout: timeout setting for this request. If one
                                   number provided, it will be total request
                                   timeout. It can also be a pair (tuple) of
                                   (connection, read) timeouts.
          :return: tuple(CollectionVersionsPage, status_code(int), headers(HTTPHeaderDict))
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['namespace', 'name', 'page', 'page_size', 'search']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          for key, val in six.iteritems(local_var_params['kwargs']):
              if key not in all_params:
                  raise ApiTypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method list_collection_versions_by_namespace_name" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'namespace' is set
          if ('namespace' not in local_var_params or
                  local_var_params['namespace'] is None):
              raise ApiValueError("Missing the required parameter `namespace` when calling `list_collection_versions_by_namespace_name`")  # noqa: E501
          # verify the required parameter 'name' is set
          if ('name' not in local_var_params or
                  local_var_params['name'] is None):
              raise ApiValueError("Missing the required parameter `name` when calling `list_collection_versions_by_namespace_name`")  # noqa: E501
  
          if 'name' in local_var_params and not re.search(r'^(?!.*__)[a-z]+[0-9a-z_]*$\'', local_var_params['name']):  # noqa: E501
              raise ApiValueError("Invalid value for parameter `name` when calling `list_collection_versions_by_namespace_name`, must conform to the pattern `/^(?!.*__)[a-z]+[0-9a-z_]*$'/`")  # noqa: E501
          if 'page_size' in local_var_params and local_var_params['page_size'] > 1000:  # noqa: E501
              raise ApiValueError("Invalid value for parameter `page_size` when calling `list_collection_versions_by_namespace_name`, must be a value less than or equal to `1000`")  # noqa: E501
          if 'page_size' in local_var_params and local_var_params['page_size'] < 0:  # noqa: E501
              raise ApiValueError("Invalid value for parameter `page_size` when calling `list_collection_versions_by_namespace_name`, must be a value greater than or equal to `0`")  # noqa: E501
          collection_formats = {}
  
          path_params = {}
          if 'namespace' in local_var_params:
              path_params['namespace'] = local_var_params['namespace']  # noqa: E501
          if 'name' in local_var_params:
              path_params['name'] = local_var_params['name']  # noqa: E501
  
          query_params = []
          if 'page' in local_var_params:
              query_params.append(('page', local_var_params['page']))  # noqa: E501
          if 'page_size' in local_var_params:
              query_params.append(('page_size', local_var_params['page_size']))  # noqa: E501
          if 'search' in local_var_params:
              query_params.append(('search', local_var_params['search']))  # noqa: E501
  
          header_params = {}
  
          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 = []  # noqa: E501
  
          return self.api_client.call_api(
              '/api/v2/collections/{namespace}/{name}/versions/', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='CollectionVersionsPage',  # noqa: E501
              auth_settings=auth_settings,
              async_req=local_var_params.get('async_req'),
              _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
              _preload_content=local_var_params.get('_preload_content', True),
              _request_timeout=local_var_params.get('_request_timeout'),
              collection_formats=collection_formats)
  