Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,39 @@ class FindingType(enum.IntEnum):
CLEAR_TEXT_PASSWORD = 6


class ScanConfig(object):
class TargetPlatform(enum.IntEnum):
"""
Cloud platforms supported by Cloud Web Security Scanner.

Attributes:
TARGET_PLATFORM_UNSPECIFIED (int): The target platform is unknown. Requests with this enum value will be
rejected with INVALID\_ARGUMENT error.
APP_ENGINE (int): Google App Engine service.
COMPUTE (int): Google Compute Engine service.
"""

TARGET_PLATFORM_UNSPECIFIED = 0
APP_ENGINE = 1
COMPUTE = 2

class UserAgent(enum.IntEnum):
"""
Type of user agents used for scanning.

Attributes:
USER_AGENT_UNSPECIFIED (int): The user agent is unknown. Service will default to CHROME\_LINUX.
CHROME_LINUX (int): Chrome on Linux. This is the service default if unspecified.
CHROME_ANDROID (int): Chrome on Android.
SAFARI_IPHONE (int): Safari on IPhone.
"""

USER_AGENT_UNSPECIFIED = 0
CHROME_LINUX = 1
CHROME_ANDROID = 2
SAFARI_IPHONE = 3


class ScanRun(object):
class ExecutionState(enum.IntEnum):
"""
Expand Down Expand Up @@ -98,36 +131,3 @@ class ResultState(enum.IntEnum):
SUCCESS = 1
ERROR = 2
KILLED = 3


class ScanConfig(object):
class UserAgent(enum.IntEnum):
"""
Type of user agents used for scanning.

Attributes:
USER_AGENT_UNSPECIFIED (int): The user agent is unknown. Service will default to CHROME\_LINUX.
CHROME_LINUX (int): Chrome on Linux. This is the service default if unspecified.
CHROME_ANDROID (int): Chrome on Android.
SAFARI_IPHONE (int): Safari on IPhone.
"""

USER_AGENT_UNSPECIFIED = 0
CHROME_LINUX = 1
CHROME_ANDROID = 2
SAFARI_IPHONE = 3

class TargetPlatform(enum.IntEnum):
"""
Cloud platforms supported by Cloud Web Security Scanner.

Attributes:
TARGET_PLATFORM_UNSPECIFIED (int): The target platform is unknown. Requests with this enum value will be
rejected with INVALID\_ARGUMENT error.
APP_ENGINE (int): Google App Engine service.
COMPUTE (int): Google Compute Engine service.
"""

TARGET_PLATFORM_UNSPECIFIED = 0
APP_ENGINE = 1
COMPUTE = 2
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def channel(self):

@property
def create_scan_config(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.create_scan_config`.

Creates a new ScanConfig.

Expand All @@ -117,7 +117,7 @@ def create_scan_config(self):

@property
def delete_scan_config(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.delete_scan_config`.

Deletes an existing ScanConfig and its child resources.

Expand All @@ -130,7 +130,7 @@ def delete_scan_config(self):

@property
def get_scan_config(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.get_scan_config`.

Gets a ScanConfig.

Expand All @@ -143,7 +143,7 @@ def get_scan_config(self):

@property
def list_scan_configs(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_scan_configs`.

Lists ScanConfigs under a given project.

Expand All @@ -156,7 +156,7 @@ def list_scan_configs(self):

@property
def update_scan_config(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.update_scan_config`.

Updates a ScanConfig. This method support partial update of a ScanConfig.

Expand All @@ -169,7 +169,7 @@ def update_scan_config(self):

@property
def start_scan_run(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.start_scan_run`.

Start a ScanRun according to the given ScanConfig.

Expand All @@ -182,7 +182,7 @@ def start_scan_run(self):

@property
def get_scan_run(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.get_scan_run`.

Gets a ScanRun.

Expand All @@ -195,7 +195,7 @@ def get_scan_run(self):

@property
def list_scan_runs(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_scan_runs`.

Lists ScanRuns under a given ScanConfig, in descending order of ScanRun
stop time.
Expand All @@ -209,7 +209,7 @@ def list_scan_runs(self):

@property
def stop_scan_run(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.stop_scan_run`.

Stops a ScanRun. The stopped ScanRun is returned.

Expand All @@ -222,7 +222,7 @@ def stop_scan_run(self):

@property
def list_crawled_urls(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_crawled_urls`.

List CrawledUrls under a given ScanRun.

Expand All @@ -235,7 +235,7 @@ def list_crawled_urls(self):

@property
def get_finding(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.get_finding`.

Gets a Finding.

Expand All @@ -248,7 +248,7 @@ def get_finding(self):

@property
def list_findings(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_findings`.

List Findings under a given ScanRun.

Expand All @@ -261,7 +261,7 @@ def list_findings(self):

@property
def list_finding_type_stats(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_finding_type_stats`.

List all FindingTypeStats under a given ScanRun.

Expand Down
10 changes: 5 additions & 5 deletions websecurityscanner/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2018-12-08T13:34:06.181027Z",
"updateTime": "2019-01-05T13:35:19.050014Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.2",
"dockerImage": "googleapis/artman@sha256:2f6b261ee7fe1aedf238991c93a20b3820de37a343d0cacf3e3e9555c2aaf2ea"
"version": "0.16.4",
"dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "6f6505a69b2b0a1260c93e890d636eefb859e76e",
"internalRef": "224530961"
"sha": "a111a53c0c6722afcd793b64724ceef7862db5b9",
"internalRef": "227896184"
}
},
{
Expand Down