/*
 * 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 TopologySingleResource.
 */
class TopologySingleResource {
  /**
   * Create a TopologySingleResource.
   * @member {string} [resourceId] Azure resource id
   * @member {string} [severity] The security severity of the resource
   * @member {boolean} [recommendationsExist] Indicates if the resource has
   * security recommendations
   * @member {string} [networkZones] Indicates the resource connectivity level
   * to the Internet (InternetFacing, Internal ,etc.)
   * @member {number} [topologyScore] Score of the resource based on its
   * security severity
   * @member {string} [location] The location of this resource
   * @member {array} [parents] Azure resources connected to this resource which
   * are in higher level in the topology view
   * @member {array} [children] Azure resources connected to this resource
   * which are in lower level in the topology view
   */
  constructor() {
  }

  /**
   * Defines the metadata of TopologySingleResource
   *
   * @returns {object} metadata of TopologySingleResource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TopologySingleResource',
      type: {
        name: 'Composite',
        className: 'TopologySingleResource',
        modelProperties: {
          resourceId: {
            required: false,
            readOnly: true,
            serializedName: 'resourceId',
            type: {
              name: 'String'
            }
          },
          severity: {
            required: false,
            readOnly: true,
            serializedName: 'severity',
            type: {
              name: 'String'
            }
          },
          recommendationsExist: {
            required: false,
            readOnly: true,
            serializedName: 'recommendationsExist',
            type: {
              name: 'Boolean'
            }
          },
          networkZones: {
            required: false,
            readOnly: true,
            serializedName: 'networkZones',
            type: {
              name: 'String'
            }
          },
          topologyScore: {
            required: false,
            readOnly: true,
            serializedName: 'topologyScore',
            type: {
              name: 'Number'
            }
          },
          location: {
            required: false,
            readOnly: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          parents: {
            required: false,
            readOnly: true,
            serializedName: 'parents',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'TopologySingleResourceParentElementType',
                  type: {
                    name: 'Composite',
                    className: 'TopologySingleResourceParent'
                  }
              }
            }
          },
          children: {
            required: false,
            readOnly: true,
            serializedName: 'children',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'TopologySingleResourceChildElementType',
                  type: {
                    name: 'Composite',
                    className: 'TopologySingleResourceChild'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = TopologySingleResource;
