text: # coding: utf-8
  
  """
      Blackfynn Swagger
  
      Swagger documentation for the Blackfynn api  # noqa: E501
  
      OpenAPI spec version: 1.0.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 datcore_sdk.api_client import ApiClient
  
  
  class DiscussionsApi(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 create_comment(self, create_comment_request, **kwargs):  # noqa: E501
          """creates a comment and/or a discussion  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.create_comment(create_comment_request, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param CreateCommentRequest create_comment_request: (required)
          :return: CommentResponse
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.create_comment_with_http_info(create_comment_request, **kwargs)  # noqa: E501
          else:
              (data) = self.create_comment_with_http_info(create_comment_request, **kwargs)  # noqa: E501
              return data
  
      def create_comment_with_http_info(self, create_comment_request, **kwargs):  # noqa: E501
          """creates a comment and/or a discussion  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.create_comment_with_http_info(create_comment_request, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param CreateCommentRequest create_comment_request: (required)
          :return: CommentResponse
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['create_comment_request']  # 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 TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method create_comment" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'create_comment_request' is set
          if ('create_comment_request' not in local_var_params or
                  local_var_params['create_comment_request'] is None):
              raise ValueError("Missing the required parameter `create_comment_request` when calling `create_comment`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'create_comment_request' in local_var_params:
              body_params = local_var_params['create_comment_request']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['*/*'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['api_key']  # noqa: E501
  
          return self.api_client.call_api(
              '/discussions/', 'POST',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='CommentResponse',  # 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 delete_comment(self, discussion_id, comment_id, **kwargs):  # noqa: E501
          """delete a comment  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.delete_comment(discussion_id, comment_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str discussion_id: the id of the discussion (required)
          :param str comment_id: the id of the comment (required)
          :return: int
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.delete_comment_with_http_info(discussion_id, comment_id, **kwargs)  # noqa: E501
          else:
              (data) = self.delete_comment_with_http_info(discussion_id, comment_id, **kwargs)  # noqa: E501
              return data
  
      def delete_comment_with_http_info(self, discussion_id, comment_id, **kwargs):  # noqa: E501
          """delete a comment  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.delete_comment_with_http_info(discussion_id, comment_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str discussion_id: the id of the discussion (required)
          :param str comment_id: the id of the comment (required)
          :return: int
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['discussion_id', 'comment_id']  # 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 TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method delete_comment" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'discussion_id' is set
          if ('discussion_id' not in local_var_params or
                  local_var_params['discussion_id'] is None):
              raise ValueError("Missing the required parameter `discussion_id` when calling `delete_comment`")  # noqa: E501
          # verify the required parameter 'comment_id' is set
          if ('comment_id' not in local_var_params or
                  local_var_params['comment_id'] is None):
              raise ValueError("Missing the required parameter `comment_id` when calling `delete_comment`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'discussion_id' in local_var_params:
              path_params['discussionId'] = local_var_params['discussion_id']  # noqa: E501
          if 'comment_id' in local_var_params:
              path_params['commentId'] = local_var_params['comment_id']  # 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(
              ['*/*'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['api_key']  # noqa: E501
  
          return self.api_client.call_api(
              '/discussions/{discussionId}/comment/{commentId}', 'DELETE',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='int',  # 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 delete_discussion(self, discussion_id, **kwargs):  # noqa: E501
          """delete a discussion  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.delete_discussion(discussion_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str discussion_id: the id of the discussion (required)
          :return: int
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.delete_discussion_with_http_info(discussion_id, **kwargs)  # noqa: E501
          else:
              (data) = self.delete_discussion_with_http_info(discussion_id, **kwargs)  # noqa: E501
              return data
  
      def delete_discussion_with_http_info(self, discussion_id, **kwargs):  # noqa: E501
          """delete a discussion  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.delete_discussion_with_http_info(discussion_id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str discussion_id: the id of the discussion (required)
          :return: int
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['discussion_id']  # 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 TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method delete_discussion" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'discussion_id' is set
          if ('discussion_id' not in local_var_params or
                  local_var_params['discussion_id'] is None):
              raise ValueError("Missing the required parameter `discussion_id` when calling `delete_discussion`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'discussion_id' in local_var_params:
              path_params['discussionId'] = local_var_params['discussion_id']  # 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(
              ['*/*'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['api_key']  # noqa: E501
  
          return self.api_client.call_api(
              '/discussions/{discussionId}', 'DELETE',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='int',  # 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_annotation_operation(self, id, **kwargs):  # noqa: E501
          """get an annotation  # 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_annotation_operation(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: the id of the packge (required)
          :return: DiscussionsResponse
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.get_annotation_operation_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_annotation_operation_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_annotation_operation_with_http_info(self, id, **kwargs):  # noqa: E501
          """get an annotation  # 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_annotation_operation_with_http_info(id, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str id: the id of the packge (required)
          :return: DiscussionsResponse
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['id']  # 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 TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method get_annotation_operation" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'id' is set
          if ('id' not in local_var_params or
                  local_var_params['id'] is None):
              raise ValueError("Missing the required parameter `id` when calling `get_annotation_operation`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'id' in local_var_params:
              path_params['id'] = local_var_params['id']  # 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(
              ['*/*'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['api_key']  # noqa: E501
  
          return self.api_client.call_api(
              '/discussions/package/{id}', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='DiscussionsResponse',  # 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 update_comment(self, comment_id, discussion_id, update_comment_request, **kwargs):  # noqa: E501
          """updates an comment  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.update_comment(comment_id, discussion_id, update_comment_request, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str comment_id: the id of the comment (required)
          :param str discussion_id: the id of the discussion (required)
          :param UpdateCommentRequest update_comment_request: the comment to add (required)
          :return: CommentResponse
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.update_comment_with_http_info(comment_id, discussion_id, update_comment_request, **kwargs)  # noqa: E501
          else:
              (data) = self.update_comment_with_http_info(comment_id, discussion_id, update_comment_request, **kwargs)  # noqa: E501
              return data
  
      def update_comment_with_http_info(self, comment_id, discussion_id, update_comment_request, **kwargs):  # noqa: E501
          """updates an comment  # noqa: E501
  
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.update_comment_with_http_info(comment_id, discussion_id, update_comment_request, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str comment_id: the id of the comment (required)
          :param str discussion_id: the id of the discussion (required)
          :param UpdateCommentRequest update_comment_request: the comment to add (required)
          :return: CommentResponse
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          local_var_params = locals()
  
          all_params = ['comment_id', 'discussion_id', 'update_comment_request']  # 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 TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method update_comment" % key
                  )
              local_var_params[key] = val
          del local_var_params['kwargs']
          # verify the required parameter 'comment_id' is set
          if ('comment_id' not in local_var_params or
                  local_var_params['comment_id'] is None):
              raise ValueError("Missing the required parameter `comment_id` when calling `update_comment`")  # noqa: E501
          # verify the required parameter 'discussion_id' is set
          if ('discussion_id' not in local_var_params or
                  local_var_params['discussion_id'] is None):
              raise ValueError("Missing the required parameter `discussion_id` when calling `update_comment`")  # noqa: E501
          # verify the required parameter 'update_comment_request' is set
          if ('update_comment_request' not in local_var_params or
                  local_var_params['update_comment_request'] is None):
              raise ValueError("Missing the required parameter `update_comment_request` when calling `update_comment`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
          if 'comment_id' in local_var_params:
              path_params['commentId'] = local_var_params['comment_id']  # noqa: E501
          if 'discussion_id' in local_var_params:
              path_params['discussionId'] = local_var_params['discussion_id']  # noqa: E501
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'update_comment_request' in local_var_params:
              body_params = local_var_params['update_comment_request']
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['*/*'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['api_key']  # noqa: E501
  
          return self.api_client.call_api(
              '/discussions/{discussionId}/comment/{commentId}', 'PUT',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='CommentResponse',  # 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)
  