# 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/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config'
require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_autoscaling'
require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config'
require 'google/dataproc/property/workflowtemplate_gke_cluster_config_node_pool_target_node_pool_config_config_accelerators'
module GoogleInSpec
  module Dataproc
    module Property
      class WorkflowTemplateGkeClusterConfigNodePoolTarget
        attr_reader :node_pool

        attr_reader :roles

        attr_reader :node_pool_config

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @node_pool = args['nodePool']
          @roles = args['roles']
          @node_pool_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateGkeClusterConfigNodePoolTargetNodePoolConfig.new(args['nodePoolConfig'], to_s)
        end

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

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