Skip to content

chore(internal): codegen related update #2176

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

Merged
merged 1 commit into from
Nov 20, 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 .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1411
configured_endpoints: 1435
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-829ade7062fed63a30accc2a5e1a14c6c26fd4dc003d300d1b25a5416b8b8727.yml
200 changes: 185 additions & 15 deletions api.md

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
origin_ca_certificates,
origin_tls_client_auth,
certificate_authorities,
leaked_credential_checks,
magic_network_monitoring,
origin_post_quantum_encryption,
)
Expand Down Expand Up @@ -718,6 +719,12 @@ def resource_sharing(self) -> resource_sharing.ResourceSharingResource:

return ResourceSharingResource(self)

@cached_property
def leaked_credential_checks(self) -> leaked_credential_checks.LeakedCredentialChecksResource:
from .resources.leaked_credential_checks import LeakedCredentialChecksResource

return LeakedCredentialChecksResource(self)

@cached_property
def with_raw_response(self) -> CloudflareWithRawResponse:
return CloudflareWithRawResponse(self)
Expand Down Expand Up @@ -1483,6 +1490,12 @@ def resource_sharing(self) -> resource_sharing.AsyncResourceSharingResource:

return AsyncResourceSharingResource(self)

@cached_property
def leaked_credential_checks(self) -> leaked_credential_checks.AsyncLeakedCredentialChecksResource:
from .resources.leaked_credential_checks import AsyncLeakedCredentialChecksResource

return AsyncLeakedCredentialChecksResource(self)

@cached_property
def with_raw_response(self) -> AsyncCloudflareWithRawResponse:
return AsyncCloudflareWithRawResponse(self)
Expand Down Expand Up @@ -2183,6 +2196,12 @@ def resource_sharing(self) -> resource_sharing.ResourceSharingResourceWithRawRes

return ResourceSharingResourceWithRawResponse(self._client.resource_sharing)

@cached_property
def leaked_credential_checks(self) -> leaked_credential_checks.LeakedCredentialChecksResourceWithRawResponse:
from .resources.leaked_credential_checks import LeakedCredentialChecksResourceWithRawResponse

return LeakedCredentialChecksResourceWithRawResponse(self._client.leaked_credential_checks)


class AsyncCloudflareWithRawResponse:
_client: AsyncCloudflare
Expand Down Expand Up @@ -2702,6 +2721,12 @@ def resource_sharing(self) -> resource_sharing.AsyncResourceSharingResourceWithR

return AsyncResourceSharingResourceWithRawResponse(self._client.resource_sharing)

@cached_property
def leaked_credential_checks(self) -> leaked_credential_checks.AsyncLeakedCredentialChecksResourceWithRawResponse:
from .resources.leaked_credential_checks import AsyncLeakedCredentialChecksResourceWithRawResponse

return AsyncLeakedCredentialChecksResourceWithRawResponse(self._client.leaked_credential_checks)


class CloudflareWithStreamedResponse:
_client: Cloudflare
Expand Down Expand Up @@ -3221,6 +3246,12 @@ def resource_sharing(self) -> resource_sharing.ResourceSharingResourceWithStream

return ResourceSharingResourceWithStreamingResponse(self._client.resource_sharing)

@cached_property
def leaked_credential_checks(self) -> leaked_credential_checks.LeakedCredentialChecksResourceWithStreamingResponse:
from .resources.leaked_credential_checks import LeakedCredentialChecksResourceWithStreamingResponse

return LeakedCredentialChecksResourceWithStreamingResponse(self._client.leaked_credential_checks)


class AsyncCloudflareWithStreamedResponse:
_client: AsyncCloudflare
Expand Down Expand Up @@ -3748,6 +3779,14 @@ def resource_sharing(self) -> resource_sharing.AsyncResourceSharingResourceWithS

return AsyncResourceSharingResourceWithStreamingResponse(self._client.resource_sharing)

@cached_property
def leaked_credential_checks(
self,
) -> leaked_credential_checks.AsyncLeakedCredentialChecksResourceWithStreamingResponse:
from .resources.leaked_credential_checks import AsyncLeakedCredentialChecksResourceWithStreamingResponse

return AsyncLeakedCredentialChecksResourceWithStreamingResponse(self._client.leaked_credential_checks)


Client = Cloudflare

Expand Down
18 changes: 18 additions & 0 deletions src/cloudflare/resources/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .leaked_credential_checks import (
LeakedCredentialChecksResource,
AsyncLeakedCredentialChecksResource,
LeakedCredentialChecksResourceWithRawResponse,
AsyncLeakedCredentialChecksResourceWithRawResponse,
LeakedCredentialChecksResourceWithStreamingResponse,
AsyncLeakedCredentialChecksResourceWithStreamingResponse,
)

__all__ = [
"LeakedCredentialChecksResource",
"AsyncLeakedCredentialChecksResource",
"LeakedCredentialChecksResourceWithRawResponse",
"AsyncLeakedCredentialChecksResourceWithRawResponse",
"LeakedCredentialChecksResourceWithStreamingResponse",
"AsyncLeakedCredentialChecksResourceWithStreamingResponse",
]
14 changes: 14 additions & 0 deletions src/cloudflare/resources/email_security/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
InvestigateResourceWithStreamingResponse,
AsyncInvestigateResourceWithStreamingResponse,
)
from .submissions import (
SubmissionsResource,
AsyncSubmissionsResource,
SubmissionsResourceWithRawResponse,
AsyncSubmissionsResourceWithRawResponse,
SubmissionsResourceWithStreamingResponse,
AsyncSubmissionsResourceWithStreamingResponse,
)
from .email_security import (
EmailSecurityResource,
AsyncEmailSecurityResource,
Expand All @@ -38,6 +46,12 @@
"AsyncSettingsResourceWithRawResponse",
"SettingsResourceWithStreamingResponse",
"AsyncSettingsResourceWithStreamingResponse",
"SubmissionsResource",
"AsyncSubmissionsResource",
"SubmissionsResourceWithRawResponse",
"AsyncSubmissionsResourceWithRawResponse",
"SubmissionsResourceWithStreamingResponse",
"AsyncSubmissionsResourceWithStreamingResponse",
"EmailSecurityResource",
"AsyncEmailSecurityResource",
"EmailSecurityResourceWithRawResponse",
Expand Down
33 changes: 33 additions & 0 deletions src/cloudflare/resources/email_security/email_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@
InvestigateResourceWithStreamingResponse,
AsyncInvestigateResourceWithStreamingResponse,
)
from .submissions import (
SubmissionsResource,
AsyncSubmissionsResource,
SubmissionsResourceWithRawResponse,
AsyncSubmissionsResourceWithRawResponse,
SubmissionsResourceWithStreamingResponse,
AsyncSubmissionsResourceWithStreamingResponse,
)
from .settings.settings import SettingsResource, AsyncSettingsResource
from .investigate.investigate import InvestigateResource, AsyncInvestigateResource

__all__ = ["EmailSecurityResource", "AsyncEmailSecurityResource"]

Expand All @@ -34,6 +43,10 @@ def investigate(self) -> InvestigateResource:
def settings(self) -> SettingsResource:
return SettingsResource(self._client)

@cached_property
def submissions(self) -> SubmissionsResource:
return SubmissionsResource(self._client)

@cached_property
def with_raw_response(self) -> EmailSecurityResourceWithRawResponse:
"""
Expand Down Expand Up @@ -63,6 +76,10 @@ def investigate(self) -> AsyncInvestigateResource:
def settings(self) -> AsyncSettingsResource:
return AsyncSettingsResource(self._client)

@cached_property
def submissions(self) -> AsyncSubmissionsResource:
return AsyncSubmissionsResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncEmailSecurityResourceWithRawResponse:
"""
Expand Down Expand Up @@ -95,6 +112,10 @@ def investigate(self) -> InvestigateResourceWithRawResponse:
def settings(self) -> SettingsResourceWithRawResponse:
return SettingsResourceWithRawResponse(self._email_security.settings)

@cached_property
def submissions(self) -> SubmissionsResourceWithRawResponse:
return SubmissionsResourceWithRawResponse(self._email_security.submissions)


class AsyncEmailSecurityResourceWithRawResponse:
def __init__(self, email_security: AsyncEmailSecurityResource) -> None:
Expand All @@ -108,6 +129,10 @@ def investigate(self) -> AsyncInvestigateResourceWithRawResponse:
def settings(self) -> AsyncSettingsResourceWithRawResponse:
return AsyncSettingsResourceWithRawResponse(self._email_security.settings)

@cached_property
def submissions(self) -> AsyncSubmissionsResourceWithRawResponse:
return AsyncSubmissionsResourceWithRawResponse(self._email_security.submissions)


class EmailSecurityResourceWithStreamingResponse:
def __init__(self, email_security: EmailSecurityResource) -> None:
Expand All @@ -121,6 +146,10 @@ def investigate(self) -> InvestigateResourceWithStreamingResponse:
def settings(self) -> SettingsResourceWithStreamingResponse:
return SettingsResourceWithStreamingResponse(self._email_security.settings)

@cached_property
def submissions(self) -> SubmissionsResourceWithStreamingResponse:
return SubmissionsResourceWithStreamingResponse(self._email_security.submissions)


class AsyncEmailSecurityResourceWithStreamingResponse:
def __init__(self, email_security: AsyncEmailSecurityResource) -> None:
Expand All @@ -133,3 +162,7 @@ def investigate(self) -> AsyncInvestigateResourceWithStreamingResponse:
@cached_property
def settings(self) -> AsyncSettingsResourceWithStreamingResponse:
return AsyncSettingsResourceWithStreamingResponse(self._email_security.settings)

@cached_property
def submissions(self) -> AsyncSubmissionsResourceWithStreamingResponse:
return AsyncSubmissionsResourceWithStreamingResponse(self._email_security.submissions)
Loading