google-cloud-discovery_engine-v1beta 0.a → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/README.md +144 -8
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +429 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/paths.rb +78 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +386 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +114 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +1107 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +768 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +135 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +908 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +905 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/service_stub.rb +518 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service.rb +58 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +486 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +135 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +443 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/service_stub.rb +116 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/rest.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +840 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +768 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/paths.rb +127 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +680 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +905 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/service_stub.rb +382 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +513 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +131 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +465 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/service_stub.rb +116 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +638 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +768 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +131 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +542 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +905 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +250 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +7 -2
- data/lib/google/cloud/discovery_engine/v1beta.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +41 -0
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +38 -0
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +43 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +58 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +81 -0
- data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +109 -0
- data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +40 -0
- data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/schema_pb.rb +30 -0
- data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +72 -0
- data/lib/google/cloud/discoveryengine/v1beta/schema_service_services_pb.rb +53 -0
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +151 -0
- data/lib/google/cloud/discoveryengine/v1beta/search_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +93 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +39 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +59 -0
- data/lib/google-cloud-discovery_engine-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/httpbody.rb +80 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +107 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +98 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +107 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +181 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +286 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +84 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +210 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/schema.rb +45 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +180 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +605 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +473 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +64 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/date.rb +53 -0
- metadata +254 -12
@@ -0,0 +1,250 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/discoveryengine/v1beta/user_event_service_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module DiscoveryEngine
|
24
|
+
module V1beta
|
25
|
+
module UserEventService
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the UserEventService service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
39
|
+
numeric_enums: true,
|
40
|
+
raise_faraday_errors: false
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Baseline implementation for the write_user_event REST call
|
45
|
+
#
|
46
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::WriteUserEventRequest]
|
47
|
+
# A request object representing the call parameters. Required.
|
48
|
+
# @param options [::Gapic::CallOptions]
|
49
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
50
|
+
#
|
51
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
52
|
+
# @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::UserEvent]
|
53
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
54
|
+
#
|
55
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::UserEvent]
|
56
|
+
# A result object deserialized from the server's reply
|
57
|
+
def write_user_event request_pb, options = nil
|
58
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
59
|
+
|
60
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_write_user_event_request request_pb
|
61
|
+
query_string_params = if query_string_params.any?
|
62
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
63
|
+
else
|
64
|
+
{}
|
65
|
+
end
|
66
|
+
|
67
|
+
response = @client_stub.make_http_request(
|
68
|
+
verb,
|
69
|
+
uri: uri,
|
70
|
+
body: body || "",
|
71
|
+
params: query_string_params,
|
72
|
+
options: options
|
73
|
+
)
|
74
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
75
|
+
result = ::Google::Cloud::DiscoveryEngine::V1beta::UserEvent.decode_json response.body, ignore_unknown_fields: true
|
76
|
+
|
77
|
+
yield result, operation if block_given?
|
78
|
+
result
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Baseline implementation for the collect_user_event REST call
|
83
|
+
#
|
84
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::CollectUserEventRequest]
|
85
|
+
# A request object representing the call parameters. Required.
|
86
|
+
# @param options [::Gapic::CallOptions]
|
87
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
88
|
+
#
|
89
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
90
|
+
# @yieldparam result [::Google::Api::HttpBody]
|
91
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
92
|
+
#
|
93
|
+
# @return [::Google::Api::HttpBody]
|
94
|
+
# A result object deserialized from the server's reply
|
95
|
+
def collect_user_event request_pb, options = nil
|
96
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
97
|
+
|
98
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_collect_user_event_request request_pb
|
99
|
+
query_string_params = if query_string_params.any?
|
100
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
101
|
+
else
|
102
|
+
{}
|
103
|
+
end
|
104
|
+
|
105
|
+
response = @client_stub.make_http_request(
|
106
|
+
verb,
|
107
|
+
uri: uri,
|
108
|
+
body: body || "",
|
109
|
+
params: query_string_params,
|
110
|
+
options: options
|
111
|
+
)
|
112
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
113
|
+
result = ::Google::Api::HttpBody.decode_json response.body, ignore_unknown_fields: true
|
114
|
+
|
115
|
+
yield result, operation if block_given?
|
116
|
+
result
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# Baseline implementation for the import_user_events REST call
|
121
|
+
#
|
122
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::ImportUserEventsRequest]
|
123
|
+
# A request object representing the call parameters. Required.
|
124
|
+
# @param options [::Gapic::CallOptions]
|
125
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
126
|
+
#
|
127
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
128
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
129
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
130
|
+
#
|
131
|
+
# @return [::Google::Longrunning::Operation]
|
132
|
+
# A result object deserialized from the server's reply
|
133
|
+
def import_user_events request_pb, options = nil
|
134
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
135
|
+
|
136
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_import_user_events_request request_pb
|
137
|
+
query_string_params = if query_string_params.any?
|
138
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
139
|
+
else
|
140
|
+
{}
|
141
|
+
end
|
142
|
+
|
143
|
+
response = @client_stub.make_http_request(
|
144
|
+
verb,
|
145
|
+
uri: uri,
|
146
|
+
body: body || "",
|
147
|
+
params: query_string_params,
|
148
|
+
options: options
|
149
|
+
)
|
150
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
151
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
152
|
+
|
153
|
+
yield result, operation if block_given?
|
154
|
+
result
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# @private
|
159
|
+
#
|
160
|
+
# GRPC transcoding helper method for the write_user_event REST call
|
161
|
+
#
|
162
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::WriteUserEventRequest]
|
163
|
+
# A request object representing the call parameters. Required.
|
164
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
165
|
+
# Uri, Body, Query string parameters
|
166
|
+
def self.transcode_write_user_event_request request_pb
|
167
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
168
|
+
.with_bindings(
|
169
|
+
uri_method: :post,
|
170
|
+
uri_template: "/v1beta/{parent}/userEvents:write",
|
171
|
+
body: "user_event",
|
172
|
+
matches: [
|
173
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
|
174
|
+
]
|
175
|
+
)
|
176
|
+
.with_bindings(
|
177
|
+
uri_method: :post,
|
178
|
+
uri_template: "/v1beta/{parent}/userEvents:write",
|
179
|
+
body: "user_event",
|
180
|
+
matches: [
|
181
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false]
|
182
|
+
]
|
183
|
+
)
|
184
|
+
transcoder.transcode request_pb
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# @private
|
189
|
+
#
|
190
|
+
# GRPC transcoding helper method for the collect_user_event REST call
|
191
|
+
#
|
192
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::CollectUserEventRequest]
|
193
|
+
# A request object representing the call parameters. Required.
|
194
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
195
|
+
# Uri, Body, Query string parameters
|
196
|
+
def self.transcode_collect_user_event_request request_pb
|
197
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
198
|
+
.with_bindings(
|
199
|
+
uri_method: :get,
|
200
|
+
uri_template: "/v1beta/{parent}/userEvents:collect",
|
201
|
+
matches: [
|
202
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
|
203
|
+
]
|
204
|
+
)
|
205
|
+
.with_bindings(
|
206
|
+
uri_method: :get,
|
207
|
+
uri_template: "/v1beta/{parent}/userEvents:collect",
|
208
|
+
matches: [
|
209
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false]
|
210
|
+
]
|
211
|
+
)
|
212
|
+
transcoder.transcode request_pb
|
213
|
+
end
|
214
|
+
|
215
|
+
##
|
216
|
+
# @private
|
217
|
+
#
|
218
|
+
# GRPC transcoding helper method for the import_user_events REST call
|
219
|
+
#
|
220
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::ImportUserEventsRequest]
|
221
|
+
# A request object representing the call parameters. Required.
|
222
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
223
|
+
# Uri, Body, Query string parameters
|
224
|
+
def self.transcode_import_user_events_request request_pb
|
225
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
226
|
+
.with_bindings(
|
227
|
+
uri_method: :post,
|
228
|
+
uri_template: "/v1beta/{parent}/userEvents:import",
|
229
|
+
body: "*",
|
230
|
+
matches: [
|
231
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
|
232
|
+
]
|
233
|
+
)
|
234
|
+
.with_bindings(
|
235
|
+
uri_method: :post,
|
236
|
+
uri_template: "/v1beta/{parent}/userEvents:import",
|
237
|
+
body: "*",
|
238
|
+
matches: [
|
239
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false]
|
240
|
+
]
|
241
|
+
)
|
242
|
+
transcoder.transcode request_pb
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/discovery_engine/v1beta/version"
|
24
|
+
|
25
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/credentials"
|
26
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/paths"
|
27
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/rest/operations"
|
28
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/rest/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module DiscoveryEngine
|
33
|
+
module V1beta
|
34
|
+
##
|
35
|
+
# Service for ingesting end user actions on a website to Discovery Engine API.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a REST client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/discovery_engine/v1beta/user_event_service/rest"
|
40
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Rest::Client.new
|
41
|
+
#
|
42
|
+
module UserEventService
|
43
|
+
# Client for the REST transport
|
44
|
+
module Rest
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
53
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/discovery_engine/v1beta/version"
|
24
|
+
|
25
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/credentials"
|
26
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/paths"
|
27
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/operations"
|
28
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/client"
|
29
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/rest"
|
30
|
+
|
31
|
+
module Google
|
32
|
+
module Cloud
|
33
|
+
module DiscoveryEngine
|
34
|
+
module V1beta
|
35
|
+
##
|
36
|
+
# Service for ingesting end user actions on a website to Discovery Engine API.
|
37
|
+
#
|
38
|
+
# @example Load this service and instantiate a gRPC client
|
39
|
+
#
|
40
|
+
# require "google/cloud/discovery_engine/v1beta/user_event_service"
|
41
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Client.new
|
42
|
+
#
|
43
|
+
# @example Load this service and instantiate a REST client
|
44
|
+
#
|
45
|
+
# require "google/cloud/discovery_engine/v1beta/user_event_service/rest"
|
46
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Rest::Client.new
|
47
|
+
#
|
48
|
+
module UserEventService
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
helper_path = ::File.join __dir__, "user_event_service", "helpers.rb"
|
56
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service/helpers" if ::File.file? helper_path
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2023 Google LLC
|
2
4
|
#
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
6
|
# you may not use this file except in compliance with the License.
|
5
7
|
# You may obtain a copy of the License at
|
6
8
|
#
|
7
|
-
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
10
|
#
|
9
11
|
# Unless required by applicable law or agreed to in writing, software
|
10
12
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
@@ -12,11 +14,14 @@
|
|
12
14
|
# See the License for the specific language governing permissions and
|
13
15
|
# limitations under the License.
|
14
16
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
15
20
|
module Google
|
16
21
|
module Cloud
|
17
22
|
module DiscoveryEngine
|
18
23
|
module V1beta
|
19
|
-
VERSION = "0.
|
24
|
+
VERSION = "0.1.0"
|
20
25
|
end
|
21
26
|
end
|
22
27
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/discovery_engine/v1beta/completion_service"
|
20
|
+
require "google/cloud/discovery_engine/v1beta/document_service"
|
21
|
+
require "google/cloud/discovery_engine/v1beta/recommendation_service"
|
22
|
+
require "google/cloud/discovery_engine/v1beta/schema_service"
|
23
|
+
require "google/cloud/discovery_engine/v1beta/search_service"
|
24
|
+
require "google/cloud/discovery_engine/v1beta/user_event_service"
|
25
|
+
require "google/cloud/discovery_engine/v1beta/version"
|
26
|
+
|
27
|
+
module Google
|
28
|
+
module Cloud
|
29
|
+
module DiscoveryEngine
|
30
|
+
##
|
31
|
+
# API client module.
|
32
|
+
#
|
33
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
34
|
+
#
|
35
|
+
# require "google/cloud/discovery_engine/v1beta"
|
36
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1beta::CompletionService::Client.new
|
37
|
+
#
|
38
|
+
# @example Load this package, including all its services, and instantiate a REST client
|
39
|
+
#
|
40
|
+
# require "google/cloud/discovery_engine/v1beta"
|
41
|
+
# client = ::Google::Cloud::DiscoveryEngine::V1beta::CompletionService::Rest::Client.new
|
42
|
+
#
|
43
|
+
module V1beta
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
helper_path = ::File.join __dir__, "v1beta", "_helpers.rb"
|
50
|
+
require "google/cloud/discovery_engine/v1beta/_helpers" if ::File.file? helper_path
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/discoveryengine/v1beta/common.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("google/cloud/discoveryengine/v1beta/common.proto", :syntax => :proto3) do
|
10
|
+
add_message "google.cloud.discoveryengine.v1beta.Interval" do
|
11
|
+
oneof :min do
|
12
|
+
optional :minimum, :double, 1
|
13
|
+
optional :exclusive_minimum, :double, 2
|
14
|
+
end
|
15
|
+
oneof :max do
|
16
|
+
optional :maximum, :double, 3
|
17
|
+
optional :exclusive_maximum, :double, 4
|
18
|
+
end
|
19
|
+
end
|
20
|
+
add_message "google.cloud.discoveryengine.v1beta.CustomAttribute" do
|
21
|
+
repeated :text, :string, 1
|
22
|
+
repeated :numbers, :double, 2
|
23
|
+
end
|
24
|
+
add_message "google.cloud.discoveryengine.v1beta.UserInfo" do
|
25
|
+
optional :user_id, :string, 1
|
26
|
+
optional :user_agent, :string, 2
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
module Google
|
32
|
+
module Cloud
|
33
|
+
module DiscoveryEngine
|
34
|
+
module V1beta
|
35
|
+
Interval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.Interval").msgclass
|
36
|
+
CustomAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.CustomAttribute").msgclass
|
37
|
+
UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.UserInfo").msgclass
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/discoveryengine/v1beta/completion_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_file("google/cloud/discoveryengine/v1beta/completion_service.proto", :syntax => :proto3) do
|
13
|
+
add_message "google.cloud.discoveryengine.v1beta.CompleteQueryRequest" do
|
14
|
+
optional :data_store, :string, 1
|
15
|
+
optional :query, :string, 2
|
16
|
+
optional :query_model, :string, 3
|
17
|
+
optional :user_pseudo_id, :string, 4
|
18
|
+
end
|
19
|
+
add_message "google.cloud.discoveryengine.v1beta.CompleteQueryResponse" do
|
20
|
+
repeated :query_suggestions, :message, 1, "google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion"
|
21
|
+
end
|
22
|
+
add_message "google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion" do
|
23
|
+
optional :suggestion, :string, 1
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
module Google
|
29
|
+
module Cloud
|
30
|
+
module DiscoveryEngine
|
31
|
+
module V1beta
|
32
|
+
CompleteQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.CompleteQueryRequest").msgclass
|
33
|
+
CompleteQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.CompleteQueryResponse").msgclass
|
34
|
+
CompleteQueryResponse::QuerySuggestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion").msgclass
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/discoveryengine/v1beta/completion_service.proto for package 'Google.Cloud.DiscoveryEngine.V1beta'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2022 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/discoveryengine/v1beta/completion_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module DiscoveryEngine
|
25
|
+
module V1beta
|
26
|
+
module CompletionService
|
27
|
+
# Service for Auto-Completion.
|
28
|
+
class Service
|
29
|
+
|
30
|
+
include ::GRPC::GenericService
|
31
|
+
|
32
|
+
self.marshal_class_method = :encode
|
33
|
+
self.unmarshal_class_method = :decode
|
34
|
+
self.service_name = 'google.cloud.discoveryengine.v1beta.CompletionService'
|
35
|
+
|
36
|
+
# Completes the specified user input with keyword suggestions.
|
37
|
+
rpc :CompleteQuery, ::Google::Cloud::DiscoveryEngine::V1beta::CompleteQueryRequest, ::Google::Cloud::DiscoveryEngine::V1beta::CompleteQueryResponse
|
38
|
+
end
|
39
|
+
|
40
|
+
Stub = Service.rpc_stub_class
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/discoveryengine/v1beta/document.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/api/resource_pb'
|
8
|
+
require 'google/protobuf/struct_pb'
|
9
|
+
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_file("google/cloud/discoveryengine/v1beta/document.proto", :syntax => :proto3) do
|
12
|
+
add_message "google.cloud.discoveryengine.v1beta.Document" do
|
13
|
+
optional :name, :string, 1
|
14
|
+
optional :id, :string, 2
|
15
|
+
optional :schema_id, :string, 3
|
16
|
+
optional :content, :message, 10, "google.cloud.discoveryengine.v1beta.Document.Content"
|
17
|
+
optional :parent_document_id, :string, 7
|
18
|
+
optional :derived_struct_data, :message, 6, "google.protobuf.Struct"
|
19
|
+
oneof :data do
|
20
|
+
optional :struct_data, :message, 4, "google.protobuf.Struct"
|
21
|
+
optional :json_data, :string, 5
|
22
|
+
end
|
23
|
+
end
|
24
|
+
add_message "google.cloud.discoveryengine.v1beta.Document.Content" do
|
25
|
+
optional :mime_type, :string, 1
|
26
|
+
oneof :content do
|
27
|
+
optional :raw_bytes, :bytes, 2
|
28
|
+
optional :uri, :string, 3
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
module Google
|
35
|
+
module Cloud
|
36
|
+
module DiscoveryEngine
|
37
|
+
module V1beta
|
38
|
+
Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.Document").msgclass
|
39
|
+
Document::Content = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.Document.Content").msgclass
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/discoveryengine/v1beta/document_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/cloud/discoveryengine/v1beta/document_pb'
|
11
|
+
require 'google/cloud/discoveryengine/v1beta/import_config_pb'
|
12
|
+
require 'google/cloud/discoveryengine/v1beta/purge_config_pb'
|
13
|
+
require 'google/longrunning/operations_pb'
|
14
|
+
require 'google/protobuf/empty_pb'
|
15
|
+
|
16
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
|
+
add_file("google/cloud/discoveryengine/v1beta/document_service.proto", :syntax => :proto3) do
|
18
|
+
add_message "google.cloud.discoveryengine.v1beta.GetDocumentRequest" do
|
19
|
+
optional :name, :string, 1
|
20
|
+
end
|
21
|
+
add_message "google.cloud.discoveryengine.v1beta.ListDocumentsRequest" do
|
22
|
+
optional :parent, :string, 1
|
23
|
+
optional :page_size, :int32, 2
|
24
|
+
optional :page_token, :string, 3
|
25
|
+
end
|
26
|
+
add_message "google.cloud.discoveryengine.v1beta.ListDocumentsResponse" do
|
27
|
+
repeated :documents, :message, 1, "google.cloud.discoveryengine.v1beta.Document"
|
28
|
+
optional :next_page_token, :string, 2
|
29
|
+
end
|
30
|
+
add_message "google.cloud.discoveryengine.v1beta.CreateDocumentRequest" do
|
31
|
+
optional :parent, :string, 1
|
32
|
+
optional :document, :message, 2, "google.cloud.discoveryengine.v1beta.Document"
|
33
|
+
optional :document_id, :string, 3
|
34
|
+
end
|
35
|
+
add_message "google.cloud.discoveryengine.v1beta.UpdateDocumentRequest" do
|
36
|
+
optional :document, :message, 1, "google.cloud.discoveryengine.v1beta.Document"
|
37
|
+
optional :allow_missing, :bool, 2
|
38
|
+
end
|
39
|
+
add_message "google.cloud.discoveryengine.v1beta.DeleteDocumentRequest" do
|
40
|
+
optional :name, :string, 1
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
module Google
|
46
|
+
module Cloud
|
47
|
+
module DiscoveryEngine
|
48
|
+
module V1beta
|
49
|
+
GetDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.GetDocumentRequest").msgclass
|
50
|
+
ListDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.ListDocumentsRequest").msgclass
|
51
|
+
ListDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.ListDocumentsResponse").msgclass
|
52
|
+
CreateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.CreateDocumentRequest").msgclass
|
53
|
+
UpdateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.UpdateDocumentRequest").msgclass
|
54
|
+
DeleteDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.DeleteDocumentRequest").msgclass
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|