lib/mbta/model/informed_entity.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.InformedEntity do
  @moduledoc """
  An entity affected by an alert. At least one of the fields other than `activities` will be non-null. The affected entity is the intersection of these fields, not the union: if `stop` and `route` both have values, the alert does not affect the entire route.  See [GTFS Realtime `FeedMessage` `FeedEntity` `Alert` `EntitySelector`](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-entityselector).  * `activities` - The activities affected. * `direction_id` - The direction of the affected `trip`. See     [GTFS `trips.txt` `direction_id`](https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#tripstxt). * `facility` - The facility affected. * `route` - The route affected. See     [GTFS `routes.txt` `route_id`](https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#routestxt) * `route_type` - The type of route affected. If present alone, indicates the entire mode of transit is affected. See     [GTFS `routes.txt` `route_type`](https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#routestxt) * `stop` - The stop affected. See     [GTFS `stops.txt` `stop_id`](https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#stopstxt) * `trip` - The trip affected. See     [GTFS `trips.txt` `trip_id`](https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#tripstxt) 
  """

  @derive Jason.Encoder
  defstruct [
    :trip,
    :stop,
    :route_type,
    :route,
    :facility,
    :direction_id,
    :activities
  ]

  @type t :: %__MODULE__{
    :trip => String.t | nil,
    :stop => String.t | nil,
    :route_type => integer() | nil,
    :route => String.t | nil,
    :facility => String.t | nil,
    :direction_id => integer() | nil,
    :activities => [String.t] | nil
  }

  def decode(value) do
    value
  end
end