# coding: utf-8

"""
    CyberSource Merged Spec

    All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html

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


from pprint import pformat
from six import iteritems
import re


class Riskv1authenticationsTravelInformation(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 = {
        'legs': 'list[Riskv1decisionsTravelInformationLegs]',
        'number_of_passengers': 'int',
        'passengers': 'list[Riskv1decisionsTravelInformationPassengers]'
    }

    attribute_map = {
        'legs': 'legs',
        'number_of_passengers': 'numberOfPassengers',
        'passengers': 'passengers'
    }

    def __init__(self, legs=None, number_of_passengers=None, passengers=None):
        """
        Riskv1authenticationsTravelInformation - a model defined in Swagger
        """

        self._legs = None
        self._number_of_passengers = None
        self._passengers = None

        if legs is not None:
          self.legs = legs
        if number_of_passengers is not None:
          self.number_of_passengers = number_of_passengers
        if passengers is not None:
          self.passengers = passengers

    @property
    def legs(self):
        """
        Gets the legs of this Riskv1authenticationsTravelInformation.

        :return: The legs of this Riskv1authenticationsTravelInformation.
        :rtype: list[Riskv1decisionsTravelInformationLegs]
        """
        return self._legs

    @legs.setter
    def legs(self, legs):
        """
        Sets the legs of this Riskv1authenticationsTravelInformation.

        :param legs: The legs of this Riskv1authenticationsTravelInformation.
        :type: list[Riskv1decisionsTravelInformationLegs]
        """

        self._legs = legs

    @property
    def number_of_passengers(self):
        """
        Gets the number_of_passengers of this Riskv1authenticationsTravelInformation.
        Number of passengers for whom the ticket was issued. If you do not include this field in your request, CyberSource uses a default value of 1. Required for American Express SafeKey (U.S.) for travel-related requests. 

        :return: The number_of_passengers of this Riskv1authenticationsTravelInformation.
        :rtype: int
        """
        return self._number_of_passengers

    @number_of_passengers.setter
    def number_of_passengers(self, number_of_passengers):
        """
        Sets the number_of_passengers of this Riskv1authenticationsTravelInformation.
        Number of passengers for whom the ticket was issued. If you do not include this field in your request, CyberSource uses a default value of 1. Required for American Express SafeKey (U.S.) for travel-related requests. 

        :param number_of_passengers: The number_of_passengers of this Riskv1authenticationsTravelInformation.
        :type: int
        """

        self._number_of_passengers = number_of_passengers

    @property
    def passengers(self):
        """
        Gets the passengers of this Riskv1authenticationsTravelInformation.

        :return: The passengers of this Riskv1authenticationsTravelInformation.
        :rtype: list[Riskv1decisionsTravelInformationPassengers]
        """
        return self._passengers

    @passengers.setter
    def passengers(self, passengers):
        """
        Sets the passengers of this Riskv1authenticationsTravelInformation.

        :param passengers: The passengers of this Riskv1authenticationsTravelInformation.
        :type: list[Riskv1decisionsTravelInformationPassengers]
        """

        self._passengers = passengers

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

        return self.__dict__ == other.__dict__

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