# 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 BatchCreate(Model):
    """BatchCreate.

    All required parameters must be populated in order to send to Azure.

    :param batch_code: Required. The batch code <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 255 characters</span>
    :type batch_code: str
    :param close_existing_batch: If user has another batch open, should it be
     closed?
    :type close_existing_batch: bool
    :param statement_date: Statement date for batch - will get applied as
     default to any bill added to this batch
    :type statement_date: datetime
    :param due_date: Due date for batch - will get applied as default to any
     bill added to this batch
    :type due_date: datetime
    :param next_reading: Next reading date for batch - will get applied as
     default to any bill added to this batch
    :type next_reading: datetime
    :param control_code: Control code for batch - will get applied as default
     to any bill added to this batch <span class='property-internal'>Must be
     between 0 and 255 characters</span>
    :type control_code: str
    :param invoice_number: Invoice number for batch - will get applied as
     default to any bill added to this batch <span
     class='property-internal'>Must be between 0 and 255 characters</span>
    :type invoice_number: str
    :param account_period_number: Account period number for batch - will get
     applied as default to any bill added to this batch
    :type account_period_number: int
    :param account_period_year: Accountperiod year for batch - will get
     applied as default to any bill added to this batch <span
     class='property-internal'>Must be between 1900 and 2099</span>
    :type account_period_year: int
    :param note: Note/comment for batch <span class='property-internal'>Must
     be between 0 and 255 characters</span>
    :type note: str
    """

    _validation = {
        'batch_code': {'required': True, 'max_length': 255, 'min_length': 0},
        'control_code': {'max_length': 255, 'min_length': 0},
        'invoice_number': {'max_length': 255, 'min_length': 0},
        'account_period_year': {'maximum': 2099, 'minimum': 1900},
        'note': {'max_length': 255, 'min_length': 0},
    }

    _attribute_map = {
        'batch_code': {'key': 'batchCode', 'type': 'str'},
        'close_existing_batch': {'key': 'closeExistingBatch', 'type': 'bool'},
        'statement_date': {'key': 'statementDate', 'type': 'iso-8601'},
        'due_date': {'key': 'dueDate', 'type': 'iso-8601'},
        'next_reading': {'key': 'nextReading', 'type': 'iso-8601'},
        'control_code': {'key': 'controlCode', 'type': 'str'},
        'invoice_number': {'key': 'invoiceNumber', 'type': 'str'},
        'account_period_number': {'key': 'accountPeriodNumber', 'type': 'int'},
        'account_period_year': {'key': 'accountPeriodYear', 'type': 'int'},
        'note': {'key': 'note', 'type': 'str'},
    }

    def __init__(self, **kwargs):
        super(BatchCreate, self).__init__(**kwargs)
        self.batch_code = kwargs.get('batch_code', None)
        self.close_existing_batch = kwargs.get('close_existing_batch', None)
        self.statement_date = kwargs.get('statement_date', None)
        self.due_date = kwargs.get('due_date', None)
        self.next_reading = kwargs.get('next_reading', None)
        self.control_code = kwargs.get('control_code', None)
        self.invoice_number = kwargs.get('invoice_number', None)
        self.account_period_number = kwargs.get('account_period_number', None)
        self.account_period_year = kwargs.get('account_period_year', None)
        self.note = kwargs.get('note', None)
