# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.HealthCare.V1beta1.Model.SchemaConfig do
  @moduledoc """
  Configuration for the FHIR BigQuery schema. Determines how the server generates the schema.

  ## Attributes

  *   `lastUpdatedPartitionConfig` (*type:* `GoogleApi.HealthCare.V1beta1.Model.TimePartitioning.t`, *default:* `nil`) - The configuration for exported BigQuery tables to be partitioned by FHIR resource's last updated time column.
  *   `recursiveStructureDepth` (*type:* `String.t`, *default:* `nil`) - The depth for all recursive structures in the output analytics schema. For example, `concept` in the CodeSystem resource is a recursive structure; when the depth is 2, the CodeSystem table will have a column called `concept.concept` but not `concept.concept.concept`. If not specified or set to 0, the server will use the default value 2. The maximum depth allowed is 5.
  *   `schemaType` (*type:* `String.t`, *default:* `nil`) - Specifies the output schema type. Schema type is required.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :lastUpdatedPartitionConfig =>
            GoogleApi.HealthCare.V1beta1.Model.TimePartitioning.t() | nil,
          :recursiveStructureDepth => String.t() | nil,
          :schemaType => String.t() | nil
        }

  field(:lastUpdatedPartitionConfig, as: GoogleApi.HealthCare.V1beta1.Model.TimePartitioning)
  field(:recursiveStructureDepth)
  field(:schemaType)
end

defimpl Poison.Decoder, for: GoogleApi.HealthCare.V1beta1.Model.SchemaConfig do
  def decode(value, options) do
    GoogleApi.HealthCare.V1beta1.Model.SchemaConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.HealthCare.V1beta1.Model.SchemaConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
