Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #253

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4086,7 +4086,7 @@ Methods:
Types:

```python
from cloudflare.types.request_tracers import Trace, TraceCreateResponse
from cloudflare.types.request_tracers import Trace, TraceItem, TraceCreateResponse
```

Methods:
Expand Down
1 change: 1 addition & 0 deletions src/cloudflare/types/request_tracers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
from __future__ import annotations

from .trace import Trace as Trace
from .trace_item import TraceItem as TraceItem
from .trace_create_params import TraceCreateParams as TraceCreateParams
from .trace_create_response import TraceCreateResponse as TraceCreateResponse
35 changes: 4 additions & 31 deletions src/cloudflare/types/request_tracers/trace.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from __future__ import annotations

from ..._models import BaseModel
from typing import List

__all__ = ["Trace"]

Trace = List["TraceItem"]

class Trace(BaseModel):
action: Optional[str] = None
"""If step type is rule, then action performed by this rule"""

action_parameters: Optional[object] = None
"""If step type is rule, then action parameters of this rule as JSON"""

description: Optional[str] = None
"""If step type is rule or ruleset, the description of this entity"""

expression: Optional[str] = None
"""If step type is rule, then expression used to match for this rule"""

kind: Optional[str] = None
"""If step type is ruleset, then kind of this ruleset"""

matched: Optional[bool] = None
"""Whether tracing step affected tracing request/response"""

name: Optional[str] = None
"""If step type is ruleset, then name of this ruleset"""

step_name: Optional[str] = None
"""Tracing step identifying name"""

trace: Optional[List[Trace]] = None

type: Optional[str] = None
"""Tracing step type"""
from .trace_item import TraceItem
16 changes: 13 additions & 3 deletions src/cloudflare/types/request_tracers/trace_create_response.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from __future__ import annotations

from .trace import Trace
from typing import Optional

from ..._compat import PYDANTIC_V2
from ..._models import BaseModel

__all__ = ["TraceCreateResponse"]
Expand All @@ -12,4 +14,12 @@ class TraceCreateResponse(BaseModel):
status_code: Optional[int] = None
"""HTTP Status code of zone response"""

trace: Optional[List[Trace]] = None
trace: Optional["Trace"] = None


from .trace import Trace

if PYDANTIC_V2:
TraceCreateResponse.model_rebuild()
else:
TraceCreateResponse.update_forward_refs() # type: ignore
49 changes: 49 additions & 0 deletions src/cloudflare/types/request_tracers/trace_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Optional

from ..._compat import PYDANTIC_V2
from ..._models import BaseModel

__all__ = ["TraceItem"]


class TraceItem(BaseModel):
action: Optional[str] = None
"""If step type is rule, then action performed by this rule"""

action_parameters: Optional[object] = None
"""If step type is rule, then action parameters of this rule as JSON"""

description: Optional[str] = None
"""If step type is rule or ruleset, the description of this entity"""

expression: Optional[str] = None
"""If step type is rule, then expression used to match for this rule"""

kind: Optional[str] = None
"""If step type is ruleset, then kind of this ruleset"""

matched: Optional[bool] = None
"""Whether tracing step affected tracing request/response"""

name: Optional[str] = None
"""If step type is ruleset, then name of this ruleset"""

step_name: Optional[str] = None
"""Tracing step identifying name"""

trace: Optional["Trace"] = None

type: Optional[str] = None
"""Tracing step type"""


from .trace import Trace

if PYDANTIC_V2:
TraceItem.model_rebuild()
else:
TraceItem.update_forward_refs() # type: ignore