Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Jul 12, 2024
1 parent 13c692a commit ead688f
Show file tree
Hide file tree
Showing 22 changed files with 1,710 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1252
configured_endpoints: 1256
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml
31 changes: 31 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6935,6 +6935,22 @@ Methods:

- <code title="get /radar/traffic_anomalies/locations">client.radar.traffic_anomalies.locations.<a href="./src/cloudflare/resources/radar/traffic_anomalies/locations.py">get</a>(\*\*<a href="src/cloudflare/types/radar/traffic_anomalies/location_get_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/traffic_anomalies/location_get_response.py">LocationGetResponse</a></code>

## TCPResetsTimeouts

Types:

```python
from cloudflare.types.radar import (
TCPResetsTimeoutSummaryResponse,
TCPResetsTimeoutTimeseriesGroupsResponse,
)
```

Methods:

- <code title="get /radar/tcp_resets_timeouts/summary">client.radar.tcp_resets_timeouts.<a href="./src/cloudflare/resources/radar/tcp_resets_timeouts.py">summary</a>(\*\*<a href="src/cloudflare/types/radar/tcp_resets_timeout_summary_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/tcp_resets_timeout_summary_response.py">TCPResetsTimeoutSummaryResponse</a></code>
- <code title="get /radar/tcp_resets_timeouts/timeseries_groups">client.radar.tcp_resets_timeouts.<a href="./src/cloudflare/resources/radar/tcp_resets_timeouts.py">timeseries_groups</a>(\*\*<a href="src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_response.py">TCPResetsTimeoutTimeseriesGroupsResponse</a></code>

# BotManagement

Types:
Expand Down Expand Up @@ -7312,3 +7328,18 @@ Methods:
- <code title="get /accounts/{account_id}/iam/resource_groups">client.iam.resource_groups.<a href="./src/cloudflare/resources/iam/resource_groups.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/iam/resource_group_list_params.py">params</a>) -> <a href="./src/cloudflare/types/iam/resource_group_list_response.py">SyncV4PagePaginationArray[object]</a></code>
- <code title="delete /accounts/{account_id}/iam/resource_groups/{resource_group_id}">client.iam.resource_groups.<a href="./src/cloudflare/resources/iam/resource_groups.py">delete</a>(resource_group_id, \*, account_id) -> <a href="./src/cloudflare/types/iam/resource_group_delete_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/iam/resource_groups/{resource_group_id}">client.iam.resource_groups.<a href="./src/cloudflare/resources/iam/resource_groups.py">get</a>(resource_group_id, \*, account_id) -> <a href="./src/cloudflare/types/iam/resource_group_get_response.py">ResourceGroupGetResponse</a></code>

# CloudConnector

## Rules

Types:

```python
from cloudflare.types.cloud_connector import RuleUpdateResponse, RuleListResponse
```

Methods:

- <code title="put /zones/{zone_id}/cloud_connector/rules">client.cloud_connector.rules.<a href="./src/cloudflare/resources/cloud_connector/rules.py">update</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/cloud_connector/rule_update_params.py">params</a>) -> <a href="./src/cloudflare/types/cloud_connector/rule_update_response.py">Optional</a></code>
- <code title="get /zones/{zone_id}/cloud_connector/rules">client.cloud_connector.rules.<a href="./src/cloudflare/resources/cloud_connector/rules.py">list</a>(\*, zone_id) -> <a href="./src/cloudflare/types/cloud_connector/rule_list_response.py">SyncSinglePage[RuleListResponse]</a></code>
8 changes: 8 additions & 0 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class Cloudflare(SyncAPIClient):
event_notifications: resources.EventNotificationsResource
ai_gateway: resources.AIGatewayResource
iam: resources.IAMResource
cloud_connector: resources.CloudConnectorResource
with_raw_response: CloudflareWithRawResponse
with_streaming_response: CloudflareWithStreamedResponse

Expand Down Expand Up @@ -290,6 +291,7 @@ def __init__(
self.event_notifications = resources.EventNotificationsResource(self)
self.ai_gateway = resources.AIGatewayResource(self)
self.iam = resources.IAMResource(self)
self.cloud_connector = resources.CloudConnectorResource(self)
self.with_raw_response = CloudflareWithRawResponse(self)
self.with_streaming_response = CloudflareWithStreamedResponse(self)

Expand Down Expand Up @@ -552,6 +554,7 @@ class AsyncCloudflare(AsyncAPIClient):
event_notifications: resources.AsyncEventNotificationsResource
ai_gateway: resources.AsyncAIGatewayResource
iam: resources.AsyncIAMResource
cloud_connector: resources.AsyncCloudConnectorResource
with_raw_response: AsyncCloudflareWithRawResponse
with_streaming_response: AsyncCloudflareWithStreamedResponse

Expand Down Expand Up @@ -711,6 +714,7 @@ def __init__(
self.event_notifications = resources.AsyncEventNotificationsResource(self)
self.ai_gateway = resources.AsyncAIGatewayResource(self)
self.iam = resources.AsyncIAMResource(self)
self.cloud_connector = resources.AsyncCloudConnectorResource(self)
self.with_raw_response = AsyncCloudflareWithRawResponse(self)
self.with_streaming_response = AsyncCloudflareWithStreamedResponse(self)

Expand Down Expand Up @@ -984,6 +988,7 @@ def __init__(self, client: Cloudflare) -> None:
self.event_notifications = resources.EventNotificationsResourceWithRawResponse(client.event_notifications)
self.ai_gateway = resources.AIGatewayResourceWithRawResponse(client.ai_gateway)
self.iam = resources.IAMResourceWithRawResponse(client.iam)
self.cloud_connector = resources.CloudConnectorResourceWithRawResponse(client.cloud_connector)


class AsyncCloudflareWithRawResponse:
Expand Down Expand Up @@ -1086,6 +1091,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.event_notifications = resources.AsyncEventNotificationsResourceWithRawResponse(client.event_notifications)
self.ai_gateway = resources.AsyncAIGatewayResourceWithRawResponse(client.ai_gateway)
self.iam = resources.AsyncIAMResourceWithRawResponse(client.iam)
self.cloud_connector = resources.AsyncCloudConnectorResourceWithRawResponse(client.cloud_connector)


class CloudflareWithStreamedResponse:
Expand Down Expand Up @@ -1188,6 +1194,7 @@ def __init__(self, client: Cloudflare) -> None:
self.event_notifications = resources.EventNotificationsResourceWithStreamingResponse(client.event_notifications)
self.ai_gateway = resources.AIGatewayResourceWithStreamingResponse(client.ai_gateway)
self.iam = resources.IAMResourceWithStreamingResponse(client.iam)
self.cloud_connector = resources.CloudConnectorResourceWithStreamingResponse(client.cloud_connector)


class AsyncCloudflareWithStreamedResponse:
Expand Down Expand Up @@ -1298,6 +1305,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
)
self.ai_gateway = resources.AsyncAIGatewayResourceWithStreamingResponse(client.ai_gateway)
self.iam = resources.AsyncIAMResourceWithStreamingResponse(client.iam)
self.cloud_connector = resources.AsyncCloudConnectorResourceWithStreamingResponse(client.cloud_connector)


Client = Cloudflare
Expand Down
14 changes: 14 additions & 0 deletions src/cloudflare/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,14 @@
WARPConnectorResourceWithStreamingResponse,
AsyncWARPConnectorResourceWithStreamingResponse,
)
from .cloud_connector import (
CloudConnectorResource,
AsyncCloudConnectorResource,
CloudConnectorResourceWithRawResponse,
AsyncCloudConnectorResourceWithRawResponse,
CloudConnectorResourceWithStreamingResponse,
AsyncCloudConnectorResourceWithStreamingResponse,
)
from .durable_objects import (
DurableObjectsResource,
AsyncDurableObjectsResource,
Expand Down Expand Up @@ -1178,4 +1186,10 @@
"AsyncIAMResourceWithRawResponse",
"IAMResourceWithStreamingResponse",
"AsyncIAMResourceWithStreamingResponse",
"CloudConnectorResource",
"AsyncCloudConnectorResource",
"CloudConnectorResourceWithRawResponse",
"AsyncCloudConnectorResourceWithRawResponse",
"CloudConnectorResourceWithStreamingResponse",
"AsyncCloudConnectorResourceWithStreamingResponse",
]
33 changes: 33 additions & 0 deletions src/cloudflare/resources/cloud_connector/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .rules import (
RulesResource,
AsyncRulesResource,
RulesResourceWithRawResponse,
AsyncRulesResourceWithRawResponse,
RulesResourceWithStreamingResponse,
AsyncRulesResourceWithStreamingResponse,
)
from .cloud_connector import (
CloudConnectorResource,
AsyncCloudConnectorResource,
CloudConnectorResourceWithRawResponse,
AsyncCloudConnectorResourceWithRawResponse,
CloudConnectorResourceWithStreamingResponse,
AsyncCloudConnectorResourceWithStreamingResponse,
)

__all__ = [
"RulesResource",
"AsyncRulesResource",
"RulesResourceWithRawResponse",
"AsyncRulesResourceWithRawResponse",
"RulesResourceWithStreamingResponse",
"AsyncRulesResourceWithStreamingResponse",
"CloudConnectorResource",
"AsyncCloudConnectorResource",
"CloudConnectorResourceWithRawResponse",
"AsyncCloudConnectorResourceWithRawResponse",
"CloudConnectorResourceWithStreamingResponse",
"AsyncCloudConnectorResourceWithStreamingResponse",
]
80 changes: 80 additions & 0 deletions src/cloudflare/resources/cloud_connector/cloud_connector.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from .rules import (
RulesResource,
AsyncRulesResource,
RulesResourceWithRawResponse,
AsyncRulesResourceWithRawResponse,
RulesResourceWithStreamingResponse,
AsyncRulesResourceWithStreamingResponse,
)
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource

__all__ = ["CloudConnectorResource", "AsyncCloudConnectorResource"]


class CloudConnectorResource(SyncAPIResource):
@cached_property
def rules(self) -> RulesResource:
return RulesResource(self._client)

@cached_property
def with_raw_response(self) -> CloudConnectorResourceWithRawResponse:
return CloudConnectorResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> CloudConnectorResourceWithStreamingResponse:
return CloudConnectorResourceWithStreamingResponse(self)


class AsyncCloudConnectorResource(AsyncAPIResource):
@cached_property
def rules(self) -> AsyncRulesResource:
return AsyncRulesResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncCloudConnectorResourceWithRawResponse:
return AsyncCloudConnectorResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncCloudConnectorResourceWithStreamingResponse:
return AsyncCloudConnectorResourceWithStreamingResponse(self)


class CloudConnectorResourceWithRawResponse:
def __init__(self, cloud_connector: CloudConnectorResource) -> None:
self._cloud_connector = cloud_connector

@cached_property
def rules(self) -> RulesResourceWithRawResponse:
return RulesResourceWithRawResponse(self._cloud_connector.rules)


class AsyncCloudConnectorResourceWithRawResponse:
def __init__(self, cloud_connector: AsyncCloudConnectorResource) -> None:
self._cloud_connector = cloud_connector

@cached_property
def rules(self) -> AsyncRulesResourceWithRawResponse:
return AsyncRulesResourceWithRawResponse(self._cloud_connector.rules)


class CloudConnectorResourceWithStreamingResponse:
def __init__(self, cloud_connector: CloudConnectorResource) -> None:
self._cloud_connector = cloud_connector

@cached_property
def rules(self) -> RulesResourceWithStreamingResponse:
return RulesResourceWithStreamingResponse(self._cloud_connector.rules)


class AsyncCloudConnectorResourceWithStreamingResponse:
def __init__(self, cloud_connector: AsyncCloudConnectorResource) -> None:
self._cloud_connector = cloud_connector

@cached_property
def rules(self) -> AsyncRulesResourceWithStreamingResponse:
return AsyncRulesResourceWithStreamingResponse(self._cloud_connector.rules)
Loading

0 comments on commit ead688f

Please sign in to comment.