lib/mbta/model/occupancy_resource.ex

# NOTE: This file is auto generated by OpenAPI Generator 7.1.0 (https://openapi-generator.tech).
# Do not edit this file manually.

defmodule MBTA.Model.OccupancyResource do
  @moduledoc """
  An expected or predicted level of occupancy for a given trip. 
  """

  @derive Jason.Encoder
  defstruct [
    :type,
    :relationships,
    :links,
    :id,
    :attributes
  ]

  @type t :: %__MODULE__{
    :type => String.t | nil,
    :relationships => map() | nil,
    :links => map() | nil,
    :id => String.t | nil,
    :attributes => MBTA.Model.OccupancyResourceAttributes.t | nil
  }

  alias MBTA.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:attributes, :struct, MBTA.Model.OccupancyResourceAttributes)
  end
end