lib/mbta/model/route_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.RouteResource do
  @moduledoc """
  Path a vehicle travels during service. See [GTFS `routes.txt](https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#routestxt) for the base specification. 
  """

  @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.RouteResourceAttributes.t | nil
  }

  alias MBTA.Deserializer

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