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

/**
 * Status of the secondary replicator when it is in idle mode and is being
 * built by the primary.
 *
 * @extends models['SecondaryReplicatorStatus']
 */
class SecondaryIdleReplicatorStatus extends models['SecondaryReplicatorStatus'] {
  /**
   * Create a SecondaryIdleReplicatorStatus.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of SecondaryIdleReplicatorStatus
   *
   * @returns {object} metadata of SecondaryIdleReplicatorStatus
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'IdleSecondary',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'Kind',
          clientName: 'kind'
        },
        uberParent: 'ReplicatorStatus',
        className: 'SecondaryIdleReplicatorStatus',
        modelProperties: {
          kind: {
            required: true,
            serializedName: 'Kind',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          replicationQueueStatus: {
            required: false,
            serializedName: 'ReplicationQueueStatus',
            type: {
              name: 'Composite',
              className: 'ReplicatorQueueStatus'
            }
          },
          lastReplicationOperationReceivedTimeUtc: {
            required: false,
            serializedName: 'LastReplicationOperationReceivedTimeUtc',
            type: {
              name: 'DateTime'
            }
          },
          isInBuild: {
            required: false,
            serializedName: 'IsInBuild',
            type: {
              name: 'Boolean'
            }
          },
          copyQueueStatus: {
            required: false,
            serializedName: 'CopyQueueStatus',
            type: {
              name: 'Composite',
              className: 'ReplicatorQueueStatus'
            }
          },
          lastCopyOperationReceivedTimeUtc: {
            required: false,
            serializedName: 'LastCopyOperationReceivedTimeUtc',
            type: {
              name: 'DateTime'
            }
          },
          lastAcknowledgementSentTimeUtc: {
            required: false,
            serializedName: 'LastAcknowledgementSentTimeUtc',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = SecondaryIdleReplicatorStatus;
