# 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 UpdatePeerRequest(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 = {"id": "str", "name": "str", "overlay_mtu": "int", "force": "bool"}

    attribute_map = {
        "id": "id",
        "name": "name",
        "overlay_mtu": "overlay_mtu",
        "force": "force",
    }

    def __init__(self, id=None, name=None, overlay_mtu=None, force=None):  # noqa: E501
        """UpdatePeerRequest - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._name = None
        self._overlay_mtu = None
        self._force = None
        self.discriminator = None

        self.id = id
        self.name = name
        if overlay_mtu is not None:
            self.overlay_mtu = overlay_mtu
        if force is not None:
            self.force = force

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

        Manager ID as an integer of the the manager you are peering with,  NOT the id of the one you are calling from   # noqa: E501

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

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

        Manager ID as an integer of the the manager you are peering with,  NOT the id of the one you are calling from   # noqa: E501

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

        self._id = id

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

        IP address or host name of the one you are peering with.  # noqa: E501

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

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

        IP address or host name of the one you are peering with.  # noqa: E501

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

        self._name = name

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

        link MTU between 500 and 4800  # noqa: E501

        :return: The overlay_mtu of this UpdatePeerRequest.  # noqa: E501
        :rtype: int
        """
        return self._overlay_mtu

    @overlay_mtu.setter
    def overlay_mtu(self, overlay_mtu):
        """Sets the overlay_mtu of this UpdatePeerRequest.

        link MTU between 500 and 4800  # noqa: E501

        :param overlay_mtu: The overlay_mtu of this UpdatePeerRequest.  # noqa: E501
        :type: int
        """
        if overlay_mtu is not None and overlay_mtu > 48000:  # noqa: E501
            raise ValueError(
                "Invalid value for `overlay_mtu`, must be a value less than or equal to `48000`"
            )  # noqa: E501
        if overlay_mtu is not None and overlay_mtu < 500:  # noqa: E501
            raise ValueError(
                "Invalid value for `overlay_mtu`, must be a value greater than or equal to `500`"
            )  # noqa: E501

        self._overlay_mtu = overlay_mtu

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

        Setting false will NOT finalize the peering operation.  A peer \"reconfigure\" call would then be required. Default is true   # noqa: E501

        :return: The force of this UpdatePeerRequest.  # noqa: E501
        :rtype: bool
        """
        return self._force

    @force.setter
    def force(self, force):
        """Sets the force of this UpdatePeerRequest.

        Setting false will NOT finalize the peering operation.  A peer \"reconfigure\" call would then be required. Default is true   # noqa: E501

        :param force: The force of this UpdatePeerRequest.  # noqa: E501
        :type: bool
        """

        self._force = force

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

        return self.__dict__ == other.__dict__

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