// Copyright 2019 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.talent.v4beta1;

import "google/api/annotations.proto";
import "google/cloud/talent/v4beta1/event.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
option java_multiple_files = true;
option java_outer_classname = "EventServiceProto";
option java_package = "com.google.cloud.talent.v4beta1";
option objc_class_prefix = "CTS";

// A service handles client event report.
service EventService {
  // Report events issued when end user interacts with customer's application
  // that uses Cloud Talent Solution. You may inspect the created events in
  // [self service
  // tools](https://console.cloud.google.com/talent-solution/overview).
  // [Learn
  // more](https://cloud.google.com/talent-solution/job-search/docs/management-tools)
  // about self service tools.
  rpc CreateClientEvent(CreateClientEventRequest) returns (ClientEvent) {
    option (google.api.http) = {
      post: "/v4beta1/{parent=projects/*}/clientEvents"
      body: "*"
    };
  }
}

// The report event request.
message CreateClientEventRequest {
  // Parent project name.
  string parent = 1;

  // Required.
  //
  // Events issued when end user interacts with customer's application that
  // uses Cloud Talent Solution.
  ClientEvent client_event = 2;
}
