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


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 ShardPeerWithExadbXs(object):
    """
    Details of the shard peer
    """

    #: A constant which can be used with the status property of a ShardPeerWithExadbXs.
    #: This constant has a value of "FAILED"
    STATUS_FAILED = "FAILED"

    #: A constant which can be used with the status property of a ShardPeerWithExadbXs.
    #: This constant has a value of "DELETING"
    STATUS_DELETING = "DELETING"

    #: A constant which can be used with the status property of a ShardPeerWithExadbXs.
    #: This constant has a value of "DELETED"
    STATUS_DELETED = "DELETED"

    #: A constant which can be used with the status property of a ShardPeerWithExadbXs.
    #: This constant has a value of "UPDATING"
    STATUS_UPDATING = "UPDATING"

    #: A constant which can be used with the status property of a ShardPeerWithExadbXs.
    #: This constant has a value of "CREATING"
    STATUS_CREATING = "CREATING"

    #: A constant which can be used with the status property of a ShardPeerWithExadbXs.
    #: This constant has a value of "CREATED"
    STATUS_CREATED = "CREATED"

    #: A constant which can be used with the status property of a ShardPeerWithExadbXs.
    #: This constant has a value of "READY_FOR_CONFIGURATION"
    STATUS_READY_FOR_CONFIGURATION = "READY_FOR_CONFIGURATION"

    #: A constant which can be used with the status property of a ShardPeerWithExadbXs.
    #: This constant has a value of "CONFIGURED"
    STATUS_CONFIGURED = "CONFIGURED"

    #: A constant which can be used with the status property of a ShardPeerWithExadbXs.
    #: This constant has a value of "NEEDS_ATTENTION"
    STATUS_NEEDS_ATTENTION = "NEEDS_ATTENTION"

    #: A constant which can be used with the protection_mode property of a ShardPeerWithExadbXs.
    #: This constant has a value of "MAXIMUM_AVAILABILITY"
    PROTECTION_MODE_MAXIMUM_AVAILABILITY = "MAXIMUM_AVAILABILITY"

    #: A constant which can be used with the protection_mode property of a ShardPeerWithExadbXs.
    #: This constant has a value of "MAXIMUM_PERFORMANCE"
    PROTECTION_MODE_MAXIMUM_PERFORMANCE = "MAXIMUM_PERFORMANCE"

    #: A constant which can be used with the protection_mode property of a ShardPeerWithExadbXs.
    #: This constant has a value of "MAXIMUM_PROTECTION"
    PROTECTION_MODE_MAXIMUM_PROTECTION = "MAXIMUM_PROTECTION"

    #: A constant which can be used with the transport_type property of a ShardPeerWithExadbXs.
    #: This constant has a value of "SYNC"
    TRANSPORT_TYPE_SYNC = "SYNC"

    #: A constant which can be used with the transport_type property of a ShardPeerWithExadbXs.
    #: This constant has a value of "ASYNC"
    TRANSPORT_TYPE_ASYNC = "ASYNC"

    #: A constant which can be used with the transport_type property of a ShardPeerWithExadbXs.
    #: This constant has a value of "FASTSYNC"
    TRANSPORT_TYPE_FASTSYNC = "FASTSYNC"

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

        :param vm_cluster_id:
            The value to assign to the vm_cluster_id property of this ShardPeerWithExadbXs.
        :type vm_cluster_id: str

        :param shard_group:
            The value to assign to the shard_group property of this ShardPeerWithExadbXs.
        :type shard_group: str

        :param status:
            The value to assign to the status property of this ShardPeerWithExadbXs.
            Allowed values for this property are: "FAILED", "DELETING", "DELETED", "UPDATING", "CREATING", "CREATED", "READY_FOR_CONFIGURATION", "CONFIGURED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type status: str

        :param supporting_resource_id:
            The value to assign to the supporting_resource_id property of this ShardPeerWithExadbXs.
        :type supporting_resource_id: str

        :param container_database_id:
            The value to assign to the container_database_id property of this ShardPeerWithExadbXs.
        :type container_database_id: str

        :param time_created:
            The value to assign to the time_created property of this ShardPeerWithExadbXs.
        :type time_created: datetime

        :param time_updated:
            The value to assign to the time_updated property of this ShardPeerWithExadbXs.
        :type time_updated: datetime

        :param protection_mode:
            The value to assign to the protection_mode property of this ShardPeerWithExadbXs.
            Allowed values for this property are: "MAXIMUM_AVAILABILITY", "MAXIMUM_PERFORMANCE", "MAXIMUM_PROTECTION", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type protection_mode: str

        :param transport_type:
            The value to assign to the transport_type property of this ShardPeerWithExadbXs.
            Allowed values for this property are: "SYNC", "ASYNC", "FASTSYNC", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type transport_type: str

        :param metadata:
            The value to assign to the metadata property of this ShardPeerWithExadbXs.
        :type metadata: oci.distributed_database.models.DistributedDbMetadata

        """
        self.swagger_types = {
            'vm_cluster_id': 'str',
            'shard_group': 'str',
            'status': 'str',
            'supporting_resource_id': 'str',
            'container_database_id': 'str',
            'time_created': 'datetime',
            'time_updated': 'datetime',
            'protection_mode': 'str',
            'transport_type': 'str',
            'metadata': 'DistributedDbMetadata'
        }
        self.attribute_map = {
            'vm_cluster_id': 'vmClusterId',
            'shard_group': 'shardGroup',
            'status': 'status',
            'supporting_resource_id': 'supportingResourceId',
            'container_database_id': 'containerDatabaseId',
            'time_created': 'timeCreated',
            'time_updated': 'timeUpdated',
            'protection_mode': 'protectionMode',
            'transport_type': 'transportType',
            'metadata': 'metadata'
        }
        self._vm_cluster_id = None
        self._shard_group = None
        self._status = None
        self._supporting_resource_id = None
        self._container_database_id = None
        self._time_created = None
        self._time_updated = None
        self._protection_mode = None
        self._transport_type = None
        self._metadata = None

    @property
    def vm_cluster_id(self):
        """
        **[Required]** Gets the vm_cluster_id of this ShardPeerWithExadbXs.
        The `OCID`__ of the VmCluster.

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


        :return: The vm_cluster_id of this ShardPeerWithExadbXs.
        :rtype: str
        """
        return self._vm_cluster_id

    @vm_cluster_id.setter
    def vm_cluster_id(self, vm_cluster_id):
        """
        Sets the vm_cluster_id of this ShardPeerWithExadbXs.
        The `OCID`__ of the VmCluster.

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


        :param vm_cluster_id: The vm_cluster_id of this ShardPeerWithExadbXs.
        :type: str
        """
        self._vm_cluster_id = vm_cluster_id

    @property
    def shard_group(self):
        """
        **[Required]** Gets the shard_group of this ShardPeerWithExadbXs.
        The name of the shardGroup for the peer.


        :return: The shard_group of this ShardPeerWithExadbXs.
        :rtype: str
        """
        return self._shard_group

    @shard_group.setter
    def shard_group(self, shard_group):
        """
        Sets the shard_group of this ShardPeerWithExadbXs.
        The name of the shardGroup for the peer.


        :param shard_group: The shard_group of this ShardPeerWithExadbXs.
        :type: str
        """
        self._shard_group = shard_group

    @property
    def status(self):
        """
        **[Required]** Gets the status of this ShardPeerWithExadbXs.
        Status of EXADB_XS based shard peer.

        Allowed values for this property are: "FAILED", "DELETING", "DELETED", "UPDATING", "CREATING", "CREATED", "READY_FOR_CONFIGURATION", "CONFIGURED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The status of this ShardPeerWithExadbXs.
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """
        Sets the status of this ShardPeerWithExadbXs.
        Status of EXADB_XS based shard peer.


        :param status: The status of this ShardPeerWithExadbXs.
        :type: str
        """
        allowed_values = ["FAILED", "DELETING", "DELETED", "UPDATING", "CREATING", "CREATED", "READY_FOR_CONFIGURATION", "CONFIGURED", "NEEDS_ATTENTION"]
        if not value_allowed_none_or_none_sentinel(status, allowed_values):
            status = 'UNKNOWN_ENUM_VALUE'
        self._status = status

    @property
    def supporting_resource_id(self):
        """
        Gets the supporting_resource_id of this ShardPeerWithExadbXs.
        the identifier of the underlying supporting resource.


        :return: The supporting_resource_id of this ShardPeerWithExadbXs.
        :rtype: str
        """
        return self._supporting_resource_id

    @supporting_resource_id.setter
    def supporting_resource_id(self, supporting_resource_id):
        """
        Sets the supporting_resource_id of this ShardPeerWithExadbXs.
        the identifier of the underlying supporting resource.


        :param supporting_resource_id: The supporting_resource_id of this ShardPeerWithExadbXs.
        :type: str
        """
        self._supporting_resource_id = supporting_resource_id

    @property
    def container_database_id(self):
        """
        Gets the container_database_id of this ShardPeerWithExadbXs.
        the identifier of the container database for underlying supporting resource.


        :return: The container_database_id of this ShardPeerWithExadbXs.
        :rtype: str
        """
        return self._container_database_id

    @container_database_id.setter
    def container_database_id(self, container_database_id):
        """
        Sets the container_database_id of this ShardPeerWithExadbXs.
        the identifier of the container database for underlying supporting resource.


        :param container_database_id: The container_database_id of this ShardPeerWithExadbXs.
        :type: str
        """
        self._container_database_id = container_database_id

    @property
    def time_created(self):
        """
        **[Required]** Gets the time_created of this ShardPeerWithExadbXs.
        The time the shard peer was created. An RFC3339 formatted datetime string


        :return: The time_created of this ShardPeerWithExadbXs.
        :rtype: datetime
        """
        return self._time_created

    @time_created.setter
    def time_created(self, time_created):
        """
        Sets the time_created of this ShardPeerWithExadbXs.
        The time the shard peer was created. An RFC3339 formatted datetime string


        :param time_created: The time_created of this ShardPeerWithExadbXs.
        :type: datetime
        """
        self._time_created = time_created

    @property
    def time_updated(self):
        """
        **[Required]** Gets the time_updated of this ShardPeerWithExadbXs.
        The time the shard peer was last updated. An RFC3339 formatted datetime string


        :return: The time_updated of this ShardPeerWithExadbXs.
        :rtype: datetime
        """
        return self._time_updated

    @time_updated.setter
    def time_updated(self, time_updated):
        """
        Sets the time_updated of this ShardPeerWithExadbXs.
        The time the shard peer was last updated. An RFC3339 formatted datetime string


        :param time_updated: The time_updated of this ShardPeerWithExadbXs.
        :type: datetime
        """
        self._time_updated = time_updated

    @property
    def protection_mode(self):
        """
        Gets the protection_mode of this ShardPeerWithExadbXs.
        The protectionMode for the shard peer.

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


        :return: The protection_mode of this ShardPeerWithExadbXs.
        :rtype: str
        """
        return self._protection_mode

    @protection_mode.setter
    def protection_mode(self, protection_mode):
        """
        Sets the protection_mode of this ShardPeerWithExadbXs.
        The protectionMode for the shard peer.


        :param protection_mode: The protection_mode of this ShardPeerWithExadbXs.
        :type: str
        """
        allowed_values = ["MAXIMUM_AVAILABILITY", "MAXIMUM_PERFORMANCE", "MAXIMUM_PROTECTION"]
        if not value_allowed_none_or_none_sentinel(protection_mode, allowed_values):
            protection_mode = 'UNKNOWN_ENUM_VALUE'
        self._protection_mode = protection_mode

    @property
    def transport_type(self):
        """
        Gets the transport_type of this ShardPeerWithExadbXs.
        The redo transport type to use for this Data Guard association.

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


        :return: The transport_type of this ShardPeerWithExadbXs.
        :rtype: str
        """
        return self._transport_type

    @transport_type.setter
    def transport_type(self, transport_type):
        """
        Sets the transport_type of this ShardPeerWithExadbXs.
        The redo transport type to use for this Data Guard association.


        :param transport_type: The transport_type of this ShardPeerWithExadbXs.
        :type: str
        """
        allowed_values = ["SYNC", "ASYNC", "FASTSYNC"]
        if not value_allowed_none_or_none_sentinel(transport_type, allowed_values):
            transport_type = 'UNKNOWN_ENUM_VALUE'
        self._transport_type = transport_type

    @property
    def metadata(self):
        """
        Gets the metadata of this ShardPeerWithExadbXs.

        :return: The metadata of this ShardPeerWithExadbXs.
        :rtype: oci.distributed_database.models.DistributedDbMetadata
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """
        Sets the metadata of this ShardPeerWithExadbXs.

        :param metadata: The metadata of this ShardPeerWithExadbXs.
        :type: oci.distributed_database.models.DistributedDbMetadata
        """
        self._metadata = metadata

    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
