From 29c79dc6446df1b727601a1697c127c74c792c59 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 10:18:54 -0500 Subject: [PATCH] docs: Add documentation for enums (#249) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Add documentation for enums fix: Add context manager return types chore: Update gapic-generator-python to v1.8.1 PiperOrigin-RevId: 503210727 Source-Link: https://github.com/googleapis/googleapis/commit/a391fd1dac18dfdfa00c18c8404f2c3a6ff8e98e Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../services/web_risk_service/client.py | 2 +- google/cloud/webrisk_v1/types/webrisk.py | 40 ++++++++++++++++++- .../web_risk_service_v1_beta1/client.py | 2 +- google/cloud/webrisk_v1beta1/types/webrisk.py | 36 ++++++++++++++++- ...ppet_metadata_google.cloud.webrisk.v1.json | 2 +- ...metadata_google.cloud.webrisk.v1beta1.json | 2 +- 6 files changed, 76 insertions(+), 8 deletions(-) diff --git a/google/cloud/webrisk_v1/services/web_risk_service/client.py b/google/cloud/webrisk_v1/services/web_risk_service/client.py index 853a4ce..abc41ad 100644 --- a/google/cloud/webrisk_v1/services/web_risk_service/client.py +++ b/google/cloud/webrisk_v1/services/web_risk_service/client.py @@ -904,7 +904,7 @@ def sample_create_submission(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "WebRiskServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/webrisk_v1/types/webrisk.py b/google/cloud/webrisk_v1/types/webrisk.py index 6b3b3ea..95f011e 100644 --- a/google/cloud/webrisk_v1/types/webrisk.py +++ b/google/cloud/webrisk_v1/types/webrisk.py @@ -43,6 +43,20 @@ class ThreatType(proto.Enum): r"""The type of threat. This maps directly to the threat list a threat may belong to. + + Values: + THREAT_TYPE_UNSPECIFIED (0): + No entries should match this threat type. + This threat type is unused. + MALWARE (1): + Malware targeting any platform. + SOCIAL_ENGINEERING (2): + Social engineering targeting any platform. + UNWANTED_SOFTWARE (3): + Unwanted software targeting any platform. + SOCIAL_ENGINEERING_EXTENDED_COVERAGE (4): + A list of extended coverage social + engineering URIs targeting any platform. """ THREAT_TYPE_UNSPECIFIED = 0 MALWARE = 1 @@ -52,7 +66,16 @@ class ThreatType(proto.Enum): class CompressionType(proto.Enum): - r"""The ways in which threat entry sets can be compressed.""" + r"""The ways in which threat entry sets can be compressed. + + Values: + COMPRESSION_TYPE_UNSPECIFIED (0): + Unknown. + RAW (1): + Raw, uncompressed data. + RICE (2): + Rice-Golomb encoded data. + """ COMPRESSION_TYPE_UNSPECIFIED = 0 RAW = 1 RICE = 2 @@ -168,7 +191,20 @@ class ComputeThreatListDiffResponse(proto.Message): """ class ResponseType(proto.Enum): - r"""The type of response sent to the client.""" + r"""The type of response sent to the client. + + Values: + RESPONSE_TYPE_UNSPECIFIED (0): + Unknown. + DIFF (1): + Partial updates are applied to the client's + existing local database. + RESET (2): + Full updates resets the client's entire local + database. This means that either the client had + no state, was seriously out-of-date, or the + client is believed to be corrupt. + """ RESPONSE_TYPE_UNSPECIFIED = 0 DIFF = 1 RESET = 2 diff --git a/google/cloud/webrisk_v1beta1/services/web_risk_service_v1_beta1/client.py b/google/cloud/webrisk_v1beta1/services/web_risk_service_v1_beta1/client.py index e03a36d..2fbc698 100644 --- a/google/cloud/webrisk_v1beta1/services/web_risk_service_v1_beta1/client.py +++ b/google/cloud/webrisk_v1beta1/services/web_risk_service_v1_beta1/client.py @@ -752,7 +752,7 @@ def sample_search_hashes(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "WebRiskServiceV1Beta1Client": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/webrisk_v1beta1/types/webrisk.py b/google/cloud/webrisk_v1beta1/types/webrisk.py index 4b5b925..c6fbf91 100644 --- a/google/cloud/webrisk_v1beta1/types/webrisk.py +++ b/google/cloud/webrisk_v1beta1/types/webrisk.py @@ -41,6 +41,16 @@ class ThreatType(proto.Enum): r"""The type of threat. This maps dirrectly to the threat list a threat may belong to. + + Values: + THREAT_TYPE_UNSPECIFIED (0): + Unknown. + MALWARE (1): + Malware targeting any platform. + SOCIAL_ENGINEERING (2): + Social engineering targeting any platform. + UNWANTED_SOFTWARE (3): + Unwanted software targeting any platform. """ THREAT_TYPE_UNSPECIFIED = 0 MALWARE = 1 @@ -49,7 +59,16 @@ class ThreatType(proto.Enum): class CompressionType(proto.Enum): - r"""The ways in which threat entry sets can be compressed.""" + r"""The ways in which threat entry sets can be compressed. + + Values: + COMPRESSION_TYPE_UNSPECIFIED (0): + Unknown. + RAW (1): + Raw, uncompressed data. + RICE (2): + Rice-Golomb encoded data. + """ COMPRESSION_TYPE_UNSPECIFIED = 0 RAW = 1 RICE = 2 @@ -154,7 +173,20 @@ class ComputeThreatListDiffResponse(proto.Message): """ class ResponseType(proto.Enum): - r"""The type of response sent to the client.""" + r"""The type of response sent to the client. + + Values: + RESPONSE_TYPE_UNSPECIFIED (0): + Unknown. + DIFF (1): + Partial updates are applied to the client's + existing local database. + RESET (2): + Full updates resets the client's entire local + database. This means that either the client had + no state, was seriously out-of-date, or the + client is believed to be corrupt. + """ RESPONSE_TYPE_UNSPECIFIED = 0 DIFF = 1 RESET = 2 diff --git a/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1.json index 9c1b562..60eac29 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-webrisk", - "version": "1.10.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1beta1.json index db56592..de1e97a 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.webrisk.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-webrisk", - "version": "1.10.0" + "version": "0.1.0" }, "snippets": [ {