3
3
from __future__ import annotations
4
4
5
5
from typing import List , Type , Optional , cast
6
+ from typing_extensions import Literal
6
7
7
8
import httpx
8
9
@@ -64,7 +65,7 @@ def create(
64
65
self ,
65
66
* ,
66
67
account_id : str ,
67
- duration : str ,
68
+ duration : Literal [ "1m" , "5m" , "10m" , "15m" , "20m" , "30m" , "45m" , "60m" ] ,
68
69
name : str ,
69
70
automatic_advertisement : Optional [bool ] | NotGiven = NOT_GIVEN ,
70
71
bandwidth : float | NotGiven = NOT_GIVEN ,
@@ -85,9 +86,7 @@ def create(
85
86
Args:
86
87
duration: The amount of time that the rule threshold must be exceeded to send an alert
87
88
notification. The final value must be equivalent to one of the following 8
88
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
89
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
90
- least one unit must be provided.
89
+ values ["1m","5m","10m","15m","20m","30m","45m","60m"].
91
90
92
91
name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
93
92
underscore (\\ __), dash (-), period (.), and tilde (~). You can’t have a space in
@@ -140,7 +139,7 @@ def update(
140
139
self ,
141
140
* ,
142
141
account_id : str ,
143
- duration : str ,
142
+ duration : Literal [ "1m" , "5m" , "10m" , "15m" , "20m" , "30m" , "45m" , "60m" ] ,
144
143
name : str ,
145
144
id : str | NotGiven = NOT_GIVEN ,
146
145
automatic_advertisement : Optional [bool ] | NotGiven = NOT_GIVEN ,
@@ -160,9 +159,7 @@ def update(
160
159
Args:
161
160
duration: The amount of time that the rule threshold must be exceeded to send an alert
162
161
notification. The final value must be equivalent to one of the following 8
163
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
164
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
165
- least one unit must be provided.
162
+ values ["1m","5m","10m","15m","20m","30m","45m","60m"].
166
163
167
164
name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
168
165
underscore (\\ __), dash (-), period (.), and tilde (~). You can’t have a space in
@@ -297,7 +294,7 @@ def edit(
297
294
account_id : str ,
298
295
automatic_advertisement : Optional [bool ] | NotGiven = NOT_GIVEN ,
299
296
bandwidth : float | NotGiven = NOT_GIVEN ,
300
- duration : str | NotGiven = NOT_GIVEN ,
297
+ duration : Literal [ "1m" , "5m" , "10m" , "15m" , "20m" , "30m" , "45m" , "60m" ] | NotGiven = NOT_GIVEN ,
301
298
name : str | NotGiven = NOT_GIVEN ,
302
299
packet_threshold : float | NotGiven = NOT_GIVEN ,
303
300
prefixes : List [str ] | NotGiven = NOT_GIVEN ,
@@ -323,9 +320,7 @@ def edit(
323
320
324
321
duration: The amount of time that the rule threshold must be exceeded to send an alert
325
322
notification. The final value must be equivalent to one of the following 8
326
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
327
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
328
- least one unit must be provided.
323
+ values ["1m","5m","10m","15m","20m","30m","45m","60m"].
329
324
330
325
name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
331
326
underscore (\\ __), dash (-), period (.), and tilde (~). You can’t have a space in
@@ -440,7 +435,7 @@ async def create(
440
435
self ,
441
436
* ,
442
437
account_id : str ,
443
- duration : str ,
438
+ duration : Literal [ "1m" , "5m" , "10m" , "15m" , "20m" , "30m" , "45m" , "60m" ] ,
444
439
name : str ,
445
440
automatic_advertisement : Optional [bool ] | NotGiven = NOT_GIVEN ,
446
441
bandwidth : float | NotGiven = NOT_GIVEN ,
@@ -461,9 +456,7 @@ async def create(
461
456
Args:
462
457
duration: The amount of time that the rule threshold must be exceeded to send an alert
463
458
notification. The final value must be equivalent to one of the following 8
464
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
465
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
466
- least one unit must be provided.
459
+ values ["1m","5m","10m","15m","20m","30m","45m","60m"].
467
460
468
461
name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
469
462
underscore (\\ __), dash (-), period (.), and tilde (~). You can’t have a space in
@@ -516,7 +509,7 @@ async def update(
516
509
self ,
517
510
* ,
518
511
account_id : str ,
519
- duration : str ,
512
+ duration : Literal [ "1m" , "5m" , "10m" , "15m" , "20m" , "30m" , "45m" , "60m" ] ,
520
513
name : str ,
521
514
id : str | NotGiven = NOT_GIVEN ,
522
515
automatic_advertisement : Optional [bool ] | NotGiven = NOT_GIVEN ,
@@ -536,9 +529,7 @@ async def update(
536
529
Args:
537
530
duration: The amount of time that the rule threshold must be exceeded to send an alert
538
531
notification. The final value must be equivalent to one of the following 8
539
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
540
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
541
- least one unit must be provided.
532
+ values ["1m","5m","10m","15m","20m","30m","45m","60m"].
542
533
543
534
name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
544
535
underscore (\\ __), dash (-), period (.), and tilde (~). You can’t have a space in
@@ -673,7 +664,7 @@ async def edit(
673
664
account_id : str ,
674
665
automatic_advertisement : Optional [bool ] | NotGiven = NOT_GIVEN ,
675
666
bandwidth : float | NotGiven = NOT_GIVEN ,
676
- duration : str | NotGiven = NOT_GIVEN ,
667
+ duration : Literal [ "1m" , "5m" , "10m" , "15m" , "20m" , "30m" , "45m" , "60m" ] | NotGiven = NOT_GIVEN ,
677
668
name : str | NotGiven = NOT_GIVEN ,
678
669
packet_threshold : float | NotGiven = NOT_GIVEN ,
679
670
prefixes : List [str ] | NotGiven = NOT_GIVEN ,
@@ -699,9 +690,7 @@ async def edit(
699
690
700
691
duration: The amount of time that the rule threshold must be exceeded to send an alert
701
692
notification. The final value must be equivalent to one of the following 8
702
- values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
703
- AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
704
- least one unit must be provided.
693
+ values ["1m","5m","10m","15m","20m","30m","45m","60m"].
705
694
706
695
name: The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
707
696
underscore (\\ __), dash (-), period (.), and tilde (~). You can’t have a space in
0 commit comments