# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from logs.models.base_model_ import Model
from logs.models.security_method import SecurityMethod
from logs import util

from logs.models.security_method import SecurityMethod  # noqa: E501

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

    Do not edit the class manually.
    """

    def __init__(self, ipv4_addr=None, ipv6_addr=None, port=None, security_methods=None):  # noqa: E501
        """InterfaceDescription - a model defined in OpenAPI

        :param ipv4_addr: The ipv4_addr of this InterfaceDescription.  # noqa: E501
        :type ipv4_addr: str
        :param ipv6_addr: The ipv6_addr of this InterfaceDescription.  # noqa: E501
        :type ipv6_addr: str
        :param port: The port of this InterfaceDescription.  # noqa: E501
        :type port: int
        :param security_methods: The security_methods of this InterfaceDescription.  # noqa: E501
        :type security_methods: List[SecurityMethod]
        """
        self.openapi_types = {
            'ipv4_addr': str,
            'ipv6_addr': str,
            'port': int,
            'security_methods': List[SecurityMethod]
        }

        self.attribute_map = {
            'ipv4_addr': 'ipv4Addr',
            'ipv6_addr': 'ipv6Addr',
            'port': 'port',
            'security_methods': 'securityMethods'
        }

        self._ipv4_addr = ipv4_addr
        self._ipv6_addr = ipv6_addr
        self._port = port
        self._security_methods = security_methods

    @classmethod
    def from_dict(cls, dikt) -> 'InterfaceDescription':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The InterfaceDescription of this InterfaceDescription.  # noqa: E501
        :rtype: InterfaceDescription
        """
        return util.deserialize_model(dikt, cls)

    @property
    def ipv4_addr(self):
        """Gets the ipv4_addr of this InterfaceDescription.

        string identifying a Ipv4 address formatted in the \"dotted decimal\" notation as defined in IETF RFC 1166.  # noqa: E501

        :return: The ipv4_addr of this InterfaceDescription.
        :rtype: str
        """
        return self._ipv4_addr

    @ipv4_addr.setter
    def ipv4_addr(self, ipv4_addr):
        """Sets the ipv4_addr of this InterfaceDescription.

        string identifying a Ipv4 address formatted in the \"dotted decimal\" notation as defined in IETF RFC 1166.  # noqa: E501

        :param ipv4_addr: The ipv4_addr of this InterfaceDescription.
        :type ipv4_addr: str
        """

        self._ipv4_addr = ipv4_addr

    @property
    def ipv6_addr(self):
        """Gets the ipv6_addr of this InterfaceDescription.

        string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used.  # noqa: E501

        :return: The ipv6_addr of this InterfaceDescription.
        :rtype: str
        """
        return self._ipv6_addr

    @ipv6_addr.setter
    def ipv6_addr(self, ipv6_addr):
        """Sets the ipv6_addr of this InterfaceDescription.

        string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used.  # noqa: E501

        :param ipv6_addr: The ipv6_addr of this InterfaceDescription.
        :type ipv6_addr: str
        """

        self._ipv6_addr = ipv6_addr

    @property
    def port(self):
        """Gets the port of this InterfaceDescription.

        Unsigned integer with valid values between 0 and 65535.  # noqa: E501

        :return: The port of this InterfaceDescription.
        :rtype: int
        """
        return self._port

    @port.setter
    def port(self, port):
        """Sets the port of this InterfaceDescription.

        Unsigned integer with valid values between 0 and 65535.  # noqa: E501

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

        self._port = port

    @property
    def security_methods(self):
        """Gets the security_methods of this InterfaceDescription.

        Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface.  # noqa: E501

        :return: The security_methods of this InterfaceDescription.
        :rtype: List[SecurityMethod]
        """
        return self._security_methods

    @security_methods.setter
    def security_methods(self, security_methods):
        """Sets the security_methods of this InterfaceDescription.

        Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface.  # noqa: E501

        :param security_methods: The security_methods of this InterfaceDescription.
        :type security_methods: List[SecurityMethod]
        """
        if security_methods is not None and len(security_methods) < 1:
            raise ValueError("Invalid value for `security_methods`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._security_methods = security_methods
