# 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.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2TicketInfo do
  @moduledoc """
  Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding.

  ## Attributes

  *   `assignee` (*type:* `String.t`, *default:* `nil`) - The assignee of the ticket in the ticket system.
  *   `description` (*type:* `String.t`, *default:* `nil`) - The description of the ticket in the ticket system.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The identifier of the ticket in the ticket system.
  *   `status` (*type:* `String.t`, *default:* `nil`) - The latest status of the ticket, as reported by the ticket system.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the ticket was last updated, as reported by the ticket system.
  *   `uri` (*type:* `String.t`, *default:* `nil`) - The link to the ticket in the ticket system.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :assignee => String.t() | nil,
          :description => String.t() | nil,
          :id => String.t() | nil,
          :status => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :uri => String.t() | nil
        }

  field(:assignee)
  field(:description)
  field(:id)
  field(:status)
  field(:updateTime, as: DateTime)
  field(:uri)
end

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

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