# coding: utf-8

"""
    Amadeus Travel Innovation Sandbox

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

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


from pprint import pformat
from six import iteritems
import re


class TrainSearchPricing(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 = {
        'service_class': 'str',
        'booking_code': 'str',
        'accomodation': 'str',
        'total_price': 'Amount',
        'rate': 'RestrictedRate'
    }

    attribute_map = {
        'service_class': 'service_class',
        'booking_code': 'booking_code',
        'accomodation': 'accomodation',
        'total_price': 'total_price',
        'rate': 'rate'
    }

    def __init__(self, service_class=None, booking_code=None, accomodation=None, total_price=None, rate=None):
        """
        TrainSearchPricing - a model defined in Swagger
        """

        self._service_class = None
        self._booking_code = None
        self._accomodation = None
        self._total_price = None
        self._rate = None

        self.service_class = service_class
        self.booking_code = booking_code
        self.accomodation = accomodation
        self.total_price = total_price
        self.rate = rate

    @property
    def service_class(self):
        """
        Gets the service_class of this TrainSearchPricing.
        A standard enumeration of the type of seat, bed or service the passenger can expect.

        :return: The service_class of this TrainSearchPricing.
        :rtype: str
        """
        return self._service_class

    @service_class.setter
    def service_class(self, service_class):
        """
        Sets the service_class of this TrainSearchPricing.
        A standard enumeration of the type of seat, bed or service the passenger can expect.

        :param service_class: The service_class of this TrainSearchPricing.
        :type: str
        """
        if service_class is None:
            raise ValueError("Invalid value for `service_class`, must not be `None`")

        self._service_class = service_class

    @property
    def booking_code(self):
        """
        Gets the booking_code of this TrainSearchPricing.
        A code the identifies the type of booking class being used.

        :return: The booking_code of this TrainSearchPricing.
        :rtype: str
        """
        return self._booking_code

    @booking_code.setter
    def booking_code(self, booking_code):
        """
        Sets the booking_code of this TrainSearchPricing.
        A code the identifies the type of booking class being used.

        :param booking_code: The booking_code of this TrainSearchPricing.
        :type: str
        """
        if booking_code is None:
            raise ValueError("Invalid value for `booking_code`, must not be `None`")

        self._booking_code = booking_code

    @property
    def accomodation(self):
        """
        Gets the accomodation of this TrainSearchPricing.
        A standard enumeration of the mode in which the passenger is accommodated. For example&colon; SEAT, BERTH, CABIN, CARGO, UNKNOWN.

        :return: The accomodation of this TrainSearchPricing.
        :rtype: str
        """
        return self._accomodation

    @accomodation.setter
    def accomodation(self, accomodation):
        """
        Sets the accomodation of this TrainSearchPricing.
        A standard enumeration of the mode in which the passenger is accommodated. For example&colon; SEAT, BERTH, CABIN, CARGO, UNKNOWN.

        :param accomodation: The accomodation of this TrainSearchPricing.
        :type: str
        """
        if accomodation is None:
            raise ValueError("Invalid value for `accomodation`, must not be `None`")

        self._accomodation = accomodation

    @property
    def total_price(self):
        """
        Gets the total_price of this TrainSearchPricing.
        The total cost of this service.

        :return: The total_price of this TrainSearchPricing.
        :rtype: Amount
        """
        return self._total_price

    @total_price.setter
    def total_price(self, total_price):
        """
        Sets the total_price of this TrainSearchPricing.
        The total cost of this service.

        :param total_price: The total_price of this TrainSearchPricing.
        :type: Amount
        """
        if total_price is None:
            raise ValueError("Invalid value for `total_price`, must not be `None`")

        self._total_price = total_price

    @property
    def rate(self):
        """
        Gets the rate of this TrainSearchPricing.
        A rate identifying type of charge being levied for this service, and the restrictions that apply.

        :return: The rate of this TrainSearchPricing.
        :rtype: RestrictedRate
        """
        return self._rate

    @rate.setter
    def rate(self, rate):
        """
        Sets the rate of this TrainSearchPricing.
        A rate identifying type of charge being levied for this service, and the restrictions that apply.

        :param rate: The rate of this TrainSearchPricing.
        :type: RestrictedRate
        """
        if rate is None:
            raise ValueError("Invalid value for `rate`, must not be `None`")

        self._rate = rate

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, TrainSearchPricing):
            return False

        return self.__dict__ == other.__dict__

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