# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
#     ***     AUTO GENERATED CODE    ***    AUTO GENERATED CODE     ***
#
# ----------------------------------------------------------------------------
#
#     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/bigquery/property/table_external_data_configuration_bigtable_options'
require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families'
require 'google/bigquery/property/table_external_data_configuration_csv_options'
require 'google/bigquery/property/table_external_data_configuration_google_sheets_options'
require 'google/bigquery/property/table_external_data_configuration_schema'
require 'google/bigquery/property/table_external_data_configuration_schema_fields'
module GoogleInSpec
  module BigQuery
    module Property
      class TableExternalDataConfiguration
        attr_reader :autodetect

        attr_reader :compression

        attr_reader :ignore_unknown_values

        attr_reader :max_bad_records

        attr_reader :source_format

        attr_reader :source_uris

        attr_reader :schema

        attr_reader :google_sheets_options

        attr_reader :csv_options

        attr_reader :bigtable_options

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @autodetect = args['autodetect']
          @compression = args['compression']
          @ignore_unknown_values = args['ignoreUnknownValues']
          @max_bad_records = args['maxBadRecords']
          @source_format = args['sourceFormat']
          @source_uris = args['sourceUris']
          @schema = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.new(args['schema'], to_s)
          @google_sheets_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.new(args['googleSheetsOptions'], to_s)
          @csv_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.new(args['csvOptions'], to_s)
          @bigtable_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.new(args['bigtableOptions'], to_s)
        end

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