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

/**
 * Describes a role on the cluster.
 *
 */
class Role {
  /**
   * Create a Role.
   * @property {string} [name] The name of the role.
   * @property {number} [minInstanceCount] The minimum instance count of the
   * cluster.
   * @property {number} [targetInstanceCount] The instance count of the
   * cluster.
   * @property {object} [hardwareProfile] The hardware profile.
   * @property {string} [hardwareProfile.vmSize] The size of the VM
   * @property {object} [osProfile] The operating system profile.
   * @property {object} [osProfile.linuxOperatingSystemProfile] The Linux OS
   * profile.
   * @property {string} [osProfile.linuxOperatingSystemProfile.username] The
   * username.
   * @property {string} [osProfile.linuxOperatingSystemProfile.password] The
   * password.
   * @property {object} [osProfile.linuxOperatingSystemProfile.sshProfile] The
   * SSH profile.
   * @property {array}
   * [osProfile.linuxOperatingSystemProfile.sshProfile.publicKeys] The list of
   * SSH public keys.
   * @property {object} [virtualNetworkProfile] The virtual network profile.
   * @property {string} [virtualNetworkProfile.id] The ID of the virtual
   * network.
   * @property {string} [virtualNetworkProfile.subnet] The name of the subnet.
   * @property {array} [dataDisksGroups] The data disks groups for the role.
   * @property {array} [scriptActions] The list of script actions on the role.
   */
  constructor() {
  }

  /**
   * Defines the metadata of Role
   *
   * @returns {object} metadata of Role
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Role',
      type: {
        name: 'Composite',
        className: 'Role',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          minInstanceCount: {
            required: false,
            serializedName: 'minInstanceCount',
            type: {
              name: 'Number'
            }
          },
          targetInstanceCount: {
            required: false,
            serializedName: 'targetInstanceCount',
            type: {
              name: 'Number'
            }
          },
          hardwareProfile: {
            required: false,
            serializedName: 'hardwareProfile',
            type: {
              name: 'Composite',
              className: 'HardwareProfile'
            }
          },
          osProfile: {
            required: false,
            serializedName: 'osProfile',
            type: {
              name: 'Composite',
              className: 'OsProfile'
            }
          },
          virtualNetworkProfile: {
            required: false,
            serializedName: 'virtualNetworkProfile',
            type: {
              name: 'Composite',
              className: 'VirtualNetworkProfile'
            }
          },
          dataDisksGroups: {
            required: false,
            serializedName: 'dataDisksGroups',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DataDisksGroupsElementType',
                  type: {
                    name: 'Composite',
                    className: 'DataDisksGroups'
                  }
              }
            }
          },
          scriptActions: {
            required: false,
            serializedName: 'scriptActions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ScriptActionElementType',
                  type: {
                    name: 'Composite',
                    className: 'ScriptAction'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = Role;
