|
1 | 1 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
2 | 2 |
|
3 | | -from typing import Union, Optional |
4 | | -from typing_extensions import TypeAlias |
| 3 | +from typing import Optional |
| 4 | +from typing_extensions import Literal |
5 | 5 |
|
6 | | -__all__ = ["UARuleCreateResponse"] |
| 6 | +from ..._models import BaseModel |
7 | 7 |
|
8 | | -UARuleCreateResponse: TypeAlias = Union[Optional[str], Optional[object]] |
| 8 | +__all__ = ["UARuleCreateResponse", "Configuration"] |
| 9 | + |
| 10 | + |
| 11 | +class Configuration(BaseModel): |
| 12 | + target: Optional[str] = None |
| 13 | + """The configuration target for this rule. |
| 14 | +
|
| 15 | + You must set the target to `ua` for User Agent Blocking rules. |
| 16 | + """ |
| 17 | + |
| 18 | + value: Optional[str] = None |
| 19 | + """The exact user agent string to match. |
| 20 | +
|
| 21 | + This value will be compared to the received `User-Agent` HTTP header value. |
| 22 | + """ |
| 23 | + |
| 24 | + |
| 25 | +class UARuleCreateResponse(BaseModel): |
| 26 | + id: Optional[str] = None |
| 27 | + """The unique identifier of the User Agent Blocking rule.""" |
| 28 | + |
| 29 | + configuration: Optional[Configuration] = None |
| 30 | + """The configuration object for the current rule.""" |
| 31 | + |
| 32 | + description: Optional[str] = None |
| 33 | + """An informative summary of the rule.""" |
| 34 | + |
| 35 | + mode: Optional[Literal["block", "challenge", "js_challenge", "managed_challenge"]] = None |
| 36 | + """The action to apply to a matched request.""" |
| 37 | + |
| 38 | + paused: Optional[bool] = None |
| 39 | + """When true, indicates that the rule is currently paused.""" |
0 commit comments