// 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;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/faulttesting/v1alpha/state.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.FaultTesting.V1Alpha";
option go_package = "cloud.google.com/go/faulttesting/apiv1alpha/faulttestingpb;faulttestingpb";
option java_multiple_files = true;
option java_outer_classname = "LoggingProto";
option java_package = "com.google.cloud.faulttesting.v1alpha";
option php_namespace = "Google\\Cloud\\FaultTesting\\V1alpha";
option ruby_package = "Google::Cloud::FaultTesting::V1alpha";

// Represents the payload of a Platform Log.
message FaultTestingLog {
  // Required. Indicates the time the event described by the log entry occurred.
  google.protobuf.Timestamp event_time = 1
      [(google.api.field_behavior) = REQUIRED];

  // Required. Specifies the resource name of the experiment that this log entry
  // is associated with.
  string experiment = 2 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "faulttesting.googleapis.com/Experiment"
    }
  ];

  // Output only. Represents the state of the resource after the event.
  // Output only.
  State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. Describes the reason for the state change.
  string reason = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Provides additional details about the event.
  google.protobuf.Struct details = 5 [(google.api.field_behavior) = OPTIONAL];
}
