Skip to content

Commit ff8a003

Browse files
yoshi-automationtseaver
authored andcommitted
Pick up order-of-enum fix from GAPIC generator. (#6882)
1 parent c6669c2 commit ff8a003

File tree

3 files changed

+84
-49
lines changed

3 files changed

+84
-49
lines changed

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

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

6666

67-
class ScanConfig(object):
68-
class UserAgent(enum.IntEnum):
69-
"""
70-
Type of user agents used for scanning.
71-
72-
Attributes:
73-
USER_AGENT_UNSPECIFIED (int): The user agent is unknown. Service will default to CHROME\_LINUX.
74-
CHROME_LINUX (int): Chrome on Linux. This is the service default if unspecified.
75-
CHROME_ANDROID (int): Chrome on Android.
76-
SAFARI_IPHONE (int): Safari on IPhone.
77-
"""
78-
79-
USER_AGENT_UNSPECIFIED = 0
80-
CHROME_LINUX = 1
81-
CHROME_ANDROID = 2
82-
SAFARI_IPHONE = 3
83-
84-
class TargetPlatform(enum.IntEnum):
85-
"""
86-
Cloud platforms supported by Cloud Web Security Scanner.
87-
88-
Attributes:
89-
TARGET_PLATFORM_UNSPECIFIED (int): The target platform is unknown. Requests with this enum value will be
90-
rejected with INVALID\_ARGUMENT error.
91-
APP_ENGINE (int): Google App Engine service.
92-
COMPUTE (int): Google Compute Engine service.
93-
"""
94-
95-
TARGET_PLATFORM_UNSPECIFIED = 0
96-
APP_ENGINE = 1
97-
COMPUTE = 2
98-
99-
10067
class ScanRun(object):
10168
class ExecutionState(enum.IntEnum):
10269
"""
@@ -131,3 +98,36 @@ class ResultState(enum.IntEnum):
13198
SUCCESS = 1
13299
ERROR = 2
133100
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

packages/google-cloud-websecurityscanner/noxfile.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,36 @@
2323
LOCAL_DEPS = (os.path.join("..", "api_core"), os.path.join("..", "core"))
2424

2525
@nox.session(python="3.7")
26-
def blacken(session):
27-
"""Run black.
26+
def lint(session):
27+
"""Run linters.
2828
29-
Format code to uniform standard.
29+
Returns a failure if the linters find linting errors or sufficiently
30+
serious code quality issues.
3031
"""
31-
session.install("black")
32+
session.install("flake8", "black", *LOCAL_DEPS)
3233
session.run(
3334
"black",
35+
"--check",
3436
"google",
3537
"tests",
3638
"docs",
37-
"--exclude",
38-
".*/proto/.*|.*/gapic/.*|.*/.*_pb2.py",
3939
)
40+
session.run("flake8", "google", "tests")
4041

4142

42-
@nox.session(python="3.7")
43-
def lint(session):
44-
"""Run linters.
43+
@nox.session(python="3.6")
44+
def blacken(session):
45+
"""Run black.
4546
46-
Returns a failure if the linters find linting errors or sufficiently
47-
serious code quality issues.
47+
Format code to uniform standard.
4848
"""
49-
session.install("flake8", "black", *LOCAL_DEPS)
49+
session.install("black")
5050
session.run(
5151
"black",
52-
"--check",
5352
"google",
5453
"tests",
5554
"docs",
56-
"--exclude",
57-
".*/proto/.*|.*/gapic/.*|.*/.*_pb2.py",
5855
)
59-
session.run("flake8", "google", "tests")
6056

6157

6258
@nox.session(python="3.7")
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"updateTime": "2018-12-08T13:34:06.181027Z",
3+
"sources": [
4+
{
5+
"generator": {
6+
"name": "artman",
7+
"version": "0.16.2",
8+
"dockerImage": "googleapis/artman@sha256:2f6b261ee7fe1aedf238991c93a20b3820de37a343d0cacf3e3e9555c2aaf2ea"
9+
}
10+
},
11+
{
12+
"git": {
13+
"name": "googleapis",
14+
"remote": "https://github.com/googleapis/googleapis.git",
15+
"sha": "6f6505a69b2b0a1260c93e890d636eefb859e76e",
16+
"internalRef": "224530961"
17+
}
18+
},
19+
{
20+
"template": {
21+
"name": "python_library",
22+
"origin": "synthtool.gcp",
23+
"version": "2018.12.6"
24+
}
25+
}
26+
],
27+
"destinations": [
28+
{
29+
"client": {
30+
"source": "googleapis",
31+
"apiName": "websecurityscanner",
32+
"apiVersion": "v1alpha",
33+
"language": "python",
34+
"generator": "gapic",
35+
"config": "google/cloud/websecurityscanner/artman_websecurityscanner_v1alpha.yaml"
36+
}
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)