Skip to content

Commit f5cacaf

Browse files
Google APIscopybara-github
authored andcommitted
feat: add v1alpha public library for discoveryengine
PiperOrigin-RevId: 572280880
1 parent de65541 commit f5cacaf

19 files changed

Lines changed: 4840 additions & 0 deletions
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
// Copyright 2022 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+
15+
syntax = "proto3";
16+
17+
package google.cloud.discoveryengine.logging;
18+
19+
import "google/protobuf/struct.proto";
20+
import "google/rpc/status.proto";
21+
22+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.Logging";
23+
option go_package = "cloud.google.com/go/discoveryengine/logging/loggingpb;loggingpb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "ErrorLogProto";
26+
option java_package = "com.google.cloud.discoveryengine.logging";
27+
option objc_class_prefix = "DISCOVERYENGINE";
28+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\Logging";
29+
option ruby_package = "Google::Cloud::DiscoveryEngine::Logging";
30+
31+
// Describes a running service that sends errors.
32+
message ServiceContext {
33+
// An identifier of the service—for example, `discoveryengine.googleapis.com`.
34+
string service = 1;
35+
}
36+
37+
// HTTP request data that is related to a reported error.
38+
message HttpRequestContext {
39+
// The HTTP response status code for the request.
40+
int32 response_status_code = 1;
41+
}
42+
43+
// Indicates a location in the source code of the service for which
44+
// errors are reported.
45+
message SourceLocation {
46+
// Human-readable name of a function or method—for example,
47+
// `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`.
48+
string function_name = 1;
49+
}
50+
51+
// A description of the context in which an error occurred.
52+
message ErrorContext {
53+
// The HTTP request which was processed when the error was triggered.
54+
HttpRequestContext http_request = 1;
55+
56+
// The location in the source code where the decision was made to
57+
// report the error, usually the place where it was logged.
58+
SourceLocation report_location = 2;
59+
}
60+
61+
// The error payload that is populated on LRO import APIs, including the
62+
// following:
63+
//
64+
// * `google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments`
65+
// * `google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents`
66+
message ImportErrorContext {
67+
// The operation resource name of the LRO.
68+
string operation = 1;
69+
70+
// Google Cloud Storage file path of the import source.
71+
// Can be set for batch operation error.
72+
string gcs_path = 2;
73+
74+
// Line number of the content in file.
75+
// Should be empty for permission or batch operation error.
76+
string line_number = 3;
77+
78+
// Detailed content which caused the error.
79+
// Should be empty for permission or batch operation error.
80+
oneof line_content {
81+
// The detailed content which caused the error on importing a document.
82+
string document = 4;
83+
84+
// The detailed content which caused the error on importing a user event.
85+
string user_event = 5;
86+
}
87+
}
88+
89+
// An error log which is reported to the Error Reporting system.
90+
message ErrorLog {
91+
// The service context in which this error has occurred.
92+
ServiceContext service_context = 1;
93+
94+
// A description of the context in which the error occurred.
95+
ErrorContext context = 2;
96+
97+
// A message describing the error.
98+
string message = 3;
99+
100+
// The RPC status associated with the error log.
101+
google.rpc.Status status = 4;
102+
103+
// The API request payload, represented as a protocol buffer.
104+
//
105+
// Most API request types are supported—for example:
106+
//
107+
// * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocumentRequest`
108+
// * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEventRequest`
109+
google.protobuf.Struct request_payload = 5;
110+
111+
// The API response payload, represented as a protocol buffer.
112+
//
113+
// This is used to log some "soft errors", where the response is valid but we
114+
// consider there are some quality issues like unjoined events.
115+
//
116+
// The following API responses are supported, and no PII is included:
117+
//
118+
// * `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`
119+
// * `google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEvent`
120+
// * `google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent`
121+
google.protobuf.Struct response_payload = 6;
122+
123+
// The error payload that is populated on LRO import APIs.
124+
ImportErrorContext import_payload = 7;
125+
}

0 commit comments

Comments
 (0)