google-apis-developerknowledge_v1 0.4.0 → 0.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/google/apis/developerknowledge_v1/classes.rb +171 -0
- data/lib/google/apis/developerknowledge_v1/gem_version.rb +2 -2
- data/lib/google/apis/developerknowledge_v1/representations.rb +102 -0
- data/lib/google/apis/developerknowledge_v1/service.rb +54 -22
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad262eaab1f85e1d0202a52fc6422200e1104ca813e3f2d04cc7a5291ca2ed6d
|
|
4
|
+
data.tar.gz: 9c34373b55f53820efcfcd2bd5968fa81e4ceb63ef4afdcfbb05294fe55d3f9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ba18cd2cda8398d42e12ac4bc23631cbd5b5b43bc6151bdaf80ed545be232cd4a2731ebe8292403aba6a7cf830ad7fb8f891388728a07cb1480d84dbfb272c9
|
|
7
|
+
data.tar.gz: ebbdbf100b3177dc698f4c80651f90b13c72e19bf1e7bf9027343adca09c4222354ba5cbb9b64790faece7e5a91f5b3f001323143bced9e11e733e9b3110d16e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Release history for google-apis-developerknowledge_v1
|
|
2
2
|
|
|
3
|
+
### v0.6.0 (2026-07-19)
|
|
4
|
+
|
|
5
|
+
* Regenerated from discovery document revision 20260712
|
|
6
|
+
|
|
7
|
+
### v0.5.0 (2026-07-12)
|
|
8
|
+
|
|
9
|
+
* Regenerated from discovery document revision 20260705
|
|
10
|
+
|
|
3
11
|
### v0.4.0 (2026-06-14)
|
|
4
12
|
|
|
5
13
|
* Regenerated using generator version 0.19.0
|
|
@@ -22,6 +22,129 @@ module Google
|
|
|
22
22
|
module Apis
|
|
23
23
|
module DeveloperknowledgeV1
|
|
24
24
|
|
|
25
|
+
# An answer to a query.
|
|
26
|
+
class Answer
|
|
27
|
+
include Google::Apis::Core::Hashable
|
|
28
|
+
|
|
29
|
+
# Contains the text of the answer.
|
|
30
|
+
# Corresponds to the JSON property `answerText`
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :answer_text
|
|
33
|
+
|
|
34
|
+
# Output only. Contains citations for the answer.
|
|
35
|
+
# Corresponds to the JSON property `citations`
|
|
36
|
+
# @return [Array<Google::Apis::DeveloperknowledgeV1::AnswerCitation>]
|
|
37
|
+
attr_accessor :citations
|
|
38
|
+
|
|
39
|
+
# Output only. Contains references for the answer.
|
|
40
|
+
# Corresponds to the JSON property `references`
|
|
41
|
+
# @return [Array<Google::Apis::DeveloperknowledgeV1::AnswerReference>]
|
|
42
|
+
attr_accessor :references
|
|
43
|
+
|
|
44
|
+
def initialize(**args)
|
|
45
|
+
update!(**args)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Update properties of this object
|
|
49
|
+
def update!(**args)
|
|
50
|
+
@answer_text = args[:answer_text] if args.key?(:answer_text)
|
|
51
|
+
@citations = args[:citations] if args.key?(:citations)
|
|
52
|
+
@references = args[:references] if args.key?(:references)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Citation info for a segment.
|
|
57
|
+
class AnswerCitation
|
|
58
|
+
include Google::Apis::Core::Hashable
|
|
59
|
+
|
|
60
|
+
# Output only. Indicates the end of the segment, measured in bytes (UTF-8
|
|
61
|
+
# unicode), exclusive. If there are multi-byte characters, such as non-ASCII
|
|
62
|
+
# characters, the index measurement is longer than the string length.
|
|
63
|
+
# Corresponds to the JSON property `endIndex`
|
|
64
|
+
# @return [Fixnum]
|
|
65
|
+
attr_accessor :end_index
|
|
66
|
+
|
|
67
|
+
# Output only. Contains citation sources for the attributed segment.
|
|
68
|
+
# Corresponds to the JSON property `sources`
|
|
69
|
+
# @return [Array<Google::Apis::DeveloperknowledgeV1::CitationSource>]
|
|
70
|
+
attr_accessor :sources
|
|
71
|
+
|
|
72
|
+
# Output only. Indicates the start of the segment, measured in bytes (UTF-8
|
|
73
|
+
# unicode), inclusive. If there are multi-byte characters, such as non-ASCII
|
|
74
|
+
# characters, the index measurement is longer than the string length.
|
|
75
|
+
# Corresponds to the JSON property `startIndex`
|
|
76
|
+
# @return [Fixnum]
|
|
77
|
+
attr_accessor :start_index
|
|
78
|
+
|
|
79
|
+
def initialize(**args)
|
|
80
|
+
update!(**args)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Update properties of this object
|
|
84
|
+
def update!(**args)
|
|
85
|
+
@end_index = args[:end_index] if args.key?(:end_index)
|
|
86
|
+
@sources = args[:sources] if args.key?(:sources)
|
|
87
|
+
@start_index = args[:start_index] if args.key?(:start_index)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Request message for DeveloperKnowledge.AnswerQuery.
|
|
92
|
+
class AnswerQueryRequest
|
|
93
|
+
include Google::Apis::Core::Hashable
|
|
94
|
+
|
|
95
|
+
# Required. The query to answer.
|
|
96
|
+
# Corresponds to the JSON property `query`
|
|
97
|
+
# @return [String]
|
|
98
|
+
attr_accessor :query
|
|
99
|
+
|
|
100
|
+
def initialize(**args)
|
|
101
|
+
update!(**args)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Update properties of this object
|
|
105
|
+
def update!(**args)
|
|
106
|
+
@query = args[:query] if args.key?(:query)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Response message for DeveloperKnowledge.AnswerQuery.
|
|
111
|
+
class AnswerQueryResponse
|
|
112
|
+
include Google::Apis::Core::Hashable
|
|
113
|
+
|
|
114
|
+
# An answer to a query.
|
|
115
|
+
# Corresponds to the JSON property `answer`
|
|
116
|
+
# @return [Google::Apis::DeveloperknowledgeV1::Answer]
|
|
117
|
+
attr_accessor :answer
|
|
118
|
+
|
|
119
|
+
def initialize(**args)
|
|
120
|
+
update!(**args)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Update properties of this object
|
|
124
|
+
def update!(**args)
|
|
125
|
+
@answer = args[:answer] if args.key?(:answer)
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Represents a reference to a source.
|
|
130
|
+
class AnswerReference
|
|
131
|
+
include Google::Apis::Core::Hashable
|
|
132
|
+
|
|
133
|
+
# Represents a reference to a document.
|
|
134
|
+
# Corresponds to the JSON property `documentReference`
|
|
135
|
+
# @return [Google::Apis::DeveloperknowledgeV1::DocumentReference]
|
|
136
|
+
attr_accessor :document_reference
|
|
137
|
+
|
|
138
|
+
def initialize(**args)
|
|
139
|
+
update!(**args)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Update properties of this object
|
|
143
|
+
def update!(**args)
|
|
144
|
+
@document_reference = args[:document_reference] if args.key?(:document_reference)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
25
148
|
# Response message for DeveloperKnowledge.BatchGetDocuments.
|
|
26
149
|
class BatchGetDocumentsResponse
|
|
27
150
|
include Google::Apis::Core::Hashable
|
|
@@ -41,6 +164,26 @@ module Google
|
|
|
41
164
|
end
|
|
42
165
|
end
|
|
43
166
|
|
|
167
|
+
# Citation source.
|
|
168
|
+
class CitationSource
|
|
169
|
+
include Google::Apis::Core::Hashable
|
|
170
|
+
|
|
171
|
+
# Output only. Contains the index of the Answer.AnswerReference in the `
|
|
172
|
+
# references` repeated field.
|
|
173
|
+
# Corresponds to the JSON property `referenceIndex`
|
|
174
|
+
# @return [Fixnum]
|
|
175
|
+
attr_accessor :reference_index
|
|
176
|
+
|
|
177
|
+
def initialize(**args)
|
|
178
|
+
update!(**args)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Update properties of this object
|
|
182
|
+
def update!(**args)
|
|
183
|
+
@reference_index = args[:reference_index] if args.key?(:reference_index)
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
44
187
|
# A Document represents a piece of content from the Developer Knowledge corpus.
|
|
45
188
|
class Document
|
|
46
189
|
include Google::Apis::Core::Hashable
|
|
@@ -50,6 +193,11 @@ module Google
|
|
|
50
193
|
# @return [String]
|
|
51
194
|
attr_accessor :content
|
|
52
195
|
|
|
196
|
+
# Output only. The length of the `content` field in bytes.
|
|
197
|
+
# Corresponds to the JSON property `contentLengthBytes`
|
|
198
|
+
# @return [Fixnum]
|
|
199
|
+
attr_accessor :content_length_bytes
|
|
200
|
+
|
|
53
201
|
# Output only. Specifies the data source of the document. Example data source: `
|
|
54
202
|
# firebase.google.com`
|
|
55
203
|
# Corresponds to the JSON property `dataSource`
|
|
@@ -97,6 +245,7 @@ module Google
|
|
|
97
245
|
# Update properties of this object
|
|
98
246
|
def update!(**args)
|
|
99
247
|
@content = args[:content] if args.key?(:content)
|
|
248
|
+
@content_length_bytes = args[:content_length_bytes] if args.key?(:content_length_bytes)
|
|
100
249
|
@data_source = args[:data_source] if args.key?(:data_source)
|
|
101
250
|
@description = args[:description] if args.key?(:description)
|
|
102
251
|
@name = args[:name] if args.key?(:name)
|
|
@@ -151,6 +300,28 @@ module Google
|
|
|
151
300
|
end
|
|
152
301
|
end
|
|
153
302
|
|
|
303
|
+
# Represents a reference to a document.
|
|
304
|
+
class DocumentReference
|
|
305
|
+
include Google::Apis::Core::Hashable
|
|
306
|
+
|
|
307
|
+
# A DocumentChunk represents a piece of content from a Document in the
|
|
308
|
+
# DeveloperKnowledge corpus. To fetch the entire document content, pass the `
|
|
309
|
+
# parent` to DeveloperKnowledge.GetDocument or DeveloperKnowledge.
|
|
310
|
+
# BatchGetDocuments.
|
|
311
|
+
# Corresponds to the JSON property `documentChunk`
|
|
312
|
+
# @return [Google::Apis::DeveloperknowledgeV1::DocumentChunk]
|
|
313
|
+
attr_accessor :document_chunk
|
|
314
|
+
|
|
315
|
+
def initialize(**args)
|
|
316
|
+
update!(**args)
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Update properties of this object
|
|
320
|
+
def update!(**args)
|
|
321
|
+
@document_chunk = args[:document_chunk] if args.key?(:document_chunk)
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
|
|
154
325
|
# Response message for DeveloperKnowledge.SearchDocumentChunks.
|
|
155
326
|
class SearchDocumentChunksResponse
|
|
156
327
|
include Google::Apis::Core::Hashable
|
|
@@ -16,13 +16,13 @@ module Google
|
|
|
16
16
|
module Apis
|
|
17
17
|
module DeveloperknowledgeV1
|
|
18
18
|
# Version of the google-apis-developerknowledge_v1 gem
|
|
19
|
-
GEM_VERSION = "0.
|
|
19
|
+
GEM_VERSION = "0.6.0"
|
|
20
20
|
|
|
21
21
|
# Version of the code generator used to generate this client
|
|
22
22
|
GENERATOR_VERSION = "0.19.0"
|
|
23
23
|
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
|
25
|
-
REVISION = "
|
|
25
|
+
REVISION = "20260712"
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -22,12 +22,48 @@ module Google
|
|
|
22
22
|
module Apis
|
|
23
23
|
module DeveloperknowledgeV1
|
|
24
24
|
|
|
25
|
+
class Answer
|
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
27
|
+
|
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
class AnswerCitation
|
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
33
|
+
|
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
class AnswerQueryRequest
|
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
39
|
+
|
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
class AnswerQueryResponse
|
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
45
|
+
|
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class AnswerReference
|
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
51
|
+
|
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
53
|
+
end
|
|
54
|
+
|
|
25
55
|
class BatchGetDocumentsResponse
|
|
26
56
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
27
57
|
|
|
28
58
|
include Google::Apis::Core::JsonObjectSupport
|
|
29
59
|
end
|
|
30
60
|
|
|
61
|
+
class CitationSource
|
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
63
|
+
|
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
65
|
+
end
|
|
66
|
+
|
|
31
67
|
class Document
|
|
32
68
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
33
69
|
|
|
@@ -40,12 +76,62 @@ module Google
|
|
|
40
76
|
include Google::Apis::Core::JsonObjectSupport
|
|
41
77
|
end
|
|
42
78
|
|
|
79
|
+
class DocumentReference
|
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
81
|
+
|
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
83
|
+
end
|
|
84
|
+
|
|
43
85
|
class SearchDocumentChunksResponse
|
|
44
86
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
45
87
|
|
|
46
88
|
include Google::Apis::Core::JsonObjectSupport
|
|
47
89
|
end
|
|
48
90
|
|
|
91
|
+
class Answer
|
|
92
|
+
# @private
|
|
93
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
94
|
+
property :answer_text, as: 'answerText'
|
|
95
|
+
collection :citations, as: 'citations', class: Google::Apis::DeveloperknowledgeV1::AnswerCitation, decorator: Google::Apis::DeveloperknowledgeV1::AnswerCitation::Representation
|
|
96
|
+
|
|
97
|
+
collection :references, as: 'references', class: Google::Apis::DeveloperknowledgeV1::AnswerReference, decorator: Google::Apis::DeveloperknowledgeV1::AnswerReference::Representation
|
|
98
|
+
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
class AnswerCitation
|
|
103
|
+
# @private
|
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
105
|
+
property :end_index, as: 'endIndex'
|
|
106
|
+
collection :sources, as: 'sources', class: Google::Apis::DeveloperknowledgeV1::CitationSource, decorator: Google::Apis::DeveloperknowledgeV1::CitationSource::Representation
|
|
107
|
+
|
|
108
|
+
property :start_index, as: 'startIndex'
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
class AnswerQueryRequest
|
|
113
|
+
# @private
|
|
114
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
115
|
+
property :query, as: 'query'
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
class AnswerQueryResponse
|
|
120
|
+
# @private
|
|
121
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
122
|
+
property :answer, as: 'answer', class: Google::Apis::DeveloperknowledgeV1::Answer, decorator: Google::Apis::DeveloperknowledgeV1::Answer::Representation
|
|
123
|
+
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
class AnswerReference
|
|
128
|
+
# @private
|
|
129
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
130
|
+
property :document_reference, as: 'documentReference', class: Google::Apis::DeveloperknowledgeV1::DocumentReference, decorator: Google::Apis::DeveloperknowledgeV1::DocumentReference::Representation
|
|
131
|
+
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
49
135
|
class BatchGetDocumentsResponse
|
|
50
136
|
# @private
|
|
51
137
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -54,10 +140,18 @@ module Google
|
|
|
54
140
|
end
|
|
55
141
|
end
|
|
56
142
|
|
|
143
|
+
class CitationSource
|
|
144
|
+
# @private
|
|
145
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
146
|
+
property :reference_index, as: 'referenceIndex'
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
57
150
|
class Document
|
|
58
151
|
# @private
|
|
59
152
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
60
153
|
property :content, as: 'content'
|
|
154
|
+
property :content_length_bytes, as: 'contentLengthBytes'
|
|
61
155
|
property :data_source, as: 'dataSource'
|
|
62
156
|
property :description, as: 'description'
|
|
63
157
|
property :name, as: 'name'
|
|
@@ -79,6 +173,14 @@ module Google
|
|
|
79
173
|
end
|
|
80
174
|
end
|
|
81
175
|
|
|
176
|
+
class DocumentReference
|
|
177
|
+
# @private
|
|
178
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
179
|
+
property :document_chunk, as: 'documentChunk', class: Google::Apis::DeveloperknowledgeV1::DocumentChunk, decorator: Google::Apis::DeveloperknowledgeV1::DocumentChunk::Representation
|
|
180
|
+
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
82
184
|
class SearchDocumentChunksResponse
|
|
83
185
|
# @private
|
|
84
186
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -133,31 +133,33 @@ module Google
|
|
|
133
133
|
# Optional. Applies a strict filter to the search results. The expression
|
|
134
134
|
# supports a subset of the syntax described at https://google.aip.dev/160. While
|
|
135
135
|
# `SearchDocumentChunks` returns DocumentChunks, the filter is applied to `
|
|
136
|
-
# DocumentChunk.document` fields. Supported fields for filtering: * `
|
|
137
|
-
# (
|
|
138
|
-
#
|
|
139
|
-
#
|
|
140
|
-
#
|
|
141
|
-
#
|
|
142
|
-
# document
|
|
143
|
-
#
|
|
144
|
-
#
|
|
145
|
-
#
|
|
146
|
-
#
|
|
147
|
-
#
|
|
148
|
-
# operators.
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
#
|
|
152
|
-
#
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
#
|
|
136
|
+
# DocumentChunk.document` fields. Supported fields for filtering: * `
|
|
137
|
+
# content_length_bytes` (INTEGER): The length of the `Document.content` field in
|
|
138
|
+
# bytes. * `data_source` (STRING): The source of the document, e.g. `docs.cloud.
|
|
139
|
+
# google.com`. See https://developers.google.com/knowledge/reference/corpus-
|
|
140
|
+
# reference for the complete list of data sources in the corpus. * `update_time`
|
|
141
|
+
# (TIMESTAMP): The timestamp of when the document was last meaningfully updated.
|
|
142
|
+
# A meaningful update is one that changes document's markdown content or
|
|
143
|
+
# metadata. * `uri` (STRING): The document URI, e.g. `https://docs.cloud.google.
|
|
144
|
+
# com/bigquery/docs/tables`. INTEGER fields support `=`, `<`, `<=`, `>`, and `>=`
|
|
145
|
+
# operators. STRING fields support `=` (equals) and `!=` (not equals) operators
|
|
146
|
+
# for **exact match** on the whole string. Partial match, prefix match, and
|
|
147
|
+
# regexp match are not supported. TIMESTAMP fields support `=`, `<`, `<=`, `>`,
|
|
148
|
+
# and `>=` operators. Timestamps must be in RFC-3339 format, e.g., `"2025-01-
|
|
149
|
+
# 01T00:00:00Z"`. You can combine expressions using `AND`, `OR`, and `NOT` (or `-
|
|
150
|
+
# `) logical operators. `OR` has higher precedence than `AND`. Use parentheses
|
|
151
|
+
# for explicit precedence grouping. Examples: * Filter by `Document.
|
|
152
|
+
# content_length_bytes`: `content_length_bytes < 50000` * `data_source = "docs.
|
|
153
|
+
# cloud.google.com" OR data_source = "firebase.google.com"` * `data_source != "
|
|
154
|
+
# firebase.google.com"` * `update_time < "2024-01-01T00:00:00Z"` * `update_time >
|
|
155
|
+
# = "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR
|
|
156
|
+
# data_source = "web.dev")` * `uri = "https://docs.cloud.google.com/release-
|
|
157
|
+
# notes"` The `filter` string must not exceed 500 characters; values longer than
|
|
158
|
+
# 500 characters will result in an `INVALID_ARGUMENT` error.
|
|
156
159
|
# @param [Fixnum] page_size
|
|
157
160
|
# Optional. Specifies the maximum number of results to return. The service may
|
|
158
161
|
# return fewer than this value. If unspecified, at most 5 results will be
|
|
159
|
-
# returned. The maximum value is
|
|
160
|
-
# INVALID_ARGUMENT error.
|
|
162
|
+
# returned. The maximum value is 100; values above 100 will be coerced to 100.
|
|
161
163
|
# @param [String] page_token
|
|
162
164
|
# Optional. Contains a page token, received from a previous `
|
|
163
165
|
# SearchDocumentChunks` call. Provide this to retrieve the subsequent page.
|
|
@@ -193,6 +195,36 @@ module Google
|
|
|
193
195
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
194
196
|
execute_or_queue_command(command, &block)
|
|
195
197
|
end
|
|
198
|
+
|
|
199
|
+
# Answers a query using grounded generation.
|
|
200
|
+
# @param [Google::Apis::DeveloperknowledgeV1::AnswerQueryRequest] answer_query_request_object
|
|
201
|
+
# @param [String] fields
|
|
202
|
+
# Selector specifying which fields to include in a partial response.
|
|
203
|
+
# @param [String] quota_user
|
|
204
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
205
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
206
|
+
# @param [Google::Apis::RequestOptions] options
|
|
207
|
+
# Request-specific options
|
|
208
|
+
#
|
|
209
|
+
# @yield [result, err] Result & error if block supplied
|
|
210
|
+
# @yieldparam result [Google::Apis::DeveloperknowledgeV1::AnswerQueryResponse] parsed result object
|
|
211
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
212
|
+
#
|
|
213
|
+
# @return [Google::Apis::DeveloperknowledgeV1::AnswerQueryResponse]
|
|
214
|
+
#
|
|
215
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
216
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
217
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
218
|
+
def answer_query(answer_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
219
|
+
command = make_simple_command(:post, 'v1:answerQuery', options)
|
|
220
|
+
command.request_representation = Google::Apis::DeveloperknowledgeV1::AnswerQueryRequest::Representation
|
|
221
|
+
command.request_object = answer_query_request_object
|
|
222
|
+
command.response_representation = Google::Apis::DeveloperknowledgeV1::AnswerQueryResponse::Representation
|
|
223
|
+
command.response_class = Google::Apis::DeveloperknowledgeV1::AnswerQueryResponse
|
|
224
|
+
command.query['fields'] = fields unless fields.nil?
|
|
225
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
226
|
+
execute_or_queue_command(command, &block)
|
|
227
|
+
end
|
|
196
228
|
|
|
197
229
|
protected
|
|
198
230
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-apis-developerknowledge_v1
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -57,7 +57,7 @@ licenses:
|
|
|
57
57
|
metadata:
|
|
58
58
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
|
59
59
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-developerknowledge_v1/CHANGELOG.md
|
|
60
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-developerknowledge_v1/v0.
|
|
60
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-developerknowledge_v1/v0.6.0
|
|
61
61
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-developerknowledge_v1
|
|
62
62
|
rdoc_options: []
|
|
63
63
|
require_paths:
|