# 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
    #
    # Job creation parameters.
    #
    class JobCreateParameters

      include MsRestAzure

      # @return [JobPriority] Scheduling priority. Scheduling priority
      # associated with the job. Possible values: low, normal, high. Possible
      # values include: 'low', 'normal', 'high'. Default value: 'normal' .
      attr_accessor :scheduling_priority

      # @return [ResourceId] Cluster. Resource ID of the cluster on which this
      # job will run.
      attr_accessor :cluster

      # @return [MountVolumes] Mount volumes. Information on mount volumes to
      # be used by the job. These volumes will be mounted before the job
      # execution and will be unmounted after the job completion. The volumes
      # will be mounted at location specified by $AZ_BATCHAI_JOB_MOUNT_ROOT
      # environment variable.
      attr_accessor :mount_volumes

      # @return [Integer] Node count. Number of compute nodes to run the job
      # on. The job will be gang scheduled on that many compute nodes.
      attr_accessor :node_count

      # @return [ContainerSettings] Container settings. Docker container
      # settings for the job. If not provided, the job will run directly on the
      # node.
      attr_accessor :container_settings

      # @return [CNTKsettings] CNTK settings. Settings for CNTK (aka Microsoft
      # Cognitive Toolkit) job.
      attr_accessor :cntk_settings

      # @return [PyTorchSettings] pyTorch settings. Settings for pyTorch job.
      attr_accessor :py_torch_settings

      # @return [TensorFlowSettings] TensorFlow settings. Settings for Tensor
      # Flow job.
      attr_accessor :tensor_flow_settings

      # @return [CaffeSettings] Caffe settings. Settings for Caffe job.
      attr_accessor :caffe_settings

      # @return [Caffe2Settings] Caffe2 settings. Settings for Caffe2 job.
      attr_accessor :caffe2settings

      # @return [ChainerSettings] Chainer settings. Settings for Chainer job.
      attr_accessor :chainer_settings

      # @return [CustomToolkitSettings] Custom tool kit job. Settings for
      # custom tool kit job.
      attr_accessor :custom_toolkit_settings

      # @return [CustomMpiSettings] Custom MPI settings. Settings for custom
      # MPI job.
      attr_accessor :custom_mpi_settings

      # @return [HorovodSettings] Horovod settings. Settings for Horovod job.
      attr_accessor :horovod_settings

      # @return [JobPreparation] Job preparation. A command line to be executed
      # on each node allocated for the job before tool kit is launched.
      attr_accessor :job_preparation

      # @return [String] Standard output path prefix. The path where the Batch
      # AI service will store stdout, stderror and execution log of the job.
      attr_accessor :std_out_err_path_prefix

      # @return [Array<InputDirectory>] Input directories. A list of input
      # directories for the job.
      attr_accessor :input_directories

      # @return [Array<OutputDirectory>] Output directories. A list of output
      # directories for the job.
      attr_accessor :output_directories

      # @return [Array<EnvironmentVariable>] Environment variables. A list of
      # user defined environment variables which will be setup for the job.
      attr_accessor :environment_variables

      # @return [Array<EnvironmentVariableWithSecretValue>] Secrets. A list of
      # user defined environment variables with secret values which will be
      # setup for the job. Server will never report values of these variables
      # back.
      attr_accessor :secrets

      # @return [JobBasePropertiesConstraints] Constraints associated with the
      # Job.
      attr_accessor :constraints


      #
      # Mapper for JobCreateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'JobCreateParameters',
          type: {
            name: 'Composite',
            class_name: 'JobCreateParameters',
            model_properties: {
              scheduling_priority: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.schedulingPriority',
                default_value: 'normal',
                type: {
                  name: 'String'
                }
              },
              cluster: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.cluster',
                type: {
                  name: 'Composite',
                  class_name: 'ResourceId'
                }
              },
              mount_volumes: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.mountVolumes',
                type: {
                  name: 'Composite',
                  class_name: 'MountVolumes'
                }
              },
              node_count: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.nodeCount',
                type: {
                  name: 'Number'
                }
              },
              container_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.containerSettings',
                type: {
                  name: 'Composite',
                  class_name: 'ContainerSettings'
                }
              },
              cntk_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.cntkSettings',
                type: {
                  name: 'Composite',
                  class_name: 'CNTKsettings'
                }
              },
              py_torch_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.pyTorchSettings',
                type: {
                  name: 'Composite',
                  class_name: 'PyTorchSettings'
                }
              },
              tensor_flow_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.tensorFlowSettings',
                type: {
                  name: 'Composite',
                  class_name: 'TensorFlowSettings'
                }
              },
              caffe_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.caffeSettings',
                type: {
                  name: 'Composite',
                  class_name: 'CaffeSettings'
                }
              },
              caffe2settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.caffe2Settings',
                type: {
                  name: 'Composite',
                  class_name: 'Caffe2Settings'
                }
              },
              chainer_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.chainerSettings',
                type: {
                  name: 'Composite',
                  class_name: 'ChainerSettings'
                }
              },
              custom_toolkit_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.customToolkitSettings',
                type: {
                  name: 'Composite',
                  class_name: 'CustomToolkitSettings'
                }
              },
              custom_mpi_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.customMpiSettings',
                type: {
                  name: 'Composite',
                  class_name: 'CustomMpiSettings'
                }
              },
              horovod_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.horovodSettings',
                type: {
                  name: 'Composite',
                  class_name: 'HorovodSettings'
                }
              },
              job_preparation: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.jobPreparation',
                type: {
                  name: 'Composite',
                  class_name: 'JobPreparation'
                }
              },
              std_out_err_path_prefix: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.stdOutErrPathPrefix',
                type: {
                  name: 'String'
                }
              },
              input_directories: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.inputDirectories',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'InputDirectoryElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'InputDirectory'
                      }
                  }
                }
              },
              output_directories: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.outputDirectories',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'OutputDirectoryElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'OutputDirectory'
                      }
                  }
                }
              },
              environment_variables: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.environmentVariables',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'EnvironmentVariableElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'EnvironmentVariable'
                      }
                  }
                }
              },
              secrets: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.secrets',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'EnvironmentVariableWithSecretValueElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'EnvironmentVariableWithSecretValue'
                      }
                  }
                }
              },
              constraints: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.constraints',
                type: {
                  name: 'Composite',
                  class_name: 'JobBasePropertiesConstraints'
                }
              }
            }
          }
        }
      end
    end
  end
end
