// 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: ChatCompletionMessageToolCall
// ==========================================

/// A tool call generated by the model, such as a function call.
@freezed
class ChatCompletionMessageToolCall with _$ChatCompletionMessageToolCall {
  const ChatCompletionMessageToolCall._();

  /// Factory constructor for ChatCompletionMessageToolCall
  const factory ChatCompletionMessageToolCall({
    /// The ID of the tool call.
    required String id,

    /// The type of the tool. Currently, only `function` is supported.
    required ChatCompletionMessageToolCallType type,

    /// The name and arguments of a function that should be called, as generated by the model.
    required ChatCompletionMessageFunctionCall function,
  }) = _ChatCompletionMessageToolCall;

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

  /// List of all property names of schema
  static const List<String> propertyNames = ['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 {
      'id': id,
      'type': type,
      'function': function,
    };
  }
}

// ==========================================
// ENUM: ChatCompletionMessageToolCallType
// ==========================================

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