# coding: utf-8

"""
    syntropy-controller

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

import pprint
import re  # noqa: F401

import six


class WgAddPeerArgs(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 = {
        "endpoint_port": "float",
        "endpoint_ipv4": "str",
        "allowed_ips": "list[str]",
        "public_key": "str",
        "ifname": "str",
        "gw_ipv4": "str",
    }

    attribute_map = {
        "endpoint_port": "endpoint_port",
        "endpoint_ipv4": "endpoint_ipv4",
        "allowed_ips": "allowed_ips",
        "public_key": "public_key",
        "ifname": "ifname",
        "gw_ipv4": "gw_ipv4",
    }

    def __init__(
        self,
        endpoint_port=None,
        endpoint_ipv4=None,
        allowed_ips=None,
        public_key=None,
        ifname=None,
        gw_ipv4=None,
    ):  # noqa: E501
        """WgAddPeerArgs - a model defined in Swagger"""  # noqa: E501
        self._endpoint_port = None
        self._endpoint_ipv4 = None
        self._allowed_ips = None
        self._public_key = None
        self._ifname = None
        self._gw_ipv4 = None
        self.discriminator = None
        self.endpoint_port = endpoint_port
        self.endpoint_ipv4 = endpoint_ipv4
        self.allowed_ips = allowed_ips
        self.public_key = public_key
        self.ifname = ifname
        self.gw_ipv4 = gw_ipv4

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


        :return: The endpoint_port of this WgAddPeerArgs.  # noqa: E501
        :rtype: float
        """
        return self._endpoint_port

    @endpoint_port.setter
    def endpoint_port(self, endpoint_port):
        """Sets the endpoint_port of this WgAddPeerArgs.


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

        self._endpoint_port = endpoint_port

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


        :return: The endpoint_ipv4 of this WgAddPeerArgs.  # noqa: E501
        :rtype: str
        """
        return self._endpoint_ipv4

    @endpoint_ipv4.setter
    def endpoint_ipv4(self, endpoint_ipv4):
        """Sets the endpoint_ipv4 of this WgAddPeerArgs.


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

        self._endpoint_ipv4 = endpoint_ipv4

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


        :return: The allowed_ips of this WgAddPeerArgs.  # noqa: E501
        :rtype: list[str]
        """
        return self._allowed_ips

    @allowed_ips.setter
    def allowed_ips(self, allowed_ips):
        """Sets the allowed_ips of this WgAddPeerArgs.


        :param allowed_ips: The allowed_ips of this WgAddPeerArgs.  # noqa: E501
        :type: list[str]
        """
        if allowed_ips is None:
            raise ValueError(
                "Invalid value for `allowed_ips`, must not be `None`"
            )  # noqa: E501

        self._allowed_ips = allowed_ips

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


        :return: The public_key of this WgAddPeerArgs.  # noqa: E501
        :rtype: str
        """
        return self._public_key

    @public_key.setter
    def public_key(self, public_key):
        """Sets the public_key of this WgAddPeerArgs.


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

        self._public_key = public_key

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


        :return: The ifname of this WgAddPeerArgs.  # noqa: E501
        :rtype: str
        """
        return self._ifname

    @ifname.setter
    def ifname(self, ifname):
        """Sets the ifname of this WgAddPeerArgs.


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

        self._ifname = ifname

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


        :return: The gw_ipv4 of this WgAddPeerArgs.  # noqa: E501
        :rtype: str
        """
        return self._gw_ipv4

    @gw_ipv4.setter
    def gw_ipv4(self, gw_ipv4):
        """Sets the gw_ipv4 of this WgAddPeerArgs.


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

        self._gw_ipv4 = gw_ipv4

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

        return self.__dict__ == other.__dict__

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