google-cloud-discovery_engine-v1 0.7.0 → 0.8.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 (123) 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 +764 -6
  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 +715 -6
  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 +45 -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 +23 -13
  23. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  24. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -13
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  26. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  30. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  37. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  46. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  53. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
  56. data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
  57. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  58. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  59. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  60. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  61. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +15 -8
  62. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +15 -8
  63. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  64. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  65. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  66. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  67. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  68. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  69. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  70. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  71. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  72. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
  73. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  74. data/lib/google/cloud/discovery_engine/v1.rb +4 -0
  75. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  76. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  77. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  78. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  79. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  80. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  81. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  82. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
  83. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
  84. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  85. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  86. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  87. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  88. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  89. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  90. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  91. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  92. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  93. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  94. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  95. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  96. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  97. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  98. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  99. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
  100. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
  101. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  102. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  103. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  104. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +485 -0
  105. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
  106. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  107. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
  108. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
  109. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
  110. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  111. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  112. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +4 -4
  113. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
  117. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  118. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +23 -18
  119. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
  122. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  123. metadata +56 -2
@@ -0,0 +1,102 @@
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
+ # A singleton resource of
25
+ # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}. It's empty when
26
+ # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} is created, which
27
+ # defaults to digital parser. The first call to
28
+ # [DataStoreService.UpdateDocumentProcessingConfig][] method will initialize
29
+ # the config.
30
+ # @!attribute [rw] name
31
+ # @return [::String]
32
+ # The full resource name of the Document Processing Config.
33
+ # Format:
34
+ # `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.
35
+ # @!attribute [rw] default_parsing_config
36
+ # @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig]
37
+ # Configurations for default Document parser.
38
+ # If not specified, we will configure it as default DigitalParsingConfig, and
39
+ # the default parsing config will be applied to all file types for Document
40
+ # parsing.
41
+ # @!attribute [rw] parsing_config_overrides
42
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig}]
43
+ # Map from file type to override the default parsing configuration based on
44
+ # the file type. Supported keys:
45
+ #
46
+ # * `pdf`: Override parsing config for PDF files, either digital parsing, ocr
47
+ # parsing or layout parsing is supported.
48
+ # * `html`: Override parsing config for HTML files, only digital parsing and
49
+ # or layout parsing are supported.
50
+ # * `docx`: Override parsing config for DOCX files, only digital parsing and
51
+ # or layout parsing are supported.
52
+ class DocumentProcessingConfig
53
+ include ::Google::Protobuf::MessageExts
54
+ extend ::Google::Protobuf::MessageExts::ClassMethods
55
+
56
+ # Related configurations applied to a specific type of document parser.
57
+ # @!attribute [rw] digital_parsing_config
58
+ # @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig::DigitalParsingConfig]
59
+ # Configurations applied to digital parser.
60
+ # @!attribute [rw] ocr_parsing_config
61
+ # @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig::OcrParsingConfig]
62
+ # Configurations applied to OCR parser. Currently it only applies to
63
+ # PDFs.
64
+ class ParsingConfig
65
+ include ::Google::Protobuf::MessageExts
66
+ extend ::Google::Protobuf::MessageExts::ClassMethods
67
+
68
+ # The digital parsing configurations for documents.
69
+ class DigitalParsingConfig
70
+ include ::Google::Protobuf::MessageExts
71
+ extend ::Google::Protobuf::MessageExts::ClassMethods
72
+ end
73
+
74
+ # The OCR parsing configurations for documents.
75
+ # @!attribute [rw] enhanced_document_elements
76
+ # @deprecated This field is deprecated and may be removed in the next major version update.
77
+ # @return [::Array<::String>]
78
+ # [DEPRECATED] This field is deprecated. To use the additional enhanced
79
+ # document elements processing, please switch to `layout_parsing_config`.
80
+ # @!attribute [rw] use_native_text
81
+ # @return [::Boolean]
82
+ # If true, will use native text instead of OCR text on pages containing
83
+ # native text.
84
+ class OcrParsingConfig
85
+ include ::Google::Protobuf::MessageExts
86
+ extend ::Google::Protobuf::MessageExts::ClassMethods
87
+ end
88
+ end
89
+
90
+ # @!attribute [rw] key
91
+ # @return [::String]
92
+ # @!attribute [rw] value
93
+ # @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig]
94
+ class ParsingConfigOverridesEntry
95
+ include ::Google::Protobuf::MessageExts
96
+ extend ::Google::Protobuf::MessageExts::ClassMethods
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -59,7 +59,7 @@ module Google
59
59
  # @return [::Integer]
60
60
  # Maximum number of {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to
61
61
  # return. If unspecified, defaults to 100. The maximum allowed value is 1000.
62
- # Values above 1000 will be coerced to 1000.
62
+ # Values above 1000 are set to 1000.
63
63
  #
64
64
  # If this field is negative, an `INVALID_ARGUMENT` error is returned.
65
65
  # @!attribute [rw] page_token
@@ -110,7 +110,7 @@ module Google
110
110
  # @!attribute [rw] document_id
111
111
  # @return [::String]
112
112
  # Required. The ID to use for the
113
- # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, which will become the
113
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, which becomes the
114
114
  # final component of the
115
115
  # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name}.
116
116
  #
@@ -148,13 +148,13 @@ module Google
148
148
  # is not set, a `NOT_FOUND` error is returned.
149
149
  # @!attribute [rw] allow_missing
150
150
  # @return [::Boolean]
151
- # If set to true, and the
151
+ # If set to `true` and the
152
152
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document} is not found, a new
153
- # {::Google::Cloud::DiscoveryEngine::V1::Document Document} will be created.
153
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document} is be created.
154
154
  # @!attribute [rw] update_mask
155
155
  # @return [::Google::Protobuf::FieldMask]
156
156
  # Indicates which fields in the provided imported 'document' to update. If
157
- # not set, will by default update all fields.
157
+ # not set, by default updates all fields.
158
158
  class UpdateDocumentRequest
159
159
  include ::Google::Protobuf::MessageExts
160
160
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -89,7 +89,7 @@ module Google
89
89
  # The restriction of the Engine industry vertical is based on
90
90
  # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}: If unspecified,
91
91
  # default to `GENERIC`. Vertical on Engine has to match vertical of the
92
- # DataStore liniked to the engine.
92
+ # DataStore linked to the engine.
93
93
  # @!attribute [rw] common_config
94
94
  # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::CommonConfig]
95
95
  # Common config spec that specifies the metadata of the engine.
@@ -187,8 +187,8 @@ module Google
187
187
  # Common configurations for an Engine.
188
188
  # @!attribute [rw] company_name
189
189
  # @return [::String]
190
- # Immutable. The name of the company, business or entity that is associated
191
- # with the engine. Setting this may help improve LLM related features.
190
+ # The name of the company, business or entity that is associated with the
191
+ # engine. Setting this may help improve LLM related features.
192
192
  class CommonConfig
193
193
  include ::Google::Protobuf::MessageExts
194
194
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -0,0 +1,144 @@
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
+ # Specification for the grounding check.
25
+ # @!attribute [rw] citation_threshold
26
+ # @return [::Float]
27
+ # The threshold (in [0,1]) used for determining whether a fact must be
28
+ # cited for a claim in the answer candidate. Choosing a higher threshold
29
+ # will lead to fewer but very strong citations, while choosing a lower
30
+ # threshold may lead to more but somewhat weaker citations. If unset, the
31
+ # threshold will default to 0.6.
32
+ class CheckGroundingSpec
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
+ end
36
+
37
+ # Request message for
38
+ # {::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationService::Client#check_grounding GroundedGenerationService.CheckGrounding}
39
+ # method.
40
+ # @!attribute [rw] grounding_config
41
+ # @return [::String]
42
+ # Required. The resource name of the grounding config, such as
43
+ # `projects/*/locations/global/groundingConfigs/default_grounding_config`.
44
+ # @!attribute [rw] answer_candidate
45
+ # @return [::String]
46
+ # Answer candidate to check. Can have a maximum length of 1024 characters.
47
+ # @!attribute [rw] facts
48
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>]
49
+ # List of facts for the grounding check.
50
+ # We support up to 200 facts.
51
+ # @!attribute [rw] grounding_spec
52
+ # @return [::Google::Cloud::DiscoveryEngine::V1::CheckGroundingSpec]
53
+ # Configuration of the grounding check.
54
+ # @!attribute [rw] user_labels
55
+ # @return [::Google::Protobuf::Map{::String => ::String}]
56
+ # The user labels applied to a resource must meet the following requirements:
57
+ #
58
+ # * Each resource can have multiple labels, up to a maximum of 64.
59
+ # * Each label must be a key-value pair.
60
+ # * Keys have a minimum length of 1 character and a maximum length of 63
61
+ # characters and cannot be empty. Values can be empty and have a maximum
62
+ # length of 63 characters.
63
+ # * Keys and values can contain only lowercase letters, numeric characters,
64
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
65
+ # international characters are allowed.
66
+ # * The key portion of a label must be unique. However, you can use the same
67
+ # key with multiple resources.
68
+ # * Keys must start with a lowercase letter or international character.
69
+ #
70
+ # See [Google Cloud
71
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
72
+ # for more details.
73
+ class CheckGroundingRequest
74
+ include ::Google::Protobuf::MessageExts
75
+ extend ::Google::Protobuf::MessageExts::ClassMethods
76
+
77
+ # @!attribute [rw] key
78
+ # @return [::String]
79
+ # @!attribute [rw] value
80
+ # @return [::String]
81
+ class UserLabelsEntry
82
+ include ::Google::Protobuf::MessageExts
83
+ extend ::Google::Protobuf::MessageExts::ClassMethods
84
+ end
85
+ end
86
+
87
+ # Response message for the
88
+ # {::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationService::Client#check_grounding GroundedGenerationService.CheckGrounding}
89
+ # method.
90
+ # @!attribute [rw] support_score
91
+ # @return [::Float]
92
+ # The support score for the input answer candidate.
93
+ # Higher the score, higher is the fraction of claims that are supported by
94
+ # the provided facts. This is always set when a response is returned.
95
+ # @!attribute [rw] cited_chunks
96
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::FactChunk>]
97
+ # List of facts cited across all claims in the answer candidate.
98
+ # These are derived from the facts supplied in the request.
99
+ # @!attribute [rw] claims
100
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim>]
101
+ # Claim texts and citation info across all claims in the answer candidate.
102
+ class CheckGroundingResponse
103
+ include ::Google::Protobuf::MessageExts
104
+ extend ::Google::Protobuf::MessageExts::ClassMethods
105
+
106
+ # Text and citation info for a claim in the answer candidate.
107
+ # @!attribute [rw] start_pos
108
+ # @return [::Integer]
109
+ # Position indicating the start of the claim in the answer candidate,
110
+ # measured in bytes.
111
+ # @!attribute [rw] end_pos
112
+ # @return [::Integer]
113
+ # Position indicating the end of the claim in the answer candidate,
114
+ # exclusive.
115
+ # @!attribute [rw] claim_text
116
+ # @return [::String]
117
+ # Text for the claim in the answer candidate. Always provided regardless of
118
+ # whether citations or anti-citations are found.
119
+ # @!attribute [rw] citation_indices
120
+ # @return [::Array<::Integer>]
121
+ # A list of indices (into 'cited_chunks') specifying the citations
122
+ # associated with the claim. For instance [1,3,4] means that
123
+ # cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
124
+ # supporting for the claim. A citation to a fact indicates that the claim
125
+ # is supported by the fact.
126
+ # @!attribute [rw] grounding_check_required
127
+ # @return [::Boolean]
128
+ # Indicates that this claim required grounding check. When the system
129
+ # decided this claim doesn't require attribution/grounding check, this
130
+ # field will be set to false. In that case, no grounding check was done for
131
+ # the claim and therefore
132
+ # {::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim#citation_indices citation_indices},
133
+ # and
134
+ # [anti_citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.anti_citation_indices]
135
+ # should not be returned.
136
+ class Claim
137
+ include ::Google::Protobuf::MessageExts
138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
139
+ end
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,79 @@
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
+ # Grounding Fact.
25
+ # @!attribute [rw] fact_text
26
+ # @return [::String]
27
+ # Text content of the fact. Can be at most 10K characters long.
28
+ # @!attribute [rw] attributes
29
+ # @return [::Google::Protobuf::Map{::String => ::String}]
30
+ # Attributes associated with the fact.
31
+ # Common attributes include `source` (indicating where the fact was sourced
32
+ # from), `author` (indicating the author of the fact), and so on.
33
+ class GroundingFact
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+
37
+ # @!attribute [rw] key
38
+ # @return [::String]
39
+ # @!attribute [rw] value
40
+ # @return [::String]
41
+ class AttributesEntry
42
+ include ::Google::Protobuf::MessageExts
43
+ extend ::Google::Protobuf::MessageExts::ClassMethods
44
+ end
45
+ end
46
+
47
+ # Fact Chunk.
48
+ # @!attribute [rw] chunk_text
49
+ # @return [::String]
50
+ # Text content of the fact chunk. Can be at most 10K characters long.
51
+ # @!attribute [rw] source
52
+ # @return [::String]
53
+ # Source from which this fact chunk was retrieved. If it was retrieved
54
+ # from the GroundingFacts provided in the request then this field will
55
+ # contain the index of the specific fact from which this chunk was
56
+ # retrieved.
57
+ # @!attribute [rw] index
58
+ # @return [::Integer]
59
+ # The index of this chunk. Currently, only used for the streaming mode.
60
+ # @!attribute [rw] source_metadata
61
+ # @return [::Google::Protobuf::Map{::String => ::String}]
62
+ # More fine-grained information for the source reference.
63
+ class FactChunk
64
+ include ::Google::Protobuf::MessageExts
65
+ extend ::Google::Protobuf::MessageExts::ClassMethods
66
+
67
+ # @!attribute [rw] key
68
+ # @return [::String]
69
+ # @!attribute [rw] value
70
+ # @return [::String]
71
+ class SourceMetadataEntry
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -24,7 +24,7 @@ module Google
24
24
  # Cloud Storage location for input content.
25
25
  # @!attribute [rw] input_uris
26
26
  # @return [::Array<::String>]
27
- # Required. Cloud Storage URIs to input files. URI can be up to
27
+ # Required. Cloud Storage URIs to input files. Each URI can be up to
28
28
  # 2000 characters long. URIs can match the full object path (for example,
29
29
  # `gs://bucket/directory/object.json`) or a pattern matching one or more
30
30
  # files, such as `gs://bucket/directory/*.json`.
@@ -53,7 +53,7 @@ module Google
53
53
  # data store. Each entry after the header is imported as a Document.
54
54
  # This can only be used by the GENERIC Data Store vertical.
55
55
  #
56
- # Supported values for user even imports:
56
+ # Supported values for user event imports:
57
57
  #
58
58
  # * `user_event` (default): One JSON
59
59
  # {::Google::Cloud::DiscoveryEngine::V1::UserEvent UserEvent} per line.
@@ -350,8 +350,8 @@ module Google
350
350
  # of 256 characters.
351
351
  # @!attribute [rw] collection_id
352
352
  # @return [::String]
353
- # Required. The Firestore collection to copy the data from with a length
354
- # limit of 1,500 characters.
353
+ # Required. The Firestore collection (or entity) to copy the data from with a
354
+ # length limit of 1,500 characters.
355
355
  # @!attribute [rw] gcs_staging_dir
356
356
  # @return [::String]
357
357
  # Intermediate Cloud Storage directory used for the import with a length
@@ -0,0 +1,106 @@
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
+ # Metadata and configurations for a Google Cloud project in the service.
25
+ # @!attribute [r] name
26
+ # @return [::String]
27
+ # Output only. Full resource name of the project, for example
28
+ # `projects/{project_number}`.
29
+ # Note that when making requests, project number and project id are both
30
+ # acceptable, but the server will always respond in project number.
31
+ # @!attribute [r] create_time
32
+ # @return [::Google::Protobuf::Timestamp]
33
+ # Output only. The timestamp when this project is created.
34
+ # @!attribute [r] provision_completion_time
35
+ # @return [::Google::Protobuf::Timestamp]
36
+ # Output only. The timestamp when this project is successfully provisioned.
37
+ # Empty value means this project is still provisioning and is not ready for
38
+ # use.
39
+ # @!attribute [r] service_terms_map
40
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::Project::ServiceTerms}]
41
+ # Output only. A map of terms of services. The key is the `id` of
42
+ # {::Google::Cloud::DiscoveryEngine::V1::Project::ServiceTerms ServiceTerms}.
43
+ class Project
44
+ include ::Google::Protobuf::MessageExts
45
+ extend ::Google::Protobuf::MessageExts::ClassMethods
46
+
47
+ # Metadata about the terms of service.
48
+ # @!attribute [rw] id
49
+ # @return [::String]
50
+ # The unique identifier of this terms of service.
51
+ # Available terms:
52
+ #
53
+ # * `GA_DATA_USE_TERMS`: [Terms for data
54
+ # use](https://cloud.google.com/retail/data-use-terms). When using this as
55
+ # `id`, the acceptable
56
+ # {::Google::Cloud::DiscoveryEngine::V1::Project::ServiceTerms#version version}
57
+ # to provide is `2022-11-23`.
58
+ # @!attribute [rw] version
59
+ # @return [::String]
60
+ # The version string of the terms of service.
61
+ # For acceptable values, see the comments for
62
+ # {::Google::Cloud::DiscoveryEngine::V1::Project::ServiceTerms#id id} above.
63
+ # @!attribute [rw] state
64
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Project::ServiceTerms::State]
65
+ # Whether the project has accepted/rejected the service terms or it is
66
+ # still pending.
67
+ # @!attribute [rw] accept_time
68
+ # @return [::Google::Protobuf::Timestamp]
69
+ # The last time when the project agreed to the terms of service.
70
+ # @!attribute [rw] decline_time
71
+ # @return [::Google::Protobuf::Timestamp]
72
+ # The last time when the project declined or revoked the agreement to terms
73
+ # of service.
74
+ class ServiceTerms
75
+ include ::Google::Protobuf::MessageExts
76
+ extend ::Google::Protobuf::MessageExts::ClassMethods
77
+
78
+ # The agreement states this terms of service.
79
+ module State
80
+ # The default value of the enum. This value is not actually used.
81
+ STATE_UNSPECIFIED = 0
82
+
83
+ # The project has given consent to the terms of service.
84
+ TERMS_ACCEPTED = 1
85
+
86
+ # The project is pending to review and accept the terms of service.
87
+ TERMS_PENDING = 2
88
+
89
+ # The project has declined or revoked the agreement to terms of service.
90
+ TERMS_DECLINED = 3
91
+ end
92
+ end
93
+
94
+ # @!attribute [rw] key
95
+ # @return [::String]
96
+ # @!attribute [rw] value
97
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Project::ServiceTerms]
98
+ class ServiceTermsMapEntry
99
+ include ::Google::Protobuf::MessageExts
100
+ extend ::Google::Protobuf::MessageExts::ClassMethods
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,57 @@
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 for
25
+ # {::Google::Cloud::DiscoveryEngine::V1::ProjectService::Client#provision_project ProjectService.ProvisionProject}
26
+ # method.
27
+ # @!attribute [rw] name
28
+ # @return [::String]
29
+ # Required. Full resource name of a
30
+ # {::Google::Cloud::DiscoveryEngine::V1::Project Project}, such as
31
+ # `projects/{project_id_or_number}`.
32
+ # @!attribute [rw] accept_data_use_terms
33
+ # @return [::Boolean]
34
+ # Required. Set to `true` to specify that caller has read and would like to
35
+ # give consent to the [Terms for data
36
+ # use](https://cloud.google.com/retail/data-use-terms).
37
+ # @!attribute [rw] data_use_terms_version
38
+ # @return [::String]
39
+ # Required. The version of the [Terms for data
40
+ # use](https://cloud.google.com/retail/data-use-terms) that caller has read
41
+ # and would like to give consent to.
42
+ #
43
+ # Acceptable version is `2022-11-23`, and this may change over time.
44
+ class ProvisionProjectRequest
45
+ include ::Google::Protobuf::MessageExts
46
+ extend ::Google::Protobuf::MessageExts::ClassMethods
47
+ end
48
+
49
+ # Metadata associated with a project provision operation.
50
+ class ProvisionProjectMetadata
51
+ include ::Google::Protobuf::MessageExts
52
+ extend ::Google::Protobuf::MessageExts::ClassMethods
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end