Skip to content

Commit c010364

Browse files
yoshi-automationtseaver
authored andcommitted
GAPIC generation fixes. (googleapis#7059)
* Pick up stub docstring fix from GAPIC generator. * Pick up order-of-enum fix from GAPIC generator.
1 parent e71bbeb commit c010364

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

websecurityscanner/google/cloud/websecurityscanner_v1alpha/gapic/enums.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,39 @@ class FindingType(enum.IntEnum):
6464
CLEAR_TEXT_PASSWORD = 6
6565

6666

67+
class ScanConfig(object):
68+
class TargetPlatform(enum.IntEnum):
69+
"""
70+
Cloud platforms supported by Cloud Web Security Scanner.
71+
72+
Attributes:
73+
TARGET_PLATFORM_UNSPECIFIED (int): The target platform is unknown. Requests with this enum value will be
74+
rejected with INVALID\_ARGUMENT error.
75+
APP_ENGINE (int): Google App Engine service.
76+
COMPUTE (int): Google Compute Engine service.
77+
"""
78+
79+
TARGET_PLATFORM_UNSPECIFIED = 0
80+
APP_ENGINE = 1
81+
COMPUTE = 2
82+
83+
class UserAgent(enum.IntEnum):
84+
"""
85+
Type of user agents used for scanning.
86+
87+
Attributes:
88+
USER_AGENT_UNSPECIFIED (int): The user agent is unknown. Service will default to CHROME\_LINUX.
89+
CHROME_LINUX (int): Chrome on Linux. This is the service default if unspecified.
90+
CHROME_ANDROID (int): Chrome on Android.
91+
SAFARI_IPHONE (int): Safari on IPhone.
92+
"""
93+
94+
USER_AGENT_UNSPECIFIED = 0
95+
CHROME_LINUX = 1
96+
CHROME_ANDROID = 2
97+
SAFARI_IPHONE = 3
98+
99+
67100
class ScanRun(object):
68101
class ExecutionState(enum.IntEnum):
69102
"""
@@ -98,36 +131,3 @@ class ResultState(enum.IntEnum):
98131
SUCCESS = 1
99132
ERROR = 2
100133
KILLED = 3
101-
102-
103-
class ScanConfig(object):
104-
class UserAgent(enum.IntEnum):
105-
"""
106-
Type of user agents used for scanning.
107-
108-
Attributes:
109-
USER_AGENT_UNSPECIFIED (int): The user agent is unknown. Service will default to CHROME\_LINUX.
110-
CHROME_LINUX (int): Chrome on Linux. This is the service default if unspecified.
111-
CHROME_ANDROID (int): Chrome on Android.
112-
SAFARI_IPHONE (int): Safari on IPhone.
113-
"""
114-
115-
USER_AGENT_UNSPECIFIED = 0
116-
CHROME_LINUX = 1
117-
CHROME_ANDROID = 2
118-
SAFARI_IPHONE = 3
119-
120-
class TargetPlatform(enum.IntEnum):
121-
"""
122-
Cloud platforms supported by Cloud Web Security Scanner.
123-
124-
Attributes:
125-
TARGET_PLATFORM_UNSPECIFIED (int): The target platform is unknown. Requests with this enum value will be
126-
rejected with INVALID\_ARGUMENT error.
127-
APP_ENGINE (int): Google App Engine service.
128-
COMPUTE (int): Google Compute Engine service.
129-
"""
130-
131-
TARGET_PLATFORM_UNSPECIFIED = 0
132-
APP_ENGINE = 1
133-
COMPUTE = 2

websecurityscanner/google/cloud/websecurityscanner_v1alpha/gapic/transports/web_security_scanner_grpc_transport.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def channel(self):
104104

105105
@property
106106
def create_scan_config(self):
107-
"""Return the gRPC stub for {$apiMethod.name}.
107+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.create_scan_config`.
108108
109109
Creates a new ScanConfig.
110110
@@ -117,7 +117,7 @@ def create_scan_config(self):
117117

118118
@property
119119
def delete_scan_config(self):
120-
"""Return the gRPC stub for {$apiMethod.name}.
120+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.delete_scan_config`.
121121
122122
Deletes an existing ScanConfig and its child resources.
123123
@@ -130,7 +130,7 @@ def delete_scan_config(self):
130130

131131
@property
132132
def get_scan_config(self):
133-
"""Return the gRPC stub for {$apiMethod.name}.
133+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.get_scan_config`.
134134
135135
Gets a ScanConfig.
136136
@@ -143,7 +143,7 @@ def get_scan_config(self):
143143

144144
@property
145145
def list_scan_configs(self):
146-
"""Return the gRPC stub for {$apiMethod.name}.
146+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_scan_configs`.
147147
148148
Lists ScanConfigs under a given project.
149149
@@ -156,7 +156,7 @@ def list_scan_configs(self):
156156

157157
@property
158158
def update_scan_config(self):
159-
"""Return the gRPC stub for {$apiMethod.name}.
159+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.update_scan_config`.
160160
161161
Updates a ScanConfig. This method support partial update of a ScanConfig.
162162
@@ -169,7 +169,7 @@ def update_scan_config(self):
169169

170170
@property
171171
def start_scan_run(self):
172-
"""Return the gRPC stub for {$apiMethod.name}.
172+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.start_scan_run`.
173173
174174
Start a ScanRun according to the given ScanConfig.
175175
@@ -182,7 +182,7 @@ def start_scan_run(self):
182182

183183
@property
184184
def get_scan_run(self):
185-
"""Return the gRPC stub for {$apiMethod.name}.
185+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.get_scan_run`.
186186
187187
Gets a ScanRun.
188188
@@ -195,7 +195,7 @@ def get_scan_run(self):
195195

196196
@property
197197
def list_scan_runs(self):
198-
"""Return the gRPC stub for {$apiMethod.name}.
198+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_scan_runs`.
199199
200200
Lists ScanRuns under a given ScanConfig, in descending order of ScanRun
201201
stop time.
@@ -209,7 +209,7 @@ def list_scan_runs(self):
209209

210210
@property
211211
def stop_scan_run(self):
212-
"""Return the gRPC stub for {$apiMethod.name}.
212+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.stop_scan_run`.
213213
214214
Stops a ScanRun. The stopped ScanRun is returned.
215215
@@ -222,7 +222,7 @@ def stop_scan_run(self):
222222

223223
@property
224224
def list_crawled_urls(self):
225-
"""Return the gRPC stub for {$apiMethod.name}.
225+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_crawled_urls`.
226226
227227
List CrawledUrls under a given ScanRun.
228228
@@ -235,7 +235,7 @@ def list_crawled_urls(self):
235235

236236
@property
237237
def get_finding(self):
238-
"""Return the gRPC stub for {$apiMethod.name}.
238+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.get_finding`.
239239
240240
Gets a Finding.
241241
@@ -248,7 +248,7 @@ def get_finding(self):
248248

249249
@property
250250
def list_findings(self):
251-
"""Return the gRPC stub for {$apiMethod.name}.
251+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_findings`.
252252
253253
List Findings under a given ScanRun.
254254
@@ -261,7 +261,7 @@ def list_findings(self):
261261

262262
@property
263263
def list_finding_type_stats(self):
264-
"""Return the gRPC stub for {$apiMethod.name}.
264+
"""Return the gRPC stub for :meth:`WebSecurityScannerClient.list_finding_type_stats`.
265265
266266
List all FindingTypeStats under a given ScanRun.
267267

websecurityscanner/synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2018-12-08T13:34:06.181027Z",
2+
"updateTime": "2019-01-05T13:35:19.050014Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.16.2",
8-
"dockerImage": "googleapis/artman@sha256:2f6b261ee7fe1aedf238991c93a20b3820de37a343d0cacf3e3e9555c2aaf2ea"
7+
"version": "0.16.4",
8+
"dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "6f6505a69b2b0a1260c93e890d636eefb859e76e",
16-
"internalRef": "224530961"
15+
"sha": "a111a53c0c6722afcd793b64724ceef7862db5b9",
16+
"internalRef": "227896184"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)