# coding: utf-8
# Copyright (c) 2016, 2026, Oracle and/or its affiliates.  All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.

# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220919


from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel  # noqa: F401
from oci.decorators import init_model_state_from_kwargs


@init_model_state_from_kwargs
class OlvmBootProtocol(object):
    """
    Defines the options of the IP address assignment method to a NIC.
    """

    #: A constant which can be used with the protocol property of a OlvmBootProtocol.
    #: This constant has a value of "AUTOCONF"
    PROTOCOL_AUTOCONF = "AUTOCONF"

    #: A constant which can be used with the protocol property of a OlvmBootProtocol.
    #: This constant has a value of "DHCP"
    PROTOCOL_DHCP = "DHCP"

    #: A constant which can be used with the protocol property of a OlvmBootProtocol.
    #: This constant has a value of "NONE"
    PROTOCOL_NONE = "NONE"

    #: A constant which can be used with the protocol property of a OlvmBootProtocol.
    #: This constant has a value of "POLY_DHCP_AUTOCONF"
    PROTOCOL_POLY_DHCP_AUTOCONF = "POLY_DHCP_AUTOCONF"

    #: A constant which can be used with the protocol property of a OlvmBootProtocol.
    #: This constant has a value of "STATIC"
    PROTOCOL_STATIC = "STATIC"

    def __init__(self, **kwargs):
        """
        Initializes a new OlvmBootProtocol object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param protocol:
            The value to assign to the protocol property of this OlvmBootProtocol.
            Allowed values for this property are: "AUTOCONF", "DHCP", "NONE", "POLY_DHCP_AUTOCONF", "STATIC"
        :type protocol: str

        """
        self.swagger_types = {
            'protocol': 'str'
        }
        self.attribute_map = {
            'protocol': 'protocol'
        }
        self._protocol = None

    @property
    def protocol(self):
        """
        Gets the protocol of this OlvmBootProtocol.
        IP address assignment methods to a NIC.

        Allowed values for this property are: "AUTOCONF", "DHCP", "NONE", "POLY_DHCP_AUTOCONF", "STATIC"


        :return: The protocol of this OlvmBootProtocol.
        :rtype: str
        """
        return self._protocol

    @protocol.setter
    def protocol(self, protocol):
        """
        Sets the protocol of this OlvmBootProtocol.
        IP address assignment methods to a NIC.


        :param protocol: The protocol of this OlvmBootProtocol.
        :type: str
        """
        allowed_values = ["AUTOCONF", "DHCP", "NONE", "POLY_DHCP_AUTOCONF", "STATIC"]
        if not value_allowed_none_or_none_sentinel(protocol, allowed_values):
            raise ValueError(
                f"Invalid value for `protocol`, must be None or one of {allowed_values}"
            )
        self._protocol = protocol

    def __repr__(self):
        return formatted_flat_dict(self)

    def __eq__(self, other):
        if other is None:
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not self == other
