ThreatMatch
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
セーフ ブラウジングの脅威リストの脅威エントリの確認時に一致します。
フィールド |
threatType |
enum (ThreatType )
この脅威に一致する脅威の種類。
|
platformType |
enum (PlatformType )
この脅威に一致するプラットフォーム タイプ。
|
threatEntryType |
enum (ThreatEntryType )
この脅威に一致する脅威エントリのタイプ。
|
threat |
object (ThreatEntry )
この脅威に一致する脅威。
|
threatEntryMetadata |
object (ThreatEntryMetadata )
この脅威に関連するオプションのメタデータ。
|
cacheDuration |
string (Duration format)
返された一致のキャッシュ存続期間。誤検出を避けるため、クライアントはこのレスポンスをこの期間を超えてキャッシュに保存してはなりません。 s で終わる小数 9 桁までの秒単位の期間。例: "3.5s" 。
|
ThreatEntryMetadata
特定の脅威エントリに関連付けられたメタデータ。クライアントは、各脅威タイプに関連付けられているメタデータの Key-Value ペアを知っていることが期待されます。
MetadataEntry
JSON 表現 |
{
"key": string,
"value": string
} |
フィールド |
key |
string (bytes format)
メタデータ エントリキー。JSON リクエストの場合、鍵は base64 でエンコードされます。 Base64 でエンコードされた文字列。
|
value |
string (bytes format)
メタデータ エントリの値。JSON リクエストの場合、値は base64 でエンコードされます。 Base64 でエンコードされた文字列。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eThreatMatch indicates a match when checking for threats in Safe Browsing threat lists, containing information about the threat type, platform, and entry type.\u003c/p\u003e\n"],["\u003cp\u003eIt includes optional metadata associated with the specific threat entry, which may provide additional context.\u003c/p\u003e\n"],["\u003cp\u003eThreatEntryMetadata stores this metadata as key-value pairs, understood by the client based on the threat type.\u003c/p\u003e\n"],["\u003cp\u003eMetadataEntry represents a single metadata entry, where both the key and value are base64-encoded for JSON requests.\u003c/p\u003e\n"]]],["The document defines data structures for threat matches in Safe Browsing. A threat match includes `threatType`, `platformType`, `threatEntryType`, and the matching `threat`. It may optionally contain `threatEntryMetadata`, consisting of `MetadataEntry` objects with `key` and `value` string pairs. Each match also specifies `cacheDuration`, dictating how long the match should be considered valid, to avoid false positives. Data representation is in JSON format with specific structure for `ThreatEntryMetadata` and `MetadataEntry`.\n"],null,["# ThreatMatch\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [ThreatEntryMetadata](#ThreatEntryMetadata)\n - [JSON representation](#ThreatEntryMetadata.SCHEMA_REPRESENTATION)\n- [MetadataEntry](#MetadataEntry)\n - [JSON representation](#MetadataEntry.SCHEMA_REPRESENTATION)\n\nA match when checking a threat entry in the Safe Browsing threat lists.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"threatType\": enum (/safe-browsing/reference/rest/v4/ThreatType), \"platformType\": enum (/safe-browsing/reference/rest/v4/PlatformType), \"threatEntryType\": enum (/safe-browsing/reference/rest/v4/ThreatEntryType), \"threat\": { object (/safe-browsing/reference/rest/v4/ThreatEntry) }, \"threatEntryMetadata\": { object (/safe-browsing/reference/rest/v4/ThreatMatch#ThreatEntryMetadata) }, \"cacheDuration\": string } ``` |\n\n| Fields ||\n|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `threatType` | `enum (`[ThreatType](/safe-browsing/reference/rest/v4/ThreatType)`)` The threat type matching this threat. |\n| `platformType` | `enum (`[PlatformType](/safe-browsing/reference/rest/v4/PlatformType)`)` The platform type matching this threat. |\n| `threatEntryType` | `enum (`[ThreatEntryType](/safe-browsing/reference/rest/v4/ThreatEntryType)`)` The threat entry type matching this threat. |\n| `threat` | `object (`[ThreatEntry](/safe-browsing/reference/rest/v4/ThreatEntry)`)` The threat matching this threat. |\n| `threatEntryMetadata` | `object (`[ThreatEntryMetadata](/safe-browsing/reference/rest/v4/ThreatMatch#ThreatEntryMetadata)`)` Optional metadata associated with this threat. |\n| `cacheDuration` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` The cache lifetime for the returned match. Clients must not cache this response for more than this duration to avoid false positives. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n\nThreatEntryMetadata\n-------------------\n\nThe metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------|\n| ``` { \"entries\": [ { object (/safe-browsing/reference/rest/v4/ThreatMatch#MetadataEntry) } ] } ``` |\n\n| Fields ||\n|-------------|----------------------------------------------------------------------------------------------------------------|\n| `entries[]` | `object (`[MetadataEntry](/safe-browsing/reference/rest/v4/ThreatMatch#MetadataEntry)`)` The metadata entries. |\n\nMetadataEntry\n-------------\n\nA single metadata entry.\n\n| JSON representation |\n|--------------------------------------------|\n| ``` { \"key\": string, \"value\": string } ``` |\n\n| Fields ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `key` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` The metadata entry key. For JSON requests, the key is base64-encoded. A base64-encoded string. |\n| `value` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` The metadata entry value. For JSON requests, the value is base64-encoded. A base64-encoded string. |"]]