google-developers-developer_knowledge-v1 0.4.0 → 0.5.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: 8ad8cca7aaa334031193c8b77909834f2c5404ed76621c45a9ea4ee1a65248ac
4
- data.tar.gz: a70b840dcc90caf6a69643be1f58ca13e7cb18409af0fa13bc341f2bc2e92320
3
+ metadata.gz: 4780c7b824068fd4e11272f086f953b1b42e9dafe75e69ec5ab461481f1b9874
4
+ data.tar.gz: c9f191d79d2e0aeedd344bae18507da8afb2fdd24f69f644bec296399beee424
5
5
  SHA512:
6
- metadata.gz: 5abcfddb5429906b3b107b0c8b066bd1e7485cb80e466eb62014aabdadb9f7adb6d7227625c069719866bc71e12c463ae2cc8c282db6c49fdaefcb6a81cc8980
7
- data.tar.gz: 3e555a5e75575935eb22a5cf0ef7b4f9a91e80f00e2e2ce62e5b30997d2aac3b7ce9c4b49cd77ce1862b1d63d0f5b9f7983141a78d97251cd888c9182d8366c7
6
+ metadata.gz: 7646445da58c588e67e2660ca8779c4f2a2bda5ea92551ba8450457bc09800389bf0263843b381c321b2312b626404379985a9c899c8fb76e1506587b4298f20
7
+ data.tar.gz: 87c8fbc210d25572751bcca4d102a8b2ca2440c3f7732e8c4cb025a5a10ad1cf74e9071f985921b8c01828a0fabe857f2df4146ce9fa8a98b29bfe619b4749ef
@@ -568,13 +568,59 @@ module Google
568
568
  # @param options [::Gapic::CallOptions, ::Hash]
569
569
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
570
570
  #
571
- # @overload answer_query(query: nil)
571
+ # @overload answer_query(query: nil, filter: nil)
572
572
  # Pass arguments to `answer_query` via keyword arguments. Note that at
573
573
  # least one keyword argument is required. To specify no parameters, or to keep all
574
574
  # the default parameter values, pass an empty Hash as a request object (see above).
575
575
  #
576
576
  # @param query [::String]
577
577
  # Required. The query to answer.
578
+ # @param filter [::String]
579
+ # Optional. Applies a strict filter to the search results used to ground the
580
+ # answer. The expression supports a subset of the syntax described at
581
+ # https://google.aip.dev/160.
582
+ #
583
+ # Supported fields for filtering:
584
+ #
585
+ # * `content_length_bytes` (INTEGER): The length of the `Document.content`
586
+ # field in bytes.
587
+ # * `data_source` (STRING): The source of the document, e.g.
588
+ # `docs.cloud.google.com`. See
589
+ # https://developers.google.com/knowledge/reference/corpus-reference for
590
+ # the complete list of data sources in the corpus.
591
+ # * `update_time` (TIMESTAMP): The timestamp of when the document was last
592
+ # meaningfully updated. A meaningful update is one that changes document's
593
+ # markdown content or metadata.
594
+ # * `uri` (STRING): The document URI, e.g.
595
+ # `https://docs.cloud.google.com/bigquery/docs/tables`.
596
+ #
597
+ # INTEGER fields support `=`, `<`, `<=`, `>`, and `>=` operators.
598
+ #
599
+ # STRING fields support `=` (equals) and `!=` (not equals) operators for
600
+ # **exact match** on the whole string. Partial match, prefix match, and
601
+ # regexp match are not supported.
602
+ #
603
+ # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators.
604
+ # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`.
605
+ #
606
+ # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical
607
+ # operators. `OR` has higher precedence than `AND`. Use parentheses for
608
+ # explicit precedence grouping.
609
+ #
610
+ # Examples:
611
+ #
612
+ # * Filter by `Document.content_length_bytes`:
613
+ # `content_length_bytes < 50000`
614
+ # * `data_source = "docs.cloud.google.com" OR data_source =
615
+ # "firebase.google.com"`
616
+ # * `data_source != "firebase.google.com"`
617
+ # * `update_time < "2024-01-01T00:00:00Z"`
618
+ # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source =
619
+ # "developer.chrome.com" OR data_source = "web.dev")`
620
+ # * `uri = "https://docs.cloud.google.com/release-notes"`
621
+ #
622
+ # The `filter` string must not exceed 500 characters; values longer than 500
623
+ # characters will result in an `INVALID_ARGUMENT` error.
578
624
  #
579
625
  # @yield [response, operation] Access the result along with the RPC operation
580
626
  # @yieldparam response [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse]
@@ -556,13 +556,59 @@ module Google
556
556
  # @param options [::Gapic::CallOptions, ::Hash]
557
557
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
558
558
  #
559
- # @overload answer_query(query: nil)
559
+ # @overload answer_query(query: nil, filter: nil)
560
560
  # Pass arguments to `answer_query` via keyword arguments. Note that at
561
561
  # least one keyword argument is required. To specify no parameters, or to keep all
562
562
  # the default parameter values, pass an empty Hash as a request object (see above).
563
563
  #
564
564
  # @param query [::String]
565
565
  # Required. The query to answer.
566
+ # @param filter [::String]
567
+ # Optional. Applies a strict filter to the search results used to ground the
568
+ # answer. The expression supports a subset of the syntax described at
569
+ # https://google.aip.dev/160.
570
+ #
571
+ # Supported fields for filtering:
572
+ #
573
+ # * `content_length_bytes` (INTEGER): The length of the `Document.content`
574
+ # field in bytes.
575
+ # * `data_source` (STRING): The source of the document, e.g.
576
+ # `docs.cloud.google.com`. See
577
+ # https://developers.google.com/knowledge/reference/corpus-reference for
578
+ # the complete list of data sources in the corpus.
579
+ # * `update_time` (TIMESTAMP): The timestamp of when the document was last
580
+ # meaningfully updated. A meaningful update is one that changes document's
581
+ # markdown content or metadata.
582
+ # * `uri` (STRING): The document URI, e.g.
583
+ # `https://docs.cloud.google.com/bigquery/docs/tables`.
584
+ #
585
+ # INTEGER fields support `=`, `<`, `<=`, `>`, and `>=` operators.
586
+ #
587
+ # STRING fields support `=` (equals) and `!=` (not equals) operators for
588
+ # **exact match** on the whole string. Partial match, prefix match, and
589
+ # regexp match are not supported.
590
+ #
591
+ # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators.
592
+ # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`.
593
+ #
594
+ # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical
595
+ # operators. `OR` has higher precedence than `AND`. Use parentheses for
596
+ # explicit precedence grouping.
597
+ #
598
+ # Examples:
599
+ #
600
+ # * Filter by `Document.content_length_bytes`:
601
+ # `content_length_bytes < 50000`
602
+ # * `data_source = "docs.cloud.google.com" OR data_source =
603
+ # "firebase.google.com"`
604
+ # * `data_source != "firebase.google.com"`
605
+ # * `update_time < "2024-01-01T00:00:00Z"`
606
+ # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source =
607
+ # "developer.chrome.com" OR data_source = "web.dev")`
608
+ # * `uri = "https://docs.cloud.google.com/release-notes"`
609
+ #
610
+ # The `filter` string must not exceed 500 characters; values longer than 500
611
+ # characters will result in an `INVALID_ARGUMENT` error.
566
612
  # @yield [result, operation] Access the result along with the TransportOperation object
567
613
  # @yieldparam result [::Google::Developers::DeveloperKnowledge::V1::AnswerQueryResponse]
568
614
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -21,7 +21,7 @@ module Google
21
21
  module Developers
22
22
  module DeveloperKnowledge
23
23
  module V1
24
- VERSION = "0.4.0"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -11,7 +11,7 @@ require 'google/api/resource_pb'
11
11
  require 'google/protobuf/timestamp_pb'
12
12
 
13
13
 
14
- descriptor_data = "\n7google/developers/knowledge/v1/developerknowledge.proto\x12\x1egoogle.developers.knowledge.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x03\n\x08\x44ocument\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x04view\x18\x08 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x03\x12!\n\x14\x63ontent_length_bytes\x18\t \x01(\x05\x42\x03\xe0\x41\x03:Z\xea\x41W\n*developerknowledge.googleapis.com/Document\x12\x14\x64ocuments/{document}*\tdocuments2\x08\x64ocument\"w\n\x1bSearchDocumentChunksRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"w\n\x1cSearchDocumentChunksResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.developers.knowledge.v1.DocumentChunk\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x97\x01\n\x12GetDocumentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"\x9e\x01\n\x18\x42\x61tchGetDocumentsRequest\x12\x41\n\x05names\x18\x01 \x03(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"X\n\x19\x42\x61tchGetDocumentsResponse\x12;\n\tdocuments\x18\x01 \x03(\x0b\x32(.google.developers.knowledge.v1.Document\"(\n\x12\x41nswerQueryRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\"M\n\x13\x41nswerQueryResponse\x12\x36\n\x06\x61nswer\x18\x01 \x01(\x0b\x32&.google.developers.knowledge.v1.Answer\"\xdb\x04\n\x06\x41nswer\x12\x13\n\x0b\x61nswer_text\x18\x01 \x01(\t\x12M\n\tcitations\x18\x02 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.AnswerCitationB\x03\xe0\x41\x03\x12O\n\nreferences\x18\x03 \x03(\x0b\x32\x36.google.developers.knowledge.v1.Answer.AnswerReferenceB\x03\xe0\x41\x03\x1a\x8f\x01\n\x0e\x41nswerCitation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x07sources\x18\x03 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.CitationSourceB\x03\xe0\x41\x03\x1a.\n\x0e\x43itationSource\x12\x1c\n\x0freference_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x1ay\n\x0f\x41nswerReference\x12[\n\x12\x64ocument_reference\x18\x01 \x01(\x0b\x32\x38.google.developers.knowledge.v1.Answer.DocumentReferenceB\x03\xe0\x41\x03H\x00\x42\t\n\x07\x63ontent\x1a_\n\x11\x44ocumentReference\x12J\n\x0e\x64ocument_chunk\x18\x01 \x01(\x0b\x32-.google.developers.knowledge.v1.DocumentChunkB\x03\xe0\x41\x03\"\xf2\x01\n\rDocumentChunk\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x08\x64ocument\x18\x04 \x01(\x0b\x32(.google.developers.knowledge.v1.DocumentB\x03\xe0\x41\x03\x12!\n\x0frelevance_score\x18\x05 \x01(\x01\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x12\n\x10_relevance_score*y\n\x0c\x44ocumentView\x12\x1d\n\x19\x44OCUMENT_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44OCUMENT_VIEW_BASIC\x10\x01\x12\x16\n\x12\x44OCUMENT_VIEW_FULL\x10\x02\x12\x19\n\x15\x44OCUMENT_VIEW_CONTENT\x10\x03\x32\x81\x06\n\x12\x44\x65veloperKnowledge\x12\xbd\x01\n\x14SearchDocumentChunks\x12;.google.developers.knowledge.v1.SearchDocumentChunksRequest\x1a<.google.developers.knowledge.v1.SearchDocumentChunksResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/documents:searchDocumentChunks\x12\x93\x01\n\x0bGetDocument\x12\x32.google.developers.knowledge.v1.GetDocumentRequest\x1a(.google.developers.knowledge.v1.Document\"&\xda\x41\x04name\x82\xd3\xe4\x93\x02\x19\x12\x17/v1/{name=documents/**}\x12\xa8\x01\n\x11\x42\x61tchGetDocuments\x12\x38.google.developers.knowledge.v1.BatchGetDocumentsRequest\x1a\x39.google.developers.knowledge.v1.BatchGetDocumentsResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/documents:batchGet\x12\x92\x01\n\x0b\x41nswerQuery\x12\x32.google.developers.knowledge.v1.AnswerQueryRequest\x1a\x33.google.developers.knowledge.v1.AnswerQueryResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1:answerQuery:\x01*\x1aU\xca\x41!developerknowledge.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x83\x02\n\"com.google.developers.knowledge.v1B\x17\x44\x65veloperKnowledgeProtoP\x01ZAcloud.google.com/go/developerknowledge/apiv1/developerknowledgepb\xaa\x02\'Google.Developers.DeveloperKnowledge.V1\xca\x02\'Google\\Developers\\DeveloperKnowledge\\V1\xea\x02*Google::Developers::DeveloperKnowledge::V1b\x06proto3"
14
+ descriptor_data = "\n7google/developers/knowledge/v1/developerknowledge.proto\x12\x1egoogle.developers.knowledge.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x03\n\x08\x44ocument\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x04view\x18\x08 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x03\x12!\n\x14\x63ontent_length_bytes\x18\t \x01(\x05\x42\x03\xe0\x41\x03:Z\xea\x41W\n*developerknowledge.googleapis.com/Document\x12\x14\x64ocuments/{document}*\tdocuments2\x08\x64ocument\"w\n\x1bSearchDocumentChunksRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"w\n\x1cSearchDocumentChunksResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.developers.knowledge.v1.DocumentChunk\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x97\x01\n\x12GetDocumentRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"\x9e\x01\n\x18\x42\x61tchGetDocumentsRequest\x12\x41\n\x05names\x18\x01 \x03(\tB2\xe0\x41\x02\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12?\n\x04view\x18\x02 \x01(\x0e\x32,.google.developers.knowledge.v1.DocumentViewB\x03\xe0\x41\x01\"X\n\x19\x42\x61tchGetDocumentsResponse\x12;\n\tdocuments\x18\x01 \x03(\x0b\x32(.google.developers.knowledge.v1.Document\"=\n\x12\x41nswerQueryRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"M\n\x13\x41nswerQueryResponse\x12\x36\n\x06\x61nswer\x18\x01 \x01(\x0b\x32&.google.developers.knowledge.v1.Answer\"\xdb\x04\n\x06\x41nswer\x12\x13\n\x0b\x61nswer_text\x18\x01 \x01(\t\x12M\n\tcitations\x18\x02 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.AnswerCitationB\x03\xe0\x41\x03\x12O\n\nreferences\x18\x03 \x03(\x0b\x32\x36.google.developers.knowledge.v1.Answer.AnswerReferenceB\x03\xe0\x41\x03\x1a\x8f\x01\n\x0e\x41nswerCitation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12K\n\x07sources\x18\x03 \x03(\x0b\x32\x35.google.developers.knowledge.v1.Answer.CitationSourceB\x03\xe0\x41\x03\x1a.\n\x0e\x43itationSource\x12\x1c\n\x0freference_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x1ay\n\x0f\x41nswerReference\x12[\n\x12\x64ocument_reference\x18\x01 \x01(\x0b\x32\x38.google.developers.knowledge.v1.Answer.DocumentReferenceB\x03\xe0\x41\x03H\x00\x42\t\n\x07\x63ontent\x1a_\n\x11\x44ocumentReference\x12J\n\x0e\x64ocument_chunk\x18\x01 \x01(\x0b\x32-.google.developers.knowledge.v1.DocumentChunkB\x03\xe0\x41\x03\"\xf2\x01\n\rDocumentChunk\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*developerknowledge.googleapis.com/Document\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63ontent\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12?\n\x08\x64ocument\x18\x04 \x01(\x0b\x32(.google.developers.knowledge.v1.DocumentB\x03\xe0\x41\x03\x12!\n\x0frelevance_score\x18\x05 \x01(\x01\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x12\n\x10_relevance_score*y\n\x0c\x44ocumentView\x12\x1d\n\x19\x44OCUMENT_VIEW_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44OCUMENT_VIEW_BASIC\x10\x01\x12\x16\n\x12\x44OCUMENT_VIEW_FULL\x10\x02\x12\x19\n\x15\x44OCUMENT_VIEW_CONTENT\x10\x03\x32\x81\x06\n\x12\x44\x65veloperKnowledge\x12\xbd\x01\n\x14SearchDocumentChunks\x12;.google.developers.knowledge.v1.SearchDocumentChunksRequest\x1a<.google.developers.knowledge.v1.SearchDocumentChunksResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/documents:searchDocumentChunks\x12\x93\x01\n\x0bGetDocument\x12\x32.google.developers.knowledge.v1.GetDocumentRequest\x1a(.google.developers.knowledge.v1.Document\"&\xda\x41\x04name\x82\xd3\xe4\x93\x02\x19\x12\x17/v1/{name=documents/**}\x12\xa8\x01\n\x11\x42\x61tchGetDocuments\x12\x38.google.developers.knowledge.v1.BatchGetDocumentsRequest\x1a\x39.google.developers.knowledge.v1.BatchGetDocumentsResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/documents:batchGet\x12\x92\x01\n\x0b\x41nswerQuery\x12\x32.google.developers.knowledge.v1.AnswerQueryRequest\x1a\x33.google.developers.knowledge.v1.AnswerQueryResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1:answerQuery:\x01*\x1aU\xca\x41!developerknowledge.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x83\x02\n\"com.google.developers.knowledge.v1B\x17\x44\x65veloperKnowledgeProtoP\x01ZAcloud.google.com/go/developerknowledge/apiv1/developerknowledgepb\xaa\x02\'Google.Developers.DeveloperKnowledge.V1\xca\x02\'Google\\Developers\\DeveloperKnowledge\\V1\xea\x02*Google::Developers::DeveloperKnowledge::V1b\x06proto3"
15
15
 
16
16
  pool = ::Google::Protobuf::DescriptorPool.generated_pool
17
17
  pool.add_serialized_file(descriptor_data)
@@ -227,6 +227,53 @@ module Google
227
227
  # @!attribute [rw] query
228
228
  # @return [::String]
229
229
  # Required. The query to answer.
230
+ # @!attribute [rw] filter
231
+ # @return [::String]
232
+ # Optional. Applies a strict filter to the search results used to ground the
233
+ # answer. The expression supports a subset of the syntax described at
234
+ # https://google.aip.dev/160.
235
+ #
236
+ # Supported fields for filtering:
237
+ #
238
+ # * `content_length_bytes` (INTEGER): The length of the `Document.content`
239
+ # field in bytes.
240
+ # * `data_source` (STRING): The source of the document, e.g.
241
+ # `docs.cloud.google.com`. See
242
+ # https://developers.google.com/knowledge/reference/corpus-reference for
243
+ # the complete list of data sources in the corpus.
244
+ # * `update_time` (TIMESTAMP): The timestamp of when the document was last
245
+ # meaningfully updated. A meaningful update is one that changes document's
246
+ # markdown content or metadata.
247
+ # * `uri` (STRING): The document URI, e.g.
248
+ # `https://docs.cloud.google.com/bigquery/docs/tables`.
249
+ #
250
+ # INTEGER fields support `=`, `<`, `<=`, `>`, and `>=` operators.
251
+ #
252
+ # STRING fields support `=` (equals) and `!=` (not equals) operators for
253
+ # **exact match** on the whole string. Partial match, prefix match, and
254
+ # regexp match are not supported.
255
+ #
256
+ # TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators.
257
+ # Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`.
258
+ #
259
+ # You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical
260
+ # operators. `OR` has higher precedence than `AND`. Use parentheses for
261
+ # explicit precedence grouping.
262
+ #
263
+ # Examples:
264
+ #
265
+ # * Filter by `Document.content_length_bytes`:
266
+ # `content_length_bytes < 50000`
267
+ # * `data_source = "docs.cloud.google.com" OR data_source =
268
+ # "firebase.google.com"`
269
+ # * `data_source != "firebase.google.com"`
270
+ # * `update_time < "2024-01-01T00:00:00Z"`
271
+ # * `update_time >= "2025-01-22T00:00:00Z" AND (data_source =
272
+ # "developer.chrome.com" OR data_source = "web.dev")`
273
+ # * `uri = "https://docs.cloud.google.com/release-notes"`
274
+ #
275
+ # The `filter` string must not exceed 500 characters; values longer than 500
276
+ # characters will result in an `INVALID_ARGUMENT` error.
230
277
  class AnswerQueryRequest
231
278
  include ::Google::Protobuf::MessageExts
232
279
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-developers-developer_knowledge-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC