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

/// Represents an embedding vector returned by embedding endpoint.
@freezed
class CreateEmbeddingResponse with _$CreateEmbeddingResponse {
  const CreateEmbeddingResponse._();

  /// Factory constructor for CreateEmbeddingResponse
  const factory CreateEmbeddingResponse({
    /// The list of embeddings generated by the model.
    required List<Embedding> data,

    /// The name of the model used to generate the embedding.
    required String model,

    /// The object type, which is always "list".
    required CreateEmbeddingResponseObject object,

    /// The usage information for the request.
    @JsonKey(includeIfNull: false) EmbeddingUsage? usage,
  }) = _CreateEmbeddingResponse;

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

  /// List of all property names of schema
  static const List<String> propertyNames = [
    'data',
    'model',
    'object',
    'usage'
  ];

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

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

// ==========================================
// ENUM: CreateEmbeddingResponseObject
// ==========================================

/// The object type, which is always "list".
enum CreateEmbeddingResponseObject {
  @JsonValue('list')
  list,
}
