// Copyright 2026 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
//
//     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 = "proto3";

package google.cloud.faulttesting.v1alpha;

option go_package = "cloud.google.com/go/faulttesting/apiv1alpha/faulttestingpb;faulttestingpb";
option java_multiple_files = true;
option java_outer_classname = "StateProto";
option java_package = "com.google.cloud.faulttesting.v1alpha";

// Represents the current state of an `Experiment` or `Validation` dry run.
// String values are used in JSON.
enum State {
  // The state is not known or not set.
  STATE_UNSPECIFIED = 0;

  // The system is identifying the target Google Cloud resources for the
  // `Experiment` or `Validation` and checking necessary permissions.
  PREPARING = 1;

  // The experiment is fully set up and ready to start.
  PREPARED = 2;

  // The system is actively applying the fault to the targeted
  // resources. Example: Slowing down responses, triggering errors.
  INJECTING = 3;

  // The fault is active on the targeted resources. The `Experiment` is
  // now running for its planned duration.
  INJECTED = 4;

  // The `Experiment` is being stopped, and FIT is removing the fault
  // and restoring the resources to their normal operational state.
  REVERTING = 5;

  // The `Experiment` or `Validation` has finished, and the resources are back
  // to their normal state. No further actions will occur.
  COMPLETED = 6;
}
