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

/**
 * Recovery plan group details.
 *
 */
class RecoveryPlanGroup {
  /**
   * Create a RecoveryPlanGroup.
   * @member {string} groupType The group type. Possible values include:
   * 'Shutdown', 'Boot', 'Failover'
   * @member {array} [replicationProtectedItems] The list of protected items.
   * @member {array} [startGroupActions] The start group actions.
   * @member {array} [endGroupActions] The end group actions.
   */
  constructor() {
  }

  /**
   * Defines the metadata of RecoveryPlanGroup
   *
   * @returns {object} metadata of RecoveryPlanGroup
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RecoveryPlanGroup',
      type: {
        name: 'Composite',
        className: 'RecoveryPlanGroup',
        modelProperties: {
          groupType: {
            required: true,
            serializedName: 'groupType',
            type: {
              name: 'String'
            }
          },
          replicationProtectedItems: {
            required: false,
            serializedName: 'replicationProtectedItems',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RecoveryPlanProtectedItemElementType',
                  type: {
                    name: 'Composite',
                    className: 'RecoveryPlanProtectedItem'
                  }
              }
            }
          },
          startGroupActions: {
            required: false,
            serializedName: 'startGroupActions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RecoveryPlanActionElementType',
                  type: {
                    name: 'Composite',
                    className: 'RecoveryPlanAction'
                  }
              }
            }
          },
          endGroupActions: {
            required: false,
            serializedName: 'endGroupActions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RecoveryPlanActionElementType',
                  type: {
                    name: 'Composite',
                    className: 'RecoveryPlanAction'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = RecoveryPlanGroup;
