# 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.Annotation do
  @moduledoc """
  An annotation record.

  ## Attributes

  *   `annotationSource` (*type:* `GoogleApi.HealthCare.V1beta1.Model.AnnotationSource.t`, *default:* `nil`) - Required. Details of the source.
  *   `customData` (*type:* `map()`, *default:* `nil`) - Additional information for this annotation record, such as annotator and verifier information or study campaign.
  *   `imageAnnotation` (*type:* `GoogleApi.HealthCare.V1beta1.Model.ImageAnnotation.t`, *default:* `nil`) - Annotations for images. For example, bounding polygons.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Resource name of the Annotation, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}`.
  *   `resourceAnnotation` (*type:* `GoogleApi.HealthCare.V1beta1.Model.ResourceAnnotation.t`, *default:* `nil`) - Annotations for resource. For example, classification tags.
  *   `textAnnotation` (*type:* `GoogleApi.HealthCare.V1beta1.Model.SensitiveTextAnnotation.t`, *default:* `nil`) - Annotations for sensitive texts. For example, a range that describes the location of sensitive text.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :annotationSource => GoogleApi.HealthCare.V1beta1.Model.AnnotationSource.t() | nil,
          :customData => map() | nil,
          :imageAnnotation => GoogleApi.HealthCare.V1beta1.Model.ImageAnnotation.t() | nil,
          :name => String.t() | nil,
          :resourceAnnotation => GoogleApi.HealthCare.V1beta1.Model.ResourceAnnotation.t() | nil,
          :textAnnotation => GoogleApi.HealthCare.V1beta1.Model.SensitiveTextAnnotation.t() | nil
        }

  field(:annotationSource, as: GoogleApi.HealthCare.V1beta1.Model.AnnotationSource)
  field(:customData, type: :map)
  field(:imageAnnotation, as: GoogleApi.HealthCare.V1beta1.Model.ImageAnnotation)
  field(:name)
  field(:resourceAnnotation, as: GoogleApi.HealthCare.V1beta1.Model.ResourceAnnotation)
  field(:textAnnotation, as: GoogleApi.HealthCare.V1beta1.Model.SensitiveTextAnnotation)
end

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

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