# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::BatchAI::Mgmt::V2018_05_01
  module Models
    #
    # Cluster creation operation.
    #
    class ClusterCreateParameters

      include MsRestAzure

      # @return [String] VM size. The size of the virtual machines in the
      # cluster. All nodes in a cluster have the same VM size. For information
      # about available VM sizes for clusters using images from the Virtual
      # Machines Marketplace see Sizes for Virtual Machines (Linux). Batch AI
      # service supports all Azure VM sizes except STANDARD_A0 and those with
      # premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
      attr_accessor :vm_size

      # @return [VmPriority] VM priority. VM priority. Allowed values are:
      # dedicated (default) and lowpriority. Possible values include:
      # 'dedicated', 'lowpriority'. Default value: 'dedicated' .
      attr_accessor :vm_priority

      # @return [ScaleSettings] Scale settings. Scale settings for the cluster.
      # Batch AI service supports manual and auto scale clusters.
      attr_accessor :scale_settings

      # @return [VirtualMachineConfiguration] VM configuration. OS image
      # configuration for cluster nodes. All nodes in a cluster have the same
      # OS image.
      attr_accessor :virtual_machine_configuration

      # @return [NodeSetup] Node setup. Setup to be performed on each compute
      # node in the cluster.
      attr_accessor :node_setup

      # @return [UserAccountSettings] User account settings. Settings for an
      # administrator user account that will be created on each compute node in
      # the cluster.
      attr_accessor :user_account_settings

      # @return [ResourceId] Subnet. Existing virtual network subnet to put the
      # cluster nodes in. Note, if a File Server mount configured in node
      # setup, the File Server's subnet will be used automatically.
      attr_accessor :subnet


      #
      # Mapper for ClusterCreateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ClusterCreateParameters',
          type: {
            name: 'Composite',
            class_name: 'ClusterCreateParameters',
            model_properties: {
              vm_size: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.vmSize',
                type: {
                  name: 'String'
                }
              },
              vm_priority: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.vmPriority',
                default_value: 'dedicated',
                type: {
                  name: 'Enum',
                  module: 'VmPriority'
                }
              },
              scale_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.scaleSettings',
                type: {
                  name: 'Composite',
                  class_name: 'ScaleSettings'
                }
              },
              virtual_machine_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.virtualMachineConfiguration',
                type: {
                  name: 'Composite',
                  class_name: 'VirtualMachineConfiguration'
                }
              },
              node_setup: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.nodeSetup',
                type: {
                  name: 'Composite',
                  class_name: 'NodeSetup'
                }
              },
              user_account_settings: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.userAccountSettings',
                type: {
                  name: 'Composite',
                  class_name: 'UserAccountSettings'
                }
              },
              subnet: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.subnet',
                type: {
                  name: 'Composite',
                  class_name: 'ResourceId'
                }
              }
            }
          }
        }
      end
    end
  end
end
