1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.talent.v4;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/talent/v4/event.proto";
24
25option go_package = "cloud.google.com/go/talent/apiv4/talentpb;talentpb";
26option java_multiple_files = true;
27option java_outer_classname = "EventServiceProto";
28option java_package = "com.google.cloud.talent.v4";
29option objc_class_prefix = "CTS";
30
31// A service handles client event report.
32service EventService {
33  option (google.api.default_host) = "jobs.googleapis.com";
34  option (google.api.oauth_scopes) =
35      "https://www.googleapis.com/auth/cloud-platform,"
36      "https://www.googleapis.com/auth/jobs";
37
38  // Report events issued when end user interacts with customer's application
39  // that uses Cloud Talent Solution. You may inspect the created events in
40  // [self service
41  // tools](https://console.cloud.google.com/talent-solution/overview).
42  // [Learn
43  // more](https://cloud.google.com/talent-solution/docs/management-tools)
44  // about self service tools.
45  rpc CreateClientEvent(CreateClientEventRequest) returns (ClientEvent) {
46    option (google.api.http) = {
47      post: "/v4/{parent=projects/*/tenants/*}/clientEvents"
48      body: "client_event"
49    };
50    option (google.api.method_signature) = "parent,client_event";
51  }
52}
53
54// The report event request.
55message CreateClientEventRequest {
56  // Required. Resource name of the tenant under which the event is created.
57  //
58  // The format is "projects/{project_id}/tenants/{tenant_id}", for example,
59  // "projects/foo/tenants/bar".
60  string parent = 1 [
61    (google.api.field_behavior) = REQUIRED,
62    (google.api.resource_reference) = { type: "jobs.googleapis.com/Tenant" }
63  ];
64
65  // Required. Events issued when end user interacts with customer's application
66  // that uses Cloud Talent Solution.
67  ClientEvent client_event = 2 [(google.api.field_behavior) = REQUIRED];
68}
69