google-developers-developer_knowledge-v1 0.a → 0.1.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 (26) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +153 -8
  5. data/lib/google/developers/developer_knowledge/v1/developer_knowledge/client.rb +758 -0
  6. data/lib/google/developers/developer_knowledge/v1/developer_knowledge/credentials.rb +47 -0
  7. data/lib/google/developers/developer_knowledge/v1/developer_knowledge/paths.rb +47 -0
  8. data/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/client.rb +710 -0
  9. data/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest/service_stub.rb +260 -0
  10. data/lib/google/developers/developer_knowledge/v1/developer_knowledge/rest.rb +67 -0
  11. data/lib/google/developers/developer_knowledge/v1/developer_knowledge.rb +70 -0
  12. data/lib/google/developers/developer_knowledge/v1/rest.rb +37 -0
  13. data/lib/google/developers/developer_knowledge/v1/version.rb +7 -2
  14. data/lib/google/developers/developer_knowledge/v1.rb +45 -0
  15. data/lib/google/developers/knowledge/v1/developerknowledge_pb.rb +34 -0
  16. data/lib/google/developers/knowledge/v1/developerknowledge_services_pb.rb +75 -0
  17. data/lib/google-developers-developer_knowledge-v1.rb +21 -0
  18. data/proto_docs/README.md +4 -0
  19. data/proto_docs/google/api/client.rb +593 -0
  20. data/proto_docs/google/api/field_behavior.rb +85 -0
  21. data/proto_docs/google/api/launch_stage.rb +71 -0
  22. data/proto_docs/google/api/resource.rb +227 -0
  23. data/proto_docs/google/developers/knowledge/v1/developerknowledge.rb +277 -0
  24. data/proto_docs/google/protobuf/duration.rb +98 -0
  25. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  26. metadata +58 -9
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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 Api
22
+ # The launch stage as defined by [Google Cloud Platform
23
+ # Launch Stages](https://cloud.google.com/terms/launch-stages).
24
+ module LaunchStage
25
+ # Do not use this default value.
26
+ LAUNCH_STAGE_UNSPECIFIED = 0
27
+
28
+ # The feature is not yet implemented. Users can not use it.
29
+ UNIMPLEMENTED = 6
30
+
31
+ # Prelaunch features are hidden from users and are only visible internally.
32
+ PRELAUNCH = 7
33
+
34
+ # Early Access features are limited to a closed group of testers. To use
35
+ # these features, you must sign up in advance and sign a Trusted Tester
36
+ # agreement (which includes confidentiality provisions). These features may
37
+ # be unstable, changed in backward-incompatible ways, and are not
38
+ # guaranteed to be released.
39
+ EARLY_ACCESS = 1
40
+
41
+ # Alpha is a limited availability test for releases before they are cleared
42
+ # for widespread use. By Alpha, all significant design issues are resolved
43
+ # and we are in the process of verifying functionality. Alpha customers
44
+ # need to apply for access, agree to applicable terms, and have their
45
+ # projects allowlisted. Alpha releases don't have to be feature complete,
46
+ # no SLAs are provided, and there are no technical support obligations, but
47
+ # they will be far enough along that customers can actually use them in
48
+ # test environments or for limited-use tests -- just like they would in
49
+ # normal production cases.
50
+ ALPHA = 2
51
+
52
+ # Beta is the point at which we are ready to open a release for any
53
+ # customer to use. There are no SLA or technical support obligations in a
54
+ # Beta release. Products will be complete from a feature perspective, but
55
+ # may have some open outstanding issues. Beta releases are suitable for
56
+ # limited production use cases.
57
+ BETA = 3
58
+
59
+ # GA features are open to all developers and are considered stable and
60
+ # fully qualified for production use.
61
+ GA = 4
62
+
63
+ # Deprecated features are scheduled to be shut down and removed. For more
64
+ # information, see the "Deprecation Policy" section of our [Terms of
65
+ # Service](https://cloud.google.com/terms/)
66
+ # and the [Google Cloud Platform Subject to the Deprecation
67
+ # Policy](https://cloud.google.com/terms/deprecation) documentation.
68
+ DEPRECATED = 5
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,227 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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 Api
22
+ # A simple descriptor of a resource type.
23
+ #
24
+ # ResourceDescriptor annotates a resource message (either by means of a
25
+ # protobuf annotation or use in the service config), and associates the
26
+ # resource's schema, the resource type, and the pattern of the resource name.
27
+ #
28
+ # Example:
29
+ #
30
+ # message Topic {
31
+ # // Indicates this message defines a resource schema.
32
+ # // Declares the resource type in the format of {service}/{kind}.
33
+ # // For Kubernetes resources, the format is {api group}/{kind}.
34
+ # option (google.api.resource) = {
35
+ # type: "pubsub.googleapis.com/Topic"
36
+ # pattern: "projects/{project}/topics/{topic}"
37
+ # };
38
+ # }
39
+ #
40
+ # The ResourceDescriptor Yaml config will look like:
41
+ #
42
+ # resources:
43
+ # - type: "pubsub.googleapis.com/Topic"
44
+ # pattern: "projects/{project}/topics/{topic}"
45
+ #
46
+ # Sometimes, resources have multiple patterns, typically because they can
47
+ # live under multiple parents.
48
+ #
49
+ # Example:
50
+ #
51
+ # message LogEntry {
52
+ # option (google.api.resource) = {
53
+ # type: "logging.googleapis.com/LogEntry"
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
58
+ # };
59
+ # }
60
+ #
61
+ # The ResourceDescriptor Yaml config will look like:
62
+ #
63
+ # resources:
64
+ # - type: 'logging.googleapis.com/LogEntry'
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
69
+ # @!attribute [rw] type
70
+ # @return [::String]
71
+ # The resource type. It must be in the format of
72
+ # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
73
+ # singular and must not include version numbers.
74
+ #
75
+ # Example: `storage.googleapis.com/Bucket`
76
+ #
77
+ # The value of the resource_type_kind must follow the regular expression
78
+ # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
79
+ # should use PascalCase (UpperCamelCase). The maximum number of
80
+ # characters allowed for the `resource_type_kind` is 100.
81
+ # @!attribute [rw] pattern
82
+ # @return [::Array<::String>]
83
+ # Optional. The relative resource name pattern associated with this resource
84
+ # type. The DNS prefix of the full resource name shouldn't be specified here.
85
+ #
86
+ # The path pattern must follow the syntax, which aligns with HTTP binding
87
+ # syntax:
88
+ #
89
+ # Template = Segment { "/" Segment } ;
90
+ # Segment = LITERAL | Variable ;
91
+ # Variable = "{" LITERAL "}" ;
92
+ #
93
+ # Examples:
94
+ #
95
+ # - "projects/\\{project}/topics/\\{topic}"
96
+ # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
97
+ #
98
+ # The components in braces correspond to the IDs for each resource in the
99
+ # hierarchy. It is expected that, if multiple patterns are provided,
100
+ # the same component name (e.g. "project") refers to IDs of the same
101
+ # type of resource.
102
+ # @!attribute [rw] name_field
103
+ # @return [::String]
104
+ # Optional. The field on the resource that designates the resource name
105
+ # field. If omitted, this is assumed to be "name".
106
+ # @!attribute [rw] history
107
+ # @return [::Google::Api::ResourceDescriptor::History]
108
+ # Optional. The historical or future-looking state of the resource pattern.
109
+ #
110
+ # Example:
111
+ #
112
+ # // The InspectTemplate message originally only supported resource
113
+ # // names with organization, and project was added later.
114
+ # message InspectTemplate {
115
+ # option (google.api.resource) = {
116
+ # type: "dlp.googleapis.com/InspectTemplate"
117
+ # pattern:
118
+ # "organizations/{organization}/inspectTemplates/{inspect_template}"
119
+ # pattern: "projects/{project}/inspectTemplates/{inspect_template}"
120
+ # history: ORIGINALLY_SINGLE_PATTERN
121
+ # };
122
+ # }
123
+ # @!attribute [rw] plural
124
+ # @return [::String]
125
+ # The plural name used in the resource name and permission names, such as
126
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
127
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
128
+ # to this is for Nested Collections that have stuttering names, as defined
129
+ # in [AIP-122](https://google.aip.dev/122#nested-collections), where the
130
+ # collection ID in the resource name pattern does not necessarily directly
131
+ # match the `plural` value.
132
+ #
133
+ # It is the same concept of the `plural` field in k8s CRD spec
134
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
135
+ #
136
+ # Note: The plural form is required even for singleton resources. See
137
+ # https://aip.dev/156
138
+ # @!attribute [rw] singular
139
+ # @return [::String]
140
+ # The same concept of the `singular` field in k8s CRD spec
141
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
142
+ # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
143
+ # @!attribute [rw] style
144
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
145
+ # Style flag(s) for this resource.
146
+ # These indicate that a resource is expected to conform to a given
147
+ # style. See the specific style flags for additional information.
148
+ class ResourceDescriptor
149
+ include ::Google::Protobuf::MessageExts
150
+ extend ::Google::Protobuf::MessageExts::ClassMethods
151
+
152
+ # A description of the historical or future-looking state of the
153
+ # resource pattern.
154
+ module History
155
+ # The "unset" value.
156
+ HISTORY_UNSPECIFIED = 0
157
+
158
+ # The resource originally had one pattern and launched as such, and
159
+ # additional patterns were added later.
160
+ ORIGINALLY_SINGLE_PATTERN = 1
161
+
162
+ # The resource has one pattern, but the API owner expects to add more
163
+ # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
164
+ # that from being necessary once there are multiple patterns.)
165
+ FUTURE_MULTI_PATTERN = 2
166
+ end
167
+
168
+ # A flag representing a specific style that a resource claims to conform to.
169
+ module Style
170
+ # The unspecified value. Do not use.
171
+ STYLE_UNSPECIFIED = 0
172
+
173
+ # This resource is intended to be "declarative-friendly".
174
+ #
175
+ # Declarative-friendly resources must be more strictly consistent, and
176
+ # setting this to true communicates to tools that this resource should
177
+ # adhere to declarative-friendly expectations.
178
+ #
179
+ # Note: This is used by the API linter (linter.aip.dev) to enable
180
+ # additional checks.
181
+ DECLARATIVE_FRIENDLY = 1
182
+ end
183
+ end
184
+
185
+ # Defines a proto annotation that describes a string field that refers to
186
+ # an API resource.
187
+ # @!attribute [rw] type
188
+ # @return [::String]
189
+ # The resource type that the annotated field references.
190
+ #
191
+ # Example:
192
+ #
193
+ # message Subscription {
194
+ # string topic = 2 [(google.api.resource_reference) = {
195
+ # type: "pubsub.googleapis.com/Topic"
196
+ # }];
197
+ # }
198
+ #
199
+ # Occasionally, a field may reference an arbitrary resource. In this case,
200
+ # APIs use the special value * in their resource reference.
201
+ #
202
+ # Example:
203
+ #
204
+ # message GetIamPolicyRequest {
205
+ # string resource = 2 [(google.api.resource_reference) = {
206
+ # type: "*"
207
+ # }];
208
+ # }
209
+ # @!attribute [rw] child_type
210
+ # @return [::String]
211
+ # The resource type of a child collection that the annotated field
212
+ # references. This is useful for annotating the `parent` field that
213
+ # doesn't have a fixed resource type.
214
+ #
215
+ # Example:
216
+ #
217
+ # message ListLogEntriesRequest {
218
+ # string parent = 1 [(google.api.resource_reference) = {
219
+ # child_type: "logging.googleapis.com/LogEntry"
220
+ # };
221
+ # }
222
+ class ResourceReference
223
+ include ::Google::Protobuf::MessageExts
224
+ extend ::Google::Protobuf::MessageExts::ClassMethods
225
+ end
226
+ end
227
+ end
@@ -0,0 +1,277 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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 Developers
22
+ module DeveloperKnowledge
23
+ module V1
24
+ # A Document represents a piece of content from the Developer Knowledge corpus.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Identifier. Contains the resource name of the document.
28
+ # Format: `documents/{uri_without_scheme}`
29
+ # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
30
+ # @!attribute [r] uri
31
+ # @return [::String]
32
+ # Output only. Provides the URI of the content, such as
33
+ # `docs.cloud.google.com/storage/docs/creating-buckets`.
34
+ # @!attribute [r] content
35
+ # @return [::String]
36
+ # Output only. Contains the full content of the document in Markdown format.
37
+ # @!attribute [r] description
38
+ # @return [::String]
39
+ # Output only. Provides a description of the document.
40
+ # @!attribute [r] data_source
41
+ # @return [::String]
42
+ # Output only. Specifies the data source of the document.
43
+ # Example data source: `firebase.google.com`
44
+ # @!attribute [r] title
45
+ # @return [::String]
46
+ # Output only. Provides the title of the document.
47
+ # @!attribute [r] update_time
48
+ # @return [::Google::Protobuf::Timestamp]
49
+ # Output only. Represents the timestamp when the content or metadata of the
50
+ # document was last updated.
51
+ # @!attribute [r] view
52
+ # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView]
53
+ # Output only. Specifies the
54
+ # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the
55
+ # document.
56
+ class Document
57
+ include ::Google::Protobuf::MessageExts
58
+ extend ::Google::Protobuf::MessageExts::ClassMethods
59
+ end
60
+
61
+ # Request message for
62
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}.
63
+ # @!attribute [rw] query
64
+ # @return [::String]
65
+ # Required. Provides the raw query string provided by the user, such as "How
66
+ # to create a Cloud Storage bucket?".
67
+ # @!attribute [rw] page_size
68
+ # @return [::Integer]
69
+ # Optional. Specifies the maximum number of results to return. The service
70
+ # may return fewer than this value.
71
+ #
72
+ # If unspecified, at most 5 results will be returned.
73
+ #
74
+ # The maximum value is 20; values above 20 will result in an INVALID_ARGUMENT
75
+ # error.
76
+ # @!attribute [rw] page_token
77
+ # @return [::String]
78
+ # Optional. Contains a page token, received from a previous
79
+ # `SearchDocumentChunks` call. Provide this to retrieve the subsequent page.
80
+ # @!attribute [rw] filter
81
+ # @return [::String]
82
+ # Optional. Applies a strict filter to the search results. The expression
83
+ # supports a subset of the syntax described at https://google.aip.dev/160.
84
+ #
85
+ # While `SearchDocumentChunks` returns
86
+ # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk}s, the filter
87
+ # is applied to `DocumentChunk.document` fields.
88
+ #
89
+ # Supported fields for filtering:
90
+ #
91
+ # * `data_source` (STRING): The source of the document, e.g.
92
+ # `docs.cloud.google.com`. See
93
+ # https://developers.google.com/knowledge/reference/corpus-reference for
94
+ # the complete list of data sources in the corpus.
95
+ # * `update_time` (TIMESTAMP): The timestamp of when the document was last
96
+ # meaningfully updated. A meaningful update is one that changes document's
97
+ # markdown content or metadata.
98
+ # * `uri` (STRING): The document URI, e.g.
99
+ # `https://docs.cloud.google.com/bigquery/docs/tables`.
100
+ #
101
+ # STRING fields support `=` (equals) and `!=` (not equals) operators for
102
+ # **exact match** on the whole string. Partial match, prefix match, and
103
+ # regexp match are not supported.
104
+ #
105
+ # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators.
106
+ # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`.
107
+ #
108
+ # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical
109
+ # operators. `OR` has higher precedence than `AND`. Use parentheses for
110
+ # explicit precedence grouping.
111
+ #
112
+ # Examples:
113
+ #
114
+ # * `data_source = "docs.cloud.google.com" OR data_source =
115
+ # "firebase.google.com"`
116
+ # * `data_source != "firebase.google.com"`
117
+ # * `update_time < "2024-01-01T00:00:00Z"`
118
+ # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source =
119
+ # "developer.chrome.com" OR data_source = "web.dev")`
120
+ # * `uri = "https://docs.cloud.google.com/release-notes"`
121
+ #
122
+ # The `filter` string must not exceed 500 characters; values longer than 500
123
+ # characters will result in an `INVALID_ARGUMENT` error.
124
+ class SearchDocumentChunksRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
129
+ # Response message for
130
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}.
131
+ # @!attribute [rw] results
132
+ # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::DocumentChunk>]
133
+ # Contains the search results for the given query. Each
134
+ # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk DocumentChunk} in this list
135
+ # contains a snippet of content relevant to the search query. Use the
136
+ # {::Google::Developers::DeveloperKnowledge::V1::DocumentChunk#parent DocumentChunk.parent}
137
+ # field of each result with
138
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}
139
+ # or
140
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}
141
+ # to retrieve the full document content.
142
+ # @!attribute [rw] next_page_token
143
+ # @return [::String]
144
+ # Optional. Provides a token that can be sent as `page_token` to retrieve the
145
+ # next page. If this field is omitted, there are no subsequent pages.
146
+ class SearchDocumentChunksResponse
147
+ include ::Google::Protobuf::MessageExts
148
+ extend ::Google::Protobuf::MessageExts::ClassMethods
149
+ end
150
+
151
+ # Request message for
152
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}.
153
+ # @!attribute [rw] name
154
+ # @return [::String]
155
+ # Required. Specifies the name of the document to retrieve.
156
+ # Format: `documents/{uri_without_scheme}`
157
+ # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
158
+ # @!attribute [rw] view
159
+ # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView]
160
+ # Optional. Specifies the
161
+ # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the
162
+ # document. If unspecified,
163
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}
164
+ # defaults to `DOCUMENT_VIEW_CONTENT`.
165
+ class GetDocumentRequest
166
+ include ::Google::Protobuf::MessageExts
167
+ extend ::Google::Protobuf::MessageExts::ClassMethods
168
+ end
169
+
170
+ # Request message for
171
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}.
172
+ # @!attribute [rw] names
173
+ # @return [::Array<::String>]
174
+ # Required. Specifies the names of the documents to retrieve. A maximum of 20
175
+ # documents can be retrieved in a batch. The documents are returned in the
176
+ # same order as the `names` in the request.
177
+ #
178
+ # Format: `documents/{uri_without_scheme}`
179
+ # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
180
+ # @!attribute [rw] view
181
+ # @return [::Google::Developers::DeveloperKnowledge::V1::DocumentView]
182
+ # Optional. Specifies the
183
+ # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of the
184
+ # document. If unspecified,
185
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}
186
+ # defaults to `DOCUMENT_VIEW_CONTENT`.
187
+ class BatchGetDocumentsRequest
188
+ include ::Google::Protobuf::MessageExts
189
+ extend ::Google::Protobuf::MessageExts::ClassMethods
190
+ end
191
+
192
+ # Response message for
193
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}.
194
+ # @!attribute [rw] documents
195
+ # @return [::Array<::Google::Developers::DeveloperKnowledge::V1::Document>]
196
+ # Contains the documents requested.
197
+ class BatchGetDocumentsResponse
198
+ include ::Google::Protobuf::MessageExts
199
+ extend ::Google::Protobuf::MessageExts::ClassMethods
200
+ end
201
+
202
+ # A DocumentChunk represents a piece of content from a
203
+ # {::Google::Developers::DeveloperKnowledge::V1::Document Document} in the DeveloperKnowledge
204
+ # corpus. To fetch the entire document content, pass the `parent` to
205
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}
206
+ # or
207
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}.
208
+ # @!attribute [r] parent
209
+ # @return [::String]
210
+ # Output only. Contains the resource name of the document this chunk is from.
211
+ # Format: `documents/{uri_without_scheme}`
212
+ # Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
213
+ # @!attribute [r] id
214
+ # @return [::String]
215
+ # Output only. Specifies the ID of this chunk within the document. The chunk
216
+ # ID is unique within a document, but not globally unique across documents.
217
+ # The chunk ID is not stable and may change over time.
218
+ # @!attribute [r] content
219
+ # @return [::String]
220
+ # Output only. Contains the content of the document chunk.
221
+ # @!attribute [r] document
222
+ # @return [::Google::Developers::DeveloperKnowledge::V1::Document]
223
+ # Output only. Represents metadata about the
224
+ # {::Google::Developers::DeveloperKnowledge::V1::Document Document} this chunk is from. The
225
+ # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} of this
226
+ # {::Google::Developers::DeveloperKnowledge::V1::Document Document} message will be set to
227
+ # `DOCUMENT_VIEW_BASIC`. It is included here for convenience so that clients
228
+ # do not need to call
229
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}
230
+ # or
231
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}
232
+ # if they only need the metadata fields. Otherwise, clients should use
233
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}
234
+ # or
235
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}
236
+ # to fetch the full document content.
237
+ class DocumentChunk
238
+ include ::Google::Protobuf::MessageExts
239
+ extend ::Google::Protobuf::MessageExts::ClassMethods
240
+ end
241
+
242
+ # Specifies which fields of the
243
+ # {::Google::Developers::DeveloperKnowledge::V1::Document Document} are included.
244
+ module DocumentView
245
+ # The default / unset value. See each API method for its default value if
246
+ # {::Google::Developers::DeveloperKnowledge::V1::DocumentView DocumentView} is not
247
+ # specified.
248
+ DOCUMENT_VIEW_UNSPECIFIED = 0
249
+
250
+ # Includes only the basic metadata fields:
251
+ # - `name`
252
+ # - `uri`
253
+ # - `data_source`
254
+ # - `title`
255
+ # - `description`
256
+ # - `update_time`
257
+ # - `view`
258
+ #
259
+ # This is the default of view for
260
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks DeveloperKnowledge.SearchDocumentChunks}.
261
+ DOCUMENT_VIEW_BASIC = 1
262
+
263
+ # Includes all {::Google::Developers::DeveloperKnowledge::V1::Document Document} fields.
264
+ DOCUMENT_VIEW_FULL = 2
265
+
266
+ # Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field.
267
+ #
268
+ # This is the default of view for
269
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#get_document DeveloperKnowledge.GetDocument}
270
+ # and
271
+ # {::Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#batch_get_documents DeveloperKnowledge.BatchGetDocuments}.
272
+ DOCUMENT_VIEW_CONTENT = 3
273
+ end
274
+ end
275
+ end
276
+ end
277
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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 Protobuf
22
+ # A Duration represents a signed, fixed-length span of time represented
23
+ # as a count of seconds and fractions of seconds at nanosecond
24
+ # resolution. It is independent of any calendar and concepts like "day"
25
+ # or "month". It is related to Timestamp in that the difference between
26
+ # two Timestamp values is a Duration and it can be added or subtracted
27
+ # from a Timestamp. Range is approximately +-10,000 years.
28
+ #
29
+ # # Examples
30
+ #
31
+ # Example 1: Compute Duration from two Timestamps in pseudo code.
32
+ #
33
+ # Timestamp start = ...;
34
+ # Timestamp end = ...;
35
+ # Duration duration = ...;
36
+ #
37
+ # duration.seconds = end.seconds - start.seconds;
38
+ # duration.nanos = end.nanos - start.nanos;
39
+ #
40
+ # if (duration.seconds < 0 && duration.nanos > 0) {
41
+ # duration.seconds += 1;
42
+ # duration.nanos -= 1000000000;
43
+ # } else if (duration.seconds > 0 && duration.nanos < 0) {
44
+ # duration.seconds -= 1;
45
+ # duration.nanos += 1000000000;
46
+ # }
47
+ #
48
+ # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
49
+ #
50
+ # Timestamp start = ...;
51
+ # Duration duration = ...;
52
+ # Timestamp end = ...;
53
+ #
54
+ # end.seconds = start.seconds + duration.seconds;
55
+ # end.nanos = start.nanos + duration.nanos;
56
+ #
57
+ # if (end.nanos < 0) {
58
+ # end.seconds -= 1;
59
+ # end.nanos += 1000000000;
60
+ # } else if (end.nanos >= 1000000000) {
61
+ # end.seconds += 1;
62
+ # end.nanos -= 1000000000;
63
+ # }
64
+ #
65
+ # Example 3: Compute Duration from datetime.timedelta in Python.
66
+ #
67
+ # td = datetime.timedelta(days=3, minutes=10)
68
+ # duration = Duration()
69
+ # duration.FromTimedelta(td)
70
+ #
71
+ # # JSON Mapping
72
+ #
73
+ # In JSON format, the Duration type is encoded as a string rather than an
74
+ # object, where the string ends in the suffix "s" (indicating seconds) and
75
+ # is preceded by the number of seconds, with nanoseconds expressed as
76
+ # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
77
+ # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
78
+ # be expressed in JSON format as "3.000000001s", and 3 seconds and 1
79
+ # microsecond should be expressed in JSON format as "3.000001s".
80
+ # @!attribute [rw] seconds
81
+ # @return [::Integer]
82
+ # Signed seconds of the span of time. Must be from -315,576,000,000
83
+ # to +315,576,000,000 inclusive. Note: these bounds are computed from:
84
+ # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
85
+ # @!attribute [rw] nanos
86
+ # @return [::Integer]
87
+ # Signed fractions of a second at nanosecond resolution of the span
88
+ # of time. Durations less than one second are represented with a 0
89
+ # `seconds` field and a positive or negative `nanos` field. For durations
90
+ # of one second or more, a non-zero value for the `nanos` field must be
91
+ # of the same sign as the `seconds` field. Must be from -999,999,999
92
+ # to +999,999,999 inclusive.
93
+ class Duration
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+ end
98
+ end