# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
#     ***     AUTO GENERATED CODE    ***    Type: MMv1     ***
#
# ----------------------------------------------------------------------------
#
#     This file is automatically generated by Magic Modules and manual
#     changes will be clobbered when the file is regenerated.
#
#     Please read more about how to change this file in README.md and
#     CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'google/vertexai/property/nasjob_njsmtasttsttjswpsc_spec'
require 'google/vertexai/property/nasjob_njsmtasttsttjswpscs_env'
require 'google/vertexai/property/nasjob_njsmtasttsttjswpsd_spec'
require 'google/vertexai/property/nasjob_njsmtasttsttjswpsm_spec'
require 'google/vertexai/property/nasjob_njsmtasttsttjswpsn_mounts'
require 'google/vertexai/property/nasjob_njsmtasttsttjswpspp_spec'
require 'google/vertexai/property/nasjob_njsmtasttsttjswpspps_env'
module GoogleInSpec
  module VertexAI
    module Property
      class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecs
        attr_reader :container_spec

        attr_reader :machine_spec

        attr_reader :replica_count

        attr_reader :nfs_mounts

        attr_reader :python_package_spec

        attr_reader :disk_spec

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @container_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpec.new(args['containerSpec'], to_s)
          @machine_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsMachineSpec.new(args['machineSpec'], to_s)
          @replica_count = args['replicaCount']
          @nfs_mounts = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsNfsMountsArray.parse(args['nfsMounts'], to_s)
          @python_package_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpec.new(args['pythonPackageSpec'], to_s)
          @disk_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsDiskSpec.new(args['diskSpec'], to_s)
        end

        def to_s
          "#{@parent_identifier} NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecs"
        end
      end

      class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsArray
        def self.parse(value, parent_identifier)
          return if value.nil?
          return NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecs.new(value, parent_identifier) unless value.is_a?(::Array)
          value.map { |v| NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecs.new(v, parent_identifier) }
        end
      end
    end
  end
end
