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


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 InfrastructureServer(object):
    """
    Database Infrastructure Server details.
    """

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "CREATING"
    LIFECYCLE_STATE_CREATING = "CREATING"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "REQUIRES_VALIDATION"
    LIFECYCLE_STATE_REQUIRES_VALIDATION = "REQUIRES_VALIDATION"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "VALIDATING"
    LIFECYCLE_STATE_VALIDATING = "VALIDATING"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "VALIDATION_FAILED"
    LIFECYCLE_STATE_VALIDATION_FAILED = "VALIDATION_FAILED"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "REQUIRES_ACTIVATION"
    LIFECYCLE_STATE_REQUIRES_ACTIVATION = "REQUIRES_ACTIVATION"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "ACTIVATING"
    LIFECYCLE_STATE_ACTIVATING = "ACTIVATING"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "ACTIVE"
    LIFECYCLE_STATE_ACTIVE = "ACTIVE"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "ACTIVATION_FAILED"
    LIFECYCLE_STATE_ACTIVATION_FAILED = "ACTIVATION_FAILED"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "FAILED"
    LIFECYCLE_STATE_FAILED = "FAILED"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "UPDATING"
    LIFECYCLE_STATE_UPDATING = "UPDATING"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "DELETING"
    LIFECYCLE_STATE_DELETING = "DELETING"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "DELETED"
    LIFECYCLE_STATE_DELETED = "DELETED"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "DISCONNECTED"
    LIFECYCLE_STATE_DISCONNECTED = "DISCONNECTED"

    #: A constant which can be used with the lifecycle_state property of a InfrastructureServer.
    #: This constant has a value of "MAINTENANCE_IN_PROGRESS"
    LIFECYCLE_STATE_MAINTENANCE_IN_PROGRESS = "MAINTENANCE_IN_PROGRESS"

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

        :param id:
            The value to assign to the id property of this InfrastructureServer.
        :type id: str

        :param server_name:
            The value to assign to the server_name property of this InfrastructureServer.
        :type server_name: str

        :param server_ip_address:
            The value to assign to the server_ip_address property of this InfrastructureServer.
        :type server_ip_address: str

        :param ilom_name:
            The value to assign to the ilom_name property of this InfrastructureServer.
        :type ilom_name: str

        :param ilom_ip_address:
            The value to assign to the ilom_ip_address property of this InfrastructureServer.
        :type ilom_ip_address: str

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this InfrastructureServer.
            Allowed values for this property are: "CREATING", "REQUIRES_VALIDATION", "VALIDATING", "VALIDATION_FAILED", "REQUIRES_ACTIVATION", "ACTIVATING", "ACTIVE", "ACTIVATION_FAILED", "FAILED", "UPDATING", "DELETING", "DELETED", "DISCONNECTED", "MAINTENANCE_IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type lifecycle_state: str

        :param base_vm_count:
            The value to assign to the base_vm_count property of this InfrastructureServer.
        :type base_vm_count: int

        :param instance_vm_count:
            The value to assign to the instance_vm_count property of this InfrastructureServer.
        :type instance_vm_count: int

        :param compute_capacity:
            The value to assign to the compute_capacity property of this InfrastructureServer.
        :type compute_capacity: oci.datacc.models.ComputeCapacityDetails

        """
        self.swagger_types = {
            'id': 'str',
            'server_name': 'str',
            'server_ip_address': 'str',
            'ilom_name': 'str',
            'ilom_ip_address': 'str',
            'lifecycle_state': 'str',
            'base_vm_count': 'int',
            'instance_vm_count': 'int',
            'compute_capacity': 'ComputeCapacityDetails'
        }
        self.attribute_map = {
            'id': 'id',
            'server_name': 'serverName',
            'server_ip_address': 'serverIpAddress',
            'ilom_name': 'ilomName',
            'ilom_ip_address': 'ilomIpAddress',
            'lifecycle_state': 'lifecycleState',
            'base_vm_count': 'baseVmCount',
            'instance_vm_count': 'instanceVmCount',
            'compute_capacity': 'computeCapacity'
        }
        self._id = None
        self._server_name = None
        self._server_ip_address = None
        self._ilom_name = None
        self._ilom_ip_address = None
        self._lifecycle_state = None
        self._base_vm_count = None
        self._instance_vm_count = None
        self._compute_capacity = None

    @property
    def id(self):
        """
        **[Required]** Gets the id of this InfrastructureServer.
        The `OCID`__ of the Oracle Data Server of Infrastructure.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :return: The id of this InfrastructureServer.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this InfrastructureServer.
        The `OCID`__ of the Oracle Data Server of Infrastructure.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :param id: The id of this InfrastructureServer.
        :type: str
        """
        self._id = id

    @property
    def server_name(self):
        """
        **[Required]** Gets the server_name of this InfrastructureServer.
        Database Infrastructure Server name.


        :return: The server_name of this InfrastructureServer.
        :rtype: str
        """
        return self._server_name

    @server_name.setter
    def server_name(self, server_name):
        """
        Sets the server_name of this InfrastructureServer.
        Database Infrastructure Server name.


        :param server_name: The server_name of this InfrastructureServer.
        :type: str
        """
        self._server_name = server_name

    @property
    def server_ip_address(self):
        """
        **[Required]** Gets the server_ip_address of this InfrastructureServer.
        Database Infrastructure Server IP address.


        :return: The server_ip_address of this InfrastructureServer.
        :rtype: str
        """
        return self._server_ip_address

    @server_ip_address.setter
    def server_ip_address(self, server_ip_address):
        """
        Sets the server_ip_address of this InfrastructureServer.
        Database Infrastructure Server IP address.


        :param server_ip_address: The server_ip_address of this InfrastructureServer.
        :type: str
        """
        self._server_ip_address = server_ip_address

    @property
    def ilom_name(self):
        """
        **[Required]** Gets the ilom_name of this InfrastructureServer.
        Database Infrastructure Server ILOM name.


        :return: The ilom_name of this InfrastructureServer.
        :rtype: str
        """
        return self._ilom_name

    @ilom_name.setter
    def ilom_name(self, ilom_name):
        """
        Sets the ilom_name of this InfrastructureServer.
        Database Infrastructure Server ILOM name.


        :param ilom_name: The ilom_name of this InfrastructureServer.
        :type: str
        """
        self._ilom_name = ilom_name

    @property
    def ilom_ip_address(self):
        """
        **[Required]** Gets the ilom_ip_address of this InfrastructureServer.
        Database Infrastructure Server ILOM IP address.


        :return: The ilom_ip_address of this InfrastructureServer.
        :rtype: str
        """
        return self._ilom_ip_address

    @ilom_ip_address.setter
    def ilom_ip_address(self, ilom_ip_address):
        """
        Sets the ilom_ip_address of this InfrastructureServer.
        Database Infrastructure Server ILOM IP address.


        :param ilom_ip_address: The ilom_ip_address of this InfrastructureServer.
        :type: str
        """
        self._ilom_ip_address = ilom_ip_address

    @property
    def lifecycle_state(self):
        """
        **[Required]** Gets the lifecycle_state of this InfrastructureServer.
        The current state of the Database Infrastructure server.

        Allowed values for this property are: "CREATING", "REQUIRES_VALIDATION", "VALIDATING", "VALIDATION_FAILED", "REQUIRES_ACTIVATION", "ACTIVATING", "ACTIVE", "ACTIVATION_FAILED", "FAILED", "UPDATING", "DELETING", "DELETED", "DISCONNECTED", "MAINTENANCE_IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The lifecycle_state of this InfrastructureServer.
        :rtype: str
        """
        return self._lifecycle_state

    @lifecycle_state.setter
    def lifecycle_state(self, lifecycle_state):
        """
        Sets the lifecycle_state of this InfrastructureServer.
        The current state of the Database Infrastructure server.


        :param lifecycle_state: The lifecycle_state of this InfrastructureServer.
        :type: str
        """
        allowed_values = ["CREATING", "REQUIRES_VALIDATION", "VALIDATING", "VALIDATION_FAILED", "REQUIRES_ACTIVATION", "ACTIVATING", "ACTIVE", "ACTIVATION_FAILED", "FAILED", "UPDATING", "DELETING", "DELETED", "DISCONNECTED", "MAINTENANCE_IN_PROGRESS"]
        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
        self._lifecycle_state = lifecycle_state

    @property
    def base_vm_count(self):
        """
        Gets the base_vm_count of this InfrastructureServer.
        Number of database virtual machines hosted on the server.


        :return: The base_vm_count of this InfrastructureServer.
        :rtype: int
        """
        return self._base_vm_count

    @base_vm_count.setter
    def base_vm_count(self, base_vm_count):
        """
        Sets the base_vm_count of this InfrastructureServer.
        Number of database virtual machines hosted on the server.


        :param base_vm_count: The base_vm_count of this InfrastructureServer.
        :type: int
        """
        self._base_vm_count = base_vm_count

    @property
    def instance_vm_count(self):
        """
        Gets the instance_vm_count of this InfrastructureServer.
        Number of instances hosted on the server.


        :return: The instance_vm_count of this InfrastructureServer.
        :rtype: int
        """
        return self._instance_vm_count

    @instance_vm_count.setter
    def instance_vm_count(self, instance_vm_count):
        """
        Sets the instance_vm_count of this InfrastructureServer.
        Number of instances hosted on the server.


        :param instance_vm_count: The instance_vm_count of this InfrastructureServer.
        :type: int
        """
        self._instance_vm_count = instance_vm_count

    @property
    def compute_capacity(self):
        """
        Gets the compute_capacity of this InfrastructureServer.

        :return: The compute_capacity of this InfrastructureServer.
        :rtype: oci.datacc.models.ComputeCapacityDetails
        """
        return self._compute_capacity

    @compute_capacity.setter
    def compute_capacity(self, compute_capacity):
        """
        Sets the compute_capacity of this InfrastructureServer.

        :param compute_capacity: The compute_capacity of this InfrastructureServer.
        :type: oci.datacc.models.ComputeCapacityDetails
        """
        self._compute_capacity = compute_capacity

    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
