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

/**
 * Definition of the dsc node report type.
 *
 */
class DscNodeReport {
  /**
   * Create a DscNodeReport.
   * @member {date} [endTime] Gets or sets the end time of the node report.
   * @member {date} [lastModifiedTime] Gets or sets the lastModifiedTime of the
   * node report.
   * @member {date} [startTime] Gets or sets the start time of the node report.
   * @member {string} [type] Gets or sets the type of the node report.
   * @member {string} [reportId] Gets or sets the id of the node report.
   * @member {string} [status] Gets or sets the status of the node report.
   * @member {string} [refreshMode] Gets or sets the refreshMode of the node
   * report.
   * @member {string} [rebootRequested] Gets or sets the rebootRequested of the
   * node report.
   * @member {string} [reportFormatVersion] Gets or sets the
   * reportFormatVersion of the node report.
   * @member {string} [configurationVersion] Gets or sets the
   * configurationVersion of the node report.
   * @member {string} [id] Gets or sets the id.
   * @member {array} [errors] Gets or sets the errors for the node report.
   * @member {array} [resources] Gets or sets the resource for the node report.
   * @member {object} [metaConfiguration] Gets or sets the metaConfiguration of
   * the node at the time of the report.
   * @member {number} [metaConfiguration.configurationModeFrequencyMins] Gets
   * or sets the ConfigurationModeFrequencyMins value of the meta
   * configuration.
   * @member {boolean} [metaConfiguration.rebootNodeIfNeeded] Gets or sets the
   * RebootNodeIfNeeded value of the meta configuration.
   * @member {string} [metaConfiguration.configurationMode] Gets or sets the
   * ConfigurationMode value of the meta configuration.
   * @member {string} [metaConfiguration.actionAfterReboot] Gets or sets the
   * ActionAfterReboot value of the meta configuration.
   * @member {string} [metaConfiguration.certificateId] Gets or sets the
   * CertificateId value of the meta configuration.
   * @member {number} [metaConfiguration.refreshFrequencyMins] Gets or sets the
   * RefreshFrequencyMins value of the meta configuration.
   * @member {boolean} [metaConfiguration.allowModuleOverwrite] Gets or sets
   * the AllowModuleOverwrite value of the meta configuration.
   * @member {string} [hostName] Gets or sets the hostname of the node that
   * sent the report.
   * @member {array} [iPV4Addresses] Gets or sets the IPv4 address of the node
   * that sent the report.
   * @member {array} [iPV6Addresses] Gets or sets the IPv6 address of the node
   * that sent the report.
   * @member {number} [numberOfResources] Gets or sets the number of resource
   * in the node report.
   * @member {string} [rawErrors] Gets or sets the unparsed errors for the node
   * report.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DscNodeReport
   *
   * @returns {object} metadata of DscNodeReport
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DscNodeReport',
      type: {
        name: 'Composite',
        className: 'DscNodeReport',
        modelProperties: {
          endTime: {
            required: false,
            nullable: true,
            serializedName: 'endTime',
            type: {
              name: 'DateTime'
            }
          },
          lastModifiedTime: {
            required: false,
            nullable: false,
            serializedName: 'lastModifiedTime',
            type: {
              name: 'DateTime'
            }
          },
          startTime: {
            required: false,
            nullable: true,
            serializedName: 'startTime',
            type: {
              name: 'DateTime'
            }
          },
          type: {
            required: false,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          reportId: {
            required: false,
            serializedName: 'reportId',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          refreshMode: {
            required: false,
            serializedName: 'refreshMode',
            type: {
              name: 'String'
            }
          },
          rebootRequested: {
            required: false,
            serializedName: 'rebootRequested',
            type: {
              name: 'String'
            }
          },
          reportFormatVersion: {
            required: false,
            serializedName: 'reportFormatVersion',
            type: {
              name: 'String'
            }
          },
          configurationVersion: {
            required: false,
            serializedName: 'configurationVersion',
            type: {
              name: 'String'
            }
          },
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          errors: {
            required: false,
            serializedName: 'errors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DscReportErrorElementType',
                  type: {
                    name: 'Composite',
                    className: 'DscReportError'
                  }
              }
            }
          },
          resources: {
            required: false,
            serializedName: 'resources',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DscReportResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'DscReportResource'
                  }
              }
            }
          },
          metaConfiguration: {
            required: false,
            serializedName: 'metaConfiguration',
            type: {
              name: 'Composite',
              className: 'DscMetaConfiguration'
            }
          },
          hostName: {
            required: false,
            serializedName: 'hostName',
            type: {
              name: 'String'
            }
          },
          iPV4Addresses: {
            required: false,
            serializedName: 'iPV4Addresses',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          iPV6Addresses: {
            required: false,
            serializedName: 'iPV6Addresses',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          numberOfResources: {
            required: false,
            serializedName: 'numberOfResources',
            type: {
              name: 'Number'
            }
          },
          rawErrors: {
            required: false,
            serializedName: 'rawErrors',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = DscNodeReport;
