Remove timestamp.proto from QUICHE BlindSignAuth copybara. This will enable the standalone Anonymous Tokens Git repo to build properly.

PiperOrigin-RevId: 567348284
diff --git a/build/source_list.bzl b/build/source_list.bzl
index 859b18b..4174621 100644
--- a/build/source_list.bzl
+++ b/build/source_list.bzl
@@ -1635,7 +1635,6 @@
     "blind_sign_auth/proto/key_services.proto",
     "blind_sign_auth/proto/public_metadata.proto",
     "blind_sign_auth/proto/spend_token_data.proto",
-    "blind_sign_auth/proto/timestamp.proto",
 ]
 libevent_hdrs = [
     "quic/bindings/quic_libevent.h",
diff --git a/build/source_list.gni b/build/source_list.gni
index 9b1a885..2681949 100644
--- a/build/source_list.gni
+++ b/build/source_list.gni
@@ -1640,7 +1640,6 @@
     "src/quiche/blind_sign_auth/proto/key_services.proto",
     "src/quiche/blind_sign_auth/proto/public_metadata.proto",
     "src/quiche/blind_sign_auth/proto/spend_token_data.proto",
-    "src/quiche/blind_sign_auth/proto/timestamp.proto",
 ]
 libevent_hdrs = [
     "src/quiche/quic/bindings/quic_libevent.h",
diff --git a/build/source_list.json b/build/source_list.json
index 3507940..ad9e6d4 100644
--- a/build/source_list.json
+++ b/build/source_list.json
@@ -1638,8 +1638,7 @@
     "quiche/blind_sign_auth/proto/get_initial_data.proto",
     "quiche/blind_sign_auth/proto/key_services.proto",
     "quiche/blind_sign_auth/proto/public_metadata.proto",
-    "quiche/blind_sign_auth/proto/spend_token_data.proto",
-    "quiche/blind_sign_auth/proto/timestamp.proto"
+    "quiche/blind_sign_auth/proto/spend_token_data.proto"
   ],
   "libevent_hdrs": [
     "quiche/quic/bindings/quic_libevent.h"
diff --git a/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.cc b/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.cc
index 0f41322..f311d3c 100644
--- a/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.cc
+++ b/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.cc
@@ -35,7 +35,7 @@
 }
 
 absl::StatusOr<absl::Time> TimeFromProto(
-    const quiche::protobuf::Timestamp& proto) {
+    const private_membership::anonymous_tokens::Timestamp& proto) {
   const auto sec = proto.seconds();
   const auto ns = proto.nanos();
   // sec must be [0001-01-01T00:00:00Z, 9999-12-31T23:59:59.999999999Z]
@@ -49,8 +49,8 @@
          absl::Nanoseconds(proto.nanos());
 }
 
-absl::StatusOr<quiche::protobuf::Timestamp> TimeToProto(absl::Time time) {
-  quiche::protobuf::Timestamp proto;
+absl::StatusOr<private_membership::anonymous_tokens::Timestamp> TimeToProto(absl::Time time) {
+  private_membership::anonymous_tokens::Timestamp proto;
   const int64_t seconds = absl::ToUnixSeconds(time);
   proto.set_seconds(seconds);
   proto.set_nanos((time - absl::FromUnixSeconds(seconds)) /
diff --git a/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.h b/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.h
index bc9b8df..f510516 100644
--- a/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.h
+++ b/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.h
@@ -15,7 +15,7 @@
 #ifndef THIRD_PARTY_ANONYMOUS_TOKENS_CPP_SHARED_PROTO_UTILS_H_
 #define THIRD_PARTY_ANONYMOUS_TOKENS_CPP_SHARED_PROTO_UTILS_H_
 
-#include "quiche/blind_sign_auth/proto/timestamp.pb.h"
+#include "quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.pb.h"
 #include "absl/status/statusor.h"
 #include "absl/strings/string_view.h"
 #include "absl/time/time.h"
@@ -33,18 +33,18 @@
 absl::StatusOr<AnonymousTokensUseCase> QUICHE_EXPORT ParseUseCase(
     absl::string_view use_case);
 
-// Takes in quiche::protobuf::Timestamp and converts it to absl::Time.
+// Takes in private_membership::anonymous_tokens::Timestamp and converts it to absl::Time.
 //
 // Timestamp is defined here:
-// https://developers.google.com/protocol-buffers/docs/reference/quiche.protobuf#timestamp
+// https://developers.google.com/protocol-buffers/docs/reference/private_membership.anonymous_tokens#timestamp
 absl::StatusOr<absl::Time> QUICHE_EXPORT TimeFromProto(
-    const quiche::protobuf::Timestamp& proto);
+    const private_membership::anonymous_tokens::Timestamp& proto);
 
-// Takes in absl::Time and converts it to quiche::protobuf::Timestamp.
+// Takes in absl::Time and converts it to private_membership::anonymous_tokens::Timestamp.
 //
 // Timestamp is defined here:
-// https://developers.google.com/protocol-buffers/docs/reference/quiche.protobuf#timestamp
-absl::StatusOr<quiche::protobuf::Timestamp> QUICHE_EXPORT TimeToProto(
+// https://developers.google.com/protocol-buffers/docs/reference/private_membership.anonymous_tokens#timestamp
+absl::StatusOr<private_membership::anonymous_tokens::Timestamp> QUICHE_EXPORT TimeToProto(
     absl::Time time);
 
 }  // namespace anonymous_tokens
diff --git a/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils_test.cc b/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils_test.cc
index 5c7d845..5018734 100644
--- a/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils_test.cc
+++ b/quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils_test.cc
@@ -14,7 +14,7 @@
 
 #include "quiche/blind_sign_auth/anonymous_tokens/cpp/shared/proto_utils.h"
 
-#include "quiche/blind_sign_auth/proto/timestamp.pb.h"
+#include "quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.pb.h"
 #include "quiche/common/platform/api/quiche_test.h"
 #include "quiche/common/test_tools/quiche_test_utils.h"
 #include "absl/status/status.h"
@@ -50,7 +50,7 @@
 }
 
 TEST(ProtoUtilsTest, TimeFromProtoGood) {
-  quiche::protobuf::Timestamp timestamp;
+  private_membership::anonymous_tokens::Timestamp timestamp;
   timestamp.set_seconds(1234567890);
   timestamp.set_nanos(12345);
   ANON_TOKENS_ASSERT_OK_AND_ASSIGN(absl::Time time, TimeFromProto(timestamp));
@@ -58,7 +58,7 @@
 }
 
 TEST(ProtoUtilsTest, TimeFromProtoBad) {
-  quiche::protobuf::Timestamp proto;
+  private_membership::anonymous_tokens::Timestamp proto;
   proto.set_nanos(-1);
   EXPECT_THAT(TimeFromProto(proto).status().code(),
               absl::StatusCode::kInvalidArgument);
@@ -70,7 +70,7 @@
 }
 
 TEST(ProtoUtilsTest, TimeToProtoGood) {
-  quiche::protobuf::Timestamp proto;
+  private_membership::anonymous_tokens::Timestamp proto;
   ANON_TOKENS_ASSERT_OK_AND_ASSIGN(
       proto, TimeToProto(absl::FromUnixSeconds(1596762373)));
   EXPECT_EQ(proto.seconds(), 1596762373);
@@ -83,7 +83,7 @@
 }
 
 TEST(ProtoUtilsTest, TimeToProtoBad) {
-  absl::StatusOr<quiche::protobuf::Timestamp> proto;
+  absl::StatusOr<private_membership::anonymous_tokens::Timestamp> proto;
   proto = TimeToProto(absl::FromUnixSeconds(253402300800));
   EXPECT_THAT(proto.status().code(), absl::StatusCode::kInvalidArgument);
 }
diff --git a/quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.proto b/quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.proto
index d0af58c..1f50fc0 100644
--- a/quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.proto
+++ b/quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.proto
@@ -16,7 +16,10 @@
 
 package private_membership.anonymous_tokens;
 
-import "quiche/blind_sign_auth/proto/timestamp.proto";
+message Timestamp {
+ int64 seconds = 1;
+ int32 nanos = 2;
+}
 
 // Different use cases for the Anonymous Tokens service.
 // Next ID: 10
@@ -104,10 +107,10 @@
   // Timestamp of expiration.
   //
   // Note that we will not return keys whose expiration times are in the past.
-  quiche.protobuf.Timestamp expiration_time = 3;
+  private_membership.anonymous_tokens.Timestamp expiration_time = 3;
 
   // Key becomes valid at key_validity_start_time.
-  quiche.protobuf.Timestamp key_validity_start_time = 8;
+  private_membership.anonymous_tokens.Timestamp key_validity_start_time = 8;
 
   // Hash function used in computing hash of the signing message
   // (see https://tools.ietf.org/html/rfc8017#section-9.1.1)
@@ -156,7 +159,7 @@
   // requested key_validity_start_time.
   //
   // If unset it will be set to current time.
-  quiche.protobuf.Timestamp key_validity_start_time = 3
+  private_membership.anonymous_tokens.Timestamp key_validity_start_time = 3
       ;
 
   // Public key that is definitely not valid after this particular time. If
@@ -164,7 +167,7 @@
   //
   // Note: It is possible that the key becomes invalid before this time. But the
   // key should not be valid after this time.
-  quiche.protobuf.Timestamp key_validity_end_time = 4
+  private_membership.anonymous_tokens.Timestamp key_validity_end_time = 4
       ;
 }
 
diff --git a/quiche/blind_sign_auth/blind_sign_auth_protos.h b/quiche/blind_sign_auth/blind_sign_auth_protos.h
index 8927731..15e3b9a 100644
--- a/quiche/blind_sign_auth/blind_sign_auth_protos.h
+++ b/quiche/blind_sign_auth/blind_sign_auth_protos.h
@@ -1,7 +1,7 @@
 #ifndef QUICHE_BLIND_SIGN_AUTH_BLIND_SIGN_AUTH_PROTOS_H_
 #define QUICHE_BLIND_SIGN_AUTH_BLIND_SIGN_AUTH_PROTOS_H_
 
-#include "quiche/blind_sign_auth/proto/timestamp.pb.h"  // IWYU pragma: export
+#include "quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.pb.h"  // IWYU pragma: export
 #include "quiche/blind_sign_auth/proto/auth_and_sign.pb.h"  // IWYU pragma: export
 #include "quiche/blind_sign_auth/proto/blind_sign_auth_options.pb.h"  // IWYU pragma: export
 #include "quiche/blind_sign_auth/proto/get_initial_data.pb.h"  // IWYU pragma: export
diff --git a/quiche/blind_sign_auth/blind_sign_auth_test.cc b/quiche/blind_sign_auth/blind_sign_auth_test.cc
index fc90bee..872d54e 100644
--- a/quiche/blind_sign_auth/blind_sign_auth_test.cc
+++ b/quiche/blind_sign_auth/blind_sign_auth_test.cc
@@ -64,7 +64,7 @@
     // Create public metadata info.
     privacy::ppn::PublicMetadata::Location location;
     location.set_country("US");
-    quiche::protobuf::Timestamp expiration;
+    private_membership::anonymous_tokens::Timestamp expiration;
     expiration.set_seconds(absl::ToUnixSeconds(absl::Now() + absl::Hours(1)));
     privacy::ppn::PublicMetadata public_metadata;
     *public_metadata.mutable_exit_location() = location;
diff --git a/quiche/blind_sign_auth/proto/public_metadata.proto b/quiche/blind_sign_auth/proto/public_metadata.proto
index 1ba729d..f9f37d4 100644
--- a/quiche/blind_sign_auth/proto/public_metadata.proto
+++ b/quiche/blind_sign_auth/proto/public_metadata.proto
@@ -16,7 +16,7 @@
 
 package privacy.ppn;
 
-import "quiche/blind_sign_auth/proto/timestamp.proto";
+import "quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.proto";
 
 option java_multiple_files = true;
 
@@ -41,7 +41,7 @@
   string service_type = 2;
 
   // When the token and metadata expire.
-  quiche.protobuf.Timestamp expiration = 3;
+  private_membership.anonymous_tokens.Timestamp expiration = 3;
 
   // Indicates the debug context of this payload.
   enum DebugMode {
diff --git a/quiche/blind_sign_auth/proto/timestamp.proto b/quiche/blind_sign_auth/proto/timestamp.proto
deleted file mode 100644
index 1d99392..0000000
--- a/quiche/blind_sign_auth/proto/timestamp.proto
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2023 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS-IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-syntax = "proto3";
-
-package quiche.protobuf;
-
-// Copied from
-// https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/timestamp.proto.
-message Timestamp {
-  // Represents seconds of UTC time since Unix epoch
-  // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
-  // 9999-12-31T23:59:59Z inclusive.
-  int64 seconds = 1;
-
-  // Non-negative fractions of a second at nanosecond resolution. Negative
-  // second values with fractions must still have non-negative nanos values
-  // that count forward in time. Must be from 0 to 999,999,999
-  // inclusive.
-  int32 nanos = 2;
-}