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

/**
 * A DDoS protection plan in a resource group.
 *
 * @extends models['BaseResource']
 */
class DdosProtectionPlan extends models['BaseResource'] {
  /**
   * Create a DdosProtectionPlan.
   * @property {string} [id] Resource ID.
   * @property {string} [name] Resource name.
   * @property {string} [type] Resource type.
   * @property {string} [location] Resource location.
   * @property {object} [tags] Resource tags.
   * @property {string} [resourceGuid] The resource GUID property of the DDoS
   * protection plan resource. It uniquely identifies the resource, even if the
   * user changes its name or migrate the resource across subscriptions or
   * resource groups.
   * @property {string} [provisioningState] The provisioning state of the DDoS
   * protection plan resource. Possible values are: 'Succeeded', 'Updating',
   * 'Deleting', and 'Failed'.
   * @property {array} [virtualNetworks] The list of virtual networks
   * associated with the DDoS protection plan resource. This list is read-only.
   * @property {string} [etag] A unique read-only string that changes whenever
   * the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DdosProtectionPlan
   *
   * @returns {object} metadata of DdosProtectionPlan
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DdosProtectionPlan',
      type: {
        name: 'Composite',
        className: 'DdosProtectionPlan',
        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'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          resourceGuid: {
            required: false,
            readOnly: true,
            serializedName: 'properties.resourceGuid',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          virtualNetworks: {
            required: false,
            readOnly: true,
            serializedName: 'properties.virtualNetworks',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'SubResource'
                  }
              }
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = DdosProtectionPlan;
