@@ -90,6 +90,8 @@ class InitialSnapshot {
9090 /// Search for "realm_wildcard_mention_policy" in https://zulip.com/api/register-queue.
9191 final RealmWildcardMentionPolicy realmWildcardMentionPolicy;
9292
93+ final RealmTopicsPolicy ? realmTopicsPolicy; // TODO(server-11)
94+
9395 final bool realmMandatoryTopics;
9496
9597 final String realmName;
@@ -183,6 +185,7 @@ class InitialSnapshot {
183185 required this .realmCanDeleteOwnMessageGroup,
184186 required this .realmDeleteOwnMessagePolicy,
185187 required this .realmWildcardMentionPolicy,
188+ required this .realmTopicsPolicy,
186189 required this .realmMandatoryTopics,
187190 required this .realmName,
188191 required this .realmWaitingPeriodThreshold,
@@ -238,6 +241,28 @@ enum RealmDeleteOwnMessagePolicy {
238241 int toJson () => apiValue;
239242}
240243
244+ /// A value of [InitialSnapshot.realmTopicsPolicy] .
245+ ///
246+ /// For docs, search for "realm_topics_policy"
247+ /// in <https://zulip.com/api/register-queue#response>.
248+ @JsonEnum (valueField: 'apiValue' )
249+ enum RealmTopicsPolicy {
250+ allowEmptyTopic (apiValue: 'allow_empty_topic' ),
251+ disableEmptyTopic (apiValue: 'disable_empty_topic' ),
252+ unknown (apiValue: null );
253+
254+ const RealmTopicsPolicy ({required this .apiValue});
255+
256+ final String ? apiValue;
257+
258+ String ? toJson () => apiValue;
259+
260+ static RealmTopicsPolicy fromApiValue (String value) => _byApiValue[value]! ;
261+
262+ static final _byApiValue = _$RealmTopicsPolicyEnumMap
263+ .map ((key, value) => MapEntry (value, key));
264+ }
265+
241266/// An item in `realm_default_external_accounts` .
242267///
243268/// For docs, search for "realm_default_external_accounts:"
0 commit comments