text: # coding: utf-8
  
  """
      videoapi
  
      The video APIs help you convert, encode, and transcode videos.  # noqa: E501
  
      OpenAPI spec version: v1
      
      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 cloudmersive_video_api_client.api_client import ApiClient
  
  
  class AudioApi(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 audio_convert_to_aac(self, **kwargs):  # noqa: E501
          """Convert Audio File to AAC format.  # noqa: E501
  
          Automatically detect audio file format and convert it to AAC format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.audio_convert_to_aac(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param file input_file: Input file to perform the operation on.
          :param str file_url: Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
          :param int bit_rate: Optional; Specify the desired bitrate of the converted audio file in kilobytes per second (kB/s). Value may be between 48 and 1,411. By default, the optimal bitrate will be chosen automatically.
          :return: str
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.audio_convert_to_aac_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.audio_convert_to_aac_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def audio_convert_to_aac_with_http_info(self, **kwargs):  # noqa: E501
          """Convert Audio File to AAC format.  # noqa: E501
  
          Automatically detect audio file format and convert it to AAC format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.audio_convert_to_aac_with_http_info(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param file input_file: Input file to perform the operation on.
          :param str file_url: Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
          :param int bit_rate: Optional; Specify the desired bitrate of the converted audio file in kilobytes per second (kB/s). Value may be between 48 and 1,411. By default, the optimal bitrate will be chosen automatically.
          :return: str
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['input_file', 'file_url', 'bit_rate']  # 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 audio_convert_to_aac" % key
                  )
              params[key] = val
          del params['kwargs']
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
          if 'file_url' in params:
              header_params['fileUrl'] = params['file_url']  # noqa: E501
          if 'bit_rate' in params:
              header_params['bitRate'] = params['bit_rate']  # noqa: E501
  
          form_params = []
          local_var_files = {}
          if 'input_file' in params:
              local_var_files['inputFile'] = params['input_file']  # noqa: E501
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/octet-stream'])  # 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 = ['Apikey']  # noqa: E501
  
          return self.api_client.call_api(
              '/video/convert/to/aac', 'POST',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='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 audio_convert_to_m4a(self, **kwargs):  # noqa: E501
          """Convert Audio File to M4A format.  # noqa: E501
  
          Automatically detect audio file format and convert it to M4A format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.audio_convert_to_m4a(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param file input_file: Input file to perform the operation on.
          :param str file_url: Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
          :param int bit_rate: Optional; Specify the desired bitrate of the converted audio file in kilobytes per second (kB/s). Value may be between 48 and 1,411. By default, the optimal bitrate will be chosen automatically.
          :return: str
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.audio_convert_to_m4a_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.audio_convert_to_m4a_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def audio_convert_to_m4a_with_http_info(self, **kwargs):  # noqa: E501
          """Convert Audio File to M4A format.  # noqa: E501
  
          Automatically detect audio file format and convert it to M4A format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.audio_convert_to_m4a_with_http_info(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param file input_file: Input file to perform the operation on.
          :param str file_url: Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
          :param int bit_rate: Optional; Specify the desired bitrate of the converted audio file in kilobytes per second (kB/s). Value may be between 48 and 1,411. By default, the optimal bitrate will be chosen automatically.
          :return: str
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['input_file', 'file_url', 'bit_rate']  # 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 audio_convert_to_m4a" % key
                  )
              params[key] = val
          del params['kwargs']
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
          if 'file_url' in params:
              header_params['fileUrl'] = params['file_url']  # noqa: E501
          if 'bit_rate' in params:
              header_params['bitRate'] = params['bit_rate']  # noqa: E501
  
          form_params = []
          local_var_files = {}
          if 'input_file' in params:
              local_var_files['inputFile'] = params['input_file']  # noqa: E501
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/octet-stream'])  # 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 = ['Apikey']  # noqa: E501
  
          return self.api_client.call_api(
              '/video/convert/to/m4a', 'POST',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='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 audio_convert_to_mp3(self, **kwargs):  # noqa: E501
          """Convert Audio File to MP3 format.  # noqa: E501
  
          Automatically detect audio file format and convert it to MP3 format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.audio_convert_to_mp3(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param file input_file: Input file to perform the operation on.
          :param str file_url: Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
          :param int bit_rate: Optional; Specify the desired bitrate of the converted audio file in kilobytes per second (kB/s). Value may be between 48 and 1,411. By default, the optimal bitrate will be chosen automatically.
          :return: str
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.audio_convert_to_mp3_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.audio_convert_to_mp3_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def audio_convert_to_mp3_with_http_info(self, **kwargs):  # noqa: E501
          """Convert Audio File to MP3 format.  # noqa: E501
  
          Automatically detect audio file format and convert it to MP3 format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.audio_convert_to_mp3_with_http_info(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param file input_file: Input file to perform the operation on.
          :param str file_url: Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
          :param int bit_rate: Optional; Specify the desired bitrate of the converted audio file in kilobytes per second (kB/s). Value may be between 48 and 1,411. By default, the optimal bitrate will be chosen automatically.
          :return: str
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['input_file', 'file_url', 'bit_rate']  # 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 audio_convert_to_mp3" % key
                  )
              params[key] = val
          del params['kwargs']
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
          if 'file_url' in params:
              header_params['fileUrl'] = params['file_url']  # noqa: E501
          if 'bit_rate' in params:
              header_params['bitRate'] = params['bit_rate']  # noqa: E501
  
          form_params = []
          local_var_files = {}
          if 'input_file' in params:
              local_var_files['inputFile'] = params['input_file']  # noqa: E501
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/octet-stream'])  # 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 = ['Apikey']  # noqa: E501
  
          return self.api_client.call_api(
              '/video/convert/to/mp3', 'POST',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='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 audio_convert_to_wav(self, **kwargs):  # noqa: E501
          """Convert Audio File to WAV format.  # noqa: E501
  
          Automatically detect audio file format and convert it to WAV format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.audio_convert_to_wav(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param file input_file: Input file to perform the operation on.
          :param str file_url: Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
          :param float sample_rate: Optional; Specify the desired sample rate of the converted audio file in kHz. Value may be between 8 and 96. Standard for audio CDs is 44.1, while DVD audio standard is 48. By default, the optimal sample rate will be chosen automatically.
          :return: str
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.audio_convert_to_wav_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.audio_convert_to_wav_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def audio_convert_to_wav_with_http_info(self, **kwargs):  # noqa: E501
          """Convert Audio File to WAV format.  # noqa: E501
  
          Automatically detect audio file format and convert it to WAV format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.audio_convert_to_wav_with_http_info(async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param file input_file: Input file to perform the operation on.
          :param str file_url: Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
          :param float sample_rate: Optional; Specify the desired sample rate of the converted audio file in kHz. Value may be between 8 and 96. Standard for audio CDs is 44.1, while DVD audio standard is 48. By default, the optimal sample rate will be chosen automatically.
          :return: str
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['input_file', 'file_url', 'sample_rate']  # 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 audio_convert_to_wav" % key
                  )
              params[key] = val
          del params['kwargs']
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
          if 'file_url' in params:
              header_params['fileUrl'] = params['file_url']  # noqa: E501
          if 'sample_rate' in params:
              header_params['sampleRate'] = params['sample_rate']  # noqa: E501
  
          form_params = []
          local_var_files = {}
          if 'input_file' in params:
              local_var_files['inputFile'] = params['input_file']  # noqa: E501
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/octet-stream'])  # 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 = ['Apikey']  # noqa: E501
  
          return self.api_client.call_api(
              '/video/convert/to/wav', 'POST',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='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)
  