// Copyright 2010 Google Inc.
//
// 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.

// Enums definitions for main types in the cache invalidation system.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package invalidation;

// The type of client / application.
message ClientType {
  enum Type {
    INTERNAL = 1;
    TEST = 2; // Uncontrolled client space for use by anyone for testing.

    // Numbers below 1000 are reserved for internal use.
    CHROME_SYNC = 1004;
  }
  optional Type type = 1;
}

// The property that hosts the object.
message ObjectSource {
  //
  // NOTE: This enum MUST be kept in sync with ObjectIdP.Source in
  // internal.proto.
  //
  enum Type {
    INTERNAL = 1;
    TEST = 2; // Uncontrolled object space for use by anyone for testing.
    UNKNOWN_VERSION = 3;

    // Numbers below 1000 are reserved for internal use.
    CHROME_SYNC = 1004;
  }
  optional Type type = 1;
}

// A dummy message to enclose various enum constant declarations.
message Constants {
  // Constants related to object versions.
  enum ObjectVersion {
    // Version number used to indicate that an object's version is unknown.
    UNKNOWN = 0;
  }
}
