# coding: utf-8
import pprint
import six
from enum import Enum



class TransactionLineItemUpdateRequest:

    swagger_types = {
    
        'new_line_items': 'list[LineItemCreate]',
        'transaction_id': 'int',
    }

    attribute_map = {
        'new_line_items': 'newLineItems','transaction_id': 'transactionId',
    }

    
    _new_line_items = None
    _transaction_id = None

    def __init__(self, **kwargs):
        self.discriminator = None
        
        self.new_line_items = kwargs.get('new_line_items', None)
        self.transaction_id = kwargs.get('transaction_id')

        

    
    @property
    def new_line_items(self):
        """Gets the new_line_items of this TransactionLineItemUpdateRequest.

            

        :return: The new_line_items of this TransactionLineItemUpdateRequest.
        :rtype: list[LineItemCreate]
        """
        return self._new_line_items

    @new_line_items.setter
    def new_line_items(self, new_line_items):
        """Sets the new_line_items of this TransactionLineItemUpdateRequest.

            

        :param new_line_items: The new_line_items of this TransactionLineItemUpdateRequest.
        :type: list[LineItemCreate]
        """

        self._new_line_items = new_line_items
    
    @property
    def transaction_id(self):
        """Gets the transaction_id of this TransactionLineItemUpdateRequest.

            

        :return: The transaction_id of this TransactionLineItemUpdateRequest.
        :rtype: int
        """
        return self._transaction_id

    @transaction_id.setter
    def transaction_id(self, transaction_id):
        """Sets the transaction_id of this TransactionLineItemUpdateRequest.

            

        :param transaction_id: The transaction_id of this TransactionLineItemUpdateRequest.
        :type: int
        """
        if transaction_id is None:
            raise ValueError("Invalid value for `transaction_id`, must not be `None`")

        self._transaction_id = transaction_id
    

    def to_dict(self):
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            elif isinstance(value, Enum):
                result[attr] = value.value
            else:
                result[attr] = value
        if issubclass(TransactionLineItemUpdateRequest, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        return self.to_str()

    def __eq__(self, other):
        if not isinstance(other, TransactionLineItemUpdateRequest):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not self == other
