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

// ==========================================
// CLASS: ChatCompletionStreamMessageToolCallChunk
// ==========================================

/// The tool that should be called, as generated by the model.
@freezed
class ChatCompletionStreamMessageToolCallChunk
    with _$ChatCompletionStreamMessageToolCallChunk {
  const ChatCompletionStreamMessageToolCallChunk._();

  /// Factory constructor for ChatCompletionStreamMessageToolCallChunk
  const factory ChatCompletionStreamMessageToolCallChunk({
    /// No Description
    required int index,

    /// The ID of the tool call.
    @JsonKey(includeIfNull: false) String? id,

    /// The type of the tool. Currently, only `function` is supported.
    @JsonKey(
      includeIfNull: false,
      unknownEnumValue: JsonKey.nullForUndefinedEnumValue,
    )
    ChatCompletionStreamMessageToolCallChunkType? type,

    /// The name and arguments of a function that should be called, as generated by the model.
    @JsonKey(includeIfNull: false)
    ChatCompletionStreamMessageFunctionCall? function,
  }) = _ChatCompletionStreamMessageToolCallChunk;

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

  /// List of all property names of schema
  static const List<String> propertyNames = ['index', 'id', 'type', 'function'];

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

  /// Map representation of object (not serialized)
  Map<String, dynamic> toMap() {
    return {
      'index': index,
      'id': id,
      'type': type,
      'function': function,
    };
  }
}

// ==========================================
// ENUM: ChatCompletionStreamMessageToolCallChunkType
// ==========================================

/// The type of the tool. Currently, only `function` is supported.
enum ChatCompletionStreamMessageToolCallChunkType {
  @JsonValue('function')
  function,
}
