// 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.

// If you change or add any fields in this file, update proto_visitors.h and
// potentially proto_enum_conversions.{h, cc}.

syntax = "proto2";

option java_multiple_files = true;
option java_package = "org.chromium.components.sync.protocol";

option optimize_for = LITE_RUNTIME;

package sync_pb;

// LINT.IfChange(AutofillValuableMetadataSpecifics)
// Usage metadata for Google Wallet passes.
message AutofillValuableMetadataSpecifics {
  // Represents the type of the pass.
  enum PassType {
    PASS_TYPE_UNSPECIFIED = 0;
    LOYALTY_CARD = 1;
    VEHICLE_REGISTRATION = 2;
    FLIGHT_RESERVATION = 3;
    PASSPORT = 4;
    DRIVER_LICENSE = 5;
    NATIONAL_ID_CARD = 6;
    REDRESS_NUMBER = 7;
    KNOWN_TRAVELER_NUMBER = 8;
    ORDER = 9;
    SHIPMENT = 10;
  }

  // The id of the Valuabe this metadata belongs to. Used as the client tag.
  optional string valuable_id = 1;

  // The amount of times this Valuable was used.
  optional int64 use_count = 2;

  // The timestamp of the last use of the Valuable.
  optional int64 last_used_date_unix_epoch_micros = 3;

  // The timestamp of the last time the Valuable was modified.
  optional int64 last_modified_date_unix_epoch_micros = 4;

  // The type of the pass.
  optional PassType pass_type = 5;
}
// LINT.ThenChange(//components/autofill/core/browser/webdata/valuables/valuables_sync_util.cc:TrimAutofillValuableMetadataSpecificsDataForCaching)
