# 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.EntityMention do
  @moduledoc """
  An entity mention in the document.

  ## Attributes

  *   `certaintyAssessment` (*type:* `GoogleApi.HealthCare.V1.Model.Feature.t`, *default:* `nil`) - The certainty assessment of the entity mention. Its value is one of: LIKELY, SOMEWHAT_LIKELY, UNCERTAIN, SOMEWHAT_UNLIKELY, UNLIKELY, CONDITIONAL
  *   `confidence` (*type:* `float()`, *default:* `nil`) - The model's confidence in this entity mention annotation. A number between 0 and 1.
  *   `linkedEntities` (*type:* `list(GoogleApi.HealthCare.V1.Model.LinkedEntity.t)`, *default:* `nil`) - linked_entities are candidate ontological concepts that this entity mention may refer to. They are sorted by decreasing confidence.
  *   `mentionId` (*type:* `String.t`, *default:* `nil`) - mention_id uniquely identifies each entity mention in a single response.
  *   `subject` (*type:* `GoogleApi.HealthCare.V1.Model.Feature.t`, *default:* `nil`) - The subject this entity mention relates to. Its value is one of: PATIENT, FAMILY_MEMBER, OTHER
  *   `temporalAssessment` (*type:* `GoogleApi.HealthCare.V1.Model.Feature.t`, *default:* `nil`) - How this entity mention relates to the subject temporally. Its value is one of: CURRENT, CLINICAL_HISTORY, FAMILY_HISTORY, UPCOMING, ALLERGY
  *   `text` (*type:* `GoogleApi.HealthCare.V1.Model.TextSpan.t`, *default:* `nil`) - text is the location of the entity mention in the document.
  *   `type` (*type:* `String.t`, *default:* `nil`) - The semantic type of the entity: UNKNOWN_ENTITY_TYPE, ALONE, ANATOMICAL_STRUCTURE, ASSISTED_LIVING, BF_RESULT, BM_RESULT, BM_UNIT, BM_VALUE, BODY_FUNCTION, BODY_MEASUREMENT, COMPLIANT, DOESNOT_FOLLOWUP, FAMILY, FOLLOWSUP, LABORATORY_DATA, LAB_RESULT, LAB_UNIT, LAB_VALUE, MEDICAL_DEVICE, MEDICINE, MED_DOSE, MED_DURATION, MED_FORM, MED_FREQUENCY, MED_ROUTE, MED_STATUS, MED_STRENGTH, MED_TOTALDOSE, MED_UNIT, NON_COMPLIANT, OTHER_LIVINGSTATUS, PROBLEM, PROCEDURE, PROCEDURE_RESULT, PROC_METHOD, REASON_FOR_NONCOMPLIANCE, SEVERITY, SUBSTANCE_ABUSE, UNCLEAR_FOLLOWUP.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :certaintyAssessment => GoogleApi.HealthCare.V1.Model.Feature.t() | nil,
          :confidence => float() | nil,
          :linkedEntities => list(GoogleApi.HealthCare.V1.Model.LinkedEntity.t()) | nil,
          :mentionId => String.t() | nil,
          :subject => GoogleApi.HealthCare.V1.Model.Feature.t() | nil,
          :temporalAssessment => GoogleApi.HealthCare.V1.Model.Feature.t() | nil,
          :text => GoogleApi.HealthCare.V1.Model.TextSpan.t() | nil,
          :type => String.t() | nil
        }

  field(:certaintyAssessment, as: GoogleApi.HealthCare.V1.Model.Feature)
  field(:confidence)
  field(:linkedEntities, as: GoogleApi.HealthCare.V1.Model.LinkedEntity, type: :list)
  field(:mentionId)
  field(:subject, as: GoogleApi.HealthCare.V1.Model.Feature)
  field(:temporalAssessment, as: GoogleApi.HealthCare.V1.Model.Feature)
  field(:text, as: GoogleApi.HealthCare.V1.Model.TextSpan)
  field(:type)
end

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

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