// 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 nearby.fastpair.proto;

option java_multiple_files = true;

// Features that can be enabled for a Fast Pair device.
enum FastPairFeature {
  FAST_PAIR_FEATURE_UNKNOWN = 0;
  FAST_PAIR_FEATURE_SILENCE_MODE = 1;
  FAST_PAIR_FEATURE_WIRELESS_CHARGING = 2;
  FAST_PAIR_FEATURE_DYNAMIC_BUFFER_SIZE = 3;
  FAST_PAIR_FEATURE_NO_PERSONALIZED_NAME = 4;
  FAST_PAIR_FEATURE_EDDYSTONE_TRACKING = 5;
  FAST_PAIR_FEATURE_SMART_AUDIO_SOURCE_SWITCHING = 6;
  FAST_PAIR_FEATURE_NOT_SUPPORTED_RING = 7;
}

// The status of the user's consent opt-in.
enum OptInStatus {
  OPT_IN_STATUS_UNKNOWN = 0;
  OPT_IN_STATUS_OPTED_IN = 1;
  OPT_IN_STATUS_OPTED_OUT = 2;
  OPT_IN_STATUS_ERROR_RETRIEVING_FROM_FOOTPRINTS_SERVER = 3;
}

// The type of a NearbyItem. Determines how the item is handled (e.g. we may
// display a different notification style for different types). It may not
// indicate the source of the data (e.g., an attachment on the Proximity Beacon
// Service that represents a device needing to be set up might become a
// NearbyItem with type=DEVICE).
enum NearbyType {
  NEARBY_TYPE_UNKNOWN = 0;
  // Proximity Beacon Service (PBS). This is the only type of nearbyItems which
  // can be customized by 3p and therefore the intents passed should not be
  // completely trusted. Deprecated already.
  NEARBY_TYPE_PROXIMITY_BEACON = 1;
  // Physical Web URL beacon. Deprecated already.
  NEARBY_TYPE_PHYSICAL_WEB = 2;
  NEARBY_TYPE_CHROMECAST = 3;
  NEARBY_TYPE_WEAR = 4;
  NEARBY_TYPE_DEVICE = 6;
  NEARBY_TYPE_POPULAR_HERE = 7;
}

enum ResolvedUrlType {
  RESOLVED_URL_TYPE_UNKNOWN = 0;
  RESOLVED_URL_TYPE_WEBPAGE = 1;
  RESOLVED_URL_TYPE_APP = 2;
}

// Used when evaluating Relevance of a NearbyItem
// Values correspond to levels in the Discoverer Notification Policy Worksheet:
// https://docs.google.com/a/google.com/spreadsheets/d/1atc1-RNLb7fAGvGdWXlh86Qy2IY9T_dj2v4gFUhdPF0/edit?usp=sharing
enum Evaluation {
  EVALUATION_UNKNOWN = 0;
  EVALUATION_BAD = 100;
  EVALUATION_POOR = 200;
  EVALUATION_NEUTRAL = 300;
  EVALUATION_OK = 400;
  EVALUATION_GOOD = 500;
  EVALUATION_GREAT = 600;
  EVALUATION_AMAZING = 700;
}
