# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class BatchSettings(Model):
    """BatchSettings.

    :param batch_mode: needs to be one of - "use existing batch", "new batch",
     "new self-contained batch", "use pending batch"
     if "use existing" - we will use an existing open batch and leave it open
     if "new batch" - close existing open batch and  make a new batch
     if "new self-contained batch" - make a new batch and add bills to it and
     close it. Any open batch will be left open
     if "use pending batch" - PendingBatchId is required.  We will use the
     pending batch and leave it pending <span class='property-internal'>One of
     use existing batch, new batch, new self-contained batch, use pending batch
     </span>
    :type batch_mode: str
    :param pending_batch_id: Pending batchId to import the bills into <span
     class='property-internal'>Required when BatchMode is set to use pending
     batch</span>
    :type pending_batch_id: int
    :param new_batch_code: optional- if not provided, we will autocreate the
     batch code.
     If useExistingBatch is true, this value will be ignored <span
     class='property-internal'>Must be between 0 and 255 characters</span>
    :type new_batch_code: str
    """

    _validation = {
        'new_batch_code': {'max_length': 255, 'min_length': 0},
    }

    _attribute_map = {
        'batch_mode': {'key': 'batchMode', 'type': 'str'},
        'pending_batch_id': {'key': 'pendingBatchId', 'type': 'int'},
        'new_batch_code': {'key': 'newBatchCode', 'type': 'str'},
    }

    def __init__(self, *, batch_mode: str=None, pending_batch_id: int=None, new_batch_code: str=None, **kwargs) -> None:
        super(BatchSettings, self).__init__(**kwargs)
        self.batch_mode = batch_mode
        self.pending_batch_id = pending_batch_id
        self.new_batch_code = new_batch_code
