LabelValueDefinition constructor

  1. @JsonSerializable(includeIfNull: false)
const LabelValueDefinition({
  1. @Default(comAtprotoLabelDefsLabelValueDefinition) @JsonKey(name: r'$type') String $type,
  2. required String identifier,
  3. @ULabelValueDefinitionSeverityConverter() required ULabelValueDefinitionSeverity severity,
  4. @ULabelValueDefinitionBlurConverter() required ULabelValueDefinitionBlur blurs,
  5. @ULabelValueDefinitionDefaultSettingConverter() ULabelValueDefinitionDefaultSetting? defaultSetting,
  6. @Default(false) bool adultOnly,
  7. @LabelValueDefinitionStringsConverter() required List<LabelValueDefinitionStrings> locales,
  8. @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory LabelValueDefinition({
  /// The unique namespace for this lex object.
  ///
  /// `com.atproto.label.defs#labelValueDefinition`
  @Default(comAtprotoLabelDefsLabelValueDefinition)
  @JsonKey(name: r'$type')
  String $type,

  /// The value of the label being defined. Must only include lowercase
  /// ascii and the '-' character ([a-z-]+).
  required String identifier,

  /// How should a client visually convey this label? 'inform' means
  /// neutral and informational; 'alert' means negative and warning;
  /// 'none' means show nothing.
  @ULabelValueDefinitionSeverityConverter()
  required ULabelValueDefinitionSeverity severity,

  /// What should this label hide in the UI, if applied? 'content'
  /// hides all of the target; 'media' hides the images/video/audio;
  /// 'none' hides nothing.
  @ULabelValueDefinitionBlurConverter()
  required ULabelValueDefinitionBlur blurs,

  /// The default setting for this label.
  @ULabelValueDefinitionDefaultSettingConverter()
  ULabelValueDefinitionDefaultSetting? defaultSetting,

  /// Does the user need to have adult content enabled in order to
  /// configure this label?
  @Default(false) bool adultOnly,
  @LabelValueDefinitionStringsConverter()
  required List<LabelValueDefinitionStrings> locales,

  /// Contains unknown objects not defined in Lexicon.
  @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
}) = _LabelValueDefinition;