@@ -50,7 +50,7 @@ def with_streaming_response(self) -> CategoriesResourceWithStreamingResponse:
50
50
def create (
51
51
self ,
52
52
* ,
53
- account_id : float ,
53
+ account_id : str ,
54
54
kill_chain : float ,
55
55
name : str ,
56
56
mitre_attack : List [str ] | NotGiven = NOT_GIVEN ,
@@ -76,6 +76,8 @@ def create(
76
76
77
77
timeout: Override the client-level default timeout for this request, in seconds
78
78
"""
79
+ if not account_id :
80
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
79
81
return self ._post (
80
82
f"/accounts/{ account_id } /cloudforce-one/events/categories/create" ,
81
83
body = maybe_transform (
@@ -96,7 +98,7 @@ def create(
96
98
def list (
97
99
self ,
98
100
* ,
99
- account_id : float ,
101
+ account_id : str ,
100
102
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
101
103
# The extra values given here take precedence over values defined on the client or passed to this method.
102
104
extra_headers : Headers | None = None ,
@@ -118,6 +120,8 @@ def list(
118
120
119
121
timeout: Override the client-level default timeout for this request, in seconds
120
122
"""
123
+ if not account_id :
124
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
121
125
return self ._get (
122
126
f"/accounts/{ account_id } /cloudforce-one/events/categories" ,
123
127
options = make_request_options (
@@ -130,7 +134,7 @@ def delete(
130
134
self ,
131
135
category_id : str ,
132
136
* ,
133
- account_id : float ,
137
+ account_id : str ,
134
138
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
135
139
# The extra values given here take precedence over values defined on the client or passed to this method.
136
140
extra_headers : Headers | None = None ,
@@ -154,6 +158,8 @@ def delete(
154
158
155
159
timeout: Override the client-level default timeout for this request, in seconds
156
160
"""
161
+ if not account_id :
162
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
157
163
if not category_id :
158
164
raise ValueError (f"Expected a non-empty value for `category_id` but received { category_id !r} " )
159
165
return self ._delete (
@@ -168,7 +174,7 @@ def edit(
168
174
self ,
169
175
category_id : str ,
170
176
* ,
171
- account_id : float ,
177
+ account_id : str ,
172
178
kill_chain : float | NotGiven = NOT_GIVEN ,
173
179
mitre_attack : List [str ] | NotGiven = NOT_GIVEN ,
174
180
name : str | NotGiven = NOT_GIVEN ,
@@ -196,6 +202,8 @@ def edit(
196
202
197
203
timeout: Override the client-level default timeout for this request, in seconds
198
204
"""
205
+ if not account_id :
206
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
199
207
if not category_id :
200
208
raise ValueError (f"Expected a non-empty value for `category_id` but received { category_id !r} " )
201
209
return self ._patch (
@@ -219,7 +227,7 @@ def get(
219
227
self ,
220
228
category_id : str ,
221
229
* ,
222
- account_id : float ,
230
+ account_id : str ,
223
231
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
224
232
# The extra values given here take precedence over values defined on the client or passed to this method.
225
233
extra_headers : Headers | None = None ,
@@ -243,6 +251,8 @@ def get(
243
251
244
252
timeout: Override the client-level default timeout for this request, in seconds
245
253
"""
254
+ if not account_id :
255
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
246
256
if not category_id :
247
257
raise ValueError (f"Expected a non-empty value for `category_id` but received { category_id !r} " )
248
258
return self ._get (
@@ -277,7 +287,7 @@ def with_streaming_response(self) -> AsyncCategoriesResourceWithStreamingRespons
277
287
async def create (
278
288
self ,
279
289
* ,
280
- account_id : float ,
290
+ account_id : str ,
281
291
kill_chain : float ,
282
292
name : str ,
283
293
mitre_attack : List [str ] | NotGiven = NOT_GIVEN ,
@@ -303,6 +313,8 @@ async def create(
303
313
304
314
timeout: Override the client-level default timeout for this request, in seconds
305
315
"""
316
+ if not account_id :
317
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
306
318
return await self ._post (
307
319
f"/accounts/{ account_id } /cloudforce-one/events/categories/create" ,
308
320
body = await async_maybe_transform (
@@ -323,7 +335,7 @@ async def create(
323
335
async def list (
324
336
self ,
325
337
* ,
326
- account_id : float ,
338
+ account_id : str ,
327
339
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
328
340
# The extra values given here take precedence over values defined on the client or passed to this method.
329
341
extra_headers : Headers | None = None ,
@@ -345,6 +357,8 @@ async def list(
345
357
346
358
timeout: Override the client-level default timeout for this request, in seconds
347
359
"""
360
+ if not account_id :
361
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
348
362
return await self ._get (
349
363
f"/accounts/{ account_id } /cloudforce-one/events/categories" ,
350
364
options = make_request_options (
@@ -357,7 +371,7 @@ async def delete(
357
371
self ,
358
372
category_id : str ,
359
373
* ,
360
- account_id : float ,
374
+ account_id : str ,
361
375
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
362
376
# The extra values given here take precedence over values defined on the client or passed to this method.
363
377
extra_headers : Headers | None = None ,
@@ -381,6 +395,8 @@ async def delete(
381
395
382
396
timeout: Override the client-level default timeout for this request, in seconds
383
397
"""
398
+ if not account_id :
399
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
384
400
if not category_id :
385
401
raise ValueError (f"Expected a non-empty value for `category_id` but received { category_id !r} " )
386
402
return await self ._delete (
@@ -395,7 +411,7 @@ async def edit(
395
411
self ,
396
412
category_id : str ,
397
413
* ,
398
- account_id : float ,
414
+ account_id : str ,
399
415
kill_chain : float | NotGiven = NOT_GIVEN ,
400
416
mitre_attack : List [str ] | NotGiven = NOT_GIVEN ,
401
417
name : str | NotGiven = NOT_GIVEN ,
@@ -423,6 +439,8 @@ async def edit(
423
439
424
440
timeout: Override the client-level default timeout for this request, in seconds
425
441
"""
442
+ if not account_id :
443
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
426
444
if not category_id :
427
445
raise ValueError (f"Expected a non-empty value for `category_id` but received { category_id !r} " )
428
446
return await self ._patch (
@@ -446,7 +464,7 @@ async def get(
446
464
self ,
447
465
category_id : str ,
448
466
* ,
449
- account_id : float ,
467
+ account_id : str ,
450
468
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
451
469
# The extra values given here take precedence over values defined on the client or passed to this method.
452
470
extra_headers : Headers | None = None ,
@@ -470,6 +488,8 @@ async def get(
470
488
471
489
timeout: Override the client-level default timeout for this request, in seconds
472
490
"""
491
+ if not account_id :
492
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
473
493
if not category_id :
474
494
raise ValueError (f"Expected a non-empty value for `category_id` but received { category_id !r} " )
475
495
return await self ._get (
0 commit comments