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

/**
 * A group created in a Migration project.
 *
 * @extends models['BaseResource']
 */
class Group extends models['BaseResource'] {
  /**
   * Create a Group.
   * @member {string} [id] Path reference to this group.
   * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/groups/{groupName}
   * @member {string} [name] Name of the group.
   * @member {string} [eTag] For optimistic concurrency control.
   * @member {string} [type] Type of the object =
   * [Microsoft.Migrate/projects/groups].
   * @member {array} machines List of machine names that are part of this
   * group.
   * @member {array} [assessments] List of References to Assessments created on
   * this group.
   * @member {date} [createdTimestamp] Time when this project was created.
   * Date-Time represented in ISO-8601 format.
   * @member {date} [updatedTimestamp] Time when this project was last updated.
   * Date-Time represented in ISO-8601 format.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Group
   *
   * @returns {object} metadata of Group
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Group',
      type: {
        name: 'Composite',
        className: 'Group',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          eTag: {
            required: false,
            serializedName: 'eTag',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          machines: {
            required: true,
            serializedName: 'properties.machines',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          assessments: {
            required: false,
            readOnly: true,
            serializedName: 'properties.assessments',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          createdTimestamp: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdTimestamp',
            type: {
              name: 'DateTime'
            }
          },
          updatedTimestamp: {
            required: false,
            readOnly: true,
            serializedName: 'properties.updatedTimestamp',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = Group;
