google-apis-developerknowledge_v1 0.5.0 → 0.7.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 +173 -4
- data/lib/google/apis/developerknowledge_v1/gem_version.rb +2 -2
- data/lib/google/apis/developerknowledge_v1/representations.rb +101 -0
- data/lib/google/apis/developerknowledge_v1/service.rb +60 -26
- 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: 37bc4906110952047945b2baa45960b47c40659678b12a1c6961c46d413d9969
|
|
4
|
+
data.tar.gz: 0d0a93d1b78b6311913eea4c490ef04d0069090330f9fdbe5ad513b82c26bdee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4ad6e0d16d7c7524735e1576a9f21e9e733f43b004cbb54dfdd7ee7d8b89d16a945b9916e98dddd1da4151742d206663610afd2643569b19715d090e90f0017
|
|
7
|
+
data.tar.gz: 2183021ec491db6e8baea4a76f9ff128f277b6fc6708e3a5c55506550daeb8c4b279cb11e453a6d7c5498a6806edfee8a897eab11c04e79754dc022b35d3670e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Release history for google-apis-developerknowledge_v1
|
|
2
2
|
|
|
3
|
+
### v0.7.0 (2026-08-09)
|
|
4
|
+
|
|
5
|
+
* Regenerated from discovery document revision 20260802
|
|
6
|
+
|
|
7
|
+
### v0.6.0 (2026-07-26)
|
|
8
|
+
|
|
9
|
+
* Regenerated from discovery document revision 20260719
|
|
10
|
+
|
|
3
11
|
### v0.5.0 (2026-07-12)
|
|
4
12
|
|
|
5
13
|
* Regenerated from discovery document revision 20260705
|
|
@@ -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,7 +164,29 @@ module Google
|
|
|
41
164
|
end
|
|
42
165
|
end
|
|
43
166
|
|
|
44
|
-
#
|
|
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
|
+
|
|
187
|
+
# A Document represents a page of documentation in the Developer Knowledge
|
|
188
|
+
# corpus, like the page at https://docs.cloud.google.com/storage/docs/creating-
|
|
189
|
+
# buckets.
|
|
45
190
|
class Document
|
|
46
191
|
include Google::Apis::Core::Hashable
|
|
47
192
|
|
|
@@ -125,7 +270,9 @@ module Google
|
|
|
125
270
|
# @return [String]
|
|
126
271
|
attr_accessor :content
|
|
127
272
|
|
|
128
|
-
# A Document represents a
|
|
273
|
+
# A Document represents a page of documentation in the Developer Knowledge
|
|
274
|
+
# corpus, like the page at https://docs.cloud.google.com/storage/docs/creating-
|
|
275
|
+
# buckets.
|
|
129
276
|
# Corresponds to the JSON property `document`
|
|
130
277
|
# @return [Google::Apis::DeveloperknowledgeV1::Document]
|
|
131
278
|
attr_accessor :document
|
|
@@ -157,12 +304,34 @@ module Google
|
|
|
157
304
|
end
|
|
158
305
|
end
|
|
159
306
|
|
|
307
|
+
# Represents a reference to a document.
|
|
308
|
+
class DocumentReference
|
|
309
|
+
include Google::Apis::Core::Hashable
|
|
310
|
+
|
|
311
|
+
# A DocumentChunk represents a piece of content from a Document in the
|
|
312
|
+
# DeveloperKnowledge corpus. To fetch the entire document content, pass the `
|
|
313
|
+
# parent` to DeveloperKnowledge.GetDocument or DeveloperKnowledge.
|
|
314
|
+
# BatchGetDocuments.
|
|
315
|
+
# Corresponds to the JSON property `documentChunk`
|
|
316
|
+
# @return [Google::Apis::DeveloperknowledgeV1::DocumentChunk]
|
|
317
|
+
attr_accessor :document_chunk
|
|
318
|
+
|
|
319
|
+
def initialize(**args)
|
|
320
|
+
update!(**args)
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Update properties of this object
|
|
324
|
+
def update!(**args)
|
|
325
|
+
@document_chunk = args[:document_chunk] if args.key?(:document_chunk)
|
|
326
|
+
end
|
|
327
|
+
end
|
|
328
|
+
|
|
160
329
|
# Response message for DeveloperKnowledge.SearchDocumentChunks.
|
|
161
330
|
class SearchDocumentChunksResponse
|
|
162
331
|
include Google::Apis::Core::Hashable
|
|
163
332
|
|
|
164
|
-
#
|
|
165
|
-
#
|
|
333
|
+
# Provides a token that can be sent as `page_token` to retrieve the next page.
|
|
334
|
+
# If this field is omitted, there are no subsequent pages.
|
|
166
335
|
# Corresponds to the JSON property `nextPageToken`
|
|
167
336
|
# @return [String]
|
|
168
337
|
attr_accessor :next_page_token
|
|
@@ -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.7.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 = "20260802"
|
|
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,6 +140,13 @@ 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
|
|
@@ -80,6 +173,14 @@ module Google
|
|
|
80
173
|
end
|
|
81
174
|
end
|
|
82
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
|
+
|
|
83
184
|
class SearchDocumentChunksResponse
|
|
84
185
|
# @private
|
|
85
186
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -56,7 +56,9 @@ module Google
|
|
|
56
56
|
# Required. Specifies the names of the documents to retrieve. A maximum of 20
|
|
57
57
|
# documents can be retrieved in a batch. The documents are returned in the same
|
|
58
58
|
# order as the `names` in the request. Format: `documents/`uri_without_scheme``
|
|
59
|
-
# Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
|
|
59
|
+
# Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` Each
|
|
60
|
+
# name must not exceed 500 characters; values longer than 500 characters will
|
|
61
|
+
# result in an `INVALID_ARGUMENT` error.
|
|
60
62
|
# @param [String] view
|
|
61
63
|
# Optional. Specifies the DocumentView of the document. If unspecified,
|
|
62
64
|
# DeveloperKnowledge.BatchGetDocuments defaults to `DOCUMENT_VIEW_CONTENT`.
|
|
@@ -92,7 +94,8 @@ module Google
|
|
|
92
94
|
# @param [String] name
|
|
93
95
|
# Required. Specifies the name of the document to retrieve. Format: `documents/`
|
|
94
96
|
# uri_without_scheme`` Example: `documents/docs.cloud.google.com/storage/docs/
|
|
95
|
-
# creating-buckets`
|
|
97
|
+
# creating-buckets` The name must not exceed 500 characters; values longer than
|
|
98
|
+
# 500 characters will result in an `INVALID_ARGUMENT` error.
|
|
96
99
|
# @param [String] view
|
|
97
100
|
# Optional. Specifies the DocumentView of the document. If unspecified,
|
|
98
101
|
# DeveloperKnowledge.GetDocument defaults to `DOCUMENT_VIEW_CONTENT`.
|
|
@@ -133,29 +136,29 @@ module Google
|
|
|
133
136
|
# Optional. Applies a strict filter to the search results. The expression
|
|
134
137
|
# supports a subset of the syntax described at https://google.aip.dev/160. While
|
|
135
138
|
# `SearchDocumentChunks` returns DocumentChunks, the filter is applied to `
|
|
136
|
-
# DocumentChunk.document` fields. Supported fields for filtering: * `
|
|
137
|
-
#
|
|
138
|
-
#
|
|
139
|
-
#
|
|
140
|
-
#
|
|
141
|
-
#
|
|
142
|
-
#
|
|
143
|
-
#
|
|
144
|
-
#
|
|
145
|
-
#
|
|
146
|
-
#
|
|
147
|
-
#
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
# `) logical operators. `OR` has
|
|
151
|
-
#
|
|
152
|
-
#
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
# = "
|
|
156
|
-
#
|
|
157
|
-
#
|
|
158
|
-
#
|
|
139
|
+
# DocumentChunk.document` fields. Supported fields for filtering: * `data_source`
|
|
140
|
+
# (STRING): The source of the document, e.g. `docs.cloud.google.com`. See https:
|
|
141
|
+
# //developers.google.com/knowledge/reference/corpus-reference for the complete
|
|
142
|
+
# list of data sources in the corpus. * `update_time` (TIMESTAMP): The timestamp
|
|
143
|
+
# of when the document was last meaningfully updated. A meaningful update is one
|
|
144
|
+
# that changes document's markdown content or metadata. * `uri` (STRING): The
|
|
145
|
+
# document URI, e.g. `https://docs.cloud.google.com/bigquery/docs/tables`.
|
|
146
|
+
# STRING fields support `=` (equals) and `!=` (not equals) operators for **exact
|
|
147
|
+
# match** on the whole string. Partial match, prefix match, and regexp match are
|
|
148
|
+
# not supported. TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=`
|
|
149
|
+
# operators. Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"
|
|
150
|
+
# `. Note: Field names must be in `snake_case` (e.g., `data_source`). Values on
|
|
151
|
+
# the right-hand side of filtering expressions must be string literals enclosed
|
|
152
|
+
# in double quotes (e.g., `"docs.cloud.google.com"`). You can combine
|
|
153
|
+
# expressions using `AND`, `OR`, and `NOT` (or `-`) logical operators. `OR` has
|
|
154
|
+
# higher precedence than `AND`. Use parentheses for explicit precedence grouping.
|
|
155
|
+
# Examples: * `data_source = "docs.cloud.google.com" OR data_source = "firebase.
|
|
156
|
+
# google.com"` * `data_source != "firebase.google.com"` * `update_time < "2024-
|
|
157
|
+
# 01-01T00:00:00Z"` * `update_time >= "2025-01-22T00:00:00Z" AND (data_source = "
|
|
158
|
+
# developer.chrome.com" OR data_source = "web.dev")` * `uri = "https://docs.
|
|
159
|
+
# cloud.google.com/release-notes"` The `filter` string must not exceed 500
|
|
160
|
+
# characters; values longer than 500 characters will result in an `
|
|
161
|
+
# INVALID_ARGUMENT` error.
|
|
159
162
|
# @param [Fixnum] page_size
|
|
160
163
|
# Optional. Specifies the maximum number of results to return. The service may
|
|
161
164
|
# return fewer than this value. If unspecified, at most 5 results will be
|
|
@@ -165,7 +168,8 @@ module Google
|
|
|
165
168
|
# SearchDocumentChunks` call. Provide this to retrieve the subsequent page.
|
|
166
169
|
# @param [String] query
|
|
167
170
|
# Required. Provides the raw query string provided by the user, such as "How to
|
|
168
|
-
# create a Cloud Storage bucket?".
|
|
171
|
+
# create a Cloud Storage bucket?". The query must not exceed 500 characters;
|
|
172
|
+
# values longer than 500 characters will result in an `INVALID_ARGUMENT` error.
|
|
169
173
|
# @param [String] fields
|
|
170
174
|
# Selector specifying which fields to include in a partial response.
|
|
171
175
|
# @param [String] quota_user
|
|
@@ -195,6 +199,36 @@ module Google
|
|
|
195
199
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
196
200
|
execute_or_queue_command(command, &block)
|
|
197
201
|
end
|
|
202
|
+
|
|
203
|
+
# Answers a query using grounded generation.
|
|
204
|
+
# @param [Google::Apis::DeveloperknowledgeV1::AnswerQueryRequest] answer_query_request_object
|
|
205
|
+
# @param [String] fields
|
|
206
|
+
# Selector specifying which fields to include in a partial response.
|
|
207
|
+
# @param [String] quota_user
|
|
208
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
209
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
210
|
+
# @param [Google::Apis::RequestOptions] options
|
|
211
|
+
# Request-specific options
|
|
212
|
+
#
|
|
213
|
+
# @yield [result, err] Result & error if block supplied
|
|
214
|
+
# @yieldparam result [Google::Apis::DeveloperknowledgeV1::AnswerQueryResponse] parsed result object
|
|
215
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
216
|
+
#
|
|
217
|
+
# @return [Google::Apis::DeveloperknowledgeV1::AnswerQueryResponse]
|
|
218
|
+
#
|
|
219
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
220
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
221
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
222
|
+
def answer_query(answer_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
223
|
+
command = make_simple_command(:post, 'v1:answerQuery', options)
|
|
224
|
+
command.request_representation = Google::Apis::DeveloperknowledgeV1::AnswerQueryRequest::Representation
|
|
225
|
+
command.request_object = answer_query_request_object
|
|
226
|
+
command.response_representation = Google::Apis::DeveloperknowledgeV1::AnswerQueryResponse::Representation
|
|
227
|
+
command.response_class = Google::Apis::DeveloperknowledgeV1::AnswerQueryResponse
|
|
228
|
+
command.query['fields'] = fields unless fields.nil?
|
|
229
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
230
|
+
execute_or_queue_command(command, &block)
|
|
231
|
+
end
|
|
198
232
|
|
|
199
233
|
protected
|
|
200
234
|
|
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.7.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.7.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:
|