# coding: utf-8

"""
    vault/kernel/core_api/proto/v1/accounts/core_api_account_schedule_tags.proto

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: version not set
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class V1PostingInstructionBatch(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'id': 'str',
        'create_request_id': 'str',
        'client_id': 'str',
        'client_batch_id': 'str',
        'posting_instructions': 'list[V1PostingInstruction]',
        'batch_details': 'dict(str, str)',
        'value_timestamp': 'datetime',
        'status': 'V1PostingInstructionBatchStatus',
        'error': 'V1PostingInstructionBatchError',
        'insertion_timestamp': 'datetime',
        'dry_run': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'create_request_id': 'create_request_id',
        'client_id': 'client_id',
        'client_batch_id': 'client_batch_id',
        'posting_instructions': 'posting_instructions',
        'batch_details': 'batch_details',
        'value_timestamp': 'value_timestamp',
        'status': 'status',
        'error': 'error',
        'insertion_timestamp': 'insertion_timestamp',
        'dry_run': 'dry_run'
    }

    def __init__(self, id=None, create_request_id=None, client_id=None, client_batch_id=None, posting_instructions=None, batch_details=None, value_timestamp=None, status=None, error=None, insertion_timestamp=None, dry_run=None):  # noqa: E501
        """V1PostingInstructionBatch - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._create_request_id = None
        self._client_id = None
        self._client_batch_id = None
        self._posting_instructions = None
        self._batch_details = None
        self._value_timestamp = None
        self._status = None
        self._error = None
        self._insertion_timestamp = None
        self._dry_run = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if create_request_id is not None:
            self.create_request_id = create_request_id
        if client_id is not None:
            self.client_id = client_id
        if client_batch_id is not None:
            self.client_batch_id = client_batch_id
        if posting_instructions is not None:
            self.posting_instructions = posting_instructions
        if batch_details is not None:
            self.batch_details = batch_details
        if value_timestamp is not None:
            self.value_timestamp = value_timestamp
        if status is not None:
            self.status = status
        if error is not None:
            self.error = error
        if insertion_timestamp is not None:
            self.insertion_timestamp = insertion_timestamp
        if dry_run is not None:
            self.dry_run = dry_run

    @property
    def id(self):
        """Gets the id of this V1PostingInstructionBatch.  # noqa: E501

        Uniquely identifies a posting instruction batch in Vault.  # noqa: E501

        :return: The id of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this V1PostingInstructionBatch.

        Uniquely identifies a posting instruction batch in Vault.  # noqa: E501

        :param id: The id of this V1PostingInstructionBatch.  # noqa: E501
        :type: str
        """

        self._id = id

    @property
    def create_request_id(self):
        """Gets the create_request_id of this V1PostingInstructionBatch.  # noqa: E501

        The `request_id` of the `create-posting-instruction-batch` request.  # noqa: E501

        :return: The create_request_id of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: str
        """
        return self._create_request_id

    @create_request_id.setter
    def create_request_id(self, create_request_id):
        """Sets the create_request_id of this V1PostingInstructionBatch.

        The `request_id` of the `create-posting-instruction-batch` request.  # noqa: E501

        :param create_request_id: The create_request_id of this V1PostingInstructionBatch.  # noqa: E501
        :type: str
        """

        self._create_request_id = create_request_id

    @property
    def client_id(self):
        """Gets the client_id of this V1PostingInstructionBatch.  # noqa: E501

        Uniquely identifies a client of the Posting API. Used to publish responses to the specified Kafka response topic. Together with `request_id` it forms a unique key used for idempotency. Required.  # noqa: E501

        :return: The client_id of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: str
        """
        return self._client_id

    @client_id.setter
    def client_id(self, client_id):
        """Sets the client_id of this V1PostingInstructionBatch.

        Uniquely identifies a client of the Posting API. Used to publish responses to the specified Kafka response topic. Together with `request_id` it forms a unique key used for idempotency. Required.  # noqa: E501

        :param client_id: The client_id of this V1PostingInstructionBatch.  # noqa: E501
        :type: str
        """

        self._client_id = client_id

    @property
    def client_batch_id(self):
        """Gets the client_batch_id of this V1PostingInstructionBatch.  # noqa: E501

        This must be set by the client, and is used as a correlation ID across different posting instruction batches. The suggested use is to set the same `client_batch_id` across batches that contain posting instructions for the same financial transaction. The posting service provides indexing on this ID, allowing for efficient queries to return all posting instructions that belong to a client transaction. Required.  # noqa: E501

        :return: The client_batch_id of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: str
        """
        return self._client_batch_id

    @client_batch_id.setter
    def client_batch_id(self, client_batch_id):
        """Sets the client_batch_id of this V1PostingInstructionBatch.

        This must be set by the client, and is used as a correlation ID across different posting instruction batches. The suggested use is to set the same `client_batch_id` across batches that contain posting instructions for the same financial transaction. The posting service provides indexing on this ID, allowing for efficient queries to return all posting instructions that belong to a client transaction. Required.  # noqa: E501

        :param client_batch_id: The client_batch_id of this V1PostingInstructionBatch.  # noqa: E501
        :type: str
        """

        self._client_batch_id = client_batch_id

    @property
    def posting_instructions(self):
        """Gets the posting_instructions of this V1PostingInstructionBatch.  # noqa: E501

        A non-empty list of posting instruction objects to be processed atomically. Required.  # noqa: E501

        :return: The posting_instructions of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: list[V1PostingInstruction]
        """
        return self._posting_instructions

    @posting_instructions.setter
    def posting_instructions(self, posting_instructions):
        """Sets the posting_instructions of this V1PostingInstructionBatch.

        A non-empty list of posting instruction objects to be processed atomically. Required.  # noqa: E501

        :param posting_instructions: The posting_instructions of this V1PostingInstructionBatch.  # noqa: E501
        :type: list[V1PostingInstruction]
        """

        self._posting_instructions = posting_instructions

    @property
    def batch_details(self):
        """Gets the batch_details of this V1PostingInstructionBatch.  # noqa: E501

        Stores metadata related to the posting instruction batch resource. These details can also be retrieved in the posting instruction resource. Optional.  # noqa: E501

        :return: The batch_details of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._batch_details

    @batch_details.setter
    def batch_details(self, batch_details):
        """Sets the batch_details of this V1PostingInstructionBatch.

        Stores metadata related to the posting instruction batch resource. These details can also be retrieved in the posting instruction resource. Optional.  # noqa: E501

        :param batch_details: The batch_details of this V1PostingInstructionBatch.  # noqa: E501
        :type: dict(str, str)
        """

        self._batch_details = batch_details

    @property
    def value_timestamp(self):
        """Gets the value_timestamp of this V1PostingInstructionBatch.  # noqa: E501

        Specifies the time at which all committed postings of this batch's posting instructions should affect balances. Optional; defaults to the system current timestamp in UTC.  # noqa: E501

        :return: The value_timestamp of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: datetime
        """
        return self._value_timestamp

    @value_timestamp.setter
    def value_timestamp(self, value_timestamp):
        """Sets the value_timestamp of this V1PostingInstructionBatch.

        Specifies the time at which all committed postings of this batch's posting instructions should affect balances. Optional; defaults to the system current timestamp in UTC.  # noqa: E501

        :param value_timestamp: The value_timestamp of this V1PostingInstructionBatch.  # noqa: E501
        :type: datetime
        """

        self._value_timestamp = value_timestamp

    @property
    def status(self):
        """Gets the status of this V1PostingInstructionBatch.  # noqa: E501


        :return: The status of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: V1PostingInstructionBatchStatus
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this V1PostingInstructionBatch.


        :param status: The status of this V1PostingInstructionBatch.  # noqa: E501
        :type: V1PostingInstructionBatchStatus
        """

        self._status = status

    @property
    def error(self):
        """Gets the error of this V1PostingInstructionBatch.  # noqa: E501


        :return: The error of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: V1PostingInstructionBatchError
        """
        return self._error

    @error.setter
    def error(self, error):
        """Sets the error of this V1PostingInstructionBatch.


        :param error: The error of this V1PostingInstructionBatch.  # noqa: E501
        :type: V1PostingInstructionBatchError
        """

        self._error = error

    @property
    def insertion_timestamp(self):
        """Gets the insertion_timestamp of this V1PostingInstructionBatch.  # noqa: E501

        Specifies the time this posting instruction batch was inserted in Vault.  # noqa: E501

        :return: The insertion_timestamp of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: datetime
        """
        return self._insertion_timestamp

    @insertion_timestamp.setter
    def insertion_timestamp(self, insertion_timestamp):
        """Sets the insertion_timestamp of this V1PostingInstructionBatch.

        Specifies the time this posting instruction batch was inserted in Vault.  # noqa: E501

        :param insertion_timestamp: The insertion_timestamp of this V1PostingInstructionBatch.  # noqa: E501
        :type: datetime
        """

        self._insertion_timestamp = insertion_timestamp

    @property
    def dry_run(self):
        """Gets the dry_run of this V1PostingInstructionBatch.  # noqa: E501

        If true, the `create-posting-instruction-batch` request did not have any side effects and no posting instruction batch resource was created.  # noqa: E501

        :return: The dry_run of this V1PostingInstructionBatch.  # noqa: E501
        :rtype: bool
        """
        return self._dry_run

    @dry_run.setter
    def dry_run(self, dry_run):
        """Sets the dry_run of this V1PostingInstructionBatch.

        If true, the `create-posting-instruction-batch` request did not have any side effects and no posting instruction batch resource was created.  # noqa: E501

        :param dry_run: The dry_run of this V1PostingInstructionBatch.  # noqa: E501
        :type: bool
        """

        self._dry_run = dry_run

    def to_dict(self):
        """Returns the model properties as a dict"""
        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()
                ))
            else:
                result[attr] = value
        if issubclass(V1PostingInstructionBatch, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, V1PostingInstructionBatch):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
