if offset < self._next_offset:<EOL><INDENT>return []<EOL><DEDENT>writes = []<EOL>if offset in self._pending_offsets:<EOL><INDENT>return []<EOL><DEDENT>heapq.heappush(self._writes, (offset, data))<EOL>self._pending_offsets.add(offset)<EOL>while self._writes and self._writes[<NUM_LIT:0>][<NUM_LIT:0>] == self._next_offset:<EOL><INDENT>next_write = heapq.heappop(self._writes)<EOL>writes.append({'<STR_LIT>': next_write[<NUM_LIT:0>], '<STR_LIT:data>': next_write[<NUM_LIT:1>]})<EOL>self._pending_offsets.remove(next_write[<NUM_LIT:0>])<EOL>self._next_offset += len(next_write[<NUM_LIT:1>])<EOL><DEDENT>return writes<EOL>

Request any available writes given new incoming data.

        You call this method by providing new data along with the
        offset associated with the data.  If that new data unlocks
        any contiguous writes that can now be submitted, this
        method will return all applicable writes.

        This is done with 1 method call so you don't have to
        make two method calls (put(), get()) which acquires a lock
        each method call.


def _submit(self, client, config, osutil, request_executor,<EOL>transfer_future):

<EOL>if transfer_future.meta.size is None:<EOL><INDENT>call_args = transfer_future.meta.call_args<EOL>head_object_request =self._get_head_object_request_from_copy_source(<EOL>call_args.copy_source)<EOL>extra_args = call_args.extra_args<EOL>for param, value in extra_args.items():<EOL><INDENT>if param in self.EXTRA_ARGS_TO_HEAD_ARGS_MAPPING:<EOL><INDENT>head_object_request[<EOL>self.EXTRA_ARGS_TO_HEAD_ARGS_MAPPING[param]] = value<EOL><DEDENT><DEDENT>response = call_args.source_client.head_object(<EOL>**head_object_request)<EOL>transfer_future.meta.provide_transfer_size(<EOL>response['<STR_LIT>'])<EOL><DEDENT>if transfer_future.meta.size < config.multipart_threshold:<EOL><INDENT>self._submit_copy_request(<EOL>client, config, osutil, request_executor, transfer_future)<EOL><DEDENT>else:<EOL><INDENT>self._submit_multipart_request(<EOL>client, config, osutil, request_executor, transfer_future)<EOL><DEDENT>

:param client: The client associated with the transfer manager

:type config: s3transfer.manager.TransferConfig
:param config: The transfer config associated with the transfer
    manager

:type osutil: s3transfer.utils.OSUtil
:param osutil: The os utility associated to the transfer manager

:type request_executor: s3transfer.futures.BoundedExecutor
:param request_executor: The request executor associated with the
    transfer manager

:type transfer_future: s3transfer.futures.TransferFuture
:param transfer_future: The transfer future associated with the
    transfer request that tasks are being submitted for


def _main(self, client, copy_source, bucket, key, extra_args, callbacks,<EOL>size):

client.copy_object(<EOL>CopySource=copy_source, Bucket=bucket, Key=key, **extra_args)<EOL>for callback in callbacks:<EOL><INDENT>callback(bytes_transferred=size)<EOL><DEDENT>

:param client: The client to use when calling PutObject
:param copy_source: The CopySource parameter to use
:param bucket: The name of the bucket to copy to
:param key: The name of the key to copy to
:param extra_args: A dictionary of any extra arguments that may be
    used in the upload.
:param callbacks: List of callbacks to call after copy
:param size: The size of the transfer. This value is passed into
    the callbacks


def _main(self, client, copy_source, bucket, key, upload_id, part_number,<EOL>extra_args, callbacks, size):

response = client.upload_part_copy(<EOL>CopySource=copy_source, Bucket=bucket, Key=key,<EOL>UploadId=upload_id, PartNumber=part_number, **extra_args)<EOL>for callback in callbacks:<EOL><INDENT>callback(bytes_transferred=size)<EOL><DEDENT>etag = response['<STR_LIT>']['<STR_LIT>']<EOL>return {'<STR_LIT>': etag, '<STR_LIT>': part_number}<EOL>

:param client: The client to use when calling PutObject
:param copy_source: The CopySource parameter to use
:param bucket: The name of the bucket to upload to
:param key: The name of the key to upload to
:param upload_id: The id of the upload
:param part_number: The number representing the part of the multipart
    upload
:param extra_args: A dictionary of any extra arguments that may be
    used in the upload.
:param callbacks: List of callbacks to call after copy part
:param size: The size of the transfer. This value is passed into
    the callbacks

:rtype: dict
:returns: A dictionary representing a part::

    {'Etag': etag_value, 'PartNumber': part_number}

    This value can be appended to a list to be used to complete
    the multipart upload.


pass<EOL>

Callback to be invoked when transfer request gets queued

        This callback can be useful for:

            * Keeping track of how many transfers have been requested
            * Providing the expected transfer size through
              future.meta.provide_transfer_size() so a HeadObject would not
              need to be made for copies and downloads.

        :type future: s3transfer.futures.TransferFuture
        :param future: The TransferFuture representing the requested transfer.


def on_progress(self, future, bytes_transferred, **kwargs):

pass<EOL>

Callback to be invoked when progress is made on transfer

        This callback can be useful for:

            * Recording and displaying progress

        :type future: s3transfer.futures.TransferFuture
        :param future: The TransferFuture representing the requested transfer.

        :type bytes_transferred: int
        :param bytes_transferred: The number of bytes transferred for that
            invocation of the callback. Note that a negative amount can be
            provided, which usually indicates that an in-progress request
            needed to be retried and thus progress was rewound.


pass<EOL>

Callback to be invoked once a transfer is done

        This callback can be useful for:

            * Recording and displaying whether the transfer succeeded or
              failed using future.result()
            * Running some task after the transfer completed like changing
              the last modified time of a downloaded file.

        :type future: s3transfer.futures.TransferFuture
        :param future: The TransferFuture representing the requested transfer.


<EOL>if hasattr(fileobj, '<STR_LIT>'):<EOL><INDENT>return fileobj.seekable()<EOL><DEDENT>elif hasattr(fileobj, '<STR_LIT>') and hasattr(fileobj, '<STR_LIT>'):<EOL><INDENT>try:<EOL><INDENT>fileobj.seek(<NUM_LIT:0>, <NUM_LIT:1>)<EOL>return True<EOL><DEDENT>except (OSError, IOError):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return False<EOL>

Backwards compat function to determine if a fileobj is seekable

    :param fileobj: The file-like object to determine if seekable

    :returns: True, if seekable. False, otherwise.


if hasattr(fileobj, '<STR_LIT>'):<EOL><INDENT>return fileobj.readable()<EOL><DEDENT>return hasattr(fileobj, '<STR_LIT>')<EOL>

Determines whether or not a file-like object is readable.

    :param fileobj: The file-like object to determine if readable

    :returns: True, if readable. False otherwise.


def __init__(self, fileobj, start_byte, chunk_size, full_file_size,<EOL>callback=None, enable_callback=True):

self._fileobj = fileobj<EOL>self._start_byte = start_byte<EOL>self._size = self._calculate_file_size(<EOL>self._fileobj, requested_size=chunk_size,<EOL>start_byte=start_byte, actual_file_size=full_file_size)<EOL>self._fileobj.seek(self._start_byte)<EOL>self._amount_read = <NUM_LIT:0><EOL>self._callback = callback<EOL>self._callback_enabled = enable_callback<EOL>

Given a file object shown below:

    |___________________________________________________|
    0          |                 |                 full_file_size
               |----chunk_size---|
         start_byte

:type fileobj: file
:param fileobj: File like object

:type start_byte: int
:param start_byte: The first byte from which to start reading.

:type chunk_size: int
:param chunk_size: The max chunk size to read.  Trying to read
    pass the end of the chunk size will behave like you've
    reached the end of the file.

:type full_file_size: int
:param full_file_size: The entire content length associated
    with ``fileobj``.

:type callback: function(amount_read)
:param callback: Called whenever data is read from this object.


@classmethod<EOL><INDENT>def from_filename(cls, filename, start_byte, chunk_size, callback=None,<EOL>enable_callback=True):<DEDENT>

f = open(filename, '<STR_LIT:rb>')<EOL>file_size = os.fstat(f.fileno()).st_size<EOL>return cls(f, start_byte, chunk_size, file_size, callback,<EOL>enable_callback)<EOL>

Convenience factory function to create from a filename.

        :type start_byte: int
        :param start_byte: The first byte from which to start reading.

        :type chunk_size: int
        :param chunk_size: The max chunk size to read.  Trying to read
            pass the end of the chunk size will behave like you've
            reached the end of the file.

        :type full_file_size: int
        :param full_file_size: The entire content length associated
            with ``fileobj``.

        :type callback: function(amount_read)
        :param callback: Called whenever data is read from this object.

        :type enable_callback: bool
        :param enable_callback: Indicate whether to invoke callback
            during read() calls.

        :rtype: ``ReadFileChunk``
        :return: A new instance of ``ReadFileChunk``


<EOL>try:<EOL><INDENT>os.remove(filename)<EOL><DEDENT>except OSError:<EOL><INDENT>pass<EOL><DEDENT>

Remove a file, noop if file does not exist.


def upload_file(self, filename, bucket, key,<EOL>callback=None, extra_args=None):

if extra_args is None:<EOL><INDENT>extra_args = {}<EOL><DEDENT>self._validate_all_known_args(extra_args, self.ALLOWED_UPLOAD_ARGS)<EOL>events = self._client.meta.events<EOL>events.register_first('<STR_LIT>',<EOL>disable_upload_callbacks,<EOL>unique_id='<STR_LIT>')<EOL>events.register_last('<STR_LIT>',<EOL>enable_upload_callbacks,<EOL>unique_id='<STR_LIT>')<EOL>if self._osutil.get_file_size(filename) >=self._config.multipart_threshold:<EOL><INDENT>self._multipart_upload(filename, bucket, key, callback, extra_args)<EOL><DEDENT>else:<EOL><INDENT>self._put_object(filename, bucket, key, callback, extra_args)<EOL><DEDENT>

Upload a file to an S3 object.

        Variants have also been injected into S3 client, Bucket and Object.
        You don't have to use S3Transfer.upload_file() directly.


def download_file(self, bucket, key, filename, extra_args=None,<EOL>callback=None):

<EOL>if extra_args is None:<EOL><INDENT>extra_args = {}<EOL><DEDENT>self._validate_all_known_args(extra_args, self.ALLOWED_DOWNLOAD_ARGS)<EOL>object_size = self._object_size(bucket, key, extra_args)<EOL>temp_filename = filename + os.extsep + random_file_extension()<EOL>try:<EOL><INDENT>self._download_file(bucket, key, temp_filename, object_size,<EOL>extra_args, callback)<EOL><DEDENT>except Exception:<EOL><INDENT>logger.debug("<STR_LIT>"<EOL>"<STR_LIT>", temp_filename, exc_info=True)<EOL>self._osutil.remove_file(temp_filename)<EOL>raise<EOL><DEDENT>else:<EOL><INDENT>self._osutil.rename_file(temp_filename, filename)<EOL><DEDENT>

Download an S3 object to a file.

        Variants have also been injected into S3 client, Bucket and Object.
        You don't have to use S3Transfer.download_file() directly.


def __init__(self, transfer_coordinator, main_kwargs=None,<EOL>pending_main_kwargs=None, done_callbacks=None,<EOL>is_final=False):

self._transfer_coordinator = transfer_coordinator<EOL>self._main_kwargs = main_kwargs<EOL>if self._main_kwargs is None:<EOL><INDENT>self._main_kwargs = {}<EOL><DEDENT>self._pending_main_kwargs = pending_main_kwargs<EOL>if pending_main_kwargs is None:<EOL><INDENT>self._pending_main_kwargs = {}<EOL><DEDENT>self._done_callbacks = done_callbacks<EOL>if self._done_callbacks is None:<EOL><INDENT>self._done_callbacks = []<EOL><DEDENT>self._is_final = is_final<EOL>

:type transfer_coordinator: s3transfer.futures.TransferCoordinator
:param transfer_coordinator: The context associated to the
    TransferFuture for which this Task is associated with.

:type main_kwargs: dict
:param main_kwargs: The keyword args that can be immediately supplied
    to the _main() method of the task

:type pending_main_kwargs: dict
:param pending_main_kwargs: The keyword args that are depended upon
    by the result from a dependent future(s). The result returned by
    the future(s) will be used as the value for the keyword argument
    when _main() is called. The values for each key can be:
        * a single future - Once completed, its value will be the
          result of that single future
        * a list of futures - Once all of the futures complete, the
          value used will be a list of each completed future result
          value in order of when they were originally supplied.

:type done_callbacks: list of callbacks
:param done_callbacks: A list of callbacks to call once the task is
    done completing. Each callback will be called with no arguments
    and will be called no matter if the task succeeds or an exception
    is raised.

:type is_final: boolean
:param is_final: True, to indicate that this task is the final task
    for the TransferFuture request. By setting this value to True, it
    will set the result of the entire TransferFuture to the result
    returned by this task's main() method.


return self._transfer_coordinator.transfer_id<EOL>

The id for the transfer request that the task belongs to


try:<EOL><INDENT>self._wait_on_dependent_futures()<EOL>kwargs = self._get_all_main_kwargs()<EOL>if not self._transfer_coordinator.done():<EOL><INDENT>return self._execute_main(kwargs)<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>self._log_and_set_exception(e)<EOL><DEDENT>finally:<EOL><INDENT>for done_callback in self._done_callbacks:<EOL><INDENT>done_callback()<EOL><DEDENT>if self._is_final:<EOL><INDENT>self._transfer_coordinator.announce_done()<EOL><DEDENT><DEDENT>

The callable to use when submitting a Task to an executor


raise NotImplementedError('<STR_LIT>')<EOL>

The method that will be ran in the executor

        This method must be implemented by subclasses from Task. main() can
        be implemented with any arguments decided upon by the subclass.


def _main(self, transfer_future, **kwargs):

try:<EOL><INDENT>self._transfer_coordinator.set_status_to_queued()<EOL>on_queued_callbacks = get_callbacks(transfer_future, '<STR_LIT>')<EOL>for on_queued_callback in on_queued_callbacks:<EOL><INDENT>on_queued_callback()<EOL><DEDENT>self._transfer_coordinator.set_status_to_running()<EOL>self._submit(transfer_future=transfer_future, **kwargs)<EOL><DEDENT>except BaseException as e:<EOL><INDENT>self._log_and_set_exception(e)<EOL>self._wait_for_all_submitted_futures_to_complete()<EOL>self._transfer_coordinator.announce_done()<EOL><DEDENT>

:type transfer_future: s3transfer.futures.TransferFuture
:param transfer_future: The transfer future associated with the
    transfer request that tasks are being submitted for

:param kwargs: Any additional kwargs that you may want to pass
    to the _submit() method


def _submit(self, transfer_future, **kwargs):

The submition method to be implemented

        :type transfer_future: s3transfer.futures.TransferFuture
        :param transfer_future: The transfer future associated with the
            transfer request that tasks are being submitted for

        :param kwargs: Any additional keyword arguments you want to be passed
            in


def _main(self, client, bucket, key, extra_args):

<EOL>response = client.create_multipart_upload(<EOL>Bucket=bucket, Key=key, **extra_args)<EOL>upload_id = response['<STR_LIT>']<EOL>self._transfer_coordinator.add_failure_cleanup(<EOL>client.abort_multipart_upload, Bucket=bucket, Key=key,<EOL>UploadId=upload_id<EOL>)<EOL>return upload_id<EOL>

:param client: The client to use when calling CreateMultipartUpload
:param bucket: The name of the bucket to upload to
:param key: The name of the key to upload to
:param extra_args: A dictionary of any extra arguments that may be
    used in the intialization.

:returns: The upload id of the multipart upload


def _main(self, client, bucket, key, upload_id, parts, extra_args):

client.complete_multipart_upload(<EOL>Bucket=bucket, Key=key, UploadId=upload_id,<EOL>MultipartUpload={'<STR_LIT>': parts},<EOL>**extra_args)<EOL>

:param client: The client to use when calling CompleteMultipartUpload
:param bucket: The name of the bucket to upload to
:param key: The name of the key to upload to
:param upload_id: The id of the upload
:param parts: A list of parts to use to complete the multipart upload::

    [{'Etag': etag_value, 'PartNumber': part_number}, ...]

    Each element in the list consists of a return value from
    ``UploadPartTask.main()``.
:param extra_args:  A dictionary of any extra arguments that may be
    used in completing the multipart transfer.


def _submit(self, client, request_executor, transfer_future, **kwargs):

:param client: The client associated with the transfer manager

:type config: s3transfer.manager.TransferConfig
:param config: The transfer config associated with the transfer
    manager

:type osutil: s3transfer.utils.OSUtil
:param osutil: The os utility associated to the transfer manager

:type request_executor: s3transfer.futures.BoundedExecutor
:param request_executor: The request executor associated with the
    transfer manager

:type transfer_future: s3transfer.futures.TransferFuture
:param transfer_future: The transfer future associated with the
    transfer request that tasks are being submitted for


client.delete_object(Bucket=bucket, Key=key, **extra_args)<EOL>

:param client: The S3 client to use when calling DeleteObject

:type bucket: str
:param bucket: The name of the bucket.

:type key: str
:param key: The name of the object to delete.

:type extra_args: dict
:param extra_args: Extra arguments to pass to the DeleteObject call.


def calculate_range_parameter(part_size, part_index, num_parts,<EOL>total_size=None):

<EOL>start_range = part_index * part_size<EOL>if part_index == num_parts - <NUM_LIT:1>:<EOL><INDENT>end_range = '<STR_LIT>'<EOL>if total_size is not None:<EOL><INDENT>end_range = str(total_size - <NUM_LIT:1>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>end_range = start_range + part_size - <NUM_LIT:1><EOL><DEDENT>range_param = '<STR_LIT>' % (start_range, end_range)<EOL>return range_param<EOL>

Calculate the range parameter for multipart downloads/copies

    :type part_size: int
    :param part_size: The size of the part

    :type part_index: int
    :param part_index: The index for which this parts starts. This index starts
        at zero

    :type num_parts: int
    :param num_parts: The total number of parts in the transfer

    :returns: The value to use for Range parameter on downloads or
        the CopySourceRange parameter for copies


callbacks = []<EOL>for subscriber in transfer_future.meta.call_args.subscribers:<EOL><INDENT>callback_name = '<STR_LIT>' + callback_type<EOL>if hasattr(subscriber, callback_name):<EOL><INDENT>callbacks.append(<EOL>functools.partial(<EOL>getattr(subscriber, callback_name),<EOL>future=transfer_future<EOL>)<EOL>)<EOL><DEDENT><DEDENT>return callbacks<EOL>

Retrieves callbacks from a subscriber

    :type transfer_future: s3transfer.futures.TransferFuture
    :param transfer_future: The transfer future the subscriber is associated
        to.

    :type callback_type: str
    :param callback_type: The type of callback to retrieve from the subscriber.
        Valid types include:
            * 'queued'
            * 'progress'
            * 'done'

    :returns: A list of callbacks for the type specified. All callbacks are
        preinjected with the transfer future.


<EOL>if bytes_transferred:<EOL><INDENT>for callback in callbacks:<EOL><INDENT>callback(bytes_transferred=bytes_transferred)<EOL><DEDENT><DEDENT>

Calls all progress callbacks

    :param callbacks: A list of progress callbacks to invoke
    :param bytes_transferred: The number of bytes transferred. This is passed
        to the callbacks. If no bytes were transferred the callbacks will not
        be invoked because no progress was achieved. It is also possible
        to receive a negative amount which comes from retrying a transfer
        request.


filtered_dict = {}<EOL>for key, value in original_dict.items():<EOL><INDENT>if key in whitelisted_keys:<EOL><INDENT>filtered_dict[key] = value<EOL><DEDENT><DEDENT>return filtered_dict<EOL>

Gets a dictionary filtered by whitelisted keys

    :param original_dict: The original dictionary of arguments to source keys
        and values.
    :param whitelisted_key: A list of keys to include in the filtered
        dictionary.

    :returns: A dictionary containing key/values from the original dictionary
        whose key was included in the whitelist


for arg, value in kwargs.items():<EOL><INDENT>setattr(self, arg, value)<EOL><DEDENT>

A class that records call arguments

        The call arguments must be passed as keyword arguments. It will set
        each keyword argument as an attribute of the object along with its
        associated value.


with self._lock:<EOL><INDENT>if self._is_finalized:<EOL><INDENT>raise RuntimeError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>self._count += <NUM_LIT:1><EOL><DEDENT>


with self._lock:<EOL><INDENT>if self._count == <NUM_LIT:0>:<EOL><INDENT>raise RuntimeError(<EOL>'<STR_LIT>')<EOL><DEDENT>self._count -= <NUM_LIT:1><EOL>if self._is_finalized and self._count == <NUM_LIT:0>:<EOL><INDENT>self._callback()<EOL><DEDENT><DEDENT>


with self._lock:<EOL><INDENT>self._is_finalized = True<EOL>if self._count == <NUM_LIT:0>:<EOL><INDENT>self._callback()<EOL><DEDENT><DEDENT>

Finalize the counter

        Once finalized, the counter never be incremented and the callback
        can be invoked once the count reaches zero


<EOL>try:<EOL><INDENT>os.remove(filename)<EOL><DEDENT>except OSError:<EOL><INDENT>pass<EOL><DEDENT>

Remove a file, noop if file does not exist.


<EOL>if not os.path.exists(filename):<EOL><INDENT>return False<EOL><DEDENT>mode = os.stat(filename).st_mode<EOL>if stat.S_ISCHR(mode):<EOL><INDENT>return True<EOL><DEDENT>if stat.S_ISBLK(mode):<EOL><INDENT>return True<EOL><DEDENT>if stat.S_ISFIFO(mode):<EOL><INDENT>return True<EOL><DEDENT>if stat.S_ISSOCK(mode):<EOL><INDENT>return True<EOL><DEDENT>return False<EOL>

Checks to see if a file is a special UNIX file.

        It checks if the file is a character special device, block special
        device, FIFO, or socket.

        :param filename: Name of the file

        :returns: True if the file is a special file. False, if is not.


def __init__(self, filename, start_byte=<NUM_LIT:0>, mode='<STR_LIT:rb>', open_function=open):

self._filename = filename<EOL>self._fileobj = None<EOL>self._start_byte = start_byte<EOL>self._mode = mode<EOL>self._open_function = open_function<EOL>

A class that defers the opening of a file till needed

        This is useful for deferring opening of a file till it is needed
        in a separate thread, as there is a limit of how many open files
        there can be in a single thread for most operating systems. The
        file gets opened in the following methods: ``read()``, ``seek()``,
        and ``__enter__()``

        :type filename: str
        :param filename: The name of the file to open

        :type start_byte: int
        :param start_byte: The byte to seek to when the file is opened.

        :type mode: str
        :param mode: The mode to use to open the file

        :type open_function: function
        :param open_function: The function to use to open the file


def __init__(self, fileobj, chunk_size, full_file_size,<EOL>callbacks=None, enable_callbacks=True, close_callbacks=None):

self._fileobj = fileobj<EOL>self._start_byte = self._fileobj.tell()<EOL>self._size = self._calculate_file_size(<EOL>self._fileobj, requested_size=chunk_size,<EOL>start_byte=self._start_byte, actual_file_size=full_file_size)<EOL>self._amount_read = <NUM_LIT:0><EOL>self._callbacks = callbacks<EOL>if callbacks is None:<EOL><INDENT>self._callbacks = []<EOL><DEDENT>self._callbacks_enabled = enable_callbacks<EOL>self._close_callbacks = close_callbacks<EOL>if close_callbacks is None:<EOL><INDENT>self._close_callbacks = close_callbacks<EOL><DEDENT>

Given a file object shown below::

    |___________________________________________________|
    0          |                 |                 full_file_size
               |----chunk_size---|
            f.tell()

:type fileobj: file
:param fileobj: File like object

:type chunk_size: int
:param chunk_size: The max chunk size to read.  Trying to read
    pass the end of the chunk size will behave like you've
    reached the end of the file.

:type full_file_size: int
:param full_file_size: The entire content length associated
    with ``fileobj``.

:type callbacks: A list of function(amount_read)
:param callbacks: Called whenever data is read from this object in the
    order provided.

:type enable_callbacks: boolean
:param enable_callbacks: True if to run callbacks. Otherwise, do not
    run callbacks

:type close_callbacks: A list of function()
:param close_callbacks: Called when close is called. The function
    should take no arguments.


@classmethod<EOL><INDENT>def from_filename(cls, filename, start_byte, chunk_size, callbacks=None,<EOL>enable_callbacks=True):<DEDENT>

f = open(filename, '<STR_LIT:rb>')<EOL>f.seek(start_byte)<EOL>file_size = os.fstat(f.fileno()).st_size<EOL>return cls(f, chunk_size, file_size, callbacks, enable_callbacks)<EOL>

Convenience factory function to create from a filename.

        :type start_byte: int
        :param start_byte: The first byte from which to start reading.

        :type chunk_size: int
        :param chunk_size: The max chunk size to read.  Trying to read
            pass the end of the chunk size will behave like you've
            reached the end of the file.

        :type full_file_size: int
        :param full_file_size: The entire content length associated
            with ``fileobj``.

        :type callbacks: function(amount_read)
        :param callbacks: Called whenever data is read from this object.

        :type enable_callbacks: bool
        :param enable_callbacks: Indicate whether to invoke callback
            during read() calls.

        :rtype: ``ReadFileChunk``
        :return: A new instance of ``ReadFileChunk``


self._semaphore = threading.Semaphore(count)<EOL>

A semaphore for the purpose of limiting the number of tasks

        :param count: The size of semaphore


logger.debug("<STR_LIT>", tag)<EOL>if not self._semaphore.acquire(blocking):<EOL><INDENT>raise NoResourcesAvailable("<STR_LIT>" % tag)<EOL><DEDENT>

Acquire the semaphore

        :param tag: A tag identifying what is acquiring the semaphore. Note
            that this is not really needed to directly use this class but is
            needed for API compatibility with the SlidingWindowSemaphore
            implementation.
        :param block: If True, block until it can be acquired. If False,
            do not block and raise an exception if cannot be aquired.

        :returns: A token (can be None) to use when releasing the semaphore


logger.debug("<STR_LIT>" % (tag, acquire_token))<EOL>self._semaphore.release()<EOL>

Release the semaphore

        :param tag: A tag identifying what is releasing the semaphore
        :param acquire_token:  The token returned from when the semaphore was
            acquired. Note that this is not really needed to directly use this
            class but is needed for API compatibility with the
            SlidingWindowSemaphore implementation.


def adjust_chunksize(self, current_chunksize, file_size=None):

chunksize = current_chunksize<EOL>if file_size is not None:<EOL><INDENT>chunksize = self._adjust_for_max_parts(chunksize, file_size)<EOL><DEDENT>return self._adjust_for_chunksize_limits(chunksize)<EOL>

Get a chunksize close to current that fits within all S3 limits.

        :type current_chunksize: int
        :param current_chunksize: The currently configured chunksize.

        :type file_size: int or None
        :param file_size: The size of the file to upload. This might be None
            if the object being transferred has an unknown size.

        :returns: A valid chunksize that fits within configured limits.


raise NotImplementedError('<STR_LIT>')<EOL>

The metadata associated to the TransferFuture


Determines if a TransferFuture has completed

        :returns: True if completed. False, otherwise.


Waits until TransferFuture is done and returns the result

        If the TransferFuture succeeded, it will return the result. If the
        TransferFuture failed, it will raise the exception associated to the
        failure.


Cancels the request associated with the TransferFuture


The call args used in the transfer request


A dictionary that requesters can store data in


def __init__(self, meta=None, coordinator=None):

self._meta = meta<EOL>if meta is None:<EOL><INDENT>self._meta = TransferMeta()<EOL><DEDENT>self._coordinator = coordinator<EOL>if coordinator is None:<EOL><INDENT>self._coordinator = TransferCoordinator()<EOL><DEDENT>

The future associated to a submitted transfer request

        :type meta: TransferMeta
        :param meta: The metadata associated to the request. This object
            is visible to the requester.

        :type coordinator: TransferCoordinator
        :param coordinator: The coordinator associated to the request. This
            object is not visible to the requester.


if not self.done():<EOL><INDENT>raise TransferNotDoneError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>self._coordinator.set_exception(exception, override=True)<EOL>


return self._call_args<EOL>


return self._transfer_id<EOL>


return self._size<EOL>

The size of the transfer request if known


return self._user_context<EOL>


self._size = size<EOL>

A method to provide the size of a transfer request

        By providing this value, the TransferManager will not try to
        call HeadObject or use the use OS to determine the size of the
        transfer.


with self._associated_futures_lock:<EOL><INDENT>return copy.copy(self._associated_futures)<EOL><DEDENT>

The list of futures associated to the inprogress TransferFuture

        Once the transfer finishes this list becomes empty as the transfer
        is considered done and there should be no running futures left.


return self._failure_cleanups<EOL>

The list of callbacks to call when the TransferFuture fails


return self._status<EOL>

The status of the TransferFuture

        The currently supported states are:
            * not-started - Has yet to start. If in this state, a transfer
              can be canceled immediately and nothing will happen.
            * queued - SubmissionTask is about to submit tasks
            * running - Is inprogress. In-progress as of now means that
              the SubmissionTask that runs the transfer is being executed. So
              there is no guarantee any transfer requests had been made to
              S3 if this state is reached.
            * cancelled - Was cancelled
            * failed - An exception other than CancelledError was thrown
            * success - No exceptions were thrown and is done.


with self._lock:<EOL><INDENT>self._exception = None<EOL>self._result = result<EOL>self._status = '<STR_LIT:success>'<EOL><DEDENT>

Set a result for the TransferFuture

        Implies that the TransferFuture succeeded. This will always set a
        result because it is invoked on the final task where there is only
        ever one final task and it is ran at the very end of a transfer
        process. So if a result is being set for this final task, the transfer
        succeeded even if something came a long and canceled the transfer
        on the final task.


def set_exception(self, exception, override=False):

with self._lock:<EOL><INDENT>if not self.done() or override:<EOL><INDENT>self._exception = exception<EOL>self._status = '<STR_LIT>'<EOL><DEDENT><DEDENT>

Set an exception for the TransferFuture

        Implies the TransferFuture failed.

        :param exception: The exception that cause the transfer to fail.
        :param override: If True, override any existing state.


<EOL>self._done_event.wait(MAXINT)<EOL>if self._exception:<EOL><INDENT>raise self._exception<EOL><DEDENT>return self._result<EOL>


def cancel(self, msg='<STR_LIT>', exc_type=CancelledError):

with self._lock:<EOL><INDENT>if not self.done():<EOL><INDENT>should_announce_done = False<EOL>logger.debug('<STR_LIT>', self, msg)<EOL>self._exception = exc_type(msg)<EOL>if self._status == '<STR_LIT>':<EOL><INDENT>should_announce_done = True<EOL><DEDENT>self._status = '<STR_LIT>'<EOL>if should_announce_done:<EOL><INDENT>self.announce_done()<EOL><DEDENT><DEDENT><DEDENT>

Cancels the TransferFuture

        :param msg: The message to attach to the cancellation
        :param exc_type: The type of exception to set for the cancellation


self._transition_to_non_done_state('<STR_LIT>')<EOL>

Sets the TransferFutrue's status to running


Sets the TransferFuture's status to running


def submit(self, executor, task, tag=None):

logger.debug(<EOL>"<STR_LIT>" % (<EOL>task, executor, self.transfer_id)<EOL>)<EOL>future = executor.submit(task, tag=tag)<EOL>self.add_associated_future(future)<EOL>future.add_done_callback(<EOL>FunctionContainer(self.remove_associated_future, future))<EOL>return future<EOL>

Submits a task to a provided executor

        :type executor: s3transfer.futures.BoundedExecutor
        :param executor: The executor to submit the callable to

        :type task: s3transfer.tasks.Task
        :param task: The task to submit to the executor

        :type tag: s3transfer.futures.TaskTag
        :param tag: A tag to associate to the submitted task

        :rtype: concurrent.futures.Future
        :returns: A future representing the submitted task


return self.status in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT:success>']<EOL>

Determines if a TransferFuture has completed

        :returns: False if status is equal to 'failed', 'cancelled', or
            'success'. True, otherwise


with self._associated_futures_lock:<EOL><INDENT>self._associated_futures.add(future)<EOL><DEDENT>

Adds a future to be associated with the TransferFuture


with self._associated_futures_lock:<EOL><INDENT>self._associated_futures.remove(future)<EOL><DEDENT>

Removes a future's association to the TransferFuture


def add_done_callback(self, function, *args, **kwargs):

with self._done_callbacks_lock:<EOL><INDENT>self._done_callbacks.append(<EOL>FunctionContainer(function, *args, **kwargs)<EOL>)<EOL><DEDENT>

Add a done callback to be invoked when transfer is done


def add_failure_cleanup(self, function, *args, **kwargs):

with self._failure_cleanups_lock:<EOL><INDENT>self._failure_cleanups.append(<EOL>FunctionContainer(function, *args, **kwargs))<EOL><DEDENT>


if self.status != '<STR_LIT:success>':<EOL><INDENT>self._run_failure_cleanups()<EOL><DEDENT>self._done_event.set()<EOL>self._run_done_callbacks()<EOL>

Announce that future is done running and run associated callbacks

        This will run any failure cleanups if the transfer failed if not
        they have not been run, allows the result() to be unblocked, and will
        run any done callbacks associated to the TransferFuture if they have
        not already been ran.


def __init__(self, max_size, max_num_threads, tag_semaphores=None,<EOL>executor_cls=None):

self._max_num_threads = max_num_threads<EOL>if executor_cls is None:<EOL><INDENT>executor_cls = self.EXECUTOR_CLS<EOL><DEDENT>self._executor = executor_cls(max_workers=self._max_num_threads)<EOL>self._semaphore = TaskSemaphore(max_size)<EOL>self._tag_semaphores = tag_semaphores<EOL>

An executor implentation that has a maximum queued up tasks

        The executor will block if the number of tasks that have been
        submitted and is currently working on is past its maximum.

        :params max_size: The maximum number of inflight futures. An inflight
            future means that the task is either queued up or is currently
            being executed. A size of None or 0 means that the executor will
            have no bound in terms of the number of inflight futures.

        :params max_num_threads: The maximum number of threads the executor
            uses.

        :type tag_semaphores: dict
        :params tag_semaphores: A dictionary where the key is the name of the
            tag and the value is the semaphore to use when limiting the
            number of tasks the executor is processing at a time.

        :type executor_cls: BaseExecutor
        :param underlying_executor_cls: The executor class that
            get bounded by this executor. If None is provided, the
            concurrent.futures.ThreadPoolExecutor class is used.


def submit(self, task, tag=None, block=True):

semaphore = self._semaphore<EOL>if tag:<EOL><INDENT>semaphore = self._tag_semaphores[tag]<EOL><DEDENT>acquire_token = semaphore.acquire(task.transfer_id, block)<EOL>release_callback = FunctionContainer(<EOL>semaphore.release, task.transfer_id, acquire_token)<EOL>future = ExecutorFuture(self._executor.submit(task))<EOL>future.add_done_callback(release_callback)<EOL>return future<EOL>

Submit a task to complete

        :type task: s3transfer.tasks.Task
        :param task: The task to run __call__ on

        :type tag: s3transfer.futures.TaskTag
        :param tag: An optional tag to associate to the task. This
            is used to override which semaphore to use.

        :type block: boolean
        :param block: True if to wait till it is possible to submit a task.
            False, if not to wait and raise an error if not able to submit
            a task.

        :returns: The future assocaited to the submitted task


self._future = future<EOL>

A future returned from the executor

        Currently, it is just a wrapper around a concurrent.futures.Future.
        However, this can eventually grow to implement the needed functionality
        of concurrent.futures.Future if we move off of the library and not
        affect the rest of the codebase.

        :type future: concurrent.futures.Future
        :param future: The underlying future


<EOL>def done_callback(future_passed_to_callback):<EOL><INDENT>return fn()<EOL><DEDENT>self._future.add_done_callback(done_callback)<EOL>

Adds a callback to be completed once future is done

        :parm fn: A callable that takes no arguments. Note that is different
            than concurrent.futures.Future.add_done_callback that requires
            a single argument for the future.


def __init__(self,<EOL>multipart_threshold=<NUM_LIT:8> * MB,<EOL>multipart_chunksize=<NUM_LIT:8> * MB,<EOL>max_request_processes=<NUM_LIT:10>):

self.multipart_threshold = multipart_threshold<EOL>self.multipart_chunksize = multipart_chunksize<EOL>self.max_request_processes = max_request_processes<EOL>

Configuration for the ProcessPoolDownloader

        :param multipart_threshold: The threshold for which ranged downloads
            occur.

        :param multipart_chunksize: The chunk size of each ranged download.

        :param max_request_processes: The maximum number of processes that
            will be making S3 API transfer-related requests at a time.


def __init__(self, client_kwargs=None, config=None):

if client_kwargs is None:<EOL><INDENT>client_kwargs = {}<EOL><DEDENT>self._client_factory = ClientFactory(client_kwargs)<EOL>self._transfer_config = config<EOL>if config is None:<EOL><INDENT>self._transfer_config = ProcessTransferConfig()<EOL><DEDENT>self._download_request_queue = multiprocessing.Queue(<NUM_LIT:1000>)<EOL>self._worker_queue = multiprocessing.Queue(<NUM_LIT:1000>)<EOL>self._osutil = OSUtils()<EOL>self._started = False<EOL>self._start_lock = threading.Lock()<EOL>self._manager = None<EOL>self._transfer_monitor = None<EOL>self._submitter = None<EOL>self._workers = []<EOL>

Downloads S3 objects using process pools

        :type client_kwargs: dict
        :param client_kwargs: The keyword arguments to provide when
            instantiating S3 clients. The arguments must match the keyword
            arguments provided to the
            `botocore.session.Session.create_client()` method.

        :type config: ProcessTransferConfig
        :param config: Configuration for the downloader


def download_file(self, bucket, key, filename, extra_args=None,<EOL>expected_size=None):

self._start_if_needed()<EOL>if extra_args is None:<EOL><INDENT>extra_args = {}<EOL><DEDENT>self._validate_all_known_args(extra_args)<EOL>transfer_id = self._transfer_monitor.notify_new_transfer()<EOL>download_file_request = DownloadFileRequest(<EOL>transfer_id=transfer_id, bucket=bucket, key=key,<EOL>filename=filename, extra_args=extra_args,<EOL>expected_size=expected_size,<EOL>)<EOL>logger.debug(<EOL>'<STR_LIT>', download_file_request)<EOL>self._download_request_queue.put(download_file_request)<EOL>call_args = CallArgs(<EOL>bucket=bucket, key=key, filename=filename, extra_args=extra_args,<EOL>expected_size=expected_size)<EOL>future = self._get_transfer_future(transfer_id, call_args)<EOL>return future<EOL>

Downloads the object's contents to a file

        :type bucket: str
        :param bucket: The name of the bucket to download from

        :type key: str
        :param key: The name of the key to download from

        :type filename: str
        :param filename: The name of a file to download to.

        :type extra_args: dict
        :param extra_args: Extra arguments that may be passed to the
            client operation

        :type expected_size: int
        :param expected_size: The expected size in bytes of the download. If
            provided, the downloader will not call HeadObject to determine the
            object's size and use the provided value instead. The size is
            needed to determine whether to do a multipart download.

        :rtype: s3transfer.futures.TransferFuture
        :returns: Transfer future representing the download


Shutdown the downloader

        It will wait till all downloads are complete before returning.


self._monitor = monitor<EOL>self._meta = meta<EOL>

The future associated to a submitted process pool transfer request

        :type monitor: TransferMonitor
        :param monitor: The monitor associated to the proccess pool downloader

        :type meta: ProcessPoolTransferMeta
        :param meta: The metadata associated to the request. This object
            is visible to the requester.


self._client_kwargs = client_kwargs<EOL>if self._client_kwargs is None:<EOL><INDENT>self._client_kwargs = {}<EOL><DEDENT>

Creates S3 clients for processes

        Botocore sessions and clients are not pickleable so they cannot be
        inherited across Process boundaries. Instead, they must be instantiated
        once a process is running.


return botocore.session.Session().create_client(<EOL>'<STR_LIT>', **self._client_kwargs)<EOL>


<EOL>self._transfer_states = {}<EOL>self._id_count = <NUM_LIT:0><EOL>self._init_lock = threading.Lock()<EOL>

Monitors transfers for cross-proccess communication

        Notifications can be sent to the monitor and information can be
        retrieved from the monitor for a particular transfer. This abstraction
        is ran in a ``multiprocessing.managers.BaseManager`` in order to be
        shared across processes.


return self._transfer_states[transfer_id].done<EOL>

Determine a particular transfer is complete

        :param transfer_id: Unique identifier for the transfer
        :return: True, if done. False, otherwise.


self._transfer_states[transfer_id].set_done()<EOL>

Notify a particular transfer is complete

        :param transfer_id: Unique identifier for the transfer


self._transfer_states[transfer_id].wait_till_done()<EOL>exception = self._transfer_states[transfer_id].exception<EOL>if exception:<EOL><INDENT>raise exception<EOL><DEDENT>return None<EOL>

Poll for the result of a transfer

        :param transfer_id: Unique identifier for the transfer
        :return: If the transfer succeeded, it will return the result. If the
            transfer failed, it will raise the exception associated to the
            failure.


def notify_exception(self, transfer_id, exception):

<EOL>self._transfer_states[transfer_id].exception = exception<EOL>

Notify an exception was encountered for a transfer

        :param transfer_id: Unique identifier for the transfer
        :param exception: The exception encountered for that transfer


return self._transfer_states[transfer_id].exception<EOL>

Retrieve the exception encountered for the transfer

        :param transfer_id: Unique identifier for the transfer
        :return: The exception encountered for that transfer. Otherwise
            if there were no exceptions, returns None.


def notify_expected_jobs_to_complete(self, transfer_id, num_jobs):

self._transfer_states[transfer_id].jobs_to_complete = num_jobs<EOL>

Notify the amount of jobs expected for a transfer

        :param transfer_id: Unique identifier for the transfer
        :param num_jobs: The number of jobs to complete the transfer


return self._transfer_states[transfer_id].decrement_jobs_to_complete()<EOL>

Notify that a single job is completed for a transfer

        :param transfer_id: Unique identifier for the transfer
        :return: The number of jobs remaining to complete the transfer


def __init__(self, transfer_config, client_factory,<EOL>transfer_monitor, osutil, download_request_queue,<EOL>worker_queue):

super(GetObjectSubmitter, self).__init__(client_factory)<EOL>self._transfer_config = transfer_config<EOL>self._transfer_monitor = transfer_monitor<EOL>self._osutil = osutil<EOL>self._download_request_queue = download_request_queue<EOL>self._worker_queue = worker_queue<EOL>

Submit GetObjectJobs to fulfill a download file request

        :param transfer_config: Configuration for transfers.
        :param client_factory: ClientFactory for creating S3 clients.
        :param transfer_monitor: Monitor for notifying and retrieving state
            of transfer.
        :param osutil: OSUtils object to use for os-related behavior when
            performing the transfer.
        :param download_request_queue: Queue to retrieve download file
            requests.
        :param worker_queue: Queue to submit GetObjectJobs for workers
            to perform.


def __init__(self, queue, client_factory, transfer_monitor, osutil):

super(GetObjectWorker, self).__init__(client_factory)<EOL>self._queue = queue<EOL>self._client_factory = client_factory<EOL>self._transfer_monitor = transfer_monitor<EOL>self._osutil = osutil<EOL>

Fulfills GetObjectJobs

        Downloads the S3 object, writes it to the specified file, and
        renames the file to its final location if it completes the final
        job for a particular transfer.

        :param queue: Queue for retrieving GetObjectJob's
        :param client_factory: ClientFactory for creating S3 clients
        :param transfer_monitor: Monitor for notifying
        :param osutil: OSUtils object to use for os-related behavior when
            performing the transfer.


if not filesystem:<EOL><INDENT>filesystem = Filesystem()<EOL><DEDENT>files = filesystem.listdir(dirtolist)<EOL>import re<EOL>cfgpat = re.compile("<STR_LIT>")<EOL>cfg_files = [fn for fn in files if cfgpat.match(fn)]<EOL>return cfg_files<EOL>


for p, d1 in b.items():<EOL><INDENT>if p in a:<EOL><INDENT>if not isinstance(d1, dict):<EOL><INDENT>continue<EOL><DEDENT>_mergedict(a[p], d1)<EOL><DEDENT>else:<EOL><INDENT>a[p] = d1<EOL><DEDENT><DEDENT>return a<EOL>

Recusively merge the 2 dicts.

    Destructive on argument 'a'.


def _path_find(path_parts, fs):<EOL><INDENT>for p,f in fs.items():<EOL><INDENT>if p == path_parts[<NUM_LIT:0>]:<EOL><INDENT>if len(path_parts) == <NUM_LIT:1>:<EOL><INDENT>del fs[p]<EOL>return<EOL><DEDENT>else:<EOL><INDENT>return _path_find(path_parts[<NUM_LIT:1>:], f)<EOL><DEDENT><DEDENT><DEDENT>raise KeyError()<EOL><DEDENT>pt = path.split("<STR_LIT:/>")<EOL>return _path_find(pt if pt[<NUM_LIT:0>] != "<STR_LIT>" else pt[<NUM_LIT:1>:], self.files)<EOL>


def _path_find(path_parts, fs):<EOL><INDENT>for p,f in fs.items():<EOL><INDENT>if p == path_parts[<NUM_LIT:0>]:<EOL><INDENT>if len(path_parts) == <NUM_LIT:1>:<EOL><INDENT>return f<EOL><DEDENT>else:<EOL><INDENT>return _path_find(path_parts[<NUM_LIT:1>:], f)<EOL><DEDENT><DEDENT><DEDENT>raise KeyError()<EOL><DEDENT>pt = path.split("<STR_LIT:/>")<EOL>return _path_find(pt if pt[<NUM_LIT:0>] != "<STR_LIT>" else pt[<NUM_LIT:1>:], self.files)<EOL>

Functional/recursive path finder.

        Raises KeyError if the path is not found


try:<EOL><INDENT>self._path(path)<EOL><DEDENT>except KeyError:<EOL><INDENT>return False<EOL><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT>

Functional (recursive) exists on the path structures


if self.exists(path):<EOL><INDENT>content = self._path(path)<EOL>return hasattr(content, "<STR_LIT>")<EOL><DEDENT>return False<EOL>

Is the path a directory?

        A path is a directory if it holds a dictionary.


async def get_sign_in_url(<EOL>self, state, code_challenge=None, emulator_url=None, final_redirect=None, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_sign_in_url.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT:state>'] = self._serialize.query("<STR_LIT:state>", state, '<STR_LIT:str>')<EOL>if code_challenge is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", code_challenge, '<STR_LIT:str>')<EOL><DEDENT>if emulator_url is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", emulator_url, '<STR_LIT:str>')<EOL><DEDENT>if final_redirect is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", final_redirect, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise HttpOperationError(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT:str>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

:param state:
:type state: str
:param code_challenge:
:type code_challenge: str
:param emulator_url:
:type emulator_url: str
:param final_redirect:
:type final_redirect: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
 deserialized response
:param operation_config: :ref:`Operation configuration
 overrides<msrest:optionsforoperations>`.
:return: str or ClientRawResponse if raw=true
:rtype: str or ~msrest.pipeline.ClientRawResponse
:raises:
 :class:`HttpOperationError<msrest.exceptions.HttpOperationError>`


async def get_token(<EOL>self, user_id, connection_name, channel_id=None, code=None, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_token.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_id, '<STR_LIT:str>')<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", connection_name, '<STR_LIT:str>')<EOL>if channel_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", channel_id, '<STR_LIT:str>')<EOL><DEDENT>if code is not None:<EOL><INDENT>query_parameters['<STR_LIT:code>'] = self._serialize.query("<STR_LIT:code>", code, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

:param user_id:
:type user_id: str
:param connection_name:
:type connection_name: str
:param channel_id:
:type channel_id: str
:param code:
:type code: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
 deserialized response
:param operation_config: :ref:`Operation configuration
 overrides<msrest:optionsforoperations>`.
:return: TokenResponse or ClientRawResponse if raw=true
:rtype: ~botframework.tokenapi.models.TokenResponse or
 ~msrest.pipeline.ClientRawResponse
:raises:
 :class:`ErrorResponseException<botframework.tokenapi.models.ErrorResponseException>`


async def get_aad_tokens(<EOL>self, user_id, connection_name, channel_id=None, resource_urls=None, *, custom_headers=None, raw=False, **operation_config):

aad_resource_urls = models.AadResourceUrls(resource_urls=resource_urls)<EOL>url = self.get_aad_tokens.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_id, '<STR_LIT:str>')<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", connection_name, '<STR_LIT:str>')<EOL>if channel_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", channel_id, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(aad_resource_urls, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

:param user_id:
:type user_id: str
:param connection_name:
:type connection_name: str
:param channel_id:
:type channel_id: str
:param resource_urls:
:type resource_urls: list[str]
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
 deserialized response
:param operation_config: :ref:`Operation configuration
 overrides<msrest:optionsforoperations>`.
:return: dict or ClientRawResponse if raw=true
:rtype: dict[str, ~botframework.tokenapi.models.TokenResponse] or
 ~msrest.pipeline.ClientRawResponse
:raises:
 :class:`ErrorResponseException<botframework.tokenapi.models.ErrorResponseException>`


async def sign_out(<EOL>self, user_id, connection_name=None, channel_id=None, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.sign_out.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_id, '<STR_LIT:str>')<EOL>if connection_name is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", connection_name, '<STR_LIT:str>')<EOL><DEDENT>if channel_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", channel_id, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT:object>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

:param user_id:
:type user_id: str
:param connection_name:
:type connection_name: str
:param channel_id:
:type channel_id: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
 deserialized response
:param operation_config: :ref:`Operation configuration
 overrides<msrest:optionsforoperations>`.
:return: object or ClientRawResponse if raw=true
:rtype: object or ~msrest.pipeline.ClientRawResponse
:raises:
 :class:`ErrorResponseException<botframework.tokenapi.models.ErrorResponseException>`


async def get_token_status(<EOL>self, user_id, channel_id=None, include=None, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_token_status.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_id, '<STR_LIT:str>')<EOL>if channel_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", channel_id, '<STR_LIT:str>')<EOL><DEDENT>if include is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", include, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

:param user_id:
:type user_id: str
:param channel_id:
:type channel_id: str
:param include:
:type include: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
 deserialized response
:param operation_config: :ref:`Operation configuration
 overrides<msrest:optionsforoperations>`.
:return: list or ClientRawResponse if raw=true
:rtype: list[~botframework.tokenapi.models.TokenStatus] or
 ~msrest.pipeline.ClientRawResponse
:raises:
 :class:`ErrorResponseException<botframework.tokenapi.models.ErrorResponseException>`


def get_token(<EOL>self, user_id, connection_name, channel_id=None, code=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_token.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_id, '<STR_LIT:str>')<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", connection_name, '<STR_LIT:str>')<EOL>if channel_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", channel_id, '<STR_LIT:str>')<EOL><DEDENT>if code is not None:<EOL><INDENT>query_parameters['<STR_LIT:code>'] = self._serialize.query("<STR_LIT:code>", code, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>


def get_aad_tokens(<EOL>self, user_id, connection_name, channel_id=None, resource_urls=None, custom_headers=None, raw=False, **operation_config):

aad_resource_urls = models.AadResourceUrls(resource_urls=resource_urls)<EOL>url = self.get_aad_tokens.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_id, '<STR_LIT:str>')<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", connection_name, '<STR_LIT:str>')<EOL>if channel_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", channel_id, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(aad_resource_urls, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>


def sign_out(<EOL>self, user_id, connection_name=None, channel_id=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.sign_out.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_id, '<STR_LIT:str>')<EOL>if connection_name is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", connection_name, '<STR_LIT:str>')<EOL><DEDENT>if channel_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", channel_id, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT:object>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>


def get_token_status(<EOL>self, user_id, channel_id=None, include=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_token_status.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_id, '<STR_LIT:str>')<EOL>if channel_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", channel_id, '<STR_LIT:str>')<EOL><DEDENT>if include is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", include, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>


def get_sign_in_url(<EOL>self, state, code_challenge=None, emulator_url=None, final_redirect=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_sign_in_url.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT:state>'] = self._serialize.query("<STR_LIT:state>", state, '<STR_LIT:str>')<EOL>if code_challenge is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", code_challenge, '<STR_LIT:str>')<EOL><DEDENT>if emulator_url is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", emulator_url, '<STR_LIT:str>')<EOL><DEDENT>if final_redirect is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", final_redirect, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise HttpOperationError(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT:str>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>


async def get_attachment_info(<EOL>self, attachment_id, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_attachment_info.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", attachment_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

GetAttachmentInfo.

        Get AttachmentInfo structure describing the attachment views.

        :param attachment_id: attachment id
        :type attachment_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: AttachmentInfo or ClientRawResponse if raw=true
        :rtype: ~botframework.connector.models.AttachmentInfo or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def get_attachment(<EOL>self, attachment_id, view_id, *, custom_headers=None, raw=False, callback=None, **operation_config):

<EOL>url = self.get_attachment.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", attachment_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", view_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=True, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = self._client.stream_download_async(response, callback)<EOL>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

GetAttachment.

        Get the named view as binary content.

        :param attachment_id: attachment id
        :type attachment_id: str
        :param view_id: View id from attachmentInfo
        :type view_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param callback: When specified, will be called with each chunk of
         data that is streamed. The callback should take two arguments, the
         bytes of the current chunk of data and the response object. If the
         data is uploading, response will be None.
        :type callback: Callable[Bytes, response=None]
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: object or ClientRawResponse if raw=true
        :rtype: Generator or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def get_conversations(<EOL>self, continuation_token=None, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_conversations.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>if continuation_token is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", continuation_token, '<STR_LIT:str>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

GetConversations.

        List the Conversations in which this bot has participated.
        GET from this method with a skip token
        The return value is a ConversationsResult, which contains an array of
        ConversationMembers and a skip token.  If the skip token is not empty,
        then
        there are further values to be returned. Call this method again with
        the returned token to get more values.
        Each ConversationMembers object contains the ID of the conversation and
        an array of ChannelAccounts that describe the members of the
        conversation.

        :param continuation_token: skip or continuation token
        :type continuation_token: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ConversationsResult or ClientRawResponse if raw=true
        :rtype: ~botframework.connector.models.ConversationsResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def create_conversation(<EOL>self, parameters, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create_conversation.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(parameters, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

CreateConversation.

        Create a new Conversation.
        POST to this method with a
        * Bot being the bot creating the conversation
        * IsGroup set to true if this is not a direct message (default is
        false)
        * Array containing the members to include in the conversation
        The return value is a ResourceResponse which contains a conversation id
        which is suitable for use
        in the message payload and REST API uris.
        Most channels only support the semantics of bots initiating a direct
        message conversation.  An example of how to do that would be:
        ```
        var resource = await connector.conversations.CreateConversation(new
        ConversationParameters(){ Bot = bot, members = new ChannelAccount[] {
        new ChannelAccount("user1") } );
        await connect.Conversations.SendToConversationAsync(resource.Id, new
        Activity() ... ) ;
        ```.

        :param parameters: Parameters to create the conversation from
        :type parameters:
         ~botframework.connector.models.ConversationParameters
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ConversationResourceResponse or ClientRawResponse if raw=true
        :rtype: ~botframework.connector.models.ConversationResourceResponse or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def send_to_conversation(<EOL>self, conversation_id, activity, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.send_to_conversation.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", conversation_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(activity, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

SendToConversation.

        This method allows you to send an activity to the end of a
        conversation.
        This is slightly different from ReplyToActivity().
        * SendToConversation(conversationId) - will append the activity to the
        end of the conversation according to the timestamp or semantics of the
        channel.
        * ReplyToActivity(conversationId,ActivityId) - adds the activity as a
        reply to another activity, if the channel supports it. If the channel
        does not support nested replies, ReplyToActivity falls back to
        SendToConversation.
        Use ReplyToActivity when replying to a specific activity in the
        conversation.
        Use SendToConversation in all other cases.

        :param conversation_id: Conversation ID
        :type conversation_id: str
        :param activity: Activity to send
        :type activity: ~botframework.connector.models.Activity
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ResourceResponse or ClientRawResponse if raw=true
        :rtype: ~botframework.connector.models.ResourceResponse or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def send_conversation_history(<EOL>self, conversation_id, activities=None, *, custom_headers=None, raw=False, **operation_config):

history = models.Transcript(activities=activities)<EOL>url = self.send_conversation_history.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", conversation_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(history, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

SendConversationHistory.

        This method allows you to upload the historic activities to the
        conversation.
        Sender must ensure that the historic activities have unique ids and
        appropriate timestamps. The ids are used by the client to deal with
        duplicate activities and the timestamps are used by the client to
        render the activities in the right order.

        :param conversation_id: Conversation ID
        :type conversation_id: str
        :param activities: A collection of Activities that conforms to the
         Transcript schema.
        :type activities: list[~botframework.connector.models.Activity]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ResourceResponse or ClientRawResponse if raw=true
        :rtype: ~botframework.connector.models.ResourceResponse or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def update_activity(<EOL>self, conversation_id, activity_id, activity, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.update_activity.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", conversation_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", activity_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(activity, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

UpdateActivity.

        Edit an existing activity.
        Some channels allow you to edit an existing activity to reflect the new
        state of a bot conversation.
        For example, you can remove buttons after someone has clicked "Approve"
        button.

        :param conversation_id: Conversation ID
        :type conversation_id: str
        :param activity_id: activityId to update
        :type activity_id: str
        :param activity: replacement Activity
        :type activity: ~botframework.connector.models.Activity
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ResourceResponse or ClientRawResponse if raw=true
        :rtype: ~botframework.connector.models.ResourceResponse or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def reply_to_activity(<EOL>self, conversation_id, activity_id, activity, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.reply_to_activity.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", conversation_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", activity_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(activity, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

ReplyToActivity.

        This method allows you to reply to an activity.
        This is slightly different from SendToConversation().
        * SendToConversation(conversationId) - will append the activity to the
        end of the conversation according to the timestamp or semantics of the
        channel.
        * ReplyToActivity(conversationId,ActivityId) - adds the activity as a
        reply to another activity, if the channel supports it. If the channel
        does not support nested replies, ReplyToActivity falls back to
        SendToConversation.
        Use ReplyToActivity when replying to a specific activity in the
        conversation.
        Use SendToConversation in all other cases.

        :param conversation_id: Conversation ID
        :type conversation_id: str
        :param activity_id: activityId the reply is to (OPTIONAL)
        :type activity_id: str
        :param activity: Activity to send
        :type activity: ~botframework.connector.models.Activity
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ResourceResponse or ClientRawResponse if raw=true
        :rtype: ~botframework.connector.models.ResourceResponse or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def delete_activity(<EOL>self, conversation_id, activity_id, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete_activity.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", conversation_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", activity_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

DeleteActivity.

        Delete an existing activity.
        Some channels allow you to delete an existing activity, and if
        successful this method will remove the specified activity.

        :param conversation_id: Conversation ID
        :type conversation_id: str
        :param activity_id: activityId to delete
        :type activity_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def get_conversation_members(<EOL>self, conversation_id, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_conversation_members.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", conversation_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

GetConversationMembers.

        Enumerate the members of a conversation.
        This REST API takes a ConversationId and returns an array of
        ChannelAccount objects representing the members of the conversation.

        :param conversation_id: Conversation ID
        :type conversation_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: list or ClientRawResponse if raw=true
        :rtype: list[~botframework.connector.models.ChannelAccount] or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`


async def get_conversation_paged_members(<EOL>self, conversation_id, page_size=None, continuation_token=None, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_conversation_paged_members.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", conversation_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if page_size is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", page_size, '<STR_LIT:int>')<EOL><DEDENT>if continuation_token is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", continuation_token, '<STR_LIT:str>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise HttpOperationError(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

GetConversationPagedMembers.

        Enumerate the members of a conversation one page at a time.
        This REST API takes a ConversationId. Optionally a pageSize and/or
        continuationToken can be provided. It returns a PagedMembersResult,
        which contains an array
        of ChannelAccounts representing the members of the conversation and a
        continuation token that can be used to get more values.
        One page of ChannelAccounts records are returned with each call. The
        number of records in a page may vary between channels and calls. The
        pageSize parameter can be used as
        a suggestion. If there are no additional results the response will not
        contain a continuation token. If there are no members in the
        conversation the Members will be empty or not present in the response.
        A response to a request that has a continuation token from a prior
        request may rarely return members from a previous request.

        :param conversation_id: Conversation ID
        :type conversation_id: str
        :param page_size: Suggested page size
        :type page_size: int
        :param continuation_token: Continuation Token
        :type continuation_token: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PagedMembersResult or ClientRawResponse if raw=true
        :rtype: ~botframework.connector.models.PagedMembersResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`HttpOperationError<msrest.exceptions.HttpOperationError>`


async def delete_conversation_member(<EOL>self, conversation_id, member_id, *, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete_conversation_member.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", conversation_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", member_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = await self._client.async_send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

DeleteConversationMember.

        Deletes a member from a conversation.
        This REST API takes a ConversationId and a memberId (of type string)
        and removes that member from the conversation. If that member was the
        last member
        of the conversation, the conversation will also be deleted.

        :param conversation_id: Conversation ID
        :type conversation_id: str
        :param member_id: ID of the member to delete from this conversation
        :type member_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>`