Alert class

An alert, indicating some sort of incident in the public transit network.

Inheritance
  • Object
  • GeneratedMessage
  • Alert

Constructors

Alert.new({Iterable<TimeRange>? activePeriod, Iterable<EntitySelector>? informedEntity, Alert_Cause? cause, Alert_Effect? effect, TranslatedString? url, TranslatedString? headerText, TranslatedString? descriptionText, TranslatedString? ttsHeaderText, TranslatedString? ttsDescriptionText, Alert_SeverityLevel? severityLevel, TranslatedImage? image, TranslatedString? imageAlternativeText, TranslatedString? causeDetail, TranslatedString? effectDetail})
factory
Alert.fromBuffer(List<int> i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
factory
Alert.fromJson(String i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
factory

Properties

activePeriod List<TimeRange>
Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them.
no setter
cause Alert_Cause
getter/setter pair
causeDetail TranslatedString
Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included. NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
getter/setter pair
descriptionText TranslatedString
Full description for the alert as plain-text. The information in the description should add to the information of the header.
getter/setter pair
effect Alert_Effect
getter/setter pair
effectDetail TranslatedString
Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included. NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
getter/setter pair
eventPlugin → EventPlugin?
Subclasses can override this getter to be notified of changes to protobuf fields.
no setterinherited
hashCode int
Calculates a hash code based on the contents of the protobuf.
no setterinherited
headerText TranslatedString
Alert header. Contains a short summary of the alert text as plain-text.
getter/setter pair
image TranslatedImage
TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information. NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
getter/setter pair
imageAlternativeText TranslatedString
Text describing the appearance of the linked image in the image field (e.g., in case the image can't be displayed or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt. NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
getter/setter pair
info_ → BuilderInfo
no setteroverride
informedEntity List<EntitySelector>
Entities whose users we should notify of this alert.
no setter
isFrozen bool
Returns true if this message is marked read-only. Otherwise false.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
severityLevel Alert_SeverityLevel
getter/setter pair
ttsDescriptionText TranslatedString
Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
getter/setter pair
ttsHeaderText TranslatedString
Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
getter/setter pair
unknownFields → UnknownFieldSet
no setterinherited
url TranslatedString
The URL which provides additional information about the alert.
getter/setter pair

Methods

addExtension(Extension extension, Object? value) → void
Adds an extension field value to a repeated field.
inherited
check() → void
inherited
clear() → void
Clears all data that was set in this message.
inherited
clearCause() → void
clearCauseDetail() → void
clearDescriptionText() → void
clearEffect() → void
clearEffectDetail() → void
clearExtension(Extension extension) → void
Clears an extension field and also removes the extension.
inherited
clearField(int tagNumber) → void
Clears the contents of a given field.
inherited
clearHeaderText() → void
clearImage() → void
clearImageAlternativeText() → void
clearSeverityLevel() → void
clearTtsDescriptionText() → void
clearTtsHeaderText() → void
clearUrl() → void
clone() Alert
Creates a deep copy of the fields in this message. (The generated code uses mergeFromMessage.)
override
copyWith(void updates(Alert)) Alert
Apply updates to a copy of this message.
override
createEmptyInstance() Alert
Creates an empty instance of the same message type as this.
override
createMapField<K, V>(int tagNumber, MapFieldInfo<K, V> fi) Map<K, V>
Creates a Map representing a map field.
inherited
createRepeatedField<T>(int tagNumber, FieldInfo<T> fi) List<T>
Creates List implementing a mutable repeated field.
inherited
ensureCauseDetail() TranslatedString
ensureDescriptionText() TranslatedString
ensureEffectDetail() TranslatedString
ensureHeaderText() TranslatedString
ensureImage() TranslatedImage
ensureImageAlternativeText() TranslatedString
ensureTtsDescriptionText() TranslatedString
ensureTtsHeaderText() TranslatedString
ensureUrl() TranslatedString
extensionsAreInitialized() bool
inherited
freeze() → GeneratedMessage
Make this message read-only.
inherited
getDefaultForField(int tagNumber) → dynamic
Returns the default value for the given field.
inherited
getExtension(Extension extension) → dynamic
Returns the value of extension.
inherited
getField(int tagNumber) → dynamic
Returns the value of the field associated with tagNumber, or the default value if it is not set.
inherited
getFieldOrNull(int tagNumber) → dynamic
Returns the value of a field, ignoring any defaults.
inherited
getTagNumber(String fieldName) int?
inherited
hasCause() bool
hasCauseDetail() bool
hasDescriptionText() bool
hasEffect() bool
hasEffectDetail() bool
hasExtension(Extension extension) bool
Returns true if a value of extension is present.
inherited
hasField(int tagNumber) bool
Whether this message has a field associated with tagNumber.
inherited
hasHeaderText() bool
hasImage() bool
hasImageAlternativeText() bool
hasRequiredFields() bool
Whether the message has required fields.
inherited
hasSeverityLevel() bool
hasTtsDescriptionText() bool
hasTtsHeaderText() bool
hasUrl() bool
isInitialized() bool
Whether all required fields in the message and embedded messages are set.
inherited
mergeFromBuffer(List<int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges serialized protocol buffer data into this message.
inherited
mergeFromCodedBufferReader(CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
inherited
mergeFromJson(String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges field values from data, a JSON object, encoded as described by GeneratedMessage.writeToJson.
inherited
mergeFromJsonMap(Map<String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges field values from a JSON object represented as a Dart map.
inherited
mergeFromMessage(GeneratedMessage other) → void
Merges the contents of the other into this message.
inherited
mergeFromProto3Json(Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void
Merges field values from json, a JSON object using proto3 encoding.
inherited
mergeUnknownFields(UnknownFieldSet unknownFieldSet) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setExtension(Extension extension, Object value) → void
Sets the value of a non-repeated extension field to value.
inherited
setField(int tagNumber, Object value) → void
Sets the value of a field by its tagNumber.
inherited
toBuilder() → GeneratedMessage
Creates a writable, shallow copy of this message.
inherited
toDebugString() String
Returns a String representation of this message.
inherited
toProto3Json({TypeRegistry typeRegistry = const TypeRegistry.empty()}) Object?
Returns an Object representing Proto3 JSON serialization of this.
inherited
toString() String
Returns a String representation of this message.
inherited
writeToBuffer() Uint8List
inherited
writeToCodedBufferWriter(CodedBufferWriter output) → void
inherited
writeToJson() String
Returns a JSON string that encodes this message.
inherited
writeToJsonMap() Map<String, dynamic>
Returns the JSON encoding of this message as a Dart Map.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create() Alert
createRepeated() → PbList<Alert>
getDefault() Alert