/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * 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
 *
 *      http://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 = "proto2";

package carwatchdog;

import "parser/performancestats.proto";

/**
 * Pulls information about the device's build.
 *
 * Copied from:
 * frameworks/proto_logging/stats/atoms.proto
 */
message BuildInformation {
  // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse.
  // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags.
  optional string fingerprint = 1;

  // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated.
  optional string brand = 2;

  // Build.PRODUCT. The name of the overall product.
  optional string product = 3;

  // Build.DEVICE. The name of the industrial design.
  optional string device = 4;

  // Build.VERSION.RELEASE. The user-visible version string.  E.g., "1.0" or "3.4b5" or "bananas".
  optional string version_release = 5;

  // Build.ID. E.g. a label like "M4-rc20".
  optional string id = 6;

  // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to
  // represent this build.
  optional string version_incremental = 7;

  // Build.TYPE. The type of build, like "user" or "eng".
  optional string type = 8;

  // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug".
  optional string tags = 9;

  // Build.VERSION.SDK. The Android SDK supported in this build. E.g., "33"
  optional string sdk = 10;

  // CarVersion.getMinorVersion(). Car-specific property detailing the minor release. E.g., "0" or
  // "2"
  optional string platform_minor = 11;

  // Build.VERSION.CODENAME. The current development codename, or "REL" if this is a release build.
  optional string codename = 12;
}

message DevicePerformanceStats {
  optional BuildInformation build_info = 1;
  repeated PerformanceStats perf_stats = 2;
}
