google-cloud-discovery_engine-v1beta 0.a → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +429 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/completion_service/credentials.rb +47 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/completion_service/paths.rb +78 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +386 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +114 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest.rb +52 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/completion_service.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +1159 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/document_service/credentials.rb +47 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +768 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +135 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +960 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +919 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/service_stub.rb +518 -0
  19. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest.rb +55 -0
  20. data/lib/google/cloud/discovery_engine/v1beta/document_service.rb +58 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +486 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/credentials.rb +47 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +135 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +443 -0
  25. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/service_stub.rb +116 -0
  26. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest.rb +52 -0
  27. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service.rb +55 -0
  28. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +42 -0
  29. data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +840 -0
  30. data/lib/google/cloud/discovery_engine/v1beta/schema_service/credentials.rb +47 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +768 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/schema_service/paths.rb +127 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +680 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +919 -0
  35. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/service_stub.rb +382 -0
  36. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest.rb +53 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/schema_service.rb +56 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +511 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/search_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +131 -0
  41. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +463 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/service_stub.rb +116 -0
  43. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest.rb +52 -0
  44. data/lib/google/cloud/discovery_engine/v1beta/search_service.rb +55 -0
  45. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +638 -0
  46. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/credentials.rb +47 -0
  47. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +768 -0
  48. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +131 -0
  49. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +542 -0
  50. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +919 -0
  51. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +250 -0
  52. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest.rb +53 -0
  53. data/lib/google/cloud/discovery_engine/v1beta/user_event_service.rb +56 -0
  54. data/lib/google/cloud/discovery_engine/v1beta/version.rb +7 -2
  55. data/lib/google/cloud/discovery_engine/v1beta.rb +50 -0
  56. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +46 -0
  57. data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +49 -0
  58. data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +45 -0
  59. data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +48 -0
  60. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +58 -0
  61. data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +81 -0
  62. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +66 -0
  63. data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +49 -0
  64. data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +55 -0
  65. data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_services_pb.rb +45 -0
  66. data/lib/google/cloud/discoveryengine/v1beta/schema_pb.rb +47 -0
  67. data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +61 -0
  68. data/lib/google/cloud/discoveryengine/v1beta/schema_service_services_pb.rb +53 -0
  69. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +71 -0
  70. data/lib/google/cloud/discoveryengine/v1beta/search_service_services_pb.rb +45 -0
  71. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +58 -0
  72. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +53 -0
  73. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +59 -0
  74. data/lib/google-cloud-discovery_engine-v1beta.rb +21 -0
  75. data/proto_docs/README.md +4 -0
  76. data/proto_docs/google/api/client.rb +381 -0
  77. data/proto_docs/google/api/field_behavior.rb +71 -0
  78. data/proto_docs/google/api/httpbody.rb +80 -0
  79. data/proto_docs/google/api/launch_stage.rb +71 -0
  80. data/proto_docs/google/api/resource.rb +222 -0
  81. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +107 -0
  82. data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +98 -0
  83. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +107 -0
  84. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +181 -0
  85. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +340 -0
  86. data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +84 -0
  87. data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +210 -0
  88. data/proto_docs/google/cloud/discoveryengine/v1beta/schema.rb +45 -0
  89. data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +180 -0
  90. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +603 -0
  91. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +473 -0
  92. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +64 -0
  93. data/proto_docs/google/longrunning/operations.rb +164 -0
  94. data/proto_docs/google/protobuf/any.rb +144 -0
  95. data/proto_docs/google/protobuf/duration.rb +98 -0
  96. data/proto_docs/google/protobuf/empty.rb +34 -0
  97. data/proto_docs/google/protobuf/struct.rb +96 -0
  98. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  99. data/proto_docs/google/rpc/status.rb +48 -0
  100. data/proto_docs/google/type/date.rb +53 -0
  101. metadata +254 -12
@@ -0,0 +1,181 @@
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
+
20
+ module Google
21
+ module Cloud
22
+ module DiscoveryEngine
23
+ module V1beta
24
+ # Request message for
25
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#get_document DocumentService.GetDocument}
26
+ # method.
27
+ # @!attribute [rw] name
28
+ # @return [::String]
29
+ # Required. Full resource name of
30
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}, such as
31
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
32
+ #
33
+ # If the caller does not have permission to access the
34
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}, regardless of
35
+ # whether or not it exists, a `PERMISSION_DENIED` error is returned.
36
+ #
37
+ # If the requested {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}
38
+ # does not exist, a `NOT_FOUND` error is returned.
39
+ class GetDocumentRequest
40
+ include ::Google::Protobuf::MessageExts
41
+ extend ::Google::Protobuf::MessageExts::ClassMethods
42
+ end
43
+
44
+ # Request message for
45
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#list_documents DocumentService.ListDocuments}
46
+ # method.
47
+ # @!attribute [rw] parent
48
+ # @return [::String]
49
+ # Required. The parent branch resource name, such as
50
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
51
+ # Use `default_branch` as the branch ID, to list documents under the default
52
+ # branch.
53
+ #
54
+ # If the caller does not have permission to list [Documents][]s under this
55
+ # branch, regardless of whether or not this branch exists, a
56
+ # `PERMISSION_DENIED` error is returned.
57
+ # @!attribute [rw] page_size
58
+ # @return [::Integer]
59
+ # Maximum number of {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s
60
+ # to return. If unspecified, defaults to 100. The maximum allowed value is
61
+ # 1000. Values above 1000 will be coerced to 1000.
62
+ #
63
+ # If this field is negative, an `INVALID_ARGUMENT` error is returned.
64
+ # @!attribute [rw] page_token
65
+ # @return [::String]
66
+ # A page token
67
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListDocumentsResponse#next_page_token ListDocumentsResponse.next_page_token},
68
+ # received from a previous
69
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#list_documents DocumentService.ListDocuments}
70
+ # call. Provide this to retrieve the subsequent page.
71
+ #
72
+ # When paginating, all other parameters provided to
73
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#list_documents DocumentService.ListDocuments}
74
+ # must match the call that provided the page token. Otherwise, an
75
+ # `INVALID_ARGUMENT` error is returned.
76
+ class ListDocumentsRequest
77
+ include ::Google::Protobuf::MessageExts
78
+ extend ::Google::Protobuf::MessageExts::ClassMethods
79
+ end
80
+
81
+ # Response message for
82
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#list_documents DocumentService.ListDocuments}
83
+ # method.
84
+ # @!attribute [rw] documents
85
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
86
+ # The {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s.
87
+ # @!attribute [rw] next_page_token
88
+ # @return [::String]
89
+ # A token that can be sent as
90
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListDocumentsRequest#page_token ListDocumentsRequest.page_token}
91
+ # to retrieve the next page. If this field is omitted, there are no
92
+ # subsequent pages.
93
+ class ListDocumentsResponse
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+
98
+ # Request message for
99
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#create_document DocumentService.CreateDocument}
100
+ # method.
101
+ # @!attribute [rw] parent
102
+ # @return [::String]
103
+ # Required. The parent resource name, such as
104
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
105
+ # @!attribute [rw] document
106
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
107
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} to
108
+ # create.
109
+ # @!attribute [rw] document_id
110
+ # @return [::String]
111
+ # Required. The ID to use for the
112
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}, which will become
113
+ # the final component of the
114
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name}.
115
+ #
116
+ # If the caller does not have permission to create the
117
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}, regardless of
118
+ # whether or not it exists, a `PERMISSION_DENIED` error is returned.
119
+ #
120
+ # This field must be unique among all
121
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s with the same
122
+ # {::Google::Cloud::DiscoveryEngine::V1beta::CreateDocumentRequest#parent parent}.
123
+ # Otherwise, an `ALREADY_EXISTS` error is returned.
124
+ #
125
+ # This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
126
+ # standard with a length limit of 63 characters. Otherwise, an
127
+ # `INVALID_ARGUMENT` error is returned.
128
+ class CreateDocumentRequest
129
+ include ::Google::Protobuf::MessageExts
130
+ extend ::Google::Protobuf::MessageExts::ClassMethods
131
+ end
132
+
133
+ # Request message for
134
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#update_document DocumentService.UpdateDocument}
135
+ # method.
136
+ # @!attribute [rw] document
137
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
138
+ # Required. The document to update/create.
139
+ #
140
+ # If the caller does not have permission to update the
141
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}, regardless of
142
+ # whether or not it exists, a `PERMISSION_DENIED` error is returned.
143
+ #
144
+ # If the {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} to update
145
+ # does not exist and
146
+ # {::Google::Cloud::DiscoveryEngine::V1beta::UpdateDocumentRequest#allow_missing allow_missing}
147
+ # is not set, a `NOT_FOUND` error is returned.
148
+ # @!attribute [rw] allow_missing
149
+ # @return [::Boolean]
150
+ # If set to true, and the
151
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} is not found, a
152
+ # new {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} will be
153
+ # created.
154
+ class UpdateDocumentRequest
155
+ include ::Google::Protobuf::MessageExts
156
+ extend ::Google::Protobuf::MessageExts::ClassMethods
157
+ end
158
+
159
+ # Request message for
160
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#delete_document DocumentService.DeleteDocument}
161
+ # method.
162
+ # @!attribute [rw] name
163
+ # @return [::String]
164
+ # Required. Full resource name of
165
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}, such as
166
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
167
+ #
168
+ # If the caller does not have permission to delete the
169
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}, regardless of
170
+ # whether or not it exists, a `PERMISSION_DENIED` error is returned.
171
+ #
172
+ # If the {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} to delete
173
+ # does not exist, a `NOT_FOUND` error is returned.
174
+ class DeleteDocumentRequest
175
+ include ::Google::Protobuf::MessageExts
176
+ extend ::Google::Protobuf::MessageExts::ClassMethods
177
+ end
178
+ end
179
+ end
180
+ end
181
+ end
@@ -0,0 +1,340 @@
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
+
20
+ module Google
21
+ module Cloud
22
+ module DiscoveryEngine
23
+ module V1beta
24
+ # Cloud Storage location for input content.
25
+ # @!attribute [rw] input_uris
26
+ # @return [::Array<::String>]
27
+ # Required. Cloud Storage URIs to input files. URI can be up to
28
+ # 2000 characters long. URIs can match the full object path (for example,
29
+ # `gs://bucket/directory/object.json`) or a pattern matching one or more
30
+ # files, such as `gs://bucket/directory/*.json`.
31
+ #
32
+ # A request can contain at most 100 files (or 100,000 files if `data_schema`
33
+ # is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
34
+ # `content`).
35
+ # @!attribute [rw] data_schema
36
+ # @return [::String]
37
+ # The schema to use when parsing the data from the source.
38
+ #
39
+ # Supported values for document imports:
40
+ #
41
+ # * `document` (default): One JSON
42
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} per line. Each
43
+ # document must
44
+ # have a valid
45
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
46
+ # * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
47
+ # `input_uris` will become a document, with the ID set to the first 128
48
+ # bits of SHA256(URI) encoded as a hex string.
49
+ # * `custom`: One custom data JSON per row in arbitrary format that conforms
50
+ # the defined {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of the
51
+ # data store. This can only be used by the GENERIC Data Store vertical.
52
+ #
53
+ # Supported values for user even imports:
54
+ #
55
+ # * `user_event` (default): One JSON
56
+ # {::Google::Cloud::DiscoveryEngine::V1beta::UserEvent UserEvent} per line.
57
+ class GcsSource
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+ end
61
+
62
+ # BigQuery source import data from.
63
+ # @!attribute [rw] partition_date
64
+ # @return [::Google::Type::Date]
65
+ # BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
66
+ # @!attribute [rw] project_id
67
+ # @return [::String]
68
+ # The project ID (can be project # or ID) that the BigQuery source is in with
69
+ # a length limit of 128 characters. If not specified, inherits the project
70
+ # ID from the parent request.
71
+ # @!attribute [rw] dataset_id
72
+ # @return [::String]
73
+ # Required. The BigQuery data set to copy the data from with a length limit
74
+ # of 1,024 characters.
75
+ # @!attribute [rw] table_id
76
+ # @return [::String]
77
+ # Required. The BigQuery table to copy the data from with a length limit of
78
+ # 1,024 characters.
79
+ # @!attribute [rw] gcs_staging_dir
80
+ # @return [::String]
81
+ # Intermediate Cloud Storage directory used for the import with a length
82
+ # limit of 2,000 characters. Can be specified if one wants to have the
83
+ # BigQuery export to a specific Cloud Storage directory.
84
+ # @!attribute [rw] data_schema
85
+ # @return [::String]
86
+ # The schema to use when parsing the data from the source.
87
+ #
88
+ # Supported values for user event imports:
89
+ #
90
+ # * `user_event` (default): One
91
+ # {::Google::Cloud::DiscoveryEngine::V1beta::UserEvent UserEvent} per row.
92
+ #
93
+ # Supported values for document imports:
94
+ #
95
+ # * `document` (default): One
96
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} format per
97
+ # row. Each document must have a valid
98
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} and one of
99
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document#json_data Document.json_data}
100
+ # or
101
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document#struct_data Document.struct_data}.
102
+ # * `custom`: One custom data per row in arbitrary format that conforms the
103
+ # defined {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of the data
104
+ # store. This can only be used by the GENERIC Data Store vertical.
105
+ class BigQuerySource
106
+ include ::Google::Protobuf::MessageExts
107
+ extend ::Google::Protobuf::MessageExts::ClassMethods
108
+ end
109
+
110
+ # Configuration of destination for Import related errors.
111
+ # @!attribute [rw] gcs_prefix
112
+ # @return [::String]
113
+ # Cloud Storage prefix for import errors. This must be an empty,
114
+ # existing Cloud Storage directory. Import errors will be written to
115
+ # sharded files in this directory, one per line, as a JSON-encoded
116
+ # `google.rpc.Status` message.
117
+ class ImportErrorConfig
118
+ include ::Google::Protobuf::MessageExts
119
+ extend ::Google::Protobuf::MessageExts::ClassMethods
120
+ end
121
+
122
+ # Request message for the ImportUserEvents request.
123
+ # @!attribute [rw] inline_source
124
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportUserEventsRequest::InlineSource]
125
+ # Required. The Inline source for the input content for UserEvents.
126
+ # @!attribute [rw] gcs_source
127
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource]
128
+ # Required. Cloud Storage location for the input content.
129
+ # @!attribute [rw] bigquery_source
130
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource]
131
+ # Required. BigQuery input source.
132
+ # @!attribute [rw] parent
133
+ # @return [::String]
134
+ # Required. Parent DataStore resource name, of the form
135
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
136
+ # @!attribute [rw] error_config
137
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig]
138
+ # The desired location of errors incurred during the Import. Cannot be set
139
+ # for inline user event imports.
140
+ class ImportUserEventsRequest
141
+ include ::Google::Protobuf::MessageExts
142
+ extend ::Google::Protobuf::MessageExts::ClassMethods
143
+
144
+ # The inline source for the input config for ImportUserEvents method.
145
+ # @!attribute [rw] user_events
146
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::UserEvent>]
147
+ # Required. A list of user events to import. Recommended max of 10k items.
148
+ class InlineSource
149
+ include ::Google::Protobuf::MessageExts
150
+ extend ::Google::Protobuf::MessageExts::ClassMethods
151
+ end
152
+ end
153
+
154
+ # Response of the ImportUserEventsRequest. If the long running
155
+ # operation was successful, then this message is returned by the
156
+ # google.longrunning.Operations.response field if the operation was successful.
157
+ # @!attribute [rw] error_samples
158
+ # @return [::Array<::Google::Rpc::Status>]
159
+ # A sample of errors encountered while processing the request.
160
+ # @!attribute [rw] error_config
161
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig]
162
+ # Echoes the destination for the complete errors if this field was set in
163
+ # the request.
164
+ # @!attribute [rw] joined_events_count
165
+ # @return [::Integer]
166
+ # Count of user events imported with complete existing Documents.
167
+ # @!attribute [rw] unjoined_events_count
168
+ # @return [::Integer]
169
+ # Count of user events imported, but with Document information not found
170
+ # in the existing Branch.
171
+ class ImportUserEventsResponse
172
+ include ::Google::Protobuf::MessageExts
173
+ extend ::Google::Protobuf::MessageExts::ClassMethods
174
+ end
175
+
176
+ # Metadata related to the progress of the Import operation. This will be
177
+ # returned by the google.longrunning.Operation.metadata field.
178
+ # @!attribute [rw] create_time
179
+ # @return [::Google::Protobuf::Timestamp]
180
+ # Operation create time.
181
+ # @!attribute [rw] update_time
182
+ # @return [::Google::Protobuf::Timestamp]
183
+ # Operation last update time. If the operation is done, this is also the
184
+ # finish time.
185
+ # @!attribute [rw] success_count
186
+ # @return [::Integer]
187
+ # Count of entries that were processed successfully.
188
+ # @!attribute [rw] failure_count
189
+ # @return [::Integer]
190
+ # Count of entries that encountered errors while processing.
191
+ class ImportUserEventsMetadata
192
+ include ::Google::Protobuf::MessageExts
193
+ extend ::Google::Protobuf::MessageExts::ClassMethods
194
+ end
195
+
196
+ # Metadata related to the progress of the ImportDocuments operation. This will
197
+ # be returned by the google.longrunning.Operation.metadata field.
198
+ # @!attribute [rw] create_time
199
+ # @return [::Google::Protobuf::Timestamp]
200
+ # Operation create time.
201
+ # @!attribute [rw] update_time
202
+ # @return [::Google::Protobuf::Timestamp]
203
+ # Operation last update time. If the operation is done, this is also the
204
+ # finish time.
205
+ # @!attribute [rw] success_count
206
+ # @return [::Integer]
207
+ # Count of entries that were processed successfully.
208
+ # @!attribute [rw] failure_count
209
+ # @return [::Integer]
210
+ # Count of entries that encountered errors while processing.
211
+ class ImportDocumentsMetadata
212
+ include ::Google::Protobuf::MessageExts
213
+ extend ::Google::Protobuf::MessageExts::ClassMethods
214
+ end
215
+
216
+ # Request message for Import methods.
217
+ # @!attribute [rw] inline_source
218
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::InlineSource]
219
+ # The Inline source for the input content for documents.
220
+ # @!attribute [rw] gcs_source
221
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource]
222
+ # Cloud Storage location for the input content.
223
+ # @!attribute [rw] bigquery_source
224
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource]
225
+ # BigQuery input source.
226
+ # @!attribute [rw] parent
227
+ # @return [::String]
228
+ # Required. The parent branch resource name, such as
229
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
230
+ # Requires create/update permission.
231
+ # @!attribute [rw] error_config
232
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig]
233
+ # The desired location of errors incurred during the Import.
234
+ # @!attribute [rw] reconciliation_mode
235
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::ReconciliationMode]
236
+ # The mode of reconciliation between existing documents and the documents to
237
+ # be imported. Defaults to
238
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
239
+ # @!attribute [rw] auto_generate_ids
240
+ # @return [::Boolean]
241
+ # Whether to automatically generate IDs for the documents if absent.
242
+ #
243
+ # If set to `true`,
244
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}s are
245
+ # automatically generated based on the hash of the payload, where IDs may not
246
+ # be consistent during multiple imports. In which case
247
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::ReconciliationMode::FULL ReconciliationMode.FULL}
248
+ # is highly recommended to avoid duplicate contents. If unset or set to
249
+ # `false`, {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}s
250
+ # have to be specified using
251
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest#id_field id_field},
252
+ # otherwises, documents without IDs will fail to be imported.
253
+ #
254
+ # Only set this field when using
255
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} or
256
+ # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}, and
257
+ # when
258
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
259
+ # or
260
+ # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
261
+ # is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.
262
+ # @!attribute [rw] id_field
263
+ # @return [::String]
264
+ # The field in the Cloud Storage and BigQuery sources that indicates the
265
+ # unique IDs of the documents.
266
+ #
267
+ # For {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} it is the
268
+ # key of the JSON field. For instance, `my_id` for JSON `{"my_id":
269
+ # "some_uuid"}`. For
270
+ # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource} it is
271
+ # the column name of the BigQuery table where the unique ids are stored.
272
+ #
273
+ # The values of the JSON field or the BigQuery column will be used as the
274
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}s. The JSON
275
+ # field or the BigQuery column must be of string type, and the values must be
276
+ # set as valid strings conform to
277
+ # [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
278
+ # Otherwise, documents without valid IDs will fail to be imported.
279
+ #
280
+ # Only set this field when using
281
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} or
282
+ # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}, and
283
+ # when
284
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
285
+ # or
286
+ # {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
287
+ # is `custom`. And only set this field when
288
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest#auto_generate_ids auto_generate_ids}
289
+ # is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
290
+ #
291
+ # If it is unset, a default value `_id` is used when importing from the
292
+ # allowed data sources.
293
+ class ImportDocumentsRequest
294
+ include ::Google::Protobuf::MessageExts
295
+ extend ::Google::Protobuf::MessageExts::ClassMethods
296
+
297
+ # The inline source for the input config for ImportDocuments method.
298
+ # @!attribute [rw] documents
299
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
300
+ # Required. A list of documents to update/create. Each document must have a
301
+ # valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
302
+ # Recommended max of 100 items.
303
+ class InlineSource
304
+ include ::Google::Protobuf::MessageExts
305
+ extend ::Google::Protobuf::MessageExts::ClassMethods
306
+ end
307
+
308
+ # Indicates how imported documents are reconciled with the existing documents
309
+ # created or imported before.
310
+ module ReconciliationMode
311
+ # Defaults to INCREMENTAL.
312
+ RECONCILIATION_MODE_UNSPECIFIED = 0
313
+
314
+ # Inserts new documents or updates existing documents.
315
+ INCREMENTAL = 1
316
+
317
+ # Calculates diff and replaces the entire document dataset. Existing
318
+ # documents may be deleted if they are not present in the source location.
319
+ FULL = 2
320
+ end
321
+ end
322
+
323
+ # Response of the
324
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest ImportDocumentsRequest}.
325
+ # If the long running operation is done, then this message is returned by the
326
+ # google.longrunning.Operations.response field if the operation was successful.
327
+ # @!attribute [rw] error_samples
328
+ # @return [::Array<::Google::Rpc::Status>]
329
+ # A sample of errors encountered while processing the request.
330
+ # @!attribute [rw] error_config
331
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig]
332
+ # Echoes the destination for the complete errors in the request if set.
333
+ class ImportDocumentsResponse
334
+ include ::Google::Protobuf::MessageExts
335
+ extend ::Google::Protobuf::MessageExts::ClassMethods
336
+ end
337
+ end
338
+ end
339
+ end
340
+ end
@@ -0,0 +1,84 @@
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
+
20
+ module Google
21
+ module Cloud
22
+ module DiscoveryEngine
23
+ module V1beta
24
+ # Request message for
25
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#purge_documents DocumentService.PurgeDocuments}
26
+ # method.
27
+ # @!attribute [rw] parent
28
+ # @return [::String]
29
+ # Required. The parent resource name, such as
30
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
31
+ # @!attribute [rw] filter
32
+ # @return [::String]
33
+ # Required. Filter matching documents to purge. Only currently supported
34
+ # value is
35
+ # `*` (all items).
36
+ # @!attribute [rw] force
37
+ # @return [::Boolean]
38
+ # Actually performs the purge. If `force` is set to false, return the
39
+ # expected purge count without deleting any documents.
40
+ class PurgeDocumentsRequest
41
+ include ::Google::Protobuf::MessageExts
42
+ extend ::Google::Protobuf::MessageExts::ClassMethods
43
+ end
44
+
45
+ # Response message for
46
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Client#purge_documents DocumentService.PurgeDocuments}
47
+ # method. If the long running operation is successfully done, then this message
48
+ # is returned by the google.longrunning.Operations.response field.
49
+ # @!attribute [rw] purge_count
50
+ # @return [::Integer]
51
+ # The total count of documents purged as a result of the operation.
52
+ # @!attribute [rw] purge_sample
53
+ # @return [::Array<::String>]
54
+ # A sample of document names that will be deleted. Only populated if `force`
55
+ # is set to false. A max of 100 names will be returned and the names are
56
+ # chosen at random.
57
+ class PurgeDocumentsResponse
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+ end
61
+
62
+ # Metadata related to the progress of the PurgeDocuments operation.
63
+ # This will be returned by the google.longrunning.Operation.metadata field.
64
+ # @!attribute [rw] create_time
65
+ # @return [::Google::Protobuf::Timestamp]
66
+ # Operation create time.
67
+ # @!attribute [rw] update_time
68
+ # @return [::Google::Protobuf::Timestamp]
69
+ # Operation last update time. If the operation is done, this is also the
70
+ # finish time.
71
+ # @!attribute [rw] success_count
72
+ # @return [::Integer]
73
+ # Count of entries that were deleted successfully.
74
+ # @!attribute [rw] failure_count
75
+ # @return [::Integer]
76
+ # Count of entries that encountered errors while processing.
77
+ class PurgeDocumentsMetadata
78
+ include ::Google::Protobuf::MessageExts
79
+ extend ::Google::Protobuf::MessageExts::ClassMethods
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end