Skip to content

Commit ba98c8f

Browse files
feat(api): api update
1 parent 45772c9 commit ba98c8f

9 files changed

Lines changed: 88 additions & 14 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1809
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-934be1deaed159fe2090b7081ad3149e2b0505fdcde8d408dbca4a215da21b93.yml
3-
openapi_spec_hash: f3339d41b39951a23a5b3b5d6960abd4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-25c5f75db599e7cb7e77f0184c0bb0702eb72d8f09188a24a0ee9e2c1ac13b84.yml
3+
openapi_spec_hash: 215abfe391fbcb874adba0fa692b0619
44
config_hash: 9f61e9f02b675e373b140471d52b670c

src/cloudflare/resources/ai_gateway/ai_gateway.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def update(
190190
rate_limiting_limit: Optional[int],
191191
rate_limiting_technique: Literal["fixed", "sliding"],
192192
authentication: bool | NotGiven = NOT_GIVEN,
193+
dlp: ai_gateway_update_params.DLP | NotGiven = NOT_GIVEN,
193194
log_management: Optional[int] | NotGiven = NOT_GIVEN,
194195
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
195196
logpush: bool | NotGiven = NOT_GIVEN,
@@ -231,6 +232,7 @@ def update(
231232
"rate_limiting_limit": rate_limiting_limit,
232233
"rate_limiting_technique": rate_limiting_technique,
233234
"authentication": authentication,
235+
"dlp": dlp,
234236
"log_management": log_management,
235237
"log_management_strategy": log_management_strategy,
236238
"logpush": logpush,
@@ -504,6 +506,7 @@ async def update(
504506
rate_limiting_limit: Optional[int],
505507
rate_limiting_technique: Literal["fixed", "sliding"],
506508
authentication: bool | NotGiven = NOT_GIVEN,
509+
dlp: ai_gateway_update_params.DLP | NotGiven = NOT_GIVEN,
507510
log_management: Optional[int] | NotGiven = NOT_GIVEN,
508511
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] | NotGiven = NOT_GIVEN,
509512
logpush: bool | NotGiven = NOT_GIVEN,
@@ -545,6 +548,7 @@ async def update(
545548
"rate_limiting_limit": rate_limiting_limit,
546549
"rate_limiting_technique": rate_limiting_technique,
547550
"authentication": authentication,
551+
"dlp": dlp,
548552
"log_management": log_management,
549553
"log_management_strategy": log_management_strategy,
550554
"logpush": logpush,

src/cloudflare/types/ai_gateway/ai_gateway_create_response.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
3+
from typing import List, Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

77
from ..._models import BaseModel
88

9-
__all__ = ["AIGatewayCreateResponse"]
9+
__all__ = ["AIGatewayCreateResponse", "DLP"]
10+
11+
12+
class DLP(BaseModel):
13+
action: Literal["BLOCK", "FLAG"]
14+
15+
enabled: bool
16+
17+
profiles: List[str]
1018

1119

1220
class AIGatewayCreateResponse(BaseModel):
@@ -37,6 +45,8 @@ class AIGatewayCreateResponse(BaseModel):
3745

3846
authentication: Optional[bool] = None
3947

48+
dlp: Optional[DLP] = None
49+
4050
log_management: Optional[int] = None
4151

4252
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] = None

src/cloudflare/types/ai_gateway/ai_gateway_delete_response.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
3+
from typing import List, Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

77
from ..._models import BaseModel
88

9-
__all__ = ["AIGatewayDeleteResponse"]
9+
__all__ = ["AIGatewayDeleteResponse", "DLP"]
10+
11+
12+
class DLP(BaseModel):
13+
action: Literal["BLOCK", "FLAG"]
14+
15+
enabled: bool
16+
17+
profiles: List[str]
1018

1119

1220
class AIGatewayDeleteResponse(BaseModel):
@@ -37,6 +45,8 @@ class AIGatewayDeleteResponse(BaseModel):
3745

3846
authentication: Optional[bool] = None
3947

48+
dlp: Optional[DLP] = None
49+
4050
log_management: Optional[int] = None
4151

4252
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] = None

src/cloudflare/types/ai_gateway/ai_gateway_get_response.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
3+
from typing import List, Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

77
from ..._models import BaseModel
88

9-
__all__ = ["AIGatewayGetResponse"]
9+
__all__ = ["AIGatewayGetResponse", "DLP"]
10+
11+
12+
class DLP(BaseModel):
13+
action: Literal["BLOCK", "FLAG"]
14+
15+
enabled: bool
16+
17+
profiles: List[str]
1018

1119

1220
class AIGatewayGetResponse(BaseModel):
@@ -37,6 +45,8 @@ class AIGatewayGetResponse(BaseModel):
3745

3846
authentication: Optional[bool] = None
3947

48+
dlp: Optional[DLP] = None
49+
4050
log_management: Optional[int] = None
4151

4252
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] = None

src/cloudflare/types/ai_gateway/ai_gateway_list_response.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
3+
from typing import List, Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

77
from ..._models import BaseModel
88

9-
__all__ = ["AIGatewayListResponse"]
9+
__all__ = ["AIGatewayListResponse", "DLP"]
10+
11+
12+
class DLP(BaseModel):
13+
action: Literal["BLOCK", "FLAG"]
14+
15+
enabled: bool
16+
17+
profiles: List[str]
1018

1119

1220
class AIGatewayListResponse(BaseModel):
@@ -37,6 +45,8 @@ class AIGatewayListResponse(BaseModel):
3745

3846
authentication: Optional[bool] = None
3947

48+
dlp: Optional[DLP] = None
49+
4050
log_management: Optional[int] = None
4151

4252
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] = None

src/cloudflare/types/ai_gateway/ai_gateway_update_params.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
from __future__ import annotations
44

5-
from typing import Optional
5+
from typing import List, Optional
66
from typing_extensions import Literal, Required, TypedDict
77

8-
__all__ = ["AIGatewayUpdateParams"]
8+
__all__ = ["AIGatewayUpdateParams", "DLP"]
99

1010

1111
class AIGatewayUpdateParams(TypedDict, total=False):
@@ -25,6 +25,8 @@ class AIGatewayUpdateParams(TypedDict, total=False):
2525

2626
authentication: bool
2727

28+
dlp: DLP
29+
2830
log_management: Optional[int]
2931

3032
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]]
@@ -34,3 +36,11 @@ class AIGatewayUpdateParams(TypedDict, total=False):
3436
logpush_public_key: Optional[str]
3537

3638
store_id: Optional[str]
39+
40+
41+
class DLP(TypedDict, total=False):
42+
action: Required[Literal["BLOCK", "FLAG"]]
43+
44+
enabled: Required[bool]
45+
46+
profiles: Required[List[str]]

src/cloudflare/types/ai_gateway/ai_gateway_update_response.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
3+
from typing import List, Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

77
from ..._models import BaseModel
88

9-
__all__ = ["AIGatewayUpdateResponse"]
9+
__all__ = ["AIGatewayUpdateResponse", "DLP"]
10+
11+
12+
class DLP(BaseModel):
13+
action: Literal["BLOCK", "FLAG"]
14+
15+
enabled: bool
16+
17+
profiles: List[str]
1018

1119

1220
class AIGatewayUpdateResponse(BaseModel):
@@ -37,6 +45,8 @@ class AIGatewayUpdateResponse(BaseModel):
3745

3846
authentication: Optional[bool] = None
3947

48+
dlp: Optional[DLP] = None
49+
4050
log_management: Optional[int] = None
4151

4252
log_management_strategy: Optional[Literal["STOP_INSERTING", "DELETE_OLDEST"]] = None

tests/api_resources/test_ai_gateway.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
135135
rate_limiting_limit=0,
136136
rate_limiting_technique="fixed",
137137
authentication=True,
138+
dlp={
139+
"action": "BLOCK",
140+
"enabled": True,
141+
"profiles": ["string"],
142+
},
138143
log_management=10000,
139144
log_management_strategy="STOP_INSERTING",
140145
logpush=True,
@@ -468,6 +473,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
468473
rate_limiting_limit=0,
469474
rate_limiting_technique="fixed",
470475
authentication=True,
476+
dlp={
477+
"action": "BLOCK",
478+
"enabled": True,
479+
"profiles": ["string"],
480+
},
471481
log_management=10000,
472482
log_management_strategy="STOP_INSERTING",
473483
logpush=True,

0 commit comments

Comments
 (0)