# 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.DeidentifyConfig do
  @moduledoc """
  Configures de-id options specific to different types of content. Each submessage customizes the handling of an https://tools.ietf.org/html/rfc6838 media type or subtype. Configs are applied in a nested manner at runtime.

  ## Attributes

  *   `annotation` (*type:* `GoogleApi.HealthCare.V1beta1.Model.AnnotationConfig.t`, *default:* `nil`) - Configures how annotations, meaning that the location and infoType of sensitive information findings, are created during de-identification. If unspecified, no annotations are created.
  *   `dicom` (*type:* `GoogleApi.HealthCare.V1beta1.Model.DicomConfig.t`, *default:* `nil`) - Configures de-id of application/DICOM content. Deprecated. Use `dicom_tag_config` instead.
  *   `dicomTagConfig` (*type:* `GoogleApi.HealthCare.V1beta1.Model.DicomTagConfig.t`, *default:* `nil`) - Configures de-id of application/DICOM content.
  *   `fhir` (*type:* `GoogleApi.HealthCare.V1beta1.Model.FhirConfig.t`, *default:* `nil`) - Configures de-id of application/FHIR content. Deprecated. Use `fhir_field_config` instead.
  *   `fhirFieldConfig` (*type:* `GoogleApi.HealthCare.V1beta1.Model.FhirFieldConfig.t`, *default:* `nil`) - Configures de-id of application/FHIR content.
  *   `image` (*type:* `GoogleApi.HealthCare.V1beta1.Model.ImageConfig.t`, *default:* `nil`) - Configures the de-identification of image pixels in the source_dataset. Deprecated. Use `dicom_tag_config.options.clean_image` instead.
  *   `operationMetadata` (*type:* `GoogleApi.HealthCare.V1beta1.Model.DeidentifyOperationMetadata.t`, *default:* `nil`) - Details about the work the de-identify operation performed.
  *   `text` (*type:* `GoogleApi.HealthCare.V1beta1.Model.TextConfig.t`, *default:* `nil`) - Configures de-identification of text wherever it is found in the source_dataset.
  *   `useRegionalDataProcessing` (*type:* `boolean()`, *default:* `nil`) - Ensures in-flight data remains in the region of origin during de-identification. The default value is false. Using this option results in a significant reduction of throughput, and is not compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. If the deprecated DicomConfig or FhirConfig are used, then `LOCATION` must be excluded within TextConfig, and must also be excluded within ImageConfig if image redaction is required.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :annotation => GoogleApi.HealthCare.V1beta1.Model.AnnotationConfig.t() | nil,
          :dicom => GoogleApi.HealthCare.V1beta1.Model.DicomConfig.t() | nil,
          :dicomTagConfig => GoogleApi.HealthCare.V1beta1.Model.DicomTagConfig.t() | nil,
          :fhir => GoogleApi.HealthCare.V1beta1.Model.FhirConfig.t() | nil,
          :fhirFieldConfig => GoogleApi.HealthCare.V1beta1.Model.FhirFieldConfig.t() | nil,
          :image => GoogleApi.HealthCare.V1beta1.Model.ImageConfig.t() | nil,
          :operationMetadata =>
            GoogleApi.HealthCare.V1beta1.Model.DeidentifyOperationMetadata.t() | nil,
          :text => GoogleApi.HealthCare.V1beta1.Model.TextConfig.t() | nil,
          :useRegionalDataProcessing => boolean() | nil
        }

  field(:annotation, as: GoogleApi.HealthCare.V1beta1.Model.AnnotationConfig)
  field(:dicom, as: GoogleApi.HealthCare.V1beta1.Model.DicomConfig)
  field(:dicomTagConfig, as: GoogleApi.HealthCare.V1beta1.Model.DicomTagConfig)
  field(:fhir, as: GoogleApi.HealthCare.V1beta1.Model.FhirConfig)
  field(:fhirFieldConfig, as: GoogleApi.HealthCare.V1beta1.Model.FhirFieldConfig)
  field(:image, as: GoogleApi.HealthCare.V1beta1.Model.ImageConfig)
  field(:operationMetadata, as: GoogleApi.HealthCare.V1beta1.Model.DeidentifyOperationMetadata)
  field(:text, as: GoogleApi.HealthCare.V1beta1.Model.TextConfig)
  field(:useRegionalDataProcessing)
end

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

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