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

/**
 * Class representing a TopologyResource.
 */
class TopologyResource {
  /**
   * Create a TopologyResource.
   * @member {string} [id] Resource Id
   * @member {string} [name] Resource name
   * @member {string} [type] Resource type
   * @member {string} [location] Location where the resource is stored
   * @member {date} [calculatedDateTime] The UTC time on which the topology was
   * calculated
   * @member {array} [topologyResources] Azure resources which are part of this
   * topology resource
   */
  constructor() {
  }

  /**
   * Defines the metadata of TopologyResource
   *
   * @returns {object} metadata of TopologyResource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TopologyResource',
      type: {
        name: 'Composite',
        className: 'TopologyResource',
        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,
            readOnly: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          calculatedDateTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.calculatedDateTime',
            type: {
              name: 'DateTime'
            }
          },
          topologyResources: {
            required: false,
            readOnly: true,
            serializedName: 'properties.topologyResources',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'TopologySingleResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'TopologySingleResource'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = TopologyResource;
