// 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/api/resource.proto";
import "google/cloud/support/v2beta/actor.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 = "CommentProto";
option java_package = "com.google.cloud.support.v2beta";
option php_namespace = "Google\\Cloud\\Support\\V2beta";
option ruby_package = "Google::Cloud::Support::V2beta";

// A comment associated with a support case.
//
// Case comments are the primary way for Google Support to communicate with a
// user who has opened a case. When a user responds to Google Support, the
// user's responses also appear as comments.
message Comment {
  option (google.api.resource) = {
    type: "cloudsupport.googleapis.com/Comment"
    pattern: "organizations/{organization}/cases/{case}/comments/{comment}"
    pattern: "projects/{project}/cases/{case}/comments/{comment}"
  };

  // Output only. Identifier. The resource name of the comment.
  string name = 1 [
    (google.api.field_behavior) = IDENTIFIER,
    (google.api.field_behavior) = OUTPUT_ONLY
  ];

  // Output only. The time when the comment was created.
  google.protobuf.Timestamp create_time = 2
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The user or Google Support agent who created the comment.
  Actor creator = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // The full comment body.
  //
  // Maximum of 12800 characters.
  string body = 4;

  // Output only. DEPRECATED. DO NOT USE.
  //
  // A duplicate of the `body` field.
  //
  // This field is only present for legacy reasons.
  string plain_text_body = 5
      [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
}
