# 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 UpdateBGPPeerConnectionRequest(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 = {
        "ipaddress": "str",
        "asn": "int",
        "access_list": "str",
        "bgp_password": "str",
        "add_network_distance": "bool",
        "add_network_distance_direction": "str",
        "add_network_distance_hops": "int",
    }

    attribute_map = {
        "ipaddress": "ipaddress",
        "asn": "asn",
        "access_list": "access_list",
        "bgp_password": "bgp_password",
        "add_network_distance": "add_network_distance",
        "add_network_distance_direction": "add_network_distance_direction",
        "add_network_distance_hops": "add_network_distance_hops",
    }

    def __init__(
        self,
        ipaddress=None,
        asn=None,
        access_list=None,
        bgp_password=None,
        add_network_distance=None,
        add_network_distance_direction=None,
        add_network_distance_hops=None,
    ):  # noqa: E501
        """UpdateBGPPeerConnectionRequest - a model defined in OpenAPI"""  # noqa: E501

        self._ipaddress = None
        self._asn = None
        self._access_list = None
        self._bgp_password = None
        self._add_network_distance = None
        self._add_network_distance_direction = None
        self._add_network_distance_hops = None
        self.discriminator = None

        self.ipaddress = ipaddress
        self.asn = asn
        if access_list is not None:
            self.access_list = access_list
        if bgp_password is not None:
            self.bgp_password = bgp_password
        if add_network_distance is not None:
            self.add_network_distance = add_network_distance
        if add_network_distance_direction is not None:
            self.add_network_distance_direction = add_network_distance_direction
        if add_network_distance_hops is not None:
            self.add_network_distance_hops = add_network_distance_hops

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

        IP address of the desired BGP peer.  # noqa: E501

        :return: The ipaddress of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._ipaddress

    @ipaddress.setter
    def ipaddress(self, ipaddress):
        """Sets the ipaddress of this UpdateBGPPeerConnectionRequest.

        IP address of the desired BGP peer.  # noqa: E501

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

        self._ipaddress = ipaddress

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

        Autonomous system number assigned to device at ipaddress  # noqa: E501

        :return: The asn of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :rtype: int
        """
        return self._asn

    @asn.setter
    def asn(self, asn):
        """Sets the asn of this UpdateBGPPeerConnectionRequest.

        Autonomous system number assigned to device at ipaddress  # noqa: E501

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

        self._asn = asn

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

        List of \"in permit CIDR\" and/or \"out permit CIDR\" statements in a string delimited by \"\\n\"  # noqa: E501

        :return: The access_list of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._access_list

    @access_list.setter
    def access_list(self, access_list):
        """Sets the access_list of this UpdateBGPPeerConnectionRequest.

        List of \"in permit CIDR\" and/or \"out permit CIDR\" statements in a string delimited by \"\\n\"  # noqa: E501

        :param access_list: The access_list of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :type: str
        """

        self._access_list = access_list

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

        String to be agreed upon by both peers as a simple password.  # noqa: E501

        :return: The bgp_password of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._bgp_password

    @bgp_password.setter
    def bgp_password(self, bgp_password):
        """Sets the bgp_password of this UpdateBGPPeerConnectionRequest.

        String to be agreed upon by both peers as a simple password.  # noqa: E501

        :param bgp_password: The bgp_password of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :type: str
        """

        self._bgp_password = bgp_password

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

        Enable network distance for BGP peer  # noqa: E501

        :return: The add_network_distance of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :rtype: bool
        """
        return self._add_network_distance

    @add_network_distance.setter
    def add_network_distance(self, add_network_distance):
        """Sets the add_network_distance of this UpdateBGPPeerConnectionRequest.

        Enable network distance for BGP peer  # noqa: E501

        :param add_network_distance: The add_network_distance of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :type: bool
        """

        self._add_network_distance = add_network_distance

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

        Add distance direction for BGP peer  # noqa: E501

        :return: The add_network_distance_direction of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :rtype: str
        """
        return self._add_network_distance_direction

    @add_network_distance_direction.setter
    def add_network_distance_direction(self, add_network_distance_direction):
        """Sets the add_network_distance_direction of this UpdateBGPPeerConnectionRequest.

        Add distance direction for BGP peer  # noqa: E501

        :param add_network_distance_direction: The add_network_distance_direction of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :type: str
        """

        self._add_network_distance_direction = add_network_distance_direction

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

        Distance metric weight indicating distance in hops for BGP peer  # noqa: E501

        :return: The add_network_distance_hops of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :rtype: int
        """
        return self._add_network_distance_hops

    @add_network_distance_hops.setter
    def add_network_distance_hops(self, add_network_distance_hops):
        """Sets the add_network_distance_hops of this UpdateBGPPeerConnectionRequest.

        Distance metric weight indicating distance in hops for BGP peer  # noqa: E501

        :param add_network_distance_hops: The add_network_distance_hops of this UpdateBGPPeerConnectionRequest.  # noqa: E501
        :type: int
        """

        self._add_network_distance_hops = add_network_distance_hops

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

        return self.__dict__ == other.__dict__

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