/*
 * 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');

/**
 * Key value store related information for the replica.
 *
 * @extends models['ReplicaStatusBase']
 */
class KeyValueStoreReplicaStatus extends models['ReplicaStatusBase'] {
  /**
   * Create a KeyValueStoreReplicaStatus.
   * @property {string} [databaseRowCountEstimate] Value indicating the
   * estimated number of rows in the underlying database.
   * @property {string} [databaseLogicalSizeEstimate] Value indicating the
   * estimated size of the underlying database.
   * @property {string} [copyNotificationCurrentKeyFilter] Value indicating the
   * latest key-prefix filter applied to enumeration during the callback. Null
   * if there is no pending callback.
   * @property {string} [copyNotificationCurrentProgress] Value indicating the
   * latest number of keys enumerated during the callback. 0 if there is no
   * pending callback.
   * @property {string} [statusDetails] Value indicating the current status
   * details of the replica.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of KeyValueStoreReplicaStatus
   *
   * @returns {object} metadata of KeyValueStoreReplicaStatus
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'KeyValueStore',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'Kind',
          clientName: 'kind'
        },
        uberParent: 'ReplicaStatusBase',
        className: 'KeyValueStoreReplicaStatus',
        modelProperties: {
          kind: {
            required: true,
            serializedName: 'Kind',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          databaseRowCountEstimate: {
            required: false,
            serializedName: 'DatabaseRowCountEstimate',
            type: {
              name: 'String'
            }
          },
          databaseLogicalSizeEstimate: {
            required: false,
            serializedName: 'DatabaseLogicalSizeEstimate',
            type: {
              name: 'String'
            }
          },
          copyNotificationCurrentKeyFilter: {
            required: false,
            serializedName: 'CopyNotificationCurrentKeyFilter',
            type: {
              name: 'String'
            }
          },
          copyNotificationCurrentProgress: {
            required: false,
            serializedName: 'CopyNotificationCurrentProgress',
            type: {
              name: 'String'
            }
          },
          statusDetails: {
            required: false,
            serializedName: 'StatusDetails',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = KeyValueStoreReplicaStatus;
