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

/**
 * Backup configuration information, for a specific partition, specifying what
 * backup policy is being applied and suspend description, if any.
 *
 * @extends models['BackupConfigurationInfo']
 */
class PartitionBackupConfigurationInfo extends models['BackupConfigurationInfo'] {
  /**
   * Create a PartitionBackupConfigurationInfo.
   * @property {string} [serviceName] The full name of the service with
   * 'fabric:' URI scheme.
   * @property {uuid} [partitionId] The partition ID indentifying the
   * partition.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of PartitionBackupConfigurationInfo
   *
   * @returns {object} metadata of PartitionBackupConfigurationInfo
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Partition',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'Kind',
          clientName: 'kind'
        },
        uberParent: 'BackupConfigurationInfo',
        className: 'PartitionBackupConfigurationInfo',
        modelProperties: {
          policyName: {
            required: false,
            serializedName: 'PolicyName',
            type: {
              name: 'String'
            }
          },
          policyInheritedFrom: {
            required: false,
            serializedName: 'PolicyInheritedFrom',
            type: {
              name: 'String'
            }
          },
          suspensionInfo: {
            required: false,
            serializedName: 'SuspensionInfo',
            type: {
              name: 'Composite',
              className: 'BackupSuspensionInfo'
            }
          },
          kind: {
            required: true,
            serializedName: 'Kind',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          serviceName: {
            required: false,
            serializedName: 'ServiceName',
            type: {
              name: 'String'
            }
          },
          partitionId: {
            required: false,
            serializedName: 'PartitionId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = PartitionBackupConfigurationInfo;
