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

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 = "ActorProto";
option java_package = "com.google.cloud.support.v2beta";
option php_namespace = "Google\\Cloud\\Support\\V2beta";
option ruby_package = "Google::Cloud::Support::V2beta";

// An Actor represents an entity that performed an action. For example, an actor
// could be a user who posted a comment on a support case, a user who
// uploaded an attachment, or a service account that created a support case.
message Actor {
  // The name to display for the actor. If not provided, it is inferred from
  // credentials supplied during case creation. When an email is provided, a
  // display name must also be provided. This will be obfuscated if the user
  // is a Google Support agent.
  string display_name = 1;

  // The email address of the actor. If not provided, it is inferred from the
  // credentials supplied during case creation. When a name is provided, an
  // email must also be provided. If the user is a Google Support agent, this is
  // obfuscated.
  //
  // This field is deprecated. Use `username` instead.
  string email = 2 [deprecated = true];

  // Output only. Whether the actor is a Google support actor.
  bool google_support = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The username of the actor. It may look like an email or other
  // format provided by the identity provider. If not provided, it is inferred
  // from the credentials supplied. When a name is provided, a username must
  // also be provided. If the user is a Google Support agent, this will not be
  // set.
  string username = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}
