# coding: utf-8

"""
    Trip Planner

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

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


import pprint
import re  # noqa: F401

import six

from swagger_client.models.trip_request_response_journey_fare_ticket_properties import TripRequestResponseJourneyFareTicketProperties  # noqa: F401,E501


class TripRequestResponseJourneyFareTicket(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',
        'name': 'str',
        'comment': 'str',
        'currency': 'str',
        'price_level': 'str',
        'price_brutto': 'float',
        'price_netto': 'float',
        'tax_percent': 'int',
        'from_leg': 'int',
        'to_leg': 'int',
        'net': 'str',
        'person': 'str',
        'traveller_class': 'str',
        'time_validity': 'str',
        'valid_minutes': 'int',
        'is_short_haul': 'str',
        'returns_allowed': 'str',
        'valid_for_one_journey_only': 'str',
        'valid_for_one_operator_only': 'str',
        'number_of_changes': 'int',
        'name_validity_area': 'str',
        'properties': 'TripRequestResponseJourneyFareTicketProperties'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'comment': 'comment',
        'currency': 'currency',
        'price_level': 'priceLevel',
        'price_brutto': 'priceBrutto',
        'price_netto': 'priceNetto',
        'tax_percent': 'taxPercent',
        'from_leg': 'fromLeg',
        'to_leg': 'toLeg',
        'net': 'net',
        'person': 'person',
        'traveller_class': 'travellerClass',
        'time_validity': 'timeValidity',
        'valid_minutes': 'validMinutes',
        'is_short_haul': 'isShortHaul',
        'returns_allowed': 'returnsAllowed',
        'valid_for_one_journey_only': 'validForOneJourneyOnly',
        'valid_for_one_operator_only': 'validForOneOperatorOnly',
        'number_of_changes': 'numberOfChanges',
        'name_validity_area': 'nameValidityArea',
        'properties': 'properties'
    }

    def __init__(self, id=None, name=None, comment=None, currency=None, price_level=None, price_brutto=None, price_netto=None, tax_percent=None, from_leg=None, to_leg=None, net=None, person=None, traveller_class=None, time_validity=None, valid_minutes=None, is_short_haul=None, returns_allowed=None, valid_for_one_journey_only=None, valid_for_one_operator_only=None, number_of_changes=None, name_validity_area=None, properties=None):  # noqa: E501
        """TripRequestResponseJourneyFareTicket - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._name = None
        self._comment = None
        self._currency = None
        self._price_level = None
        self._price_brutto = None
        self._price_netto = None
        self._tax_percent = None
        self._from_leg = None
        self._to_leg = None
        self._net = None
        self._person = None
        self._traveller_class = None
        self._time_validity = None
        self._valid_minutes = None
        self._is_short_haul = None
        self._returns_allowed = None
        self._valid_for_one_journey_only = None
        self._valid_for_one_operator_only = None
        self._number_of_changes = None
        self._name_validity_area = None
        self._properties = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if comment is not None:
            self.comment = comment
        if currency is not None:
            self.currency = currency
        if price_level is not None:
            self.price_level = price_level
        if price_brutto is not None:
            self.price_brutto = price_brutto
        if price_netto is not None:
            self.price_netto = price_netto
        if tax_percent is not None:
            self.tax_percent = tax_percent
        if from_leg is not None:
            self.from_leg = from_leg
        if to_leg is not None:
            self.to_leg = to_leg
        if net is not None:
            self.net = net
        if person is not None:
            self.person = person
        if traveller_class is not None:
            self.traveller_class = traveller_class
        if time_validity is not None:
            self.time_validity = time_validity
        if valid_minutes is not None:
            self.valid_minutes = valid_minutes
        if is_short_haul is not None:
            self.is_short_haul = is_short_haul
        if returns_allowed is not None:
            self.returns_allowed = returns_allowed
        if valid_for_one_journey_only is not None:
            self.valid_for_one_journey_only = valid_for_one_journey_only
        if valid_for_one_operator_only is not None:
            self.valid_for_one_operator_only = valid_for_one_operator_only
        if number_of_changes is not None:
            self.number_of_changes = number_of_changes
        if name_validity_area is not None:
            self.name_validity_area = name_validity_area
        if properties is not None:
            self.properties = properties

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

        This ID uniquely identifies the ticket type, based on the of traveller, mode of transport and the time of day.    # noqa: E501

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

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

        This ID uniquely identifies the ticket type, based on the of traveller, mode of transport and the time of day.    # noqa: E501

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

        self._id = id

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

        This describes the type of fare, which will be for Opal card.   # noqa: E501

        :return: The name of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this TripRequestResponseJourneyFareTicket.

        This describes the type of fare, which will be for Opal card.   # noqa: E501

        :param name: The name of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Additional information about the ticket type.   # noqa: E501

        :return: The comment of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this TripRequestResponseJourneyFareTicket.

        Additional information about the ticket type.   # noqa: E501

        :param comment: The comment of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: str
        """

        self._comment = comment

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

        The currency used for all pricing contained within this ticket. All prices are in Australian dollars (`AUD`).   # noqa: E501

        :return: The currency of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this TripRequestResponseJourneyFareTicket.

        The currency used for all pricing contained within this ticket. All prices are in Australian dollars (`AUD`).   # noqa: E501

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

        self._currency = currency

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

        XXX  # noqa: E501

        :return: The price_level of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._price_level

    @price_level.setter
    def price_level(self, price_level):
        """Sets the price_level of this TripRequestResponseJourneyFareTicket.

        XXX  # noqa: E501

        :param price_level: The price_level of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: str
        """

        self._price_level = price_level

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

        Total tariff amount for this ticket (i.e. not including extra charges such as station access fee). 'Brutto' means 'Gross' in German.   # noqa: E501

        :return: The price_brutto of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: float
        """
        return self._price_brutto

    @price_brutto.setter
    def price_brutto(self, price_brutto):
        """Sets the price_brutto of this TripRequestResponseJourneyFareTicket.

        Total tariff amount for this ticket (i.e. not including extra charges such as station access fee). 'Brutto' means 'Gross' in German.   # noqa: E501

        :param price_brutto: The price_brutto of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: float
        """

        self._price_brutto = price_brutto

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

        The net tariff amount for this ticket. This is currently at 0 as it related to the tax percentage.   # noqa: E501

        :return: The price_netto of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: float
        """
        return self._price_netto

    @price_netto.setter
    def price_netto(self, price_netto):
        """Sets the price_netto of this TripRequestResponseJourneyFareTicket.

        The net tariff amount for this ticket. This is currently at 0 as it related to the tax percentage.   # noqa: E501

        :param price_netto: The price_netto of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: float
        """

        self._price_netto = price_netto

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

        This is the amount of tax applied to the fare. Currently this will be 0 in all cases.   # noqa: E501

        :return: The tax_percent of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: int
        """
        return self._tax_percent

    @tax_percent.setter
    def tax_percent(self, tax_percent):
        """Sets the tax_percent of this TripRequestResponseJourneyFareTicket.

        This is the amount of tax applied to the fare. Currently this will be 0 in all cases.   # noqa: E501

        :param tax_percent: The tax_percent of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: int
        """

        self._tax_percent = tax_percent

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

        This value contains a 0-based index of the starting leg for this fare. For example, if there are 3 legs and the first two are covered by a single fare and the final by another, there will be one ticket with a `fromLeg` of `0` and a `toLeg` of `1`, and the second will have a value of `2` for both `fromLeg` and `toLeg`.    # noqa: E501

        :return: The from_leg of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: int
        """
        return self._from_leg

    @from_leg.setter
    def from_leg(self, from_leg):
        """Sets the from_leg of this TripRequestResponseJourneyFareTicket.

        This value contains a 0-based index of the starting leg for this fare. For example, if there are 3 legs and the first two are covered by a single fare and the final by another, there will be one ticket with a `fromLeg` of `0` and a `toLeg` of `1`, and the second will have a value of `2` for both `fromLeg` and `toLeg`.    # noqa: E501

        :param from_leg: The from_leg of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: int
        """

        self._from_leg = from_leg

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

        This value contains a 0-based index of the starting leg for this fare. For example, if there are 3 legs and the first two are covered by a single fare and the final by another, there will be one ticket with a `fromLeg` of `0` and a `toLeg` of `1`, and the second will have a value of `2` for both `fromLeg` and `toLeg`.    # noqa: E501

        :return: The to_leg of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: int
        """
        return self._to_leg

    @to_leg.setter
    def to_leg(self, to_leg):
        """Sets the to_leg of this TripRequestResponseJourneyFareTicket.

        This value contains a 0-based index of the starting leg for this fare. For example, if there are 3 legs and the first two are covered by a single fare and the final by another, there will be one ticket with a `fromLeg` of `0` and a `toLeg` of `1`, and the second will have a value of `2` for both `fromLeg` and `toLeg`.    # noqa: E501

        :param to_leg: The to_leg of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: int
        """

        self._to_leg = to_leg

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

        XXX  # noqa: E501

        :return: The net of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._net

    @net.setter
    def net(self, net):
        """Sets the net of this TripRequestResponseJourneyFareTicket.

        XXX  # noqa: E501

        :param net: The net of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: str
        """

        self._net = net

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

        This is the type of traveller the ticket applies to.  # noqa: E501

        :return: The person of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._person

    @person.setter
    def person(self, person):
        """Sets the person of this TripRequestResponseJourneyFareTicket.

        This is the type of traveller the ticket applies to.  # noqa: E501

        :param person: The person of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: str
        """
        allowed_values = ["ADULT", "CHILD", "SCHOLAR", "SENIOR"]  # noqa: E501
        if person not in allowed_values:
            raise ValueError(
                "Invalid value for `person` ({0}), must be one of {1}"  # noqa: E501
                .format(person, allowed_values)
            )

        self._person = person

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

        This indicates the class (e.g. first class, second class), but is not currently used.   # noqa: E501

        :return: The traveller_class of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._traveller_class

    @traveller_class.setter
    def traveller_class(self, traveller_class):
        """Sets the traveller_class of this TripRequestResponseJourneyFareTicket.

        This indicates the class (e.g. first class, second class), but is not currently used.   # noqa: E501

        :param traveller_class: The traveller_class of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: str
        """

        self._traveller_class = traveller_class

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

        This describes how long the ticket is valid for. Not currently used.  # noqa: E501

        :return: The time_validity of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._time_validity

    @time_validity.setter
    def time_validity(self, time_validity):
        """Sets the time_validity of this TripRequestResponseJourneyFareTicket.

        This describes how long the ticket is valid for. Not currently used.  # noqa: E501

        :param time_validity: The time_validity of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: str
        """

        self._time_validity = time_validity

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

        This describes how long in minutes the ticket is valid for. Not currently used.  # noqa: E501

        :return: The valid_minutes of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: int
        """
        return self._valid_minutes

    @valid_minutes.setter
    def valid_minutes(self, valid_minutes):
        """Sets the valid_minutes of this TripRequestResponseJourneyFareTicket.

        This describes how long in minutes the ticket is valid for. Not currently used.  # noqa: E501

        :param valid_minutes: The valid_minutes of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: int
        """

        self._valid_minutes = valid_minutes

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

        Whether or not the trip is short haul. Not currently used.  # noqa: E501

        :return: The is_short_haul of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._is_short_haul

    @is_short_haul.setter
    def is_short_haul(self, is_short_haul):
        """Sets the is_short_haul of this TripRequestResponseJourneyFareTicket.

        Whether or not the trip is short haul. Not currently used.  # noqa: E501

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

        self._is_short_haul = is_short_haul

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

        Whether or not the ticket allows you to make the return journey also. Not currently used.  # noqa: E501

        :return: The returns_allowed of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._returns_allowed

    @returns_allowed.setter
    def returns_allowed(self, returns_allowed):
        """Sets the returns_allowed of this TripRequestResponseJourneyFareTicket.

        Whether or not the ticket allows you to make the return journey also. Not currently used.  # noqa: E501

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

        self._returns_allowed = returns_allowed

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

        Whether or not the ticket is a single journey ticket only. Not currently used.  # noqa: E501

        :return: The valid_for_one_journey_only of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._valid_for_one_journey_only

    @valid_for_one_journey_only.setter
    def valid_for_one_journey_only(self, valid_for_one_journey_only):
        """Sets the valid_for_one_journey_only of this TripRequestResponseJourneyFareTicket.

        Whether or not the ticket is a single journey ticket only. Not currently used.  # noqa: E501

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

        self._valid_for_one_journey_only = valid_for_one_journey_only

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

        Whether or not the ticket will only work for a single operator. Not currently used.  # noqa: E501

        :return: The valid_for_one_operator_only of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._valid_for_one_operator_only

    @valid_for_one_operator_only.setter
    def valid_for_one_operator_only(self, valid_for_one_operator_only):
        """Sets the valid_for_one_operator_only of this TripRequestResponseJourneyFareTicket.

        Whether or not the ticket will only work for a single operator. Not currently used.  # noqa: E501

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

        self._valid_for_one_operator_only = valid_for_one_operator_only

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

        The number of transfers allowed with this ticket. Not currently used.  # noqa: E501

        :return: The number_of_changes of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: int
        """
        return self._number_of_changes

    @number_of_changes.setter
    def number_of_changes(self, number_of_changes):
        """Sets the number_of_changes of this TripRequestResponseJourneyFareTicket.

        The number of transfers allowed with this ticket. Not currently used.  # noqa: E501

        :param number_of_changes: The number_of_changes of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: int
        """

        self._number_of_changes = number_of_changes

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

        Not currently used.  # noqa: E501

        :return: The name_validity_area of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: str
        """
        return self._name_validity_area

    @name_validity_area.setter
    def name_validity_area(self, name_validity_area):
        """Sets the name_validity_area of this TripRequestResponseJourneyFareTicket.

        Not currently used.  # noqa: E501

        :param name_validity_area: The name_validity_area of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: str
        """

        self._name_validity_area = name_validity_area

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


        :return: The properties of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :rtype: TripRequestResponseJourneyFareTicketProperties
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this TripRequestResponseJourneyFareTicket.


        :param properties: The properties of this TripRequestResponseJourneyFareTicket.  # noqa: E501
        :type: TripRequestResponseJourneyFareTicketProperties
        """

        self._properties = properties

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

        return self.__dict__ == other.__dict__

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