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

// LINT.IfChange
{
  "type_name": "FieldTrialTestingConfig",
  "system-headers": [ "optional" ] ,
  "headers": [ "base/containers/span.h", "components/variations/proto/study.pb.h" ],
  "schema": [{
    "field": "studies",
    "type": "array",
    "contents": {
      "type_name": "FieldTrialTestingStudy",
      "type": "struct",
      "fields": [
        {"field": "name", "type": "string"},
        {
          "field": "experiments",
          "type": "array",
          "contents": {
            "type_name": "FieldTrialTestingExperiment",
            "type": "struct",
            "fields": [
              {"field": "name", "type": "string"},
              {
                "field": "platforms",
                "type": "array",
                "contents": {"type": "enum", "ctype": "Study::Platform", "javatype":  "String"}
              },
              {
                "field": "form_factors",
                "type": "array",
                "contents": {"type": "enum", "ctype": "Study::FormFactor", "javatype":  "String"}
              },
              {
                "field": "is_low_end_device",
                "type": "class",
                "ctype": "std::optional<bool>",
                "javatype": "Boolean",
                "default": "std::nullopt",
                "java_default": "null",
                "optional": "True"
              },
              {
                "field": "disable_benchmarking",
                "type": "class",
                "ctype": "std::optional<bool>",
                "javatype": "Boolean",
                "default": "std::nullopt",
                "java_default": "null",
                "optional": "True"
              },
              {
                "field": "min_os_version",
                "type": "string"
              },
              {
                "field": "params",
                "type": "array",
                "contents": {
                  "type_name": "FieldTrialTestingExperimentParams",
                  "type": "struct",
                  "fields": [
                    {"field": "key", "type": "string"},
                    {"field": "value", "type": "string"}
                  ]
                }
              },
              {
                "field": "enable_features",
                "type": "array",
                "contents": { "type": "string"}
              },
              {
                "field": "disable_features",
                "type": "array",
                "contents": { "type": "string"}
              },
              {
                "field": "forcing_flag",
                "type": "string"
              },
              {
                "field": "hardware_classes",
                "type": "array",
                "contents": { "type": "string"}
              },
              {
                "field": "exclude_hardware_classes",
                "type": "array",
                "contents": { "type": "string"}
              },
              {
                "field": "hardware_manufacturers",
                "type": "array",
                "contents": { "type": "string"}
              },
              {
                "field": "exclude_hardware_manufacturers",
                "type": "array",
                "contents": { "type": "string"}
              }
            ]
          }
        }
      ]
    }
  }]
}
// LINT.ThenChange(/testing/variations/PRESUBMIT.py)
