# coding: utf-8

"""
    Getir-Locals Integration Swagger Documentation

    This documentation is created by Getir Developers for Getir-Locals Integration.For this integration, you need to take CLIENT NAME and CLIENT SECRET keys from Getir-dev team and use these keys for authentication. You also need to use access token provided after successful login to be able to use all other endpoints  You can view information about the active order through /orders/unapproved endpoints. The status of the order is managed via verify, prepare, handover and cancel endpoints. Details on order management are as follows:  For orders to be made by the Getir courier, the flow is as follows:  Supplier confirms order --verify<br />Supplier prepares order --prepare (1-2 minutes must pass before delivery)<br />Supplier hands over the order to Getir courier --handover<br />For Getir delivery, transactions are made by the Getir courier after handover.  A valid reason will be requested from the supplier to cancel an order. Valid reasons may vary depending on the instant status of the order. For this reason, before canceling an order, you have to get instant valid order cancellation reasons from /orders/{orderId}/cancel-options endpoint.   # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ApiResponsePriceAndQuantityBatchResponse(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 = {
        'batch_request_id': 'str',
        'status': 'str',
        'total_count': 'int',
        'products': 'list[PriceAndQuantityBatchProductResponse]',
        'success_ratio': 'float',
        'fail_ratio': 'float',
        'duplicate_count': 'int'
    }

    attribute_map = {
        'batch_request_id': 'batchRequestId',
        'status': 'status',
        'total_count': 'totalCount',
        'products': 'products',
        'success_ratio': 'successRatio',
        'fail_ratio': 'failRatio',
        'duplicate_count': 'duplicateCount'
    }

    def __init__(self, batch_request_id=None, status=None, total_count=None, products=None, success_ratio=None, fail_ratio=None, duplicate_count=None):  # noqa: E501
        """ApiResponsePriceAndQuantityBatchResponse - a model defined in Swagger"""  # noqa: E501
        self._batch_request_id = None
        self._status = None
        self._total_count = None
        self._products = None
        self._success_ratio = None
        self._fail_ratio = None
        self._duplicate_count = None
        self.discriminator = None
        if batch_request_id is not None:
            self.batch_request_id = batch_request_id
        if status is not None:
            self.status = status
        if total_count is not None:
            self.total_count = total_count
        if products is not None:
            self.products = products
        if success_ratio is not None:
            self.success_ratio = success_ratio
        if fail_ratio is not None:
            self.fail_ratio = fail_ratio
        if duplicate_count is not None:
            self.duplicate_count = duplicate_count

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


        :return: The batch_request_id of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :rtype: str
        """
        return self._batch_request_id

    @batch_request_id.setter
    def batch_request_id(self, batch_request_id):
        """Sets the batch_request_id of this ApiResponsePriceAndQuantityBatchResponse.


        :param batch_request_id: The batch_request_id of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :type: str
        """

        self._batch_request_id = batch_request_id

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


        :return: The status of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :rtype: str
        """
        return self._status

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


        :param status: The status of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :type: str
        """
        allowed_values = ["IN_PROGRESS", "COMPLETED"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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


        :return: The total_count of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :rtype: int
        """
        return self._total_count

    @total_count.setter
    def total_count(self, total_count):
        """Sets the total_count of this ApiResponsePriceAndQuantityBatchResponse.


        :param total_count: The total_count of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :type: int
        """

        self._total_count = total_count

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


        :return: The products of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :rtype: list[PriceAndQuantityBatchProductResponse]
        """
        return self._products

    @products.setter
    def products(self, products):
        """Sets the products of this ApiResponsePriceAndQuantityBatchResponse.


        :param products: The products of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :type: list[PriceAndQuantityBatchProductResponse]
        """

        self._products = products

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


        :return: The success_ratio of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :rtype: float
        """
        return self._success_ratio

    @success_ratio.setter
    def success_ratio(self, success_ratio):
        """Sets the success_ratio of this ApiResponsePriceAndQuantityBatchResponse.


        :param success_ratio: The success_ratio of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :type: float
        """

        self._success_ratio = success_ratio

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


        :return: The fail_ratio of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :rtype: float
        """
        return self._fail_ratio

    @fail_ratio.setter
    def fail_ratio(self, fail_ratio):
        """Sets the fail_ratio of this ApiResponsePriceAndQuantityBatchResponse.


        :param fail_ratio: The fail_ratio of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :type: float
        """

        self._fail_ratio = fail_ratio

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


        :return: The duplicate_count of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :rtype: int
        """
        return self._duplicate_count

    @duplicate_count.setter
    def duplicate_count(self, duplicate_count):
        """Sets the duplicate_count of this ApiResponsePriceAndQuantityBatchResponse.


        :param duplicate_count: The duplicate_count of this ApiResponsePriceAndQuantityBatchResponse.  # noqa: E501
        :type: int
        """

        self._duplicate_count = duplicate_count

    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(ApiResponsePriceAndQuantityBatchResponse, 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, ApiResponsePriceAndQuantityBatchResponse):
            return False

        return self.__dict__ == other.__dict__

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