Skip to content

Commit bfb22ed

Browse files
feat: Remove the projects_enabled flag from the API
Stainless-Generated-From: 09a84c397ee49aeb50f6f2ba9937c2499fac4eb3
1 parent 888e8a2 commit bfb22ed

3 files changed

Lines changed: 16 additions & 80 deletions

File tree

‎src/kernel/_client.py‎

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,7 @@ def credentials(self) -> CredentialsResource:
316316

317317
@cached_property
318318
def projects(self) -> ProjectsResource:
319-
"""
320-
Create and manage projects for resource isolation within an organization.
321-
When projects are disabled for the organization, project operations return
322-
`404` with code `projects_disabled`.
323-
"""
319+
"""Create and manage projects for resource isolation within an organization."""
324320
from .resources.projects import ProjectsResource
325321

326322
return ProjectsResource(self)
@@ -729,11 +725,7 @@ def credentials(self) -> AsyncCredentialsResource:
729725

730726
@cached_property
731727
def projects(self) -> AsyncProjectsResource:
732-
"""
733-
Create and manage projects for resource isolation within an organization.
734-
When projects are disabled for the organization, project operations return
735-
`404` with code `projects_disabled`.
736-
"""
728+
"""Create and manage projects for resource isolation within an organization."""
737729
from .resources.projects import AsyncProjectsResource
738730

739731
return AsyncProjectsResource(self)
@@ -1042,11 +1034,7 @@ def credentials(self) -> credentials.CredentialsResourceWithRawResponse:
10421034

10431035
@cached_property
10441036
def projects(self) -> projects.ProjectsResourceWithRawResponse:
1045-
"""
1046-
Create and manage projects for resource isolation within an organization.
1047-
When projects are disabled for the organization, project operations return
1048-
`404` with code `projects_disabled`.
1049-
"""
1037+
"""Create and manage projects for resource isolation within an organization."""
10501038
from .resources.projects import ProjectsResourceWithRawResponse
10511039

10521040
return ProjectsResourceWithRawResponse(self._client.projects)
@@ -1187,11 +1175,7 @@ def credentials(self) -> credentials.AsyncCredentialsResourceWithRawResponse:
11871175

11881176
@cached_property
11891177
def projects(self) -> projects.AsyncProjectsResourceWithRawResponse:
1190-
"""
1191-
Create and manage projects for resource isolation within an organization.
1192-
When projects are disabled for the organization, project operations return
1193-
`404` with code `projects_disabled`.
1194-
"""
1178+
"""Create and manage projects for resource isolation within an organization."""
11951179
from .resources.projects import AsyncProjectsResourceWithRawResponse
11961180

11971181
return AsyncProjectsResourceWithRawResponse(self._client.projects)
@@ -1332,11 +1316,7 @@ def credentials(self) -> credentials.CredentialsResourceWithStreamingResponse:
13321316

13331317
@cached_property
13341318
def projects(self) -> projects.ProjectsResourceWithStreamingResponse:
1335-
"""
1336-
Create and manage projects for resource isolation within an organization.
1337-
When projects are disabled for the organization, project operations return
1338-
`404` with code `projects_disabled`.
1339-
"""
1319+
"""Create and manage projects for resource isolation within an organization."""
13401320
from .resources.projects import ProjectsResourceWithStreamingResponse
13411321

13421322
return ProjectsResourceWithStreamingResponse(self._client.projects)
@@ -1477,11 +1457,7 @@ def credentials(self) -> credentials.AsyncCredentialsResourceWithStreamingRespon
14771457

14781458
@cached_property
14791459
def projects(self) -> projects.AsyncProjectsResourceWithStreamingResponse:
1480-
"""
1481-
Create and manage projects for resource isolation within an organization.
1482-
When projects are disabled for the organization, project operations return
1483-
`404` with code `projects_disabled`.
1484-
"""
1460+
"""Create and manage projects for resource isolation within an organization."""
14851461
from .resources.projects import AsyncProjectsResourceWithStreamingResponse
14861462

14871463
return AsyncProjectsResourceWithStreamingResponse(self._client.projects)

‎src/kernel/resources/projects/limits.py‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@
2424

2525

2626
class LimitsResource(SyncAPIResource):
27-
"""
28-
Create and manage projects for resource isolation within an organization.
29-
When projects are disabled for the organization, project operations return
30-
`404` with code `projects_disabled`.
31-
"""
27+
"""Create and manage projects for resource isolation within an organization."""
3228

3329
@cached_property
3430
def with_raw_response(self) -> LimitsResourceWithRawResponse:
@@ -150,11 +146,7 @@ def update(
150146

151147

152148
class AsyncLimitsResource(AsyncAPIResource):
153-
"""
154-
Create and manage projects for resource isolation within an organization.
155-
When projects are disabled for the organization, project operations return
156-
`404` with code `projects_disabled`.
157-
"""
149+
"""Create and manage projects for resource isolation within an organization."""
158150

159151
@cached_property
160152
def with_raw_response(self) -> AsyncLimitsResourceWithRawResponse:

‎src/kernel/resources/projects/projects.py‎

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,11 @@
3333

3434

3535
class ProjectsResource(SyncAPIResource):
36-
"""
37-
Create and manage projects for resource isolation within an organization.
38-
When projects are disabled for the organization, project operations return
39-
`404` with code `projects_disabled`.
40-
"""
36+
"""Create and manage projects for resource isolation within an organization."""
4137

4238
@cached_property
4339
def limits(self) -> LimitsResource:
44-
"""
45-
Create and manage projects for resource isolation within an organization.
46-
When projects are disabled for the organization, project operations return
47-
`404` with code `projects_disabled`.
48-
"""
40+
"""Create and manage projects for resource isolation within an organization."""
4941
return LimitsResource(self._client)
5042

5143
@cached_property
@@ -295,19 +287,11 @@ def delete(
295287

296288

297289
class AsyncProjectsResource(AsyncAPIResource):
298-
"""
299-
Create and manage projects for resource isolation within an organization.
300-
When projects are disabled for the organization, project operations return
301-
`404` with code `projects_disabled`.
302-
"""
290+
"""Create and manage projects for resource isolation within an organization."""
303291

304292
@cached_property
305293
def limits(self) -> AsyncLimitsResource:
306-
"""
307-
Create and manage projects for resource isolation within an organization.
308-
When projects are disabled for the organization, project operations return
309-
`404` with code `projects_disabled`.
310-
"""
294+
"""Create and manage projects for resource isolation within an organization."""
311295
return AsyncLimitsResource(self._client)
312296

313297
@cached_property
@@ -578,11 +562,7 @@ def __init__(self, projects: ProjectsResource) -> None:
578562

579563
@cached_property
580564
def limits(self) -> LimitsResourceWithRawResponse:
581-
"""
582-
Create and manage projects for resource isolation within an organization.
583-
When projects are disabled for the organization, project operations return
584-
`404` with code `projects_disabled`.
585-
"""
565+
"""Create and manage projects for resource isolation within an organization."""
586566
return LimitsResourceWithRawResponse(self._projects.limits)
587567

588568

@@ -608,11 +588,7 @@ def __init__(self, projects: AsyncProjectsResource) -> None:
608588

609589
@cached_property
610590
def limits(self) -> AsyncLimitsResourceWithRawResponse:
611-
"""
612-
Create and manage projects for resource isolation within an organization.
613-
When projects are disabled for the organization, project operations return
614-
`404` with code `projects_disabled`.
615-
"""
591+
"""Create and manage projects for resource isolation within an organization."""
616592
return AsyncLimitsResourceWithRawResponse(self._projects.limits)
617593

618594

@@ -638,11 +614,7 @@ def __init__(self, projects: ProjectsResource) -> None:
638614

639615
@cached_property
640616
def limits(self) -> LimitsResourceWithStreamingResponse:
641-
"""
642-
Create and manage projects for resource isolation within an organization.
643-
When projects are disabled for the organization, project operations return
644-
`404` with code `projects_disabled`.
645-
"""
617+
"""Create and manage projects for resource isolation within an organization."""
646618
return LimitsResourceWithStreamingResponse(self._projects.limits)
647619

648620

@@ -668,9 +640,5 @@ def __init__(self, projects: AsyncProjectsResource) -> None:
668640

669641
@cached_property
670642
def limits(self) -> AsyncLimitsResourceWithStreamingResponse:
671-
"""
672-
Create and manage projects for resource isolation within an organization.
673-
When projects are disabled for the organization, project operations return
674-
`404` with code `projects_disabled`.
675-
"""
643+
"""Create and manage projects for resource isolation within an organization."""
676644
return AsyncLimitsResourceWithStreamingResponse(self._projects.limits)

0 commit comments

Comments
 (0)