# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .deployed_service_replica_detail_info import DeployedServiceReplicaDetailInfo


class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo):
    """Information about a stateful replica running in a code package.

    :param service_name: Full hierarchical name of the service in URI format
     starting with `fabric:`.
    :type service_name: str
    :param partition_id:
    :type partition_id: str
    :param current_service_operation: Possible values include: 'Unknown',
     'None', 'Open', 'ChangeRole', 'Close', 'Abort'
    :type current_service_operation: str
    :param current_service_operation_start_time_utc: The start time of the
     current service operation in UTC format.
    :type current_service_operation_start_time_utc: datetime
    :param reported_load:
    :type reported_load: list of :class:`LoadMetricReportInfo
     <azure.servicefabric.models.LoadMetricReportInfo>`
    :param ServiceKind: Polymorphic Discriminator
    :type ServiceKind: str
    :param replica_id: Id of the stateful service replica.
    :type replica_id: str
    :param current_replicator_operation: Possible values include: 'Invalid',
     'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort',
     'OnDataLoss', 'WaitForCatchup', 'Build'
    :type current_replicator_operation: str
    :param read_status: Possible values include: 'Invalid', 'Granted',
     'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum'
    :type read_status: str
    :param write_status: Possible values include: 'Invalid', 'Granted',
     'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum'
    :type write_status: str
    :param replicator_status:
    :type replicator_status: :class:`ReplicatorStatus
     <azure.servicefabric.models.ReplicatorStatus>`
    :param replica_status:
    :type replica_status: :class:`KeyValueStoreReplicaStatus
     <azure.servicefabric.models.KeyValueStoreReplicaStatus>`
    """ 

    _validation = {
        'ServiceKind': {'required': True},
    }

    _attribute_map = {
        'service_name': {'key': 'ServiceName', 'type': 'str'},
        'partition_id': {'key': 'PartitionId', 'type': 'str'},
        'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'},
        'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'},
        'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'},
        'ServiceKind': {'key': 'ServiceKind', 'type': 'str'},
        'replica_id': {'key': 'ReplicaId', 'type': 'str'},
        'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'},
        'read_status': {'key': 'ReadStatus', 'type': 'str'},
        'write_status': {'key': 'WriteStatus', 'type': 'str'},
        'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'},
        'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'},
    }

    def __init__(self, service_name=None, partition_id=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, replica_id=None, current_replicator_operation=None, read_status=None, write_status=None, replicator_status=None, replica_status=None):
        super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load)
        self.replica_id = replica_id
        self.current_replicator_operation = current_replicator_operation
        self.read_status = read_status
        self.write_status = write_status
        self.replicator_status = replicator_status
        self.replica_status = replica_status
        self.ServiceKind = 'Stateful'
