// Copyright 2025 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.support.v2beta;

import "google/api/field_behavior.proto";
import "google/cloud/support/v2beta/attachment.proto";
import "google/cloud/support/v2beta/comment.proto";
import "google/cloud/support/v2beta/email_message.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.Support.V2Beta";
option go_package = "cloud.google.com/go/support/apiv2beta/supportpb;supportpb";
option java_multiple_files = true;
option java_outer_classname = "FeedItemProto";
option java_package = "com.google.cloud.support.v2beta";
option php_namespace = "Google\\Cloud\\Support\\V2beta";
option ruby_package = "Google::Cloud::Support::V2beta";

// A feed item associated with a support case.
message FeedItem {
  // The object corresponding to the event.
  oneof event_object {
    // Output only. A comment added to the case.
    Comment comment = 100 [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. An attachment attached to the case.
    Attachment attachment = 101 [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. An email message received in reply to the case.
    EmailMessage email_message = 102
        [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. A deleted attachment that used to be associated with the
    // support case.
    Attachment deleted_attachment = 103
        [(google.api.field_behavior) = OUTPUT_ONLY];
  }

  // Output only. Time corresponding to the event of this item.
  google.protobuf.Timestamp event_time = 1
      [(google.api.field_behavior) = OUTPUT_ONLY];
}
