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

/**
 * Route table resource.
 *
 * @extends models['Resource']
 */
class RouteTable extends models['Resource'] {
  /**
   * Create a RouteTable.
   * @property {array} [routes] Collection of routes contained within a route
   * table.
   * @property {array} [subnets] A collection of references to subnets.
   * @property {boolean} [disableBgpRoutePropagation] Gets or sets whether to
   * disable the routes learned by BGP on that route table. True means disable.
   * @property {string} [provisioningState] The provisioning state of the
   * resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
   * @property {string} [etag] Gets a unique read-only string that changes
   * whenever the resource is updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of RouteTable
   *
   * @returns {object} metadata of RouteTable
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RouteTable',
      type: {
        name: 'Composite',
        className: 'RouteTable',
        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'
                  }
              }
            }
          },
          routes: {
            required: false,
            serializedName: 'properties.routes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RouteElementType',
                  type: {
                    name: 'Composite',
                    className: 'Route'
                  }
              }
            }
          },
          subnets: {
            required: false,
            readOnly: true,
            serializedName: 'properties.subnets',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubnetElementType',
                  type: {
                    name: 'Composite',
                    className: 'Subnet'
                  }
              }
            }
          },
          disableBgpRoutePropagation: {
            required: false,
            serializedName: 'properties.disableBgpRoutePropagation',
            type: {
              name: 'Boolean'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = RouteTable;
