google-cloud-discovery_engine-v1 0.a → 0.1.0

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