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

/**
 * VirtualWAN Resource.
 *
 * @extends models['Resource']
 */
class VirtualWAN extends models['Resource'] {
  /**
   * Create a VirtualWAN.
   * @property {boolean} [disableVpnEncryption] Vpn encryption to be disabled
   * or not.
   * @property {array} [virtualHubs] List of VirtualHubs in the VirtualWAN.
   * @property {array} [vpnSites] List of VpnSites in the VirtualWAN.
   * @property {string} [securityProviderName] The Security Provider name.
   * @property {boolean} [allowBranchToBranchTraffic] True if branch to branch
   * traffic is allowed.
   * @property {boolean} [allowVnetToVnetTraffic] True if Vnet to Vnet traffic
   * is allowed.
   * @property {string} [office365LocalBreakoutCategory] The office local
   * breakout category. Possible values include: 'Optimize',
   * 'OptimizeAndAllow', 'All', 'None'
   * @property {array} [p2SVpnServerConfigurations] List of all
   * P2SVpnServerConfigurations associated with the virtual wan.
   * @property {string} [provisioningState] The provisioning state of the
   * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting',
   * 'Failed'
   * @property {string} [etag] Gets a unique read-only string that changes
   * whenever the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VirtualWAN
   *
   * @returns {object} metadata of VirtualWAN
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VirtualWAN',
      type: {
        name: 'Composite',
        className: 'VirtualWAN',
        modelProperties: {
          id: {
            required: false,
            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'
                  }
              }
            }
          },
          disableVpnEncryption: {
            required: false,
            serializedName: 'properties.disableVpnEncryption',
            type: {
              name: 'Boolean'
            }
          },
          virtualHubs: {
            required: false,
            readOnly: true,
            serializedName: 'properties.virtualHubs',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'SubResource'
                  }
              }
            }
          },
          vpnSites: {
            required: false,
            readOnly: true,
            serializedName: 'properties.vpnSites',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'SubResource'
                  }
              }
            }
          },
          securityProviderName: {
            required: false,
            serializedName: 'properties.securityProviderName',
            type: {
              name: 'String'
            }
          },
          allowBranchToBranchTraffic: {
            required: false,
            serializedName: 'properties.allowBranchToBranchTraffic',
            type: {
              name: 'Boolean'
            }
          },
          allowVnetToVnetTraffic: {
            required: false,
            serializedName: 'properties.allowVnetToVnetTraffic',
            type: {
              name: 'Boolean'
            }
          },
          office365LocalBreakoutCategory: {
            required: false,
            serializedName: 'properties.office365LocalBreakoutCategory',
            type: {
              name: 'String'
            }
          },
          p2SVpnServerConfigurations: {
            required: false,
            serializedName: 'properties.p2SVpnServerConfigurations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'P2SVpnServerConfigurationElementType',
                  type: {
                    name: 'Composite',
                    className: 'P2SVpnServerConfiguration'
                  }
              }
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = VirtualWAN;
