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

/**
 * Single item in List or Get Alias(Disaster Recovery configuration) operation
 *
 * @extends models['Resource']
 */
class ArmDisasterRecovery extends models['Resource'] {
  /**
   * Create a ArmDisasterRecovery.
   * @property {string} [provisioningState] Provisioning state of the
   * Alias(Disaster Recovery configuration) - possible values 'Accepted' or
   * 'Succeeded' or 'Failed'. Possible values include: 'Accepted', 'Succeeded',
   * 'Failed'
   * @property {number} [pendingReplicationOperationsCount] Number of entities
   * pending to be replicated.
   * @property {string} [partnerNamespace] ARM Id of the Primary/Secondary
   * eventhub namespace name, which is part of GEO DR pairing
   * @property {string} [alternateName] Primary/Secondary eventhub namespace
   * name, which is part of GEO DR pairing
   * @property {string} [role] role of namespace in GEO DR - possible values
   * 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible values
   * include: 'Primary', 'PrimaryNotReplicating', 'Secondary'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ArmDisasterRecovery
   *
   * @returns {object} metadata of ArmDisasterRecovery
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ArmDisasterRecovery',
      type: {
        name: 'Composite',
        className: 'ArmDisasterRecovery',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Accepted', 'Succeeded', 'Failed' ]
            }
          },
          pendingReplicationOperationsCount: {
            required: false,
            readOnly: true,
            serializedName: 'properties.pendingReplicationOperationsCount',
            type: {
              name: 'Number'
            }
          },
          partnerNamespace: {
            required: false,
            serializedName: 'properties.partnerNamespace',
            type: {
              name: 'String'
            }
          },
          alternateName: {
            required: false,
            serializedName: 'properties.alternateName',
            type: {
              name: 'String'
            }
          },
          role: {
            required: false,
            readOnly: true,
            serializedName: 'properties.role',
            type: {
              name: 'Enum',
              allowedValues: [ 'Primary', 'PrimaryNotReplicating', 'Secondary' ]
            }
          }
        }
      }
    };
  }
}

module.exports = ArmDisasterRecovery;
