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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) 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 +451 -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 +408 -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/conversational_search_service/client.rb +959 -0
  13. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/credentials.rb +47 -0
  14. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +176 -0
  15. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +797 -0
  16. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +450 -0
  17. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest.rb +52 -0
  18. data/lib/google/cloud/discovery_engine/v1/conversational_search_service.rb +55 -0
  19. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +1170 -0
  20. data/lib/google/cloud/discovery_engine/v1/document_service/credentials.rb +47 -0
  21. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +770 -0
  22. data/lib/google/cloud/discovery_engine/v1/document_service/paths.rb +135 -0
  23. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +971 -0
  24. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +977 -0
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/service_stub.rb +518 -0
  26. data/lib/google/cloud/discovery_engine/v1/document_service/rest.rb +54 -0
  27. data/lib/google/cloud/discovery_engine/v1/document_service.rb +57 -0
  28. data/lib/google/cloud/discovery_engine/v1/rest.rb +42 -0
  29. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +853 -0
  30. data/lib/google/cloud/discovery_engine/v1/schema_service/credentials.rb +47 -0
  31. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +770 -0
  32. data/lib/google/cloud/discovery_engine/v1/schema_service/paths.rb +127 -0
  33. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +693 -0
  34. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +977 -0
  35. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/service_stub.rb +382 -0
  36. data/lib/google/cloud/discovery_engine/v1/schema_service/rest.rb +53 -0
  37. data/lib/google/cloud/discovery_engine/v1/schema_service.rb +56 -0
  38. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +529 -0
  39. data/lib/google/cloud/discovery_engine/v1/search_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +131 -0
  41. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +481 -0
  42. data/lib/google/cloud/discovery_engine/v1/search_service/rest/service_stub.rb +116 -0
  43. data/lib/google/cloud/discovery_engine/v1/search_service/rest.rb +52 -0
  44. data/lib/google/cloud/discovery_engine/v1/search_service.rb +55 -0
  45. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +654 -0
  46. data/lib/google/cloud/discovery_engine/v1/user_event_service/credentials.rb +47 -0
  47. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +770 -0
  48. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +131 -0
  49. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +558 -0
  50. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +977 -0
  51. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +250 -0
  52. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest.rb +53 -0
  53. data/lib/google/cloud/discovery_engine/v1/user_event_service.rb +56 -0
  54. data/lib/google/cloud/discovery_engine/v1/version.rb +7 -2
  55. data/lib/google/cloud/discovery_engine/v1.rb +50 -0
  56. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +46 -0
  57. data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +49 -0
  58. data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +45 -0
  59. data/lib/google/cloud/discoveryengine/v1/conversation_pb.rb +54 -0
  60. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +61 -0
  61. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +67 -0
  62. data/lib/google/cloud/discoveryengine/v1/document_pb.rb +48 -0
  63. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +58 -0
  64. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +79 -0
  65. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +66 -0
  66. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +49 -0
  67. data/lib/google/cloud/discoveryengine/v1/schema_pb.rb +47 -0
  68. data/lib/google/cloud/discoveryengine/v1/schema_service_pb.rb +61 -0
  69. data/lib/google/cloud/discoveryengine/v1/schema_service_services_pb.rb +53 -0
  70. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +73 -0
  71. data/lib/google/cloud/discoveryengine/v1/search_service_services_pb.rb +45 -0
  72. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +58 -0
  73. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +53 -0
  74. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +59 -0
  75. data/lib/google-cloud-discovery_engine-v1.rb +21 -0
  76. data/proto_docs/README.md +4 -0
  77. data/proto_docs/google/api/client.rb +381 -0
  78. data/proto_docs/google/api/field_behavior.rb +85 -0
  79. data/proto_docs/google/api/httpbody.rb +80 -0
  80. data/proto_docs/google/api/launch_stage.rb +71 -0
  81. data/proto_docs/google/api/resource.rb +222 -0
  82. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +106 -0
  83. data/proto_docs/google/cloud/discoveryengine/v1/completion_service.rb +111 -0
  84. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +113 -0
  85. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +206 -0
  86. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +108 -0
  87. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +181 -0
  88. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +340 -0
  89. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +84 -0
  90. data/proto_docs/google/cloud/discoveryengine/v1/schema.rb +45 -0
  91. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +177 -0
  92. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +730 -0
  93. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +478 -0
  94. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +64 -0
  95. data/proto_docs/google/longrunning/operations.rb +164 -0
  96. data/proto_docs/google/protobuf/any.rb +144 -0
  97. data/proto_docs/google/protobuf/duration.rb +98 -0
  98. data/proto_docs/google/protobuf/empty.rb +34 -0
  99. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  100. data/proto_docs/google/protobuf/struct.rb +96 -0
  101. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  102. data/proto_docs/google/rpc/status.rb +48 -0
  103. data/proto_docs/google/type/date.rb +53 -0
  104. metadata +277 -13
@@ -0,0 +1,222 @@
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 Api
22
+ # A simple descriptor of a resource type.
23
+ #
24
+ # ResourceDescriptor annotates a resource message (either by means of a
25
+ # protobuf annotation or use in the service config), and associates the
26
+ # resource's schema, the resource type, and the pattern of the resource name.
27
+ #
28
+ # Example:
29
+ #
30
+ # message Topic {
31
+ # // Indicates this message defines a resource schema.
32
+ # // Declares the resource type in the format of {service}/{kind}.
33
+ # // For Kubernetes resources, the format is {api group}/{kind}.
34
+ # option (google.api.resource) = {
35
+ # type: "pubsub.googleapis.com/Topic"
36
+ # pattern: "projects/{project}/topics/{topic}"
37
+ # };
38
+ # }
39
+ #
40
+ # The ResourceDescriptor Yaml config will look like:
41
+ #
42
+ # resources:
43
+ # - type: "pubsub.googleapis.com/Topic"
44
+ # pattern: "projects/{project}/topics/{topic}"
45
+ #
46
+ # Sometimes, resources have multiple patterns, typically because they can
47
+ # live under multiple parents.
48
+ #
49
+ # Example:
50
+ #
51
+ # message LogEntry {
52
+ # option (google.api.resource) = {
53
+ # type: "logging.googleapis.com/LogEntry"
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
58
+ # };
59
+ # }
60
+ #
61
+ # The ResourceDescriptor Yaml config will look like:
62
+ #
63
+ # resources:
64
+ # - type: 'logging.googleapis.com/LogEntry'
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
69
+ # @!attribute [rw] type
70
+ # @return [::String]
71
+ # The resource type. It must be in the format of
72
+ # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
73
+ # singular and must not include version numbers.
74
+ #
75
+ # Example: `storage.googleapis.com/Bucket`
76
+ #
77
+ # The value of the resource_type_kind must follow the regular expression
78
+ # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
79
+ # should use PascalCase (UpperCamelCase). The maximum number of
80
+ # characters allowed for the `resource_type_kind` is 100.
81
+ # @!attribute [rw] pattern
82
+ # @return [::Array<::String>]
83
+ # Optional. The relative resource name pattern associated with this resource
84
+ # type. The DNS prefix of the full resource name shouldn't be specified here.
85
+ #
86
+ # The path pattern must follow the syntax, which aligns with HTTP binding
87
+ # syntax:
88
+ #
89
+ # Template = Segment { "/" Segment } ;
90
+ # Segment = LITERAL | Variable ;
91
+ # Variable = "{" LITERAL "}" ;
92
+ #
93
+ # Examples:
94
+ #
95
+ # - "projects/\\{project}/topics/\\{topic}"
96
+ # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
97
+ #
98
+ # The components in braces correspond to the IDs for each resource in the
99
+ # hierarchy. It is expected that, if multiple patterns are provided,
100
+ # the same component name (e.g. "project") refers to IDs of the same
101
+ # type of resource.
102
+ # @!attribute [rw] name_field
103
+ # @return [::String]
104
+ # Optional. The field on the resource that designates the resource name
105
+ # field. If omitted, this is assumed to be "name".
106
+ # @!attribute [rw] history
107
+ # @return [::Google::Api::ResourceDescriptor::History]
108
+ # Optional. The historical or future-looking state of the resource pattern.
109
+ #
110
+ # Example:
111
+ #
112
+ # // The InspectTemplate message originally only supported resource
113
+ # // names with organization, and project was added later.
114
+ # message InspectTemplate {
115
+ # option (google.api.resource) = {
116
+ # type: "dlp.googleapis.com/InspectTemplate"
117
+ # pattern:
118
+ # "organizations/{organization}/inspectTemplates/{inspect_template}"
119
+ # pattern: "projects/{project}/inspectTemplates/{inspect_template}"
120
+ # history: ORIGINALLY_SINGLE_PATTERN
121
+ # };
122
+ # }
123
+ # @!attribute [rw] plural
124
+ # @return [::String]
125
+ # The plural name used in the resource name and permission names, such as
126
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
127
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
128
+ # concept of the `plural` field in k8s CRD spec
129
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
130
+ #
131
+ # Note: The plural form is required even for singleton resources. See
132
+ # https://aip.dev/156
133
+ # @!attribute [rw] singular
134
+ # @return [::String]
135
+ # The same concept of the `singular` field in k8s CRD spec
136
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
137
+ # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
138
+ # @!attribute [rw] style
139
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
140
+ # Style flag(s) for this resource.
141
+ # These indicate that a resource is expected to conform to a given
142
+ # style. See the specific style flags for additional information.
143
+ class ResourceDescriptor
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+
147
+ # A description of the historical or future-looking state of the
148
+ # resource pattern.
149
+ module History
150
+ # The "unset" value.
151
+ HISTORY_UNSPECIFIED = 0
152
+
153
+ # The resource originally had one pattern and launched as such, and
154
+ # additional patterns were added later.
155
+ ORIGINALLY_SINGLE_PATTERN = 1
156
+
157
+ # The resource has one pattern, but the API owner expects to add more
158
+ # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
159
+ # that from being necessary once there are multiple patterns.)
160
+ FUTURE_MULTI_PATTERN = 2
161
+ end
162
+
163
+ # A flag representing a specific style that a resource claims to conform to.
164
+ module Style
165
+ # The unspecified value. Do not use.
166
+ STYLE_UNSPECIFIED = 0
167
+
168
+ # This resource is intended to be "declarative-friendly".
169
+ #
170
+ # Declarative-friendly resources must be more strictly consistent, and
171
+ # setting this to true communicates to tools that this resource should
172
+ # adhere to declarative-friendly expectations.
173
+ #
174
+ # Note: This is used by the API linter (linter.aip.dev) to enable
175
+ # additional checks.
176
+ DECLARATIVE_FRIENDLY = 1
177
+ end
178
+ end
179
+
180
+ # Defines a proto annotation that describes a string field that refers to
181
+ # an API resource.
182
+ # @!attribute [rw] type
183
+ # @return [::String]
184
+ # The resource type that the annotated field references.
185
+ #
186
+ # Example:
187
+ #
188
+ # message Subscription {
189
+ # string topic = 2 [(google.api.resource_reference) = {
190
+ # type: "pubsub.googleapis.com/Topic"
191
+ # }];
192
+ # }
193
+ #
194
+ # Occasionally, a field may reference an arbitrary resource. In this case,
195
+ # APIs use the special value * in their resource reference.
196
+ #
197
+ # Example:
198
+ #
199
+ # message GetIamPolicyRequest {
200
+ # string resource = 2 [(google.api.resource_reference) = {
201
+ # type: "*"
202
+ # }];
203
+ # }
204
+ # @!attribute [rw] child_type
205
+ # @return [::String]
206
+ # The resource type of a child collection that the annotated field
207
+ # references. This is useful for annotating the `parent` field that
208
+ # doesn't have a fixed resource type.
209
+ #
210
+ # Example:
211
+ #
212
+ # message ListLogEntriesRequest {
213
+ # string parent = 1 [(google.api.resource_reference) = {
214
+ # child_type: "logging.googleapis.com/LogEntry"
215
+ # };
216
+ # }
217
+ class ResourceReference
218
+ include ::Google::Protobuf::MessageExts
219
+ extend ::Google::Protobuf::MessageExts::ClassMethods
220
+ end
221
+ end
222
+ end
@@ -0,0 +1,106 @@
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
+ # A floating point interval.
25
+ # @!attribute [rw] minimum
26
+ # @return [::Float]
27
+ # Inclusive lower bound.
28
+ # @!attribute [rw] exclusive_minimum
29
+ # @return [::Float]
30
+ # Exclusive lower bound.
31
+ # @!attribute [rw] maximum
32
+ # @return [::Float]
33
+ # Inclusive upper bound.
34
+ # @!attribute [rw] exclusive_maximum
35
+ # @return [::Float]
36
+ # Exclusive upper bound.
37
+ class Interval
38
+ include ::Google::Protobuf::MessageExts
39
+ extend ::Google::Protobuf::MessageExts::ClassMethods
40
+ end
41
+
42
+ # A custom attribute that is not explicitly modeled in a resource, e.g.
43
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent UserEvent}.
44
+ # @!attribute [rw] text
45
+ # @return [::Array<::String>]
46
+ # The textual values of this custom attribute. For example, `["yellow",
47
+ # "green"]` when the key is "color".
48
+ #
49
+ # Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
50
+ # returned.
51
+ #
52
+ # Exactly one of
53
+ # {::Google::Cloud::DiscoveryEngine::V1::CustomAttribute#text CustomAttribute.text}
54
+ # or
55
+ # {::Google::Cloud::DiscoveryEngine::V1::CustomAttribute#numbers CustomAttribute.numbers}
56
+ # should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
57
+ # @!attribute [rw] numbers
58
+ # @return [::Array<::Float>]
59
+ # The numerical values of this custom attribute. For example, `[2.3, 15.4]`
60
+ # when the key is "lengths_cm".
61
+ #
62
+ # Exactly one of
63
+ # {::Google::Cloud::DiscoveryEngine::V1::CustomAttribute#text CustomAttribute.text}
64
+ # or
65
+ # {::Google::Cloud::DiscoveryEngine::V1::CustomAttribute#numbers CustomAttribute.numbers}
66
+ # should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
67
+ class CustomAttribute
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+ end
71
+
72
+ # Information of an end user.
73
+ # @!attribute [rw] user_id
74
+ # @return [::String]
75
+ # Highly recommended for logged-in users. Unique identifier for logged-in
76
+ # user, such as a user name. Don't set for anonymous users.
77
+ #
78
+ # Always use a hashed value for this ID.
79
+ #
80
+ # Don't set the field to the same fixed ID for different users. This mixes
81
+ # the event history of those users together, which results in degraded
82
+ # model quality.
83
+ #
84
+ # The field must be a UTF-8 encoded string with a length limit of 128
85
+ # characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
86
+ # @!attribute [rw] user_agent
87
+ # @return [::String]
88
+ # User agent as included in the HTTP header.
89
+ #
90
+ # The field must be a UTF-8 encoded string with a length limit of 1,000
91
+ # characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
92
+ #
93
+ # This should not be set when using the client side event reporting with
94
+ # GTM or JavaScript tag in
95
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEventService::Client#collect_user_event UserEventService.CollectUserEvent}
96
+ # or if
97
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent#direct_user_request UserEvent.direct_user_request}
98
+ # is set.
99
+ class UserInfo
100
+ include ::Google::Protobuf::MessageExts
101
+ extend ::Google::Protobuf::MessageExts::ClassMethods
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,111 @@
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::CompletionService::Client#complete_query CompletionService.CompleteQuery}
26
+ # method.
27
+ # @!attribute [rw] data_store
28
+ # @return [::String]
29
+ # Required. The parent data store resource name for which the completion is
30
+ # performed, such as
31
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
32
+ # @!attribute [rw] query
33
+ # @return [::String]
34
+ # Required. The typeahead input used to fetch suggestions. Maximum length is
35
+ # 128 characters.
36
+ # @!attribute [rw] query_model
37
+ # @return [::String]
38
+ # Selects data model of query suggestions for serving. Currently supported
39
+ # values:
40
+ #
41
+ # * `document` - Using suggestions generated from user-imported documents.
42
+ # * `search-history` - Using suggestions generated from the past history of
43
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search SearchService.Search}
44
+ # API calls. Do not use it when there is no traffic for Search API.
45
+ # * `user-event` - Using suggestions generated from user-imported search
46
+ # events.
47
+ # * `document-completable` - Using suggestions taken directly from
48
+ # user-imported document fields marked as completable.
49
+ #
50
+ # Default values:
51
+ #
52
+ # * `document` is the default model for regular dataStores.
53
+ # * `search-history` is the default model for
54
+ # [IndustryVertical.SITE_SEARCH][] dataStores.
55
+ # @!attribute [rw] user_pseudo_id
56
+ # @return [::String]
57
+ # A unique identifier for tracking visitors. For example, this could be
58
+ # implemented with an HTTP cookie, which should be able to uniquely identify
59
+ # a visitor on a single device. This unique identifier should not change if
60
+ # the visitor logs in or out of the website.
61
+ #
62
+ # This field should NOT have a fixed value such as `unknown_visitor`.
63
+ #
64
+ # This should be the same identifier as
65
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
66
+ # and
67
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#user_pseudo_id SearchRequest.user_pseudo_id}.
68
+ #
69
+ # The field must be a UTF-8 encoded string with a length limit of 128
70
+ # characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
71
+ # @!attribute [rw] include_tail_suggestions
72
+ # @return [::Boolean]
73
+ # Indicates if tail suggestions should be returned if there are no
74
+ # suggestions that match the full query. Even if set to true, if there are
75
+ # suggestions that match the full query, those are returned and no
76
+ # tail suggestions are returned.
77
+ class CompleteQueryRequest
78
+ include ::Google::Protobuf::MessageExts
79
+ extend ::Google::Protobuf::MessageExts::ClassMethods
80
+ end
81
+
82
+ # Response message for
83
+ # {::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#complete_query CompletionService.CompleteQuery}
84
+ # method.
85
+ # @!attribute [rw] query_suggestions
86
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CompleteQueryResponse::QuerySuggestion>]
87
+ # Results of the matched query suggestions. The result list is ordered and
88
+ # the first result is a top suggestion.
89
+ # @!attribute [rw] tail_match_triggered
90
+ # @return [::Boolean]
91
+ # True if the returned suggestions are all tail suggestions.
92
+ #
93
+ # For tail matching to be triggered, include_tail_suggestions in the request
94
+ # must be true and there must be no suggestions that match the full query.
95
+ class CompleteQueryResponse
96
+ include ::Google::Protobuf::MessageExts
97
+ extend ::Google::Protobuf::MessageExts::ClassMethods
98
+
99
+ # Suggestions as search queries.
100
+ # @!attribute [rw] suggestion
101
+ # @return [::String]
102
+ # The suggestion for the query.
103
+ class QuerySuggestion
104
+ include ::Google::Protobuf::MessageExts
105
+ extend ::Google::Protobuf::MessageExts::ClassMethods
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,113 @@
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
+ # External conversation proto definition.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Immutable. Fully qualified name
28
+ # `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
29
+ # @!attribute [rw] state
30
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Conversation::State]
31
+ # The state of the Conversation.
32
+ # @!attribute [rw] user_pseudo_id
33
+ # @return [::String]
34
+ # A unique identifier for tracking users.
35
+ # @!attribute [rw] messages
36
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::ConversationMessage>]
37
+ # Conversation messages.
38
+ # @!attribute [r] start_time
39
+ # @return [::Google::Protobuf::Timestamp]
40
+ # Output only. The time the conversation started.
41
+ # @!attribute [r] end_time
42
+ # @return [::Google::Protobuf::Timestamp]
43
+ # Output only. The time the conversation finished.
44
+ class Conversation
45
+ include ::Google::Protobuf::MessageExts
46
+ extend ::Google::Protobuf::MessageExts::ClassMethods
47
+
48
+ # Enumeration of the state of the conversation.
49
+ module State
50
+ # Unknown.
51
+ STATE_UNSPECIFIED = 0
52
+
53
+ # Conversation is currently open.
54
+ IN_PROGRESS = 1
55
+
56
+ # Conversation has been completed.
57
+ COMPLETED = 2
58
+ end
59
+ end
60
+
61
+ # Defines a reply message to user.
62
+ # @!attribute [rw] summary
63
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary]
64
+ # Summary based on search results.
65
+ class Reply
66
+ include ::Google::Protobuf::MessageExts
67
+ extend ::Google::Protobuf::MessageExts::ClassMethods
68
+ end
69
+
70
+ # Defines context of the conversation
71
+ # @!attribute [rw] context_documents
72
+ # @return [::Array<::String>]
73
+ # The current list of documents the user is seeing.
74
+ # It contains the document resource references.
75
+ # @!attribute [rw] active_document
76
+ # @return [::String]
77
+ # The current active document the user opened.
78
+ # It contains the document resource reference.
79
+ class ConversationContext
80
+ include ::Google::Protobuf::MessageExts
81
+ extend ::Google::Protobuf::MessageExts::ClassMethods
82
+ end
83
+
84
+ # Defines text input.
85
+ # @!attribute [rw] input
86
+ # @return [::String]
87
+ # Text input.
88
+ # @!attribute [rw] context
89
+ # @return [::Google::Cloud::DiscoveryEngine::V1::ConversationContext]
90
+ # Conversation context of the input.
91
+ class TextInput
92
+ include ::Google::Protobuf::MessageExts
93
+ extend ::Google::Protobuf::MessageExts::ClassMethods
94
+ end
95
+
96
+ # Defines a conversation message.
97
+ # @!attribute [rw] user_input
98
+ # @return [::Google::Cloud::DiscoveryEngine::V1::TextInput]
99
+ # User text input.
100
+ # @!attribute [rw] reply
101
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Reply]
102
+ # Search reply.
103
+ # @!attribute [r] create_time
104
+ # @return [::Google::Protobuf::Timestamp]
105
+ # Output only. Message creation timestamp.
106
+ class ConversationMessage
107
+ include ::Google::Protobuf::MessageExts
108
+ extend ::Google::Protobuf::MessageExts::ClassMethods
109
+ end
110
+ end
111
+ end
112
+ end
113
+ end