# 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: 20230222


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 UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails(object):
    """
    The content of the Database Tools database API gateway config global sub resource to be updated.
    """

    #: A constant which can be used with the type property of a UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
    #: This constant has a value of "DEFAULT"
    TYPE_DEFAULT = "DEFAULT"

    #: A constant which can be used with the pool_route property of a UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
    #: This constant has a value of "PATH"
    POOL_ROUTE_PATH = "PATH"

    #: A constant which can be used with the pool_route property of a UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
    #: This constant has a value of "HEADER"
    POOL_ROUTE_HEADER = "HEADER"

    #: A constant which can be used with the database_api_status property of a UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
    #: This constant has a value of "ENABLED"
    DATABASE_API_STATUS_ENABLED = "ENABLED"

    #: A constant which can be used with the database_api_status property of a UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
    #: This constant has a value of "DISABLED"
    DATABASE_API_STATUS_DISABLED = "DISABLED"

    def __init__(self, **kwargs):
        """
        Initializes a new UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input
        to a service operations then you should favor using a subclass over the base class:

        * :class:`~oci.database_tools_runtime.models.UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDefaultDetails`

        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param type:
            The value to assign to the type property of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
            Allowed values for this property are: "DEFAULT"
        :type type: str

        :param pool_route:
            The value to assign to the pool_route property of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
            Allowed values for this property are: "PATH", "HEADER"
        :type pool_route: str

        :param pool_routing_header:
            The value to assign to the pool_routing_header property of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type pool_routing_header: str

        :param database_api_status:
            The value to assign to the database_api_status property of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
            Allowed values for this property are: "ENABLED", "DISABLED"
        :type database_api_status: str

        :param http_port:
            The value to assign to the http_port property of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type http_port: int

        :param https_port:
            The value to assign to the https_port property of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type https_port: int

        :param certificate_bundle:
            The value to assign to the certificate_bundle property of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type certificate_bundle: oci.database_tools_runtime.models.DatabaseApiGatewayConfigCertificateBundle

        :param document_root:
            The value to assign to the document_root property of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type document_root: str

        :param advanced_properties:
            The value to assign to the advanced_properties property of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type advanced_properties: dict(str, str)

        """
        self.swagger_types = {
            'type': 'str',
            'pool_route': 'str',
            'pool_routing_header': 'str',
            'database_api_status': 'str',
            'http_port': 'int',
            'https_port': 'int',
            'certificate_bundle': 'DatabaseApiGatewayConfigCertificateBundle',
            'document_root': 'str',
            'advanced_properties': 'dict(str, str)'
        }
        self.attribute_map = {
            'type': 'type',
            'pool_route': 'poolRoute',
            'pool_routing_header': 'poolRoutingHeader',
            'database_api_status': 'databaseApiStatus',
            'http_port': 'httpPort',
            'https_port': 'httpsPort',
            'certificate_bundle': 'certificateBundle',
            'document_root': 'documentRoot',
            'advanced_properties': 'advancedProperties'
        }
        self._type = None
        self._pool_route = None
        self._pool_routing_header = None
        self._database_api_status = None
        self._http_port = None
        self._https_port = None
        self._certificate_bundle = None
        self._document_root = None
        self._advanced_properties = None

    @staticmethod
    def get_subtype(object_dictionary):
        """
        Given the hash representation of a subtype of this class,
        use the info in the hash to return the class of the subtype.
        """
        type = object_dictionary['type']

        if type == 'DEFAULT':
            return 'UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDefaultDetails'
        else:
            return 'UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails'

    @property
    def type(self):
        """
        **[Required]** Gets the type of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        The type of the Database Tools database API gateway config global settings resource.

        Allowed values for this property are: "DEFAULT"


        :return: The type of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        The type of the Database Tools database API gateway config global settings resource.


        :param type: The type of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type: str
        """
        allowed_values = ["DEFAULT"]
        if not value_allowed_none_or_none_sentinel(type, allowed_values):
            raise ValueError(
                f"Invalid value for `type`, must be None or one of {allowed_values}"
            )
        self._type = type

    @property
    def pool_route(self):
        """
        Gets the pool_route of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        How the target pool route value is determined for a HTTP request.

        Allowed values for this property are: "PATH", "HEADER"


        :return: The pool_route of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :rtype: str
        """
        return self._pool_route

    @pool_route.setter
    def pool_route(self, pool_route):
        """
        Sets the pool_route of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        How the target pool route value is determined for a HTTP request.


        :param pool_route: The pool_route of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type: str
        """
        allowed_values = ["PATH", "HEADER"]
        if not value_allowed_none_or_none_sentinel(pool_route, allowed_values):
            raise ValueError(
                f"Invalid value for `pool_route`, must be None or one of {allowed_values}"
            )
        self._pool_route = pool_route

    @property
    def pool_routing_header(self):
        """
        Gets the pool_routing_header of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        The request header name providing the pool route value.


        :return: The pool_routing_header of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :rtype: str
        """
        return self._pool_routing_header

    @pool_routing_header.setter
    def pool_routing_header(self, pool_routing_header):
        """
        Sets the pool_routing_header of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        The request header name providing the pool route value.


        :param pool_routing_header: The pool_routing_header of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type: str
        """
        self._pool_routing_header = pool_routing_header

    @property
    def database_api_status(self):
        """
        Gets the database_api_status of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        ORDS database API is a database management and monitoring REST API. Database Actions requires this feature.

        Allowed values for this property are: "ENABLED", "DISABLED"


        :return: The database_api_status of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :rtype: str
        """
        return self._database_api_status

    @database_api_status.setter
    def database_api_status(self, database_api_status):
        """
        Sets the database_api_status of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        ORDS database API is a database management and monitoring REST API. Database Actions requires this feature.


        :param database_api_status: The database_api_status of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type: str
        """
        allowed_values = ["ENABLED", "DISABLED"]
        if not value_allowed_none_or_none_sentinel(database_api_status, allowed_values):
            raise ValueError(
                f"Invalid value for `database_api_status`, must be None or one of {allowed_values}"
            )
        self._database_api_status = database_api_status

    @property
    def http_port(self):
        """
        Gets the http_port of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        Specifies the HTTP listen port. 0 disables HTTP. Use of ports below 1024 requires elevated (root) privileges and is generally discouraged; deployment on non-privileged ports (1024\u201365535) is recommended.


        :return: The http_port of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :rtype: int
        """
        return self._http_port

    @http_port.setter
    def http_port(self, http_port):
        """
        Sets the http_port of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        Specifies the HTTP listen port. 0 disables HTTP. Use of ports below 1024 requires elevated (root) privileges and is generally discouraged; deployment on non-privileged ports (1024\u201365535) is recommended.


        :param http_port: The http_port of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type: int
        """
        self._http_port = http_port

    @property
    def https_port(self):
        """
        Gets the https_port of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        Specifies the HTTPS listen port. 0 disables HTTPS. Use of ports below 1024 requires elevated (root) privileges and is generally discouraged; deployment on non-privileged ports (1024\u201365535) is recommended. ORDS will use a self-signed certificate if a certificate bundle is not provided.


        :return: The https_port of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :rtype: int
        """
        return self._https_port

    @https_port.setter
    def https_port(self, https_port):
        """
        Sets the https_port of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        Specifies the HTTPS listen port. 0 disables HTTPS. Use of ports below 1024 requires elevated (root) privileges and is generally discouraged; deployment on non-privileged ports (1024\u201365535) is recommended. ORDS will use a self-signed certificate if a certificate bundle is not provided.


        :param https_port: The https_port of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type: int
        """
        self._https_port = https_port

    @property
    def certificate_bundle(self):
        """
        Gets the certificate_bundle of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.

        :return: The certificate_bundle of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :rtype: oci.database_tools_runtime.models.DatabaseApiGatewayConfigCertificateBundle
        """
        return self._certificate_bundle

    @certificate_bundle.setter
    def certificate_bundle(self, certificate_bundle):
        """
        Sets the certificate_bundle of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.

        :param certificate_bundle: The certificate_bundle of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type: oci.database_tools_runtime.models.DatabaseApiGatewayConfigCertificateBundle
        """
        self._certificate_bundle = certificate_bundle

    @property
    def document_root(self):
        """
        Gets the document_root of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        The location of the static resources to be served under the / root server path.


        :return: The document_root of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :rtype: str
        """
        return self._document_root

    @document_root.setter
    def document_root(self, document_root):
        """
        Sets the document_root of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        The location of the static resources to be served under the / root server path.


        :param document_root: The document_root of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type: str
        """
        self._document_root = document_root

    @property
    def advanced_properties(self):
        """
        Gets the advanced_properties of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        Advanced global properties.


        :return: The advanced_properties of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :rtype: dict(str, str)
        """
        return self._advanced_properties

    @advanced_properties.setter
    def advanced_properties(self, advanced_properties):
        """
        Sets the advanced_properties of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        Advanced global properties.


        :param advanced_properties: The advanced_properties of this UpdateDatabaseToolsDatabaseApiGatewayConfigGlobalDetails.
        :type: dict(str, str)
        """
        self._advanced_properties = advanced_properties

    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
