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

// Describes a user affiliated with a Chrome OS Session.

syntax = "proto2";

package reporting;

option optimize_for = LITE_RUNTIME;

// Used for annotating sensitive fields in google3.
// ${COPYBARA_DATAPOL_IMPORT}

// Common information about Session Affiliated User accounts.
message SessionAffiliatedUser {
  // Email address associated with the account.
  optional string user_email = 1;
}

message SessionUnaffiliatedUser {
  // String user id is deprecated because it was filled using a cryptographic
  // hash which generated a non-readable byte string. The ID must be human
  // readable since it's displayed in a UI.
  optional string user_id = 1 [
    // copybara:datapol_begin
    // (datapol.semantic_type) = ST_NOT_REQUIRED,
    // copybara:datapol_end
    deprecated = true
  ];

  // Unique per-device user id. Used to track unaffiliated user activity on a
  // given device without revealing the identity of the user.
  optional int64 user_id_num = 2
      // copybara:datapol_begin
      // [(datapol.semantic_type) = ST_NOT_REQUIRED]
      // copybara:datapol_end
      ;
}
