google-cloud-discovery_engine-v1 0.6.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
  6. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +769 -7
  14. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +720 -7
  16. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +94 -0
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
  22. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +71 -33
  23. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  24. data/lib/google/cloud/discovery_engine/v1/document_service/paths.rb +21 -0
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +71 -33
  26. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  30. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +558 -0
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/credentials.rb +47 -0
  56. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +220 -0
  57. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +525 -0
  58. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/service_stub.rb +145 -0
  59. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest.rb +52 -0
  60. data/lib/google/cloud/discovery_engine/v1/recommendation_service.rb +55 -0
  61. data/lib/google/cloud/discovery_engine/v1/rest.rb +5 -0
  62. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  63. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  64. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  65. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  66. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +26 -13
  67. data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +45 -0
  68. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +26 -13
  69. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  70. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  71. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  72. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  73. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  74. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  75. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  76. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  77. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  78. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
  79. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  80. data/lib/google/cloud/discovery_engine/v1.rb +5 -0
  81. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  82. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  83. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  84. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  85. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  86. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  87. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  88. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +5 -1
  89. data/lib/google/cloud/discoveryengine/v1/document_pb.rb +3 -1
  90. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
  91. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +3 -1
  92. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  93. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  94. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  95. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  96. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  97. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +13 -1
  98. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  99. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  100. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  101. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +1 -1
  102. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  103. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  104. data/lib/google/cloud/discoveryengine/v1/recommendation_service_pb.rb +55 -0
  105. data/lib/google/cloud/discoveryengine/v1/recommendation_service_services_pb.rb +45 -0
  106. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +4 -1
  107. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  108. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  109. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  110. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  111. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  112. data/proto_docs/google/api/client.rb +4 -0
  113. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +25 -1
  115. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  118. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +490 -0
  119. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +19 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  121. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +7 -0
  122. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
  123. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +8 -4
  124. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +5 -5
  125. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +313 -24
  128. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  129. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  130. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +3 -0
  131. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  132. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +229 -0
  133. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  134. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +150 -37
  135. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  136. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  137. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +40 -14
  138. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  139. metadata +66 -2
@@ -0,0 +1,124 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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
+ # Record message for
25
+ # {::Google::Cloud::DiscoveryEngine::V1::RankService::Client#rank RankService.Rank} method.
26
+ # @!attribute [rw] id
27
+ # @return [::String]
28
+ # The unique ID to represent the record.
29
+ # @!attribute [rw] title
30
+ # @return [::String]
31
+ # The title of the record. Empty by default.
32
+ # At least one of
33
+ # {::Google::Cloud::DiscoveryEngine::V1::RankingRecord#title title} or
34
+ # {::Google::Cloud::DiscoveryEngine::V1::RankingRecord#content content} should be
35
+ # set otherwise an INVALID_ARGUMENT error is thrown.
36
+ # @!attribute [rw] content
37
+ # @return [::String]
38
+ # The content of the record. Empty by default.
39
+ # At least one of
40
+ # {::Google::Cloud::DiscoveryEngine::V1::RankingRecord#title title} or
41
+ # {::Google::Cloud::DiscoveryEngine::V1::RankingRecord#content content} should be
42
+ # set otherwise an INVALID_ARGUMENT error is thrown.
43
+ # @!attribute [rw] score
44
+ # @return [::Float]
45
+ # The score of this record based on the given query and selected model.
46
+ class RankingRecord
47
+ include ::Google::Protobuf::MessageExts
48
+ extend ::Google::Protobuf::MessageExts::ClassMethods
49
+ end
50
+
51
+ # Request message for
52
+ # {::Google::Cloud::DiscoveryEngine::V1::RankService::Client#rank RankService.Rank} method.
53
+ # @!attribute [rw] ranking_config
54
+ # @return [::String]
55
+ # Required. The resource name of the rank service config, such as
56
+ # `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
57
+ # @!attribute [rw] model
58
+ # @return [::String]
59
+ # The identifier of the model to use. It is one of:
60
+ #
61
+ # * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
62
+ # token size 512.
63
+ #
64
+ # It is set to `semantic-ranker-512@latest` by default if unspecified.
65
+ # @!attribute [rw] top_n
66
+ # @return [::Integer]
67
+ # The number of results to return. If this is unset or no bigger than zero,
68
+ # returns all results.
69
+ # @!attribute [rw] query
70
+ # @return [::String]
71
+ # The query to use.
72
+ # @!attribute [rw] records
73
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::RankingRecord>]
74
+ # Required. A list of records to rank. At most 200 records to rank.
75
+ # @!attribute [rw] ignore_record_details_in_response
76
+ # @return [::Boolean]
77
+ # If true, the response will contain only record ID and score. By default, it
78
+ # is false, the response will contain record details.
79
+ # @!attribute [rw] user_labels
80
+ # @return [::Google::Protobuf::Map{::String => ::String}]
81
+ # The user labels applied to a resource must meet the following requirements:
82
+ #
83
+ # * Each resource can have multiple labels, up to a maximum of 64.
84
+ # * Each label must be a key-value pair.
85
+ # * Keys have a minimum length of 1 character and a maximum length of 63
86
+ # characters and cannot be empty. Values can be empty and have a maximum
87
+ # length of 63 characters.
88
+ # * Keys and values can contain only lowercase letters, numeric characters,
89
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
90
+ # international characters are allowed.
91
+ # * The key portion of a label must be unique. However, you can use the same
92
+ # key with multiple resources.
93
+ # * Keys must start with a lowercase letter or international character.
94
+ #
95
+ # See [Google Cloud
96
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
97
+ # for more details.
98
+ class RankRequest
99
+ include ::Google::Protobuf::MessageExts
100
+ extend ::Google::Protobuf::MessageExts::ClassMethods
101
+
102
+ # @!attribute [rw] key
103
+ # @return [::String]
104
+ # @!attribute [rw] value
105
+ # @return [::String]
106
+ class UserLabelsEntry
107
+ include ::Google::Protobuf::MessageExts
108
+ extend ::Google::Protobuf::MessageExts::ClassMethods
109
+ end
110
+ end
111
+
112
+ # Response message for
113
+ # {::Google::Cloud::DiscoveryEngine::V1::RankService::Client#rank RankService.Rank} method.
114
+ # @!attribute [rw] records
115
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::RankingRecord>]
116
+ # A list of records sorted by descending score.
117
+ class RankResponse
118
+ include ::Google::Protobuf::MessageExts
119
+ extend ::Google::Protobuf::MessageExts::ClassMethods
120
+ end
121
+ end
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,229 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 Recommend method.
25
+ # @!attribute [rw] serving_config
26
+ # @return [::String]
27
+ # Required. Full resource name of a [ServingConfig][]:
28
+ # `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or
29
+ # `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
30
+ #
31
+ # One default serving config is created along with your recommendation engine
32
+ # creation. The engine ID is used as the ID of the default serving
33
+ # config. For example, for Engine
34
+ # `projects/*/locations/global/collections/*/engines/my-engine`, you can use
35
+ # `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
36
+ # for your
37
+ # {::Google::Cloud::DiscoveryEngine::V1::RecommendationService::Client#recommend RecommendationService.Recommend}
38
+ # requests.
39
+ # @!attribute [rw] user_event
40
+ # @return [::Google::Cloud::DiscoveryEngine::V1::UserEvent]
41
+ # Required. Context about the user, what they are looking at and what action
42
+ # they took to trigger the Recommend request. Note that this user event
43
+ # detail won't be ingested to userEvent logs. Thus, a separate userEvent
44
+ # write request is required for event logging.
45
+ #
46
+ # Don't set
47
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
48
+ # or
49
+ # {::Google::Cloud::DiscoveryEngine::V1::UserInfo#user_id UserEvent.user_info.user_id}
50
+ # to the same fixed ID for different users. If you are trying to receive
51
+ # non-personalized recommendations (not recommended; this can negatively
52
+ # impact model performance), instead set
53
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
54
+ # to a random unique ID and leave
55
+ # {::Google::Cloud::DiscoveryEngine::V1::UserInfo#user_id UserEvent.user_info.user_id}
56
+ # unset.
57
+ # @!attribute [rw] page_size
58
+ # @return [::Integer]
59
+ # Maximum number of results to return. Set this property
60
+ # to the number of recommendation results needed. If zero, the service
61
+ # chooses a reasonable default. The maximum allowed value is 100. Values
62
+ # above 100 are set to 100.
63
+ # @!attribute [rw] filter
64
+ # @return [::String]
65
+ # Filter for restricting recommendation results with a length limit of 5,000
66
+ # characters. Currently, only filter expressions on the `filter_tags`
67
+ # attribute is supported.
68
+ #
69
+ #
70
+ # Examples:
71
+ #
72
+ # * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
73
+ # * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
74
+ #
75
+ # If `attributeFilteringSyntax` is set to true under the `params` field, then
76
+ # attribute-based expressions are expected instead of the above described
77
+ # tag-based syntax. Examples:
78
+ #
79
+ # * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
80
+ # * (available: true) AND
81
+ # (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
82
+ #
83
+ # If your filter blocks all results, the API returns generic
84
+ # (unfiltered) popular Documents. If you only want results strictly matching
85
+ # the filters, set `strictFiltering` to `true` in
86
+ # {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}
87
+ # to receive empty results instead.
88
+ #
89
+ # Note that the API never returns
90
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s with `storageStatus`
91
+ # as `EXPIRED` or `DELETED` regardless of filter choices.
92
+ # @!attribute [rw] validate_only
93
+ # @return [::Boolean]
94
+ # Use validate only mode for this recommendation query. If set to `true`, a
95
+ # fake model is used that returns arbitrary Document IDs.
96
+ # Note that the validate only mode should only be used for testing the API,
97
+ # or if the model is not ready.
98
+ # @!attribute [rw] params
99
+ # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
100
+ # Additional domain specific parameters for the recommendations.
101
+ #
102
+ # Allowed values:
103
+ #
104
+ # * `returnDocument`: Boolean. If set to `true`, the associated Document
105
+ # object is returned in
106
+ # {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#document RecommendResponse.RecommendationResult.document}.
107
+ # * `returnScore`: Boolean. If set to true, the recommendation score
108
+ # corresponding to each returned Document is set in
109
+ # {::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult#metadata RecommendResponse.RecommendationResult.metadata}.
110
+ # The given score indicates the probability of a Document conversion given
111
+ # the user's context and history.
112
+ # * `strictFiltering`: Boolean. True by default. If set to `false`, the
113
+ # service
114
+ # returns generic (unfiltered) popular Documents instead of empty if
115
+ # your filter blocks all recommendation results.
116
+ # * `diversityLevel`: String. Default empty. If set to be non-empty, then
117
+ # it needs to be one of:
118
+ # * `no-diversity`
119
+ # * `low-diversity`
120
+ # * `medium-diversity`
121
+ # * `high-diversity`
122
+ # * `auto-diversity`
123
+ # This gives request-level control and adjusts recommendation results
124
+ # based on Document category.
125
+ # * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
126
+ # the `filter` field is interpreted according to the new,
127
+ # attribute-based syntax.
128
+ # @!attribute [rw] user_labels
129
+ # @return [::Google::Protobuf::Map{::String => ::String}]
130
+ # The user labels applied to a resource must meet the following requirements:
131
+ #
132
+ # * Each resource can have multiple labels, up to a maximum of 64.
133
+ # * Each label must be a key-value pair.
134
+ # * Keys have a minimum length of 1 character and a maximum length of 63
135
+ # characters and cannot be empty. Values can be empty and have a maximum
136
+ # length of 63 characters.
137
+ # * Keys and values can contain only lowercase letters, numeric characters,
138
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
139
+ # international characters are allowed.
140
+ # * The key portion of a label must be unique. However, you can use the same
141
+ # key with multiple resources.
142
+ # * Keys must start with a lowercase letter or international character.
143
+ #
144
+ # See [Requirements for
145
+ # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
146
+ # for more details.
147
+ class RecommendRequest
148
+ include ::Google::Protobuf::MessageExts
149
+ extend ::Google::Protobuf::MessageExts::ClassMethods
150
+
151
+ # @!attribute [rw] key
152
+ # @return [::String]
153
+ # @!attribute [rw] value
154
+ # @return [::Google::Protobuf::Value]
155
+ class ParamsEntry
156
+ include ::Google::Protobuf::MessageExts
157
+ extend ::Google::Protobuf::MessageExts::ClassMethods
158
+ end
159
+
160
+ # @!attribute [rw] key
161
+ # @return [::String]
162
+ # @!attribute [rw] value
163
+ # @return [::String]
164
+ class UserLabelsEntry
165
+ include ::Google::Protobuf::MessageExts
166
+ extend ::Google::Protobuf::MessageExts::ClassMethods
167
+ end
168
+ end
169
+
170
+ # Response message for Recommend method.
171
+ # @!attribute [rw] results
172
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::RecommendResponse::RecommendationResult>]
173
+ # A list of recommended Documents. The order represents the ranking (from the
174
+ # most relevant Document to the least).
175
+ # @!attribute [rw] attribution_token
176
+ # @return [::String]
177
+ # A unique attribution token. This should be included in the
178
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent UserEvent} logs resulting from
179
+ # this recommendation, which enables accurate attribution of recommendation
180
+ # model performance.
181
+ # @!attribute [rw] missing_ids
182
+ # @return [::Array<::String>]
183
+ # IDs of documents in the request that were missing from the default Branch
184
+ # associated with the requested ServingConfig.
185
+ # @!attribute [rw] validate_only
186
+ # @return [::Boolean]
187
+ # True if
188
+ # {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#validate_only RecommendRequest.validate_only}
189
+ # was set.
190
+ class RecommendResponse
191
+ include ::Google::Protobuf::MessageExts
192
+ extend ::Google::Protobuf::MessageExts::ClassMethods
193
+
194
+ # RecommendationResult represents a generic recommendation result with
195
+ # associated metadata.
196
+ # @!attribute [rw] id
197
+ # @return [::String]
198
+ # Resource ID of the recommended Document.
199
+ # @!attribute [rw] document
200
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Document]
201
+ # Set if `returnDocument` is set to true in
202
+ # {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}.
203
+ # @!attribute [rw] metadata
204
+ # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
205
+ # Additional Document metadata or annotations.
206
+ #
207
+ # Possible values:
208
+ #
209
+ # * `score`: Recommendation score in double value. Is set if
210
+ # `returnScore` is set to true in
211
+ # {::Google::Cloud::DiscoveryEngine::V1::RecommendRequest#params RecommendRequest.params}.
212
+ class RecommendationResult
213
+ include ::Google::Protobuf::MessageExts
214
+ extend ::Google::Protobuf::MessageExts::ClassMethods
215
+
216
+ # @!attribute [rw] key
217
+ # @return [::String]
218
+ # @!attribute [rw] value
219
+ # @return [::Google::Protobuf::Value]
220
+ class MetadataEntry
221
+ include ::Google::Protobuf::MessageExts
222
+ extend ::Google::Protobuf::MessageExts::ClassMethods
223
+ end
224
+ end
225
+ end
226
+ end
227
+ end
228
+ end
229
+ end
@@ -46,9 +46,9 @@ module Google
46
46
  # return. The service may return fewer than this value.
47
47
  #
48
48
  # If unspecified, at most 100
49
- # {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s will be returned.
49
+ # {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}s are returned.
50
50
  #
51
- # The maximum value is 1000; values above 1000 will be coerced to 1000.
51
+ # The maximum value is 1000; values above 1000 are set to 1000.
52
52
  # @!attribute [rw] page_token
53
53
  # @return [::String]
54
54
  # A page token, received from a previous
@@ -93,8 +93,8 @@ module Google
93
93
  # @!attribute [rw] schema_id
94
94
  # @return [::String]
95
95
  # Required. The ID to use for the
96
- # {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}, which will become the
97
- # final component of the
96
+ # {::Google::Cloud::DiscoveryEngine::V1::Schema Schema}, which becomes the final
97
+ # component of the
98
98
  # {::Google::Cloud::DiscoveryEngine::V1::Schema#name Schema.name}.
99
99
  #
100
100
  # This field should conform to
@@ -114,7 +114,7 @@ module Google
114
114
  # @!attribute [rw] allow_missing
115
115
  # @return [::Boolean]
116
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
117
+ # not found, a new {::Google::Cloud::DiscoveryEngine::V1::Schema Schema} is
118
118
  # created. In this situation, `update_mask` is ignored.
119
119
  class UpdateSchemaRequest
120
120
  include ::Google::Protobuf::MessageExts