# 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.V1.Model.Entity do
  @moduledoc """
  The candidate entities that an entity mention could link to.

  ## Attributes

  *   `entityId` (*type:* `String.t`, *default:* `nil`) - entity_id is a first class field entity_id uniquely identifies this concept and its meta-vocabulary. For example, "UMLS/C0000970".
  *   `preferredTerm` (*type:* `String.t`, *default:* `nil`) - preferred_term is the preferred term for this concept. For example, "Acetaminophen". For ad hoc entities formed by normalization, this is the most popular unnormalized string.
  *   `vocabularyCodes` (*type:* `list(String.t)`, *default:* `nil`) - Vocabulary codes are first-class fields and differentiated from the concept unique identifier (entity_id). vocabulary_codes contains the representation of this concept in particular vocabularies, such as ICD-10, SNOMED-CT and RxNORM. These are prefixed by the name of the vocabulary, followed by the unique code within that vocabulary. For example, "RXNORM/A10334543".
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :entityId => String.t() | nil,
          :preferredTerm => String.t() | nil,
          :vocabularyCodes => list(String.t()) | nil
        }

  field(:entityId)
  field(:preferredTerm)
  field(:vocabularyCodes, type: :list)
end

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

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