lib/mbta/model/service_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.ServiceResource do
  @moduledoc """
  Service represents a set of dates on which trips run.
  """

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

  alias MBTA.Deserializer

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