// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto3";

package autofill;

import "components/optimization_guide/proto/features/forms_classifications.proto";

option optimize_for = LITE_RUNTIME;

message AutofillAiModelCacheEntryWithMetadata {
  // The actual model server response.
  optimization_guide.proto.AutofillAiTypeResponse server_response = 1;

  // The time the cache entry was generated serialized in microseconds since
  // the Windows epoch.
  int64 creation_time = 2;

  message FieldIdentifier {
    uint32 field_signature = 1;
    uint32 field_rank_in_signature_group = 2;
  }

  // Identifiers for the fields described in  `server_response.field_responses`
  // that allows Autofill to identify them. The size of this member should
  // match that of `server_response.field_responses`.
  repeated FieldIdentifier field_identifiers = 3;
}
