# 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.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
  module VertexAI
    module Property
      class ModelEvaluationSliceModelExplanationMeanAttributions
        attr_reader :output_display_name

        attr_reader :baseline_output_value

        attr_reader :output_name

        attr_reader :feature_attributions

        attr_reader :output_index

        attr_reader :instance_output_value

        attr_reader :approximation_error

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @output_display_name = args['outputDisplayName']
          @baseline_output_value = args['baselineOutputValue']
          @output_name = args['outputName']
          @feature_attributions = args['featureAttributions']
          @output_index = args['outputIndex']
          @instance_output_value = args['instanceOutputValue']
          @approximation_error = args['approximationError']
        end

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

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