# 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.parent_location import ParentLocation  # noqa: F401,E501


class AdditionalInfoResponseAffectedStop(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',
        'type': 'str',
        'parent': 'ParentLocation'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'type': 'type',
        'parent': 'parent'
    }

    def __init__(self, id=None, name=None, type=None, parent=None):  # noqa: E501
        """AdditionalInfoResponseAffectedStop - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._name = None
        self._type = None
        self._parent = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if type is not None:
            self.type = type
        if parent is not None:
            self.parent = parent

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

        This the unique ID of the stop that is affected. It is the same ID that is used elsewhere in the system, such as in `XML_TRIP_REQUEST2` or `XML_STOPFINDER_REQUEST`.    # noqa: E501

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

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

        This the unique ID of the stop that is affected. It is the same ID that is used elsewhere in the system, such as in `XML_TRIP_REQUEST2` or `XML_STOPFINDER_REQUEST`.    # noqa: E501

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

        self._id = id

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

        This is the title of the affected stop.  # noqa: E501

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

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

        This is the title of the affected stop.  # noqa: E501

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

        self._name = name

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

        The type of the location that is affected.  # noqa: E501

        :return: The type of this AdditionalInfoResponseAffectedStop.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this AdditionalInfoResponseAffectedStop.

        The type of the location that is affected.  # noqa: E501

        :param type: The type of this AdditionalInfoResponseAffectedStop.  # noqa: E501
        :type: str
        """
        allowed_values = ["poi", "singlehouse", "stop", "platform", "street", "locality", "location", "gisPoint", "unknown"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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

        If available, contains information about this location's parent location. For example, if the stop has a type of `platform`, then this field may contain information about the station in which the platform is located.   # noqa: E501

        :return: The parent of this AdditionalInfoResponseAffectedStop.  # noqa: E501
        :rtype: ParentLocation
        """
        return self._parent

    @parent.setter
    def parent(self, parent):
        """Sets the parent of this AdditionalInfoResponseAffectedStop.

        If available, contains information about this location's parent location. For example, if the stop has a type of `platform`, then this field may contain information about the station in which the platform is located.   # noqa: E501

        :param parent: The parent of this AdditionalInfoResponseAffectedStop.  # noqa: E501
        :type: ParentLocation
        """

        self._parent = parent

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

        return self.__dict__ == other.__dict__

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