@google-cloud/discoveryengine 1.0.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +33 -1
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
  5. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
  8. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
  10. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
  12. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +155 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +221 -0
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +851 -0
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
  29. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +6 -0
  30. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +9 -2
  31. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +25 -0
  32. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +115 -3
  33. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
  34. package/build/protos/protos.d.ts +22864 -6680
  35. package/build/protos/protos.js +57205 -16191
  36. package/build/protos/protos.json +5548 -1224
  37. package/build/src/index.d.ts +6 -1
  38. package/build/src/index.js +7 -1
  39. package/build/src/v1/completion_service_client.d.ts +156 -6
  40. package/build/src/v1/completion_service_client.js +188 -4
  41. package/build/src/v1/conversational_search_service_client.d.ts +947 -0
  42. package/build/src/v1/conversational_search_service_client.js +1205 -0
  43. package/build/src/v1/conversational_search_service_client_config.json +68 -0
  44. package/build/src/v1/document_service_client.d.ts +165 -18
  45. package/build/src/v1/document_service_client.js +215 -11
  46. package/build/src/v1/index.d.ts +1 -0
  47. package/build/src/v1/index.js +3 -1
  48. package/build/src/v1/schema_service_client.d.ts +148 -4
  49. package/build/src/v1/schema_service_client.js +207 -5
  50. package/build/src/v1/search_service_client.d.ts +238 -28
  51. package/build/src/v1/search_service_client.js +248 -20
  52. package/build/src/v1/user_event_service_client.d.ts +153 -9
  53. package/build/src/v1/user_event_service_client.js +207 -5
  54. package/build/src/v1alpha/completion_service_client.d.ts +603 -0
  55. package/build/src/v1alpha/completion_service_client.js +843 -0
  56. package/build/src/v1alpha/completion_service_client_config.json +43 -0
  57. package/build/src/v1alpha/conversational_search_service_client.d.ts +998 -0
  58. package/build/src/v1alpha/conversational_search_service_client.js +1275 -0
  59. package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
  60. package/build/src/v1alpha/document_service_client.d.ts +1140 -0
  61. package/build/src/v1alpha/document_service_client.js +1393 -0
  62. package/build/src/v1alpha/document_service_client_config.json +82 -0
  63. package/build/src/v1alpha/index.d.ts +8 -0
  64. package/build/src/v1alpha/index.js +37 -0
  65. package/build/src/v1alpha/recommendation_service_client.d.ts +735 -0
  66. package/build/src/v1alpha/recommendation_service_client.js +938 -0
  67. package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
  68. package/build/src/v1alpha/schema_service_client.d.ts +935 -0
  69. package/build/src/v1alpha/schema_service_client.js +1327 -0
  70. package/build/src/v1alpha/schema_service_client_config.json +63 -0
  71. package/build/src/v1alpha/search_service_client.d.ts +1208 -0
  72. package/build/src/v1alpha/search_service_client.js +1432 -0
  73. package/build/src/v1alpha/search_service_client_config.json +43 -0
  74. package/build/src/v1alpha/site_search_engine_service_client.d.ts +704 -0
  75. package/build/src/v1alpha/site_search_engine_service_client.js +1087 -0
  76. package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
  77. package/build/src/v1alpha/user_event_service_client.d.ts +853 -0
  78. package/build/src/v1alpha/user_event_service_client.js +1174 -0
  79. package/build/src/v1alpha/user_event_service_client_config.json +67 -0
  80. package/build/src/v1beta/completion_service_client.d.ts +55 -4
  81. package/build/src/v1beta/completion_service_client.js +60 -4
  82. package/build/src/v1beta/conversational_search_service_client.d.ts +75 -4
  83. package/build/src/v1beta/conversational_search_service_client.js +60 -4
  84. package/build/src/v1beta/document_service_client.d.ts +55 -4
  85. package/build/src/v1beta/document_service_client.js +61 -5
  86. package/build/src/v1beta/recommendation_service_client.d.ts +55 -4
  87. package/build/src/v1beta/recommendation_service_client.js +60 -4
  88. package/build/src/v1beta/schema_service_client.d.ts +55 -4
  89. package/build/src/v1beta/schema_service_client.js +61 -5
  90. package/build/src/v1beta/search_service_client.d.ts +142 -4
  91. package/build/src/v1beta/search_service_client.js +118 -4
  92. package/build/src/v1beta/user_event_service_client.d.ts +55 -4
  93. package/build/src/v1beta/user_event_service_client.js +61 -5
  94. package/package.json +5 -5
@@ -0,0 +1,312 @@
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.v1alpha;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/protobuf/struct.proto";
22
+
23
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
24
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "SchemaProto";
27
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
28
+ option objc_class_prefix = "DISCOVERYENGINE";
29
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
30
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
31
+
32
+ // Defines the structure and layout of a type of document data.
33
+ message Schema {
34
+ option (google.api.resource) = {
35
+ type: "discoveryengine.googleapis.com/Schema"
36
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}"
37
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}"
38
+ };
39
+
40
+ // Schema representation. One of
41
+ // [struct_schema][google.cloud.discoveryengine.v1alpha.Schema.struct_schema]
42
+ // or [json_schema][google.cloud.discoveryengine.v1alpha.Schema.json_schema]
43
+ // should be provided otherwise an `INVALID_ARGUMENT` error is thrown.
44
+ oneof schema {
45
+ // The structured representation of the schema.
46
+ google.protobuf.Struct struct_schema = 2;
47
+
48
+ // The JSON representation of the schema.
49
+ string json_schema = 3;
50
+ }
51
+
52
+ // Immutable. The full resource name of the schema, in the format of
53
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
54
+ //
55
+ // This field must be a UTF-8 encoded string with a length limit of 1024
56
+ // characters.
57
+ string name = 1 [(google.api.field_behavior) = IMMUTABLE];
58
+
59
+ // Output only. Configurations for fields of the schema.
60
+ repeated FieldConfig field_configs = 4
61
+ [(google.api.field_behavior) = OUTPUT_ONLY];
62
+ }
63
+
64
+ // Configurations for fields of a schema. For example, configuring a field is
65
+ // indexable, or searchable.
66
+ message FieldConfig {
67
+ // Field value type in the Schema.
68
+ enum FieldType {
69
+ // Field type is unspecified.
70
+ FIELD_TYPE_UNSPECIFIED = 0;
71
+
72
+ // Field value type is Object.
73
+ OBJECT = 1;
74
+
75
+ // Field value type is String.
76
+ STRING = 2;
77
+
78
+ // Field value type is Number.
79
+ NUMBER = 3;
80
+
81
+ // Field value type is Integer.
82
+ INTEGER = 4;
83
+
84
+ // Field value type is Boolean.
85
+ BOOLEAN = 5;
86
+
87
+ // Field value type is Geolocation.
88
+ GEOLOCATION = 6;
89
+ }
90
+
91
+ // The setting of Indexable options in schema.
92
+ enum IndexableOption {
93
+ // Value used when unset.
94
+ INDEXABLE_OPTION_UNSPECIFIED = 0;
95
+
96
+ // Indexable option enabled for a schema field.
97
+ INDEXABLE_ENABLED = 1;
98
+
99
+ // Indexable option disabled for a schema field.
100
+ INDEXABLE_DISABLED = 2;
101
+ }
102
+
103
+ // The status of the dynamic facetable option of a schema field.
104
+ enum DynamicFacetableOption {
105
+ // Value used when unset.
106
+ DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0;
107
+
108
+ // Dynamic facetable option enabled for a schema field.
109
+ DYNAMIC_FACETABLE_ENABLED = 1;
110
+
111
+ // Dynamic facetable option disabled for a schema field.
112
+ DYNAMIC_FACETABLE_DISABLED = 2;
113
+ }
114
+
115
+ // The setting of Searchable options in schema.
116
+ enum SearchableOption {
117
+ // Value used when unset.
118
+ SEARCHABLE_OPTION_UNSPECIFIED = 0;
119
+
120
+ // Searchable option enabled for a schema field.
121
+ SEARCHABLE_ENABLED = 1;
122
+
123
+ // Searchable option disabled for a schema field.
124
+ SEARCHABLE_DISABLED = 2;
125
+ }
126
+
127
+ // The setting of Retrievable options in schema.
128
+ enum RetrievableOption {
129
+ // Value used when unset.
130
+ RETRIEVABLE_OPTION_UNSPECIFIED = 0;
131
+
132
+ // Retrievable option enabled for a schema field.
133
+ RETRIEVABLE_ENABLED = 1;
134
+
135
+ // Retrievable option disabled for a schema field.
136
+ RETRIEVABLE_DISABLED = 2;
137
+ }
138
+
139
+ // The setting of Completable options in schema.
140
+ enum CompletableOption {
141
+ // Value used when unset.
142
+ COMPLETABLE_OPTION_UNSPECIFIED = 0;
143
+
144
+ // Completable option enabled for a schema field.
145
+ COMPLETABLE_ENABLED = 1;
146
+
147
+ // Completable option disabled for a schema field.
148
+ COMPLETABLE_DISABLED = 2;
149
+ }
150
+
151
+ // Sets the filterable option for schema fields.
152
+ enum FilterableOption {
153
+ // Value used when unset.
154
+ FILTERABLE_OPTION_UNSPECIFIED = 0;
155
+
156
+ // Filterable option enabled for a schema field.
157
+ FILTERABLE_ENABLED = 1;
158
+
159
+ // Filterable option disabled for a schema field.
160
+ FILTERABLE_DISABLED = 2;
161
+ }
162
+
163
+ // Required. Field path of the schema field.
164
+ // For example: `title`, `description`, `release_info.release_year`.
165
+ string field_path = 1 [(google.api.field_behavior) = REQUIRED];
166
+
167
+ // Output only. Raw type of the field.
168
+ FieldType field_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
169
+
170
+ // If
171
+ // [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
172
+ // is
173
+ // [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
174
+ // field values are indexed so that it can be filtered or faceted in
175
+ // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
176
+ //
177
+ // If
178
+ // [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
179
+ // is unset, the server behavior defaults to
180
+ // [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
181
+ // for fields that support setting indexable options. For those fields that do
182
+ // not support setting indexable options, such as `object` and `boolean` and
183
+ // key properties, the server will skip
184
+ // [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
185
+ // setting, and setting
186
+ // [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
187
+ // for those fields will throw `INVALID_ARGUMENT` error.
188
+ IndexableOption indexable_option = 3;
189
+
190
+ // If
191
+ // [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
192
+ // is
193
+ // [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
194
+ // field values are available for dynamic facet. Could only be
195
+ // [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
196
+ // if
197
+ // [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
198
+ // is
199
+ // [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
200
+ // Otherwise, an `INVALID_ARGUMENT` error will be returned.
201
+ //
202
+ // If
203
+ // [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
204
+ // is unset, the server behavior defaults to
205
+ // [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
206
+ // for fields that support setting dynamic facetable options. For those fields
207
+ // that do not support setting dynamic facetable options, such as `object` and
208
+ // `boolean`, the server will skip dynamic facetable option setting, and
209
+ // setting
210
+ // [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
211
+ // for those fields will throw `INVALID_ARGUMENT` error.
212
+ DynamicFacetableOption dynamic_facetable_option = 4;
213
+
214
+ // If
215
+ // [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
216
+ // is
217
+ // [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
218
+ // field values are searchable by text queries in
219
+ // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
220
+ //
221
+ // If
222
+ // [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
223
+ // but field type is numerical, field values will not be searchable by text
224
+ // queries in
225
+ // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
226
+ // as there are no text values associated to numerical fields.
227
+ //
228
+ // If
229
+ // [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
230
+ // is unset, the server behavior defaults to
231
+ // [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
232
+ // for fields that support setting searchable options. Only `string` fields
233
+ // that have no key property mapping support setting
234
+ // [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
235
+ //
236
+ // For those fields that do not support setting searchable options, the server
237
+ // will skip searchable option setting, and setting
238
+ // [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
239
+ // for those fields will throw `INVALID_ARGUMENT` error.
240
+ SearchableOption searchable_option = 5;
241
+
242
+ // If
243
+ // [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
244
+ // is
245
+ // [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
246
+ // field values are included in the search results.
247
+ //
248
+ // If
249
+ // [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
250
+ // is unset, the server behavior defaults to
251
+ // [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
252
+ // for fields that support setting retrievable options. For those fields
253
+ // that do not support setting retrievable options, such as `object` and
254
+ // `boolean`, the server will skip retrievable option setting, and setting
255
+ // [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
256
+ // for those fields will throw `INVALID_ARGUMENT` error.
257
+ RetrievableOption retrievable_option = 6;
258
+
259
+ // If
260
+ // [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
261
+ // is
262
+ // [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
263
+ // field values are directly used and returned as suggestions for Autocomplete
264
+ // in
265
+ // [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
266
+ //
267
+ // If
268
+ // [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
269
+ // is unset, the server behavior defaults to
270
+ // [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
271
+ // for fields that support setting completable options, which are just
272
+ // `string` fields. For those fields that do not support setting completable
273
+ // options, the server will skip completable option setting, and setting
274
+ // [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
275
+ // for those fields will throw `INVALID_ARGUMENT` error.
276
+ CompletableOption completable_option = 8;
277
+
278
+ // If
279
+ // [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
280
+ // is
281
+ // [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
282
+ // field values are filterable by filter expression in
283
+ // [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
284
+ //
285
+ // If
286
+ // [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
287
+ // but the field type is numerical, field values are not filterable by text
288
+ // queries in
289
+ // [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
290
+ // Only textual fields are supported.
291
+ //
292
+ // If
293
+ // [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
294
+ // is unset, the default setting is
295
+ // [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
296
+ // for fields that support setting filterable options.
297
+ //
298
+ // When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
299
+ // generated and an empty result is returned.
300
+ FilterableOption recs_filterable_option = 9;
301
+
302
+ // Output only. Type of the key property that this field is mapped to. Empty
303
+ // string if this is not annotated as mapped to a key property.
304
+ //
305
+ // Example types are `title`, `description`. Full list is defined
306
+ // by `keyPropertyMapping` in the schema field annotation.
307
+ //
308
+ // If the schema field has a `KeyPropertyMapping` annotation,
309
+ // `indexable_option` and `searchable_option` of this field cannot be
310
+ // modified.
311
+ string key_property_type = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
312
+ }
@@ -0,0 +1,260 @@
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.v1alpha;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1alpha/schema.proto";
24
+ import "google/longrunning/operations.proto";
25
+ import "google/protobuf/empty.proto";
26
+ import "google/protobuf/timestamp.proto";
27
+
28
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
29
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
30
+ option java_multiple_files = true;
31
+ option java_outer_classname = "SchemaServiceProto";
32
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
33
+ option objc_class_prefix = "DISCOVERYENGINE";
34
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
35
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
36
+
37
+ // Service for managing [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
38
+ service SchemaService {
39
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
40
+ option (google.api.oauth_scopes) =
41
+ "https://www.googleapis.com/auth/cloud-platform";
42
+
43
+ // Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
44
+ rpc GetSchema(GetSchemaRequest) returns (Schema) {
45
+ option (google.api.http) = {
46
+ get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/schemas/*}"
47
+ additional_bindings {
48
+ get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}"
49
+ }
50
+ };
51
+ option (google.api.method_signature) = "name";
52
+ }
53
+
54
+ // Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
55
+ rpc ListSchemas(ListSchemasRequest) returns (ListSchemasResponse) {
56
+ option (google.api.http) = {
57
+ get: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/schemas"
58
+ additional_bindings {
59
+ get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas"
60
+ }
61
+ };
62
+ option (google.api.method_signature) = "parent";
63
+ }
64
+
65
+ // Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
66
+ rpc CreateSchema(CreateSchemaRequest) returns (google.longrunning.Operation) {
67
+ option (google.api.http) = {
68
+ post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/schemas"
69
+ body: "schema"
70
+ additional_bindings {
71
+ post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas"
72
+ body: "schema"
73
+ }
74
+ };
75
+ option (google.api.method_signature) = "parent,schema,schema_id";
76
+ option (google.longrunning.operation_info) = {
77
+ response_type: "google.cloud.discoveryengine.v1alpha.Schema"
78
+ metadata_type: "google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata"
79
+ };
80
+ }
81
+
82
+ // Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
83
+ rpc UpdateSchema(UpdateSchemaRequest) returns (google.longrunning.Operation) {
84
+ option (google.api.http) = {
85
+ patch: "/v1alpha/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}"
86
+ body: "schema"
87
+ additional_bindings {
88
+ patch: "/v1alpha/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}"
89
+ body: "schema"
90
+ }
91
+ };
92
+ option (google.longrunning.operation_info) = {
93
+ response_type: "google.cloud.discoveryengine.v1alpha.Schema"
94
+ metadata_type: "google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata"
95
+ };
96
+ }
97
+
98
+ // Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
99
+ rpc DeleteSchema(DeleteSchemaRequest) returns (google.longrunning.Operation) {
100
+ option (google.api.http) = {
101
+ delete: "/v1alpha/{name=projects/*/locations/*/dataStores/*/schemas/*}"
102
+ additional_bindings {
103
+ delete: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}"
104
+ }
105
+ };
106
+ option (google.api.method_signature) = "name";
107
+ option (google.longrunning.operation_info) = {
108
+ response_type: "google.protobuf.Empty"
109
+ metadata_type: "google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata"
110
+ };
111
+ }
112
+ }
113
+
114
+ // Request message for
115
+ // [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema]
116
+ // method.
117
+ message GetSchemaRequest {
118
+ // Required. The full resource name of the schema, in the format of
119
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
120
+ string name = 1 [
121
+ (google.api.field_behavior) = REQUIRED,
122
+ (google.api.resource_reference) = {
123
+ type: "discoveryengine.googleapis.com/Schema"
124
+ }
125
+ ];
126
+ }
127
+
128
+ // Request message for
129
+ // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
130
+ // method.
131
+ message ListSchemasRequest {
132
+ // Required. The parent data store resource name, in the format of
133
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
134
+ string parent = 1 [
135
+ (google.api.field_behavior) = REQUIRED,
136
+ (google.api.resource_reference) = {
137
+ type: "discoveryengine.googleapis.com/DataStore"
138
+ }
139
+ ];
140
+
141
+ // The maximum number of
142
+ // [Schema][google.cloud.discoveryengine.v1alpha.Schema]s to return. The
143
+ // service may return fewer than this value.
144
+ //
145
+ // If unspecified, at most 100
146
+ // [Schema][google.cloud.discoveryengine.v1alpha.Schema]s will be returned.
147
+ //
148
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
149
+ int32 page_size = 2;
150
+
151
+ // A page token, received from a previous
152
+ // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
153
+ // call. Provide this to retrieve the subsequent page.
154
+ //
155
+ // When paginating, all other parameters provided to
156
+ // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
157
+ // must match the call that provided the page token.
158
+ string page_token = 3;
159
+ }
160
+
161
+ // Response message for
162
+ // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
163
+ // method.
164
+ message ListSchemasResponse {
165
+ // The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
166
+ repeated Schema schemas = 1;
167
+
168
+ // A token that can be sent as
169
+ // [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
170
+ // to retrieve the next page. If this field is omitted, there are no
171
+ // subsequent pages.
172
+ string next_page_token = 2;
173
+ }
174
+
175
+ // Request message for
176
+ // [SchemaService.CreateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.CreateSchema]
177
+ // method.
178
+ message CreateSchemaRequest {
179
+ // Required. The parent data store resource name, in the format of
180
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
181
+ string parent = 1 [
182
+ (google.api.field_behavior) = REQUIRED,
183
+ (google.api.resource_reference) = {
184
+ type: "discoveryengine.googleapis.com/DataStore"
185
+ }
186
+ ];
187
+
188
+ // Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
189
+ // create.
190
+ Schema schema = 2 [(google.api.field_behavior) = REQUIRED];
191
+
192
+ // Required. The ID to use for the
193
+ // [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
194
+ // the final component of the
195
+ // [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
196
+ //
197
+ // This field should conform to
198
+ // [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
199
+ // limit of 63 characters.
200
+ string schema_id = 3 [(google.api.field_behavior) = REQUIRED];
201
+ }
202
+
203
+ // Request message for
204
+ // [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.UpdateSchema]
205
+ // method.
206
+ message UpdateSchemaRequest {
207
+ // Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
208
+ // update.
209
+ Schema schema = 1 [(google.api.field_behavior) = REQUIRED];
210
+
211
+ // If set to true, and the
212
+ // [Schema][google.cloud.discoveryengine.v1alpha.Schema] is not found, a new
213
+ // [Schema][google.cloud.discoveryengine.v1alpha.Schema] will be created. In
214
+ // this situation, `update_mask` is ignored.
215
+ bool allow_missing = 3;
216
+ }
217
+
218
+ // Request message for
219
+ // [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1alpha.SchemaService.DeleteSchema]
220
+ // method.
221
+ message DeleteSchemaRequest {
222
+ // Required. The full resource name of the schema, in the format of
223
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
224
+ string name = 1 [
225
+ (google.api.field_behavior) = REQUIRED,
226
+ (google.api.resource_reference) = {
227
+ type: "discoveryengine.googleapis.com/Schema"
228
+ }
229
+ ];
230
+ }
231
+
232
+ // Metadata for Create Schema LRO.
233
+ message CreateSchemaMetadata {
234
+ // Operation create time.
235
+ google.protobuf.Timestamp create_time = 1;
236
+
237
+ // Operation last update time. If the operation is done, this is also the
238
+ // finish time.
239
+ google.protobuf.Timestamp update_time = 2;
240
+ }
241
+
242
+ // Metadata for UpdateSchema LRO.
243
+ message UpdateSchemaMetadata {
244
+ // Operation create time.
245
+ google.protobuf.Timestamp create_time = 1;
246
+
247
+ // Operation last update time. If the operation is done, this is also the
248
+ // finish time.
249
+ google.protobuf.Timestamp update_time = 2;
250
+ }
251
+
252
+ // Metadata for DeleteSchema LRO.
253
+ message DeleteSchemaMetadata {
254
+ // Operation create time.
255
+ google.protobuf.Timestamp create_time = 1;
256
+
257
+ // Operation last update time. If the operation is done, this is also the
258
+ // finish time.
259
+ google.protobuf.Timestamp update_time = 2;
260
+ }