# 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/dataflow/property/projectlocationjob_pipeline_description_original_pipeline_transform_display_data'
module GoogleInSpec
  module Dataflow
    module Property
      class ProjectLocationJobPipelineDescriptionOriginalPipelineTransform
        attr_reader :kind

        attr_reader :id

        attr_reader :name

        attr_reader :display_data

        attr_reader :output_collection_name

        attr_reader :input_collection_name

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @kind = args['kind']
          @id = args['id']
          @name = args['name']
          @display_data = GoogleInSpec::Dataflow::Property::ProjectLocationJobPipelineDescriptionOriginalPipelineTransformDisplayDataArray.parse(args['displayData'], to_s)
          @output_collection_name = args['outputCollectionName']
          @input_collection_name = args['inputCollectionName']
        end

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

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