// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: invalid_annotation_target
part of mistral_a_i_schema;

// ==========================================
// CLASS: ChatCompletionStreamDelta
// ==========================================

/// A chat completion delta generated by streamed model responses.
@freezed
class ChatCompletionStreamDelta with _$ChatCompletionStreamDelta {
  const ChatCompletionStreamDelta._();

  /// Factory constructor for ChatCompletionStreamDelta
  const factory ChatCompletionStreamDelta({
    /// The role of the message.
    @JsonKey(
      includeIfNull: false,
      unknownEnumValue: JsonKey.nullForUndefinedEnumValue,
    )
    ChatCompletionMessageRole? role,

    /// The message content.
    @JsonKey(includeIfNull: false) String? content,
  }) = _ChatCompletionStreamDelta;

  /// Object construction from a JSON representation
  factory ChatCompletionStreamDelta.fromJson(Map<String, dynamic> json) =>
      _$ChatCompletionStreamDeltaFromJson(json);

  /// List of all property names of schema
  static const List<String> propertyNames = ['role', 'content'];

  /// Perform validations on the schema property values
  String? validateSchema() {
    return null;
  }

  /// Map representation of object (not serialized)
  Map<String, dynamic> toMap() {
    return {
      'role': role,
      'content': content,
    };
  }
}
