# 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.Dataset do
  @moduledoc """
  A message representing a health dataset. A health dataset represents a collection of healthcare data pertaining to one or more patients. This may include multiple modalities of healthcare data, such as electronic medical records or medical imaging data.

  ## Attributes

  *   `encryptionSpec` (*type:* `GoogleApi.HealthCare.V1.Model.EncryptionSpec.t`, *default:* `nil`) - Optional. Customer-managed encryption key spec for a Dataset. If set, this Dataset and all of its sub-resources will be secured by this key. If empty, the Dataset is secured by the default Google encryption key.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.
  *   `timeZone` (*type:* `String.t`, *default:* `nil`) - Optional. The default timezone used by this dataset. Must be a either a valid IANA time zone name such as "America/New_York" or empty, which defaults to UTC. This is used for parsing times in resources, such as HL7 messages, where no explicit timezone is specified.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :encryptionSpec => GoogleApi.HealthCare.V1.Model.EncryptionSpec.t() | nil,
          :name => String.t() | nil,
          :timeZone => String.t() | nil
        }

  field(:encryptionSpec, as: GoogleApi.HealthCare.V1.Model.EncryptionSpec)
  field(:name)
  field(:timeZone)
end

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

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