Skip to content

Commit 387c057

Browse files
authored
fix: define openapi groups for audit trail (#775)
1 parent ae38801 commit 387c057

File tree

2 files changed

+114
-0
lines changed
  • scaleway/scaleway/audit_trail/v1alpha1
  • scaleway-async/scaleway_async/audit_trail/v1alpha1

2 files changed

+114
-0
lines changed

scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,41 +105,92 @@ class Resource:
105105
@dataclass
106106
class Event:
107107
id: str
108+
"""
109+
ID of the event.
110+
"""
108111

109112
locality: str
113+
"""
114+
Locality of the resource attached to the event.
115+
"""
110116

111117
organization_id: str
118+
"""
119+
Organization ID containing the event.
120+
"""
112121

113122
source_ip: str
123+
"""
124+
IP address at the origin of the event.
125+
"""
114126

115127
product_name: str
128+
"""
129+
Product name of the resource attached to the event.
130+
"""
116131

117132
recorded_at: Optional[datetime]
133+
"""
134+
Timestamp of the event.
135+
"""
118136

119137
principal: Optional[EventPrincipal]
138+
"""
139+
User or IAM application at the origin of the event.
140+
"""
120141

121142
project_id: Optional[str]
143+
"""
144+
(Optional) Project of the resource attached to the event.
145+
"""
122146

123147
user_agent: Optional[str]
148+
"""
149+
User Agent at the origin of the event.
150+
"""
124151

125152
service_name: str
153+
"""
154+
API name called to trigger the event.
155+
"""
126156

127157
method_name: str
158+
"""
159+
API method called to trigger the event.
160+
"""
128161

129162
request_id: str
163+
"""
164+
Unique identifier of the request at the origin of the event.
165+
"""
130166

131167
status_code: int
168+
"""
169+
HTTP status code resulting of the API call.
170+
"""
132171

133172
resource: Optional[Resource]
173+
"""
174+
Resource attached to the event.
175+
"""
134176

135177
request_body: Optional[Dict[str, Any]]
178+
"""
179+
Request at the origin of the event.
180+
"""
136181

137182

138183
@dataclass
139184
class Product:
140185
title: str
186+
"""
187+
Product title.
188+
"""
141189

142190
name: str
191+
"""
192+
Product name.
193+
"""
143194

144195

145196
@dataclass
@@ -220,5 +271,11 @@ class ListProductsRequest:
220271
@dataclass
221272
class ListProductsResponse:
222273
products: List[Product]
274+
"""
275+
List of all products integrated with Audit Trail.
276+
"""
223277

224278
total_count: int
279+
"""
280+
Number of integrated products.
281+
"""

scaleway/scaleway/audit_trail/v1alpha1/types.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,41 +105,92 @@ class Resource:
105105
@dataclass
106106
class Event:
107107
id: str
108+
"""
109+
ID of the event.
110+
"""
108111

109112
locality: str
113+
"""
114+
Locality of the resource attached to the event.
115+
"""
110116

111117
organization_id: str
118+
"""
119+
Organization ID containing the event.
120+
"""
112121

113122
source_ip: str
123+
"""
124+
IP address at the origin of the event.
125+
"""
114126

115127
product_name: str
128+
"""
129+
Product name of the resource attached to the event.
130+
"""
116131

117132
recorded_at: Optional[datetime]
133+
"""
134+
Timestamp of the event.
135+
"""
118136

119137
principal: Optional[EventPrincipal]
138+
"""
139+
User or IAM application at the origin of the event.
140+
"""
120141

121142
project_id: Optional[str]
143+
"""
144+
(Optional) Project of the resource attached to the event.
145+
"""
122146

123147
user_agent: Optional[str]
148+
"""
149+
User Agent at the origin of the event.
150+
"""
124151

125152
service_name: str
153+
"""
154+
API name called to trigger the event.
155+
"""
126156

127157
method_name: str
158+
"""
159+
API method called to trigger the event.
160+
"""
128161

129162
request_id: str
163+
"""
164+
Unique identifier of the request at the origin of the event.
165+
"""
130166

131167
status_code: int
168+
"""
169+
HTTP status code resulting of the API call.
170+
"""
132171

133172
resource: Optional[Resource]
173+
"""
174+
Resource attached to the event.
175+
"""
134176

135177
request_body: Optional[Dict[str, Any]]
178+
"""
179+
Request at the origin of the event.
180+
"""
136181

137182

138183
@dataclass
139184
class Product:
140185
title: str
186+
"""
187+
Product title.
188+
"""
141189

142190
name: str
191+
"""
192+
Product name.
193+
"""
143194

144195

145196
@dataclass
@@ -220,5 +271,11 @@ class ListProductsRequest:
220271
@dataclass
221272
class ListProductsResponse:
222273
products: List[Product]
274+
"""
275+
List of all products integrated with Audit Trail.
276+
"""
223277

224278
total_count: int
279+
"""
280+
Number of integrated products.
281+
"""

0 commit comments

Comments
 (0)