text: /*
   * 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.
   */
  
  'use strict';
  
  const models = require('./index');
  
  /**
   * Information about a stateful service replica deployed on a node.
   *
   * @extends models['DeployedServiceReplicaInfo']
   */
  class DeployedStatefulServiceReplicaInfo extends models['DeployedServiceReplicaInfo'] {
    /**
     * Create a DeployedStatefulServiceReplicaInfo.
     * @property {string} [replicaId] Id of a stateful service replica. ReplicaId
     * is used by Service Fabric to uniquely identify a replica of a partition.
     * It is unique within a partition and does not change for the lifetime of
     * the replica. If a replica gets dropped and another replica gets created on
     * the same node for the same partition, it will get a different value for
     * the id. Sometimes the id of a stateless service instance is also referred
     * as a replica id.
     * @property {string} [replicaRole] The role of a replica of a stateful
     * service. Possible values include: 'Unknown', 'None', 'Primary',
     * 'IdleSecondary', 'ActiveSecondary'
     * @property {object} [reconfigurationInformation] Information about current
     * reconfiguration like phase, type, previous configuration role of replica
     * and reconfiguration start date time.
     * @property {string} [reconfigurationInformation.previousConfigurationRole]
     * Replica role before reconfiguration started. Possible values include:
     * 'Unknown', 'None', 'Primary', 'IdleSecondary', 'ActiveSecondary'
     * @property {string} [reconfigurationInformation.reconfigurationPhase]
     * Current phase of ongoing reconfiguration. If no reconfiguration is taking
     * place then this value will be "None". Possible values include: 'Unknown',
     * 'None', 'Phase0', 'Phase1', 'Phase2', 'Phase3', 'Phase4', 'AbortPhaseZero'
     * @property {string} [reconfigurationInformation.reconfigurationType] Type
     * of current ongoing reconfiguration. If no reconfiguration is taking place
     * then this value will be "None". Possible values include: 'Unknown',
     * 'SwapPrimary', 'Failover', 'Other'
     * @property {date} [reconfigurationInformation.reconfigurationStartTimeUtc]
     * Start time (in UTC) of the ongoing reconfiguration. If no reconfiguration
     * is taking place then this value will be zero date-time.
     */
    constructor() {
      super();
    }
  
    /**
     * Defines the metadata of DeployedStatefulServiceReplicaInfo
     *
     * @returns {object} metadata of DeployedStatefulServiceReplicaInfo
     *
     */
    mapper() {
      return {
        required: false,
        serializedName: 'Stateful',
        type: {
          name: 'Composite',
          polymorphicDiscriminator: {
            serializedName: 'ServiceKind',
            clientName: 'serviceKind'
          },
          uberParent: 'DeployedServiceReplicaInfo',
          className: 'DeployedStatefulServiceReplicaInfo',
          modelProperties: {
            serviceName: {
              required: false,
              serializedName: 'ServiceName',
              type: {
                name: 'String'
              }
            },
            serviceTypeName: {
              required: false,
              serializedName: 'ServiceTypeName',
              type: {
                name: 'String'
              }
            },
            serviceManifestName: {
              required: false,
              serializedName: 'ServiceManifestName',
              type: {
                name: 'String'
              }
            },
            codePackageName: {
              required: false,
              serializedName: 'CodePackageName',
              type: {
                name: 'String'
              }
            },
            partitionId: {
              required: false,
              serializedName: 'PartitionId',
              type: {
                name: 'String'
              }
            },
            replicaStatus: {
              required: false,
              serializedName: 'ReplicaStatus',
              type: {
                name: 'String'
              }
            },
            address: {
              required: false,
              serializedName: 'Address',
              type: {
                name: 'String'
              }
            },
            servicePackageActivationId: {
              required: false,
              serializedName: 'ServicePackageActivationId',
              type: {
                name: 'String'
              }
            },
            hostProcessId: {
              required: false,
              serializedName: 'HostProcessId',
              type: {
                name: 'String'
              }
            },
            serviceKind: {
              required: true,
              serializedName: 'ServiceKind',
              isPolymorphicDiscriminator: true,
              type: {
                name: 'String'
              }
            },
            replicaId: {
              required: false,
              serializedName: 'ReplicaId',
              type: {
                name: 'String'
              }
            },
            replicaRole: {
              required: false,
              serializedName: 'ReplicaRole',
              type: {
                name: 'String'
              }
            },
            reconfigurationInformation: {
              required: false,
              serializedName: 'ReconfigurationInformation',
              type: {
                name: 'Composite',
                className: 'ReconfigurationInformation'
              }
            }
          }
        }
      };
    }
  }
  
  module.exports = DeployedStatefulServiceReplicaInfo;
  