blob: fa9ad2841443ec056266bd6dfa4d0abd1deaf518 [file] [log] [blame]
syntax = "proto2";
import "google/protobuf/any.proto";
option java_package = "com.android.tools.idea.serverflags.protos";
option java_multiple_files = true;
// Types of operating systems.
enum OSType {
OS_TYPE_UNKNOWN = 0;
OS_TYPE_MAC = 1;
OS_TYPE_WIN = 2;
OS_TYPE_LINUX = 3;
OS_TYPE_CHROMIUM = 4;
OS_TYPE_FREE_BSD = 5;
}
// Types of IDE brands.
enum Brand {
BRAND_UNKNOWN = 0;
BRAND_ANDROID_STUDIO = 1;
BRAND_ANDROID_STUDIO_WITH_BLAZE = 2;
}
// ServerFlag is a property used to configure a specific feature
// at the client
message ServerFlag {
// A number from 1-100 indicating what percent of users
optional int32 percent_enabled = 1;
// The specific value used by this feature. Can be one of the standard
// primitive types or a custom value.
oneof values {
int32 int_value = 2;
float float_value = 3;
string string_value = 4;
bool boolean_value = 5;
google.protobuf.Any proto_value = 6;
}
// Set of OS types to apply this flag to
repeated OSType os_type = 7;
// Set of brands to apply this flag to
repeated Brand brand = 8 [packed = true];
}
message FlagValue {
// A number from 1-100 indicating what percent of users
optional int32 percent_enabled = 1;
// The specific value used by this feature. Can be one of the standard
// primitive types or a custom value.
oneof values {
int32 int_value = 2;
float float_value = 3;
string string_value = 4;
bool boolean_value = 5;
google.protobuf.Any proto_value = 6;
}
}
message MultiValueServerFlag {
// Set of OS types to apply this flag to
repeated OSType os_type = 1 [packed = true];
// Set of brands to apply this flag to
repeated Brand brand = 2 [packed = true];
// Flag values
repeated FlagValue flag_values = 3;
}
// ServerFlagData associates a unique name with a server flag
// The name is used to retrieve the flag on the client side
message ServerFlagData {
optional string name = 1;
optional ServerFlag server_flag = 2;
optional MultiValueServerFlag multi_value_server_flag = 3;
}
// ServerFlagList is a collection of ServerFlagData objects.
// configuration_version indicates the CL used for the configuration files
// that generated this list.
message ServerFlagList {
optional int64 configuration_version = 1;
repeated ServerFlagData server_flags = 2;
}