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

Sign up to get free protection for your applications and to get access to all the features.
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 +1107 -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 +908 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +905 -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 +905 -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 +513 -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 +465 -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 +905 -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 +41 -0
  57. data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +38 -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 +43 -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 +109 -0
  63. data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +40 -0
  64. data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +49 -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 +30 -0
  67. data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +72 -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 +151 -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 +93 -0
  72. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +39 -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 +286 -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 +605 -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 +141 -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 +129 -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,107 @@
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
+ # Document captures all raw metadata information of items to be recommended or
25
+ # searched.
26
+ # @!attribute [rw] struct_data
27
+ # @return [::Google::Protobuf::Struct]
28
+ # The structured JSON data for the document. It should conform to the
29
+ # registered
30
+ # [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an
31
+ # `INVALID_ARGUMENT` error is thrown.
32
+ # @!attribute [rw] json_data
33
+ # @return [::String]
34
+ # The JSON string representation of the document. It should conform to the
35
+ # registered
36
+ # [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an
37
+ # `INVALID_ARGUMENT` error is thrown.
38
+ # @!attribute [rw] name
39
+ # @return [::String]
40
+ # Immutable. The full resource name of the document.
41
+ # Format:
42
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
43
+ #
44
+ # This field must be a UTF-8 encoded string with a length limit of 1024
45
+ # characters.
46
+ # @!attribute [rw] id
47
+ # @return [::String]
48
+ # Immutable. The identifier of the document.
49
+ #
50
+ # Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
51
+ # standard with a length limit of 63 characters.
52
+ # @!attribute [rw] schema_id
53
+ # @return [::String]
54
+ # The identifier of the schema located in the same data store.
55
+ # @!attribute [rw] content
56
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Document::Content]
57
+ # The unstructured data linked to this document. Content must be set if this
58
+ # document is under a
59
+ # `CONTENT_REQUIRED` data store.
60
+ # @!attribute [rw] parent_document_id
61
+ # @return [::String]
62
+ # The identifier of the parent document. Currently supports at most two level
63
+ # document hierarchy.
64
+ #
65
+ # Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
66
+ # standard with a length limit of 63 characters.
67
+ # @!attribute [r] derived_struct_data
68
+ # @return [::Google::Protobuf::Struct]
69
+ # Output only. This field is OUTPUT_ONLY.
70
+ # It contains derived data that are not in the original input document.
71
+ class Document
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+
75
+ # Unstructured data linked to this document.
76
+ # @!attribute [rw] raw_bytes
77
+ # @return [::String]
78
+ # The content represented as a stream of bytes. The maximum length is
79
+ # 1,000,000 bytes (1 MB / ~0.95 MiB).
80
+ #
81
+ # Note: As with all `bytes` fields, this field is represented as pure
82
+ # binary in Protocol Buffers and base64-encoded string in JSON. For
83
+ # example, `abc123!?$*&()'-=@~` should be represented as
84
+ # `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
85
+ # https://developers.google.com/protocol-buffers/docs/proto3#json.
86
+ # @!attribute [rw] uri
87
+ # @return [::String]
88
+ # The URI of the content. Only Cloud Storage URIs (e.g.
89
+ # `gs://bucket-name/path/to/file`) are supported. The maximum file size
90
+ # is 100 MB.
91
+ # @!attribute [rw] mime_type
92
+ # @return [::String]
93
+ # The MIME type of the content. Supported types:
94
+ #
95
+ # * `application/pdf` (PDF)
96
+ # * `text/html` (HTML)
97
+ #
98
+ # See https://www.iana.org/assignments/media-types/media-types.xhtml.
99
+ class Content
100
+ include ::Google::Protobuf::MessageExts
101
+ extend ::Google::Protobuf::MessageExts::ClassMethods
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -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,286 @@
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
+ class ImportDocumentsRequest
240
+ include ::Google::Protobuf::MessageExts
241
+ extend ::Google::Protobuf::MessageExts::ClassMethods
242
+
243
+ # The inline source for the input config for ImportDocuments method.
244
+ # @!attribute [rw] documents
245
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
246
+ # Required. A list of documents to update/create. Each document must have a
247
+ # valid {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
248
+ # Recommended max of 100 items.
249
+ class InlineSource
250
+ include ::Google::Protobuf::MessageExts
251
+ extend ::Google::Protobuf::MessageExts::ClassMethods
252
+ end
253
+
254
+ # Indicates how imported documents are reconciled with the existing documents
255
+ # created or imported before.
256
+ module ReconciliationMode
257
+ # Defaults to INCREMENTAL.
258
+ RECONCILIATION_MODE_UNSPECIFIED = 0
259
+
260
+ # Inserts new documents or updates existing documents.
261
+ INCREMENTAL = 1
262
+
263
+ # Calculates diff and replaces the entire document dataset. Existing
264
+ # documents may be deleted if they are not present in the source location.
265
+ FULL = 2
266
+ end
267
+ end
268
+
269
+ # Response of the
270
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest ImportDocumentsRequest}.
271
+ # If the long running operation is done, then this message is returned by the
272
+ # google.longrunning.Operations.response field if the operation was successful.
273
+ # @!attribute [rw] error_samples
274
+ # @return [::Array<::Google::Rpc::Status>]
275
+ # A sample of errors encountered while processing the request.
276
+ # @!attribute [rw] error_config
277
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig]
278
+ # Echoes the destination for the complete errors in the request if set.
279
+ class ImportDocumentsResponse
280
+ include ::Google::Protobuf::MessageExts
281
+ extend ::Google::Protobuf::MessageExts::ClassMethods
282
+ end
283
+ end
284
+ end
285
+ end
286
+ 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