Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 07288a0

Browse files
docs: Publish Scan Run logging proto for documentation (#230)
* docs: Publish Scan Run logging proto for documentation PiperOrigin-RevId: 470878694 Source-Link: googleapis/googleapis@7a8b988 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e6a268ebbc5b412174473b2e1f0c38f0892457ef Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTZhMjY4ZWJiYzViNDEyMTc0NDczYjJlMWYwYzM4ZjA4OTI0NTdlZiJ9 * 🦉 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 <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 754f873 commit 07288a0

File tree

4 files changed

+98
-0
lines changed

4 files changed

+98
-0
lines changed

google/cloud/websecurityscanner/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from google.cloud.websecurityscanner_v1.types.scan_run_error_trace import (
3838
ScanRunErrorTrace,
3939
)
40+
from google.cloud.websecurityscanner_v1.types.scan_run_log import ScanRunLog
4041
from google.cloud.websecurityscanner_v1.types.scan_run_warning_trace import (
4142
ScanRunWarningTrace,
4243
)
@@ -77,6 +78,7 @@
7778
"ScanConfigError",
7879
"ScanRun",
7980
"ScanRunErrorTrace",
81+
"ScanRunLog",
8082
"ScanRunWarningTrace",
8183
"CreateScanConfigRequest",
8284
"DeleteScanConfigRequest",

google/cloud/websecurityscanner_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from .types.scan_config_error import ScanConfigError
3434
from .types.scan_run import ScanRun
3535
from .types.scan_run_error_trace import ScanRunErrorTrace
36+
from .types.scan_run_log import ScanRunLog
3637
from .types.scan_run_warning_trace import ScanRunWarningTrace
3738
from .types.web_security_scanner import (
3839
CreateScanConfigRequest,
@@ -81,6 +82,7 @@
8182
"ScanConfigError",
8283
"ScanRun",
8384
"ScanRunErrorTrace",
85+
"ScanRunLog",
8486
"ScanRunWarningTrace",
8587
"StartScanRunRequest",
8688
"StopScanRunRequest",

google/cloud/websecurityscanner_v1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from .scan_config_error import ScanConfigError
2929
from .scan_run import ScanRun
3030
from .scan_run_error_trace import ScanRunErrorTrace
31+
from .scan_run_log import ScanRunLog
3132
from .scan_run_warning_trace import ScanRunWarningTrace
3233
from .web_security_scanner import (
3334
CreateScanConfigRequest,
@@ -64,6 +65,7 @@
6465
"ScanConfigError",
6566
"ScanRun",
6667
"ScanRunErrorTrace",
68+
"ScanRunLog",
6769
"ScanRunWarningTrace",
6870
"CreateScanConfigRequest",
6971
"DeleteScanConfigRequest",
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
import proto # type: ignore
17+
18+
from google.cloud.websecurityscanner_v1.types import scan_run, scan_run_error_trace
19+
20+
__protobuf__ = proto.module(
21+
package="google.cloud.websecurityscanner.v1",
22+
manifest={
23+
"ScanRunLog",
24+
},
25+
)
26+
27+
28+
class ScanRunLog(proto.Message):
29+
r"""A ScanRunLog is an output-only proto used for Stackdriver
30+
customer logging. It is used for logs covering the start and end
31+
of scan pipelines. Other than an added summary, this is a subset
32+
of the ScanRun. Representation in logs is either a proto Struct,
33+
or converted to JSON. Next id: 9
34+
35+
Attributes:
36+
summary (str):
37+
Human friendly message about the event.
38+
name (str):
39+
The resource name of the ScanRun being
40+
logged.
41+
execution_state (google.cloud.websecurityscanner_v1.types.ScanRun.ExecutionState):
42+
The execution state of the ScanRun.
43+
result_state (google.cloud.websecurityscanner_v1.types.ScanRun.ResultState):
44+
The result state of the ScanRun.
45+
urls_crawled_count (int):
46+
47+
urls_tested_count (int):
48+
49+
has_findings (bool):
50+
51+
error_trace (google.cloud.websecurityscanner_v1.types.ScanRunErrorTrace):
52+
53+
"""
54+
55+
summary = proto.Field(
56+
proto.STRING,
57+
number=1,
58+
)
59+
name = proto.Field(
60+
proto.STRING,
61+
number=2,
62+
)
63+
execution_state = proto.Field(
64+
proto.ENUM,
65+
number=3,
66+
enum=scan_run.ScanRun.ExecutionState,
67+
)
68+
result_state = proto.Field(
69+
proto.ENUM,
70+
number=4,
71+
enum=scan_run.ScanRun.ResultState,
72+
)
73+
urls_crawled_count = proto.Field(
74+
proto.INT64,
75+
number=5,
76+
)
77+
urls_tested_count = proto.Field(
78+
proto.INT64,
79+
number=6,
80+
)
81+
has_findings = proto.Field(
82+
proto.BOOL,
83+
number=7,
84+
)
85+
error_trace = proto.Field(
86+
proto.MESSAGE,
87+
number=8,
88+
message=scan_run_error_trace.ScanRunErrorTrace,
89+
)
90+
91+
92+
__all__ = tuple(sorted(__protobuf__.manifest))

0 commit comments

Comments
 (0)