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

/**
 * Contains bgp community information offered in Service Community resources.
 *
 */
class BGPCommunity {
  /**
   * Create a BGPCommunity.
   * @property {string} [serviceSupportedRegion] The region which the service
   * support. e.g. For O365, region is Global.
   * @property {string} [communityName] The name of the bgp community. e.g.
   * Skype.
   * @property {string} [communityValue] The value of the bgp community. For
   * more information:
   * https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
   * @property {array} [communityPrefixes] The prefixes that the bgp community
   * contains.
   * @property {boolean} [isAuthorizedToUse] Customer is authorized to use bgp
   * community or not.
   * @property {string} [serviceGroup] The service group of the bgp community
   * contains.
   */
  constructor() {
  }

  /**
   * Defines the metadata of BGPCommunity
   *
   * @returns {object} metadata of BGPCommunity
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BGPCommunity',
      type: {
        name: 'Composite',
        className: 'BGPCommunity',
        modelProperties: {
          serviceSupportedRegion: {
            required: false,
            serializedName: 'serviceSupportedRegion',
            type: {
              name: 'String'
            }
          },
          communityName: {
            required: false,
            serializedName: 'communityName',
            type: {
              name: 'String'
            }
          },
          communityValue: {
            required: false,
            serializedName: 'communityValue',
            type: {
              name: 'String'
            }
          },
          communityPrefixes: {
            required: false,
            serializedName: 'communityPrefixes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          isAuthorizedToUse: {
            required: false,
            serializedName: 'isAuthorizedToUse',
            type: {
              name: 'Boolean'
            }
          },
          serviceGroup: {
            required: false,
            serializedName: 'serviceGroup',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = BGPCommunity;
