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

/**
 * Definition of a DscNode
 *
 * @extends models['ProxyResource']
 */
class DscNode extends models['ProxyResource'] {
  /**
   * Create a DscNode.
   * @member {date} [lastSeen] Gets or sets the last seen time of the node.
   * @member {date} [registrationTime] Gets or sets the registration time of
   * the node.
   * @member {string} [ip] Gets or sets the ip of the node.
   * @member {string} [accountId] Gets or sets the account id of the node.
   * @member {string} [dscNodeName] Gets or sets the name of the dsc
   * nodeconfiguration.
   * @member {string} [status] Gets or sets the status of the node.
   * @member {string} [nodeId] Gets or sets the node id.
   * @member {string} [etag] Gets or sets the etag of the resource.
   * @member {number} [totalCount] Gets the total number of records matching
   * filter criteria.
   * @member {array} [extensionHandler] Gets or sets the list of
   * extensionHandler properties for a Node.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DscNode
   *
   * @returns {object} metadata of DscNode
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DscNode',
      type: {
        name: 'Composite',
        className: 'DscNode',
        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'
            }
          },
          lastSeen: {
            required: false,
            nullable: false,
            serializedName: 'properties.lastSeen',
            type: {
              name: 'DateTime'
            }
          },
          registrationTime: {
            required: false,
            nullable: false,
            serializedName: 'properties.registrationTime',
            type: {
              name: 'DateTime'
            }
          },
          ip: {
            required: false,
            serializedName: 'properties.ip',
            type: {
              name: 'String'
            }
          },
          accountId: {
            required: false,
            serializedName: 'properties.accountId',
            type: {
              name: 'String'
            }
          },
          dscNodeName: {
            required: false,
            serializedName: 'properties.nodeConfiguration.name',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            serializedName: 'properties.status',
            type: {
              name: 'String'
            }
          },
          nodeId: {
            required: false,
            serializedName: 'properties.nodeId',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'properties.etag',
            type: {
              name: 'String'
            }
          },
          totalCount: {
            required: false,
            serializedName: 'properties.totalCount',
            type: {
              name: 'Number'
            }
          },
          extensionHandler: {
            required: false,
            serializedName: 'properties.extensionHandler',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DscNodeExtensionHandlerAssociationPropertyElementType',
                  type: {
                    name: 'Composite',
                    className: 'DscNodeExtensionHandlerAssociationProperty'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = DscNode;
