google-cloud-discovery_engine-v1 0.a → 0.1.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 (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,177 @@
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::SchemaService::Client#get_schema SchemaService.GetSchema}
26
+ # method.
27
+ # @!attribute [rw] name
28
+ # @return [::String]
29
+ # Required. The full resource name of the schema, in the format of
30
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
31
+ class GetSchemaRequest
32
+ include ::Google::Protobuf::MessageExts
33
+ extend ::Google::Protobuf::MessageExts::ClassMethods
34
+ end
35
+
36
+ # Request message for
37
+ # {::Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#list_schemas SchemaService.ListSchemas}
38
+ # method.
39
+ # @!attribute [rw] parent
40
+ # @return [::String]
41
+ # Required. The parent data store resource name, in the format of
42
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
43
+ # @!attribute [rw] page_size
44
+ # @return [::Integer]
45
+ # The maximum number of {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s to
46
+ # return. The service may return fewer than this value.
47
+ #
48
+ # If unspecified, at most 100
49
+ # {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s will be returned.
50
+ #
51
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
52
+ # @!attribute [rw] page_token
53
+ # @return [::String]
54
+ # A page token, received from a previous
55
+ # {::Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#list_schemas SchemaService.ListSchemas}
56
+ # call. Provide this to retrieve the subsequent page.
57
+ #
58
+ # When paginating, all other parameters provided to
59
+ # {::Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#list_schemas SchemaService.ListSchemas}
60
+ # must match the call that provided the page token.
61
+ class ListSchemasRequest
62
+ include ::Google::Protobuf::MessageExts
63
+ extend ::Google::Protobuf::MessageExts::ClassMethods
64
+ end
65
+
66
+ # Response message for
67
+ # {::Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#list_schemas SchemaService.ListSchemas}
68
+ # method.
69
+ # @!attribute [rw] schemas
70
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Schema>]
71
+ # The {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s.
72
+ # @!attribute [rw] next_page_token
73
+ # @return [::String]
74
+ # A token that can be sent as
75
+ # {::Google::Cloud::DiscoveryEngine::V1::ListSchemasRequest#page_token ListSchemasRequest.page_token}
76
+ # to retrieve the next page. If this field is omitted, there are no
77
+ # subsequent pages.
78
+ class ListSchemasResponse
79
+ include ::Google::Protobuf::MessageExts
80
+ extend ::Google::Protobuf::MessageExts::ClassMethods
81
+ end
82
+
83
+ # Request message for
84
+ # {::Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#create_schema SchemaService.CreateSchema}
85
+ # method.
86
+ # @!attribute [rw] parent
87
+ # @return [::String]
88
+ # Required. The parent data store resource name, in the format of
89
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
90
+ # @!attribute [rw] schema
91
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Schema]
92
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} to create.
93
+ # @!attribute [rw] schema_id
94
+ # @return [::String]
95
+ # Required. The ID to use for the
96
+ # {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}, which will become the
97
+ # final component of the
98
+ # {::Google::Cloud::DiscoveryEngine::V1::Schema#name Schema.name}.
99
+ #
100
+ # This field should conform to
101
+ # [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
102
+ # limit of 63 characters.
103
+ class CreateSchemaRequest
104
+ include ::Google::Protobuf::MessageExts
105
+ extend ::Google::Protobuf::MessageExts::ClassMethods
106
+ end
107
+
108
+ # Request message for
109
+ # {::Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#update_schema SchemaService.UpdateSchema}
110
+ # method.
111
+ # @!attribute [rw] schema
112
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Schema]
113
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} to update.
114
+ # @!attribute [rw] allow_missing
115
+ # @return [::Boolean]
116
+ # If set to true, and the {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} is
117
+ # not found, a new {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} will be
118
+ # created. In this situation, `update_mask` is ignored.
119
+ class UpdateSchemaRequest
120
+ include ::Google::Protobuf::MessageExts
121
+ extend ::Google::Protobuf::MessageExts::ClassMethods
122
+ end
123
+
124
+ # Request message for
125
+ # {::Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#delete_schema SchemaService.DeleteSchema}
126
+ # method.
127
+ # @!attribute [rw] name
128
+ # @return [::String]
129
+ # Required. The full resource name of the schema, in the format of
130
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
131
+ class DeleteSchemaRequest
132
+ include ::Google::Protobuf::MessageExts
133
+ extend ::Google::Protobuf::MessageExts::ClassMethods
134
+ end
135
+
136
+ # Metadata for Create Schema LRO.
137
+ # @!attribute [rw] create_time
138
+ # @return [::Google::Protobuf::Timestamp]
139
+ # Operation create time.
140
+ # @!attribute [rw] update_time
141
+ # @return [::Google::Protobuf::Timestamp]
142
+ # Operation last update time. If the operation is done, this is also the
143
+ # finish time.
144
+ class CreateSchemaMetadata
145
+ include ::Google::Protobuf::MessageExts
146
+ extend ::Google::Protobuf::MessageExts::ClassMethods
147
+ end
148
+
149
+ # Metadata for UpdateSchema LRO.
150
+ # @!attribute [rw] create_time
151
+ # @return [::Google::Protobuf::Timestamp]
152
+ # Operation create time.
153
+ # @!attribute [rw] update_time
154
+ # @return [::Google::Protobuf::Timestamp]
155
+ # Operation last update time. If the operation is done, this is also the
156
+ # finish time.
157
+ class UpdateSchemaMetadata
158
+ include ::Google::Protobuf::MessageExts
159
+ extend ::Google::Protobuf::MessageExts::ClassMethods
160
+ end
161
+
162
+ # Metadata for DeleteSchema LRO.
163
+ # @!attribute [rw] create_time
164
+ # @return [::Google::Protobuf::Timestamp]
165
+ # Operation create time.
166
+ # @!attribute [rw] update_time
167
+ # @return [::Google::Protobuf::Timestamp]
168
+ # Operation last update time. If the operation is done, this is also the
169
+ # finish time.
170
+ class DeleteSchemaMetadata
171
+ include ::Google::Protobuf::MessageExts
172
+ extend ::Google::Protobuf::MessageExts::ClassMethods
173
+ end
174
+ end
175
+ end
176
+ end
177
+ end
@@ -0,0 +1,294 @@
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::SearchService::Client#search SearchService.Search}
26
+ # method.
27
+ # @!attribute [rw] serving_config
28
+ # @return [::String]
29
+ # Required. The resource name of the Search serving config, such as
30
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
31
+ # This field is used to identify the serving configuration name, set
32
+ # of models used to make the search.
33
+ # @!attribute [rw] branch
34
+ # @return [::String]
35
+ # The branch resource name, such as
36
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
37
+ #
38
+ # Use `default_branch` as the branch ID or leave this field empty, to search
39
+ # documents under the default branch.
40
+ # @!attribute [rw] query
41
+ # @return [::String]
42
+ # Raw search query.
43
+ # @!attribute [rw] page_size
44
+ # @return [::Integer]
45
+ # Maximum number of {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to
46
+ # return. If unspecified, defaults to a reasonable value. The maximum allowed
47
+ # value is 100. Values above 100 will be coerced to 100.
48
+ #
49
+ # If this field is negative, an `INVALID_ARGUMENT` is returned.
50
+ # @!attribute [rw] page_token
51
+ # @return [::String]
52
+ # A page token received from a previous
53
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search SearchService.Search}
54
+ # call. Provide this to retrieve the subsequent page.
55
+ #
56
+ # When paginating, all other parameters provided to
57
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search SearchService.Search}
58
+ # must match the call that provided the page token. Otherwise, an
59
+ # `INVALID_ARGUMENT` error is returned.
60
+ # @!attribute [rw] offset
61
+ # @return [::Integer]
62
+ # A 0-indexed integer that specifies the current offset (that is, starting
63
+ # result location, amongst the
64
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s deemed by the API as
65
+ # relevant) in search results. This field is only considered if
66
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#page_token page_token} is
67
+ # unset.
68
+ #
69
+ # If this field is negative, an `INVALID_ARGUMENT` is returned.
70
+ # @!attribute [rw] user_info
71
+ # @return [::Google::Cloud::DiscoveryEngine::V1::UserInfo]
72
+ # Information about the end user.
73
+ # Highly recommended for analytics. The user_agent string in UserInfo will
74
+ # be used to deduce device_type for analytics.
75
+ # @!attribute [rw] params
76
+ # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
77
+ # Additional search parameters.
78
+ #
79
+ # For public website search only, supported values are:
80
+ #
81
+ # * `user_country_code`: string. Default empty. If set to non-empty, results
82
+ # are restricted or boosted based on the location provided.
83
+ # * `search_type`: double. Default empty. Enables non-webpage searching
84
+ # depending on the value. The only valid non-default value is 1,
85
+ # which enables image searching.
86
+ # @!attribute [rw] query_expansion_spec
87
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec]
88
+ # The query expansion specification that specifies the conditions under which
89
+ # query expansion will occur.
90
+ # @!attribute [rw] spell_correction_spec
91
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec]
92
+ # The spell correction specification that specifies the mode under
93
+ # which spell correction will take effect.
94
+ # @!attribute [rw] user_pseudo_id
95
+ # @return [::String]
96
+ # A unique identifier for tracking visitors. For example, this could be
97
+ # implemented with an HTTP cookie, which should be able to uniquely identify
98
+ # a visitor on a single device. This unique identifier should not change if
99
+ # the visitor logs in or out of the website.
100
+ #
101
+ # This field should NOT have a fixed value such as `unknown_visitor`.
102
+ #
103
+ # This should be the same identifier as
104
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
105
+ # and
106
+ # {::Google::Cloud::DiscoveryEngine::V1::CompleteQueryRequest#user_pseudo_id CompleteQueryRequest.user_pseudo_id}
107
+ #
108
+ # The field must be a UTF-8 encoded string with a length limit of 128
109
+ # characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
110
+ # @!attribute [rw] content_search_spec
111
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec]
112
+ # The content search spec that configs the desired behavior of content
113
+ # search.
114
+ # @!attribute [rw] safe_search
115
+ # @return [::Boolean]
116
+ # Whether to turn on safe search. This is only supported for
117
+ # [ContentConfig.PUBLIC_WEBSITE][].
118
+ # @!attribute [rw] user_labels
119
+ # @return [::Google::Protobuf::Map{::String => ::String}]
120
+ # The user labels applied to a resource must meet the following requirements:
121
+ #
122
+ # * Each resource can have multiple labels, up to a maximum of 64.
123
+ # * Each label must be a key-value pair.
124
+ # * Keys have a minimum length of 1 character and a maximum length of 63
125
+ # characters and cannot be empty. Values can be empty and have a maximum
126
+ # length of 63 characters.
127
+ # * Keys and values can contain only lowercase letters, numeric characters,
128
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
129
+ # international characters are allowed.
130
+ # * The key portion of a label must be unique. However, you can use the same
131
+ # key with multiple resources.
132
+ # * Keys must start with a lowercase letter or international character.
133
+ #
134
+ # See [Google Cloud
135
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
136
+ # for more details.
137
+ class SearchRequest
138
+ include ::Google::Protobuf::MessageExts
139
+ extend ::Google::Protobuf::MessageExts::ClassMethods
140
+
141
+ # Specification to determine under which conditions query expansion should
142
+ # occur.
143
+ # @!attribute [rw] condition
144
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec::Condition]
145
+ # The condition under which query expansion should occur. Default to
146
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec::Condition::DISABLED Condition.DISABLED}.
147
+ class QueryExpansionSpec
148
+ include ::Google::Protobuf::MessageExts
149
+ extend ::Google::Protobuf::MessageExts::ClassMethods
150
+
151
+ # Enum describing under which condition query expansion should occur.
152
+ module Condition
153
+ # Unspecified query expansion condition. In this case, server behavior
154
+ # defaults to
155
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec::Condition::DISABLED Condition.DISABLED}.
156
+ CONDITION_UNSPECIFIED = 0
157
+
158
+ # Disabled query expansion. Only the exact search query is used, even if
159
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchResponse#total_size SearchResponse.total_size}
160
+ # is zero.
161
+ DISABLED = 1
162
+
163
+ # Automatic query expansion built by the Search API.
164
+ AUTO = 2
165
+ end
166
+ end
167
+
168
+ # The specification for query spell correction.
169
+ # @!attribute [rw] mode
170
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec::Mode]
171
+ # The mode under which spell correction should take effect to
172
+ # replace the original search query. Default to
173
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
174
+ class SpellCorrectionSpec
175
+ include ::Google::Protobuf::MessageExts
176
+ extend ::Google::Protobuf::MessageExts::ClassMethods
177
+
178
+ # Enum describing under which mode spell correction should occur.
179
+ module Mode
180
+ # Unspecified spell correction mode. In this case, server behavior
181
+ # defaults to
182
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
183
+ MODE_UNSPECIFIED = 0
184
+
185
+ # Search API will try to find a spell suggestion if there
186
+ # is any and put in the
187
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchResponse#corrected_query SearchResponse.corrected_query}.
188
+ # The spell suggestion will not be used as the search query.
189
+ SUGGESTION_ONLY = 1
190
+
191
+ # Automatic spell correction built by the Search API. Search will
192
+ # be based on the corrected query if found.
193
+ AUTO = 2
194
+ end
195
+ end
196
+
197
+ # The specification that configs the desired behavior of the UCS content
198
+ # search.
199
+ # @!attribute [rw] snippet_spec
200
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SnippetSpec]
201
+ # If there is no snippet spec provided, there will be no snippet in the
202
+ # search result.
203
+ class ContentSearchSpec
204
+ include ::Google::Protobuf::MessageExts
205
+ extend ::Google::Protobuf::MessageExts::ClassMethods
206
+
207
+ # The specification that configs the snippet in the search results.
208
+ # @!attribute [rw] max_snippet_count
209
+ # @return [::Integer]
210
+ # Max number of snippets returned in each search result.
211
+ # If the matching snippets is less than the max_snippet_count, return all
212
+ # of the snippets; otherwise, return the max_snippet_count.
213
+ #
214
+ # At most 5 snippets will be returned for each SearchResult.
215
+ # @!attribute [rw] reference_only
216
+ # @return [::Boolean]
217
+ # if true, only snippet reference is returned.
218
+ class SnippetSpec
219
+ include ::Google::Protobuf::MessageExts
220
+ extend ::Google::Protobuf::MessageExts::ClassMethods
221
+ end
222
+ end
223
+
224
+ # @!attribute [rw] key
225
+ # @return [::String]
226
+ # @!attribute [rw] value
227
+ # @return [::Google::Protobuf::Value]
228
+ class ParamsEntry
229
+ include ::Google::Protobuf::MessageExts
230
+ extend ::Google::Protobuf::MessageExts::ClassMethods
231
+ end
232
+
233
+ # @!attribute [rw] key
234
+ # @return [::String]
235
+ # @!attribute [rw] value
236
+ # @return [::String]
237
+ class UserLabelsEntry
238
+ include ::Google::Protobuf::MessageExts
239
+ extend ::Google::Protobuf::MessageExts::ClassMethods
240
+ end
241
+ end
242
+
243
+ # Response message for
244
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search SearchService.Search}
245
+ # method.
246
+ # @!attribute [rw] results
247
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>]
248
+ # A list of matched documents. The order represents the ranking.
249
+ # @!attribute [rw] total_size
250
+ # @return [::Integer]
251
+ # The estimated total count of matched items irrespective of pagination. The
252
+ # count of {::Google::Cloud::DiscoveryEngine::V1::SearchResponse#results results}
253
+ # returned by pagination may be less than the
254
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchResponse#total_size total_size}
255
+ # that matches.
256
+ # @!attribute [rw] attribution_token
257
+ # @return [::String]
258
+ # A unique search token. This should be included in the
259
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent UserEvent} logs resulting from
260
+ # this search, which enables accurate attribution of search model
261
+ # performance.
262
+ # @!attribute [rw] next_page_token
263
+ # @return [::String]
264
+ # A token that can be sent as
265
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#page_token SearchRequest.page_token}
266
+ # to retrieve the next page. If this field is omitted, there are no
267
+ # subsequent pages.
268
+ # @!attribute [rw] corrected_query
269
+ # @return [::String]
270
+ # Contains the spell corrected query, if found. If the spell correction type
271
+ # is AUTOMATIC, then the search results are based on corrected_query.
272
+ # Otherwise the original query is used for search.
273
+ class SearchResponse
274
+ include ::Google::Protobuf::MessageExts
275
+ extend ::Google::Protobuf::MessageExts::ClassMethods
276
+
277
+ # Represents the search results.
278
+ # @!attribute [rw] id
279
+ # @return [::String]
280
+ # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the
281
+ # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}.
282
+ # @!attribute [rw] document
283
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Document]
284
+ # The document data snippet in the search response. Only fields that are
285
+ # marked as retrievable are populated.
286
+ class SearchResult
287
+ include ::Google::Protobuf::MessageExts
288
+ extend ::Google::Protobuf::MessageExts::ClassMethods
289
+ end
290
+ end
291
+ end
292
+ end
293
+ end
294
+ end