google-apis-developerknowledge_v1 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09c7934b521cb507226acc8da25163437cebc4990f9a9fff215b82bb9a3d66df'
4
- data.tar.gz: 9c562926f90c0df9ad88edde054d2a0c22b527bcfbe9816e0cb6dd944bdc9a38
3
+ metadata.gz: ad262eaab1f85e1d0202a52fc6422200e1104ca813e3f2d04cc7a5291ca2ed6d
4
+ data.tar.gz: 9c34373b55f53820efcfcd2bd5968fa81e4ceb63ef4afdcfbb05294fe55d3f9b
5
5
  SHA512:
6
- metadata.gz: acbfa320263a37921b9cdb06a843d90b005d2bdc38fbeb2dc5440f8b3ab939567e66f42c05cb4de3d0ac36478eb72474152e6947f8a7cd2d0ce83b60ef223e23
7
- data.tar.gz: d5feddddbffe7668cb327ad8007a4edce79196b9b419a4d8aa60ee147601d1d54c5206d557c1132e350e4bbd93ee15a3d15204a5d330fac6d9a70d51a8137cd7
6
+ metadata.gz: 2ba18cd2cda8398d42e12ac4bc23631cbd5b5b43bc6151bdaf80ed545be232cd4a2731ebe8292403aba6a7cf830ad7fb8f891388728a07cb1480d84dbfb272c9
7
+ data.tar.gz: ebbdbf100b3177dc698f4c80651f90b13c72e19bf1e7bf9027343adca09c4222354ba5cbb9b64790faece7e5a91f5b3f001323143bced9e11e733e9b3110d16e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
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
+
3
7
  ### v0.5.0 (2026-07-12)
4
8
 
5
9
  * 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,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
@@ -157,6 +300,28 @@ module Google
157
300
  end
158
301
  end
159
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
+
160
325
  # Response message for DeveloperKnowledge.SearchDocumentChunks.
161
326
  class SearchDocumentChunksResponse
162
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.5.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 = "20260705"
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,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
@@ -195,6 +195,36 @@ module Google
195
195
  command.query['quotaUser'] = quota_user unless quota_user.nil?
196
196
  execute_or_queue_command(command, &block)
197
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
198
228
 
199
229
  protected
200
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.5.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.5.0
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: