HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/lib/mysqlsh/lib/python3.8/site-packages/oci/mysql/models/rest_details.py
# coding: utf-8
# Copyright (c) 2016, 2025, 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: 20190415


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 RestDetails(object):
    """
    REST configuration details.
    """

    #: A constant which can be used with the configuration property of a RestDetails.
    #: This constant has a value of "DISABLED"
    CONFIGURATION_DISABLED = "DISABLED"

    #: A constant which can be used with the configuration property of a RestDetails.
    #: This constant has a value of "DBSYSTEM_ONLY"
    CONFIGURATION_DBSYSTEM_ONLY = "DBSYSTEM_ONLY"

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

        :param configuration:
            The value to assign to the configuration property of this RestDetails.
            Allowed values for this property are: "DISABLED", "DBSYSTEM_ONLY", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type configuration: str

        :param port:
            The value to assign to the port property of this RestDetails.
        :type port: int

        """
        self.swagger_types = {
            'configuration': 'str',
            'port': 'int'
        }
        self.attribute_map = {
            'configuration': 'configuration',
            'port': 'port'
        }
        self._configuration = None
        self._port = None

    @property
    def configuration(self):
        """
        **[Required]** Gets the configuration of this RestDetails.
        Select how REST is configured across the DB System instances.

        Allowed values for this property are: "DISABLED", "DBSYSTEM_ONLY", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The configuration of this RestDetails.
        :rtype: str
        """
        return self._configuration

    @configuration.setter
    def configuration(self, configuration):
        """
        Sets the configuration of this RestDetails.
        Select how REST is configured across the DB System instances.


        :param configuration: The configuration of this RestDetails.
        :type: str
        """
        allowed_values = ["DISABLED", "DBSYSTEM_ONLY"]
        if not value_allowed_none_or_none_sentinel(configuration, allowed_values):
            configuration = 'UNKNOWN_ENUM_VALUE'
        self._configuration = configuration

    @property
    def port(self):
        """
        Gets the port of this RestDetails.
        The port for REST to listen on. Supported port numbers are 443 and from 1024 to 65535.


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

    @port.setter
    def port(self, port):
        """
        Sets the port of this RestDetails.
        The port for REST to listen on. Supported port numbers are 443 and from 1024 to 65535.


        :param port: The port of this RestDetails.
        :type: int
        """
        self._port = port

    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