# coding: utf-8

"""
    VNS3 Controller API

    Cohesive networks VNS3 API providing complete control of your network's addresses, routes, rules and edge  # noqa: E501

    The version of the OpenAPI document: 4.8
    Contact: solutions@cohesive.net
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class CreateRouteRequest(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        "cidr": "str",
        "description": "str",
        "interface": "str",
        "gateway": "str",
        "tunnel": "int",
        "advertise": "bool",
        "metric": "int",
    }

    attribute_map = {
        "cidr": "cidr",
        "description": "description",
        "interface": "interface",
        "gateway": "gateway",
        "tunnel": "tunnel",
        "advertise": "advertise",
        "metric": "metric",
    }

    def __init__(
        self,
        cidr=None,
        description=None,
        interface=None,
        gateway=None,
        tunnel=None,
        advertise=None,
        metric=None,
    ):  # noqa: E501
        """CreateRouteRequest - a model defined in OpenAPI"""  # noqa: E501

        self._cidr = None
        self._description = None
        self._interface = None
        self._gateway = None
        self._tunnel = None
        self._advertise = None
        self._metric = None
        self.discriminator = None

        self.cidr = cidr
        if description is not None:
            self.description = description
        if interface is not None:
            self.interface = interface
        if gateway is not None:
            self.gateway = gateway
        if tunnel is not None:
            self.tunnel = tunnel
        if advertise is not None:
            self.advertise = advertise
        if metric is not None:
            self.metric = metric

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

        CIDR of a route that the VNS3 Controller has access  to that it wants to publish throughout the  Routing tables of the overlay network   # noqa: E501

        :return: The cidr of this CreateRouteRequest.  # noqa: E501
        :rtype: str
        """
        return self._cidr

    @cidr.setter
    def cidr(self, cidr):
        """Sets the cidr of this CreateRouteRequest.

        CIDR of a route that the VNS3 Controller has access  to that it wants to publish throughout the  Routing tables of the overlay network   # noqa: E501

        :param cidr: The cidr of this CreateRouteRequest.  # noqa: E501
        :type: str
        """
        if cidr is None:
            raise ValueError(
                "Invalid value for `cidr`, must not be `None`"
            )  # noqa: E501

        self._cidr = cidr

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


        :return: The description of this CreateRouteRequest.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this CreateRouteRequest.


        :param description: The description of this CreateRouteRequest.  # noqa: E501
        :type: str
        """

        self._description = description

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

        Sets the interface where this route will be advertised.  # noqa: E501

        :return: The interface of this CreateRouteRequest.  # noqa: E501
        :rtype: str
        """
        return self._interface

    @interface.setter
    def interface(self, interface):
        """Sets the interface of this CreateRouteRequest.

        Sets the interface where this route will be advertised.  # noqa: E501

        :param interface: The interface of this CreateRouteRequest.  # noqa: E501
        :type: str
        """

        self._interface = interface

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

        If interface is set, a specific gateway address reachable from that interface  # noqa: E501

        :return: The gateway of this CreateRouteRequest.  # noqa: E501
        :rtype: str
        """
        return self._gateway

    @gateway.setter
    def gateway(self, gateway):
        """Sets the gateway of this CreateRouteRequest.

        If interface is set, a specific gateway address reachable from that interface  # noqa: E501

        :param gateway: The gateway of this CreateRouteRequest.  # noqa: E501
        :type: str
        """

        self._gateway = gateway

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

        numerical reference for the GRE endpoint id (must provide either tunnel OR interface)  # noqa: E501

        :return: The tunnel of this CreateRouteRequest.  # noqa: E501
        :rtype: int
        """
        return self._tunnel

    @tunnel.setter
    def tunnel(self, tunnel):
        """Sets the tunnel of this CreateRouteRequest.

        numerical reference for the GRE endpoint id (must provide either tunnel OR interface)  # noqa: E501

        :param tunnel: The tunnel of this CreateRouteRequest.  # noqa: E501
        :type: int
        """

        self._tunnel = tunnel

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

        advertise route to overlay network  # noqa: E501

        :return: The advertise of this CreateRouteRequest.  # noqa: E501
        :rtype: bool
        """
        return self._advertise

    @advertise.setter
    def advertise(self, advertise):
        """Sets the advertise of this CreateRouteRequest.

        advertise route to overlay network  # noqa: E501

        :param advertise: The advertise of this CreateRouteRequest.  # noqa: E501
        :type: bool
        """

        self._advertise = advertise

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

        weight for route  # noqa: E501

        :return: The metric of this CreateRouteRequest.  # noqa: E501
        :rtype: int
        """
        return self._metric

    @metric.setter
    def metric(self, metric):
        """Sets the metric of this CreateRouteRequest.

        weight for route  # noqa: E501

        :param metric: The metric of this CreateRouteRequest.  # noqa: E501
        :type: int
        """

        self._metric = metric

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

        for attr, _ in six.iteritems(self.openapi_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 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, CreateRouteRequest):
            return False

        return self.__dict__ == other.__dict__

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