Skip to content

Commit 772275a

Browse files
chore(api): update composite API spec
1 parent b9fbd21 commit 772275a

11 files changed

Lines changed: 4721 additions & 1073 deletions

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2232
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
3-
openapi_spec_hash: e53e5e8a8b0247835b06484b4382e0c4
3+
openapi_spec_hash: 20525f5883d4d78be797dee296df1442
44
config_hash: cef856e42543e49d9b09cb9eac20dc9e

ai_gateway/aigateway.go

Lines changed: 4202 additions & 1035 deletions
Large diffs are not rendered by default.

ai_gateway/aigateway_test.go

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,40 @@ func TestAIGatewayUpdateWithOptionalParams(t *testing.T) {
8787
Enabled: cloudflare.F(true),
8888
Profiles: cloudflare.F([]string{"string"}),
8989
}),
90+
Guardrails: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrails{
91+
Prompt: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPrompt{
92+
P1: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptP1Flag),
93+
S1: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS1Flag),
94+
S10: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS10Flag),
95+
S11: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS11Flag),
96+
S12: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS12Flag),
97+
S13: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS13Flag),
98+
S2: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS2Flag),
99+
S3: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS3Flag),
100+
S4: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS4Flag),
101+
S5: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS5Flag),
102+
S6: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS6Flag),
103+
S7: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS7Flag),
104+
S8: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS8Flag),
105+
S9: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsPromptS9Flag),
106+
}),
107+
Response: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponse{
108+
P1: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseP1Flag),
109+
S1: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS1Flag),
110+
S10: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS10Flag),
111+
S11: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS11Flag),
112+
S12: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS12Flag),
113+
S13: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS13Flag),
114+
S2: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS2Flag),
115+
S3: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS3Flag),
116+
S4: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS4Flag),
117+
S5: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS5Flag),
118+
S6: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS6Flag),
119+
S7: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS7Flag),
120+
S8: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS8Flag),
121+
S9: cloudflare.F(ai_gateway.AIGatewayUpdateParamsGuardrailsResponseS9Flag),
122+
}),
123+
}),
90124
LogManagement: cloudflare.F(int64(10000)),
91125
LogManagementStrategy: cloudflare.F(ai_gateway.AIGatewayUpdateParamsLogManagementStrategyStopInserting),
92126
Logpush: cloudflare.F(true),
@@ -96,7 +130,7 @@ func TestAIGatewayUpdateWithOptionalParams(t *testing.T) {
96130
Headers: cloudflare.F(map[string]string{
97131
"foo": "string",
98132
}),
99-
URL: cloudflare.F("url"),
133+
URL: cloudflare.F("https://example.com"),
100134
ContentType: cloudflare.F(ai_gateway.AIGatewayUpdateParamsOtelContentTypeJson),
101135
}}),
102136
RateLimitingTechnique: cloudflare.F(ai_gateway.AIGatewayUpdateParamsRateLimitingTechniqueFixed),

zero_trust/devicefleetstatus.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ type DeviceFleetStatusGetResponse struct {
7878
DeviceIPV4 DeviceFleetStatusGetResponseDeviceIPV4 `json:"deviceIpv4"`
7979
DeviceIPV6 DeviceFleetStatusGetResponseDeviceIPV6 `json:"deviceIpv6"`
8080
// Device identifier (human readable)
81-
DeviceName string `json:"deviceName"`
81+
DeviceName string `json:"deviceName"`
82+
// Deprecated: use registrationId. Device registration identifier (UUID v4).
83+
//
84+
// Deprecated: Use `registrationId` instead.
85+
DeviceRegistration string `json:"deviceRegistration" api:"nullable"`
8286
DiskReadBps int64 `json:"diskReadBps" api:"nullable"`
8387
DiskUsagePct float64 `json:"diskUsagePct" api:"nullable"`
8488
DiskWriteBps int64 `json:"diskWriteBps" api:"nullable"`
@@ -127,6 +131,7 @@ type deviceFleetStatusGetResponseJSON struct {
127131
DeviceIPV4 apijson.Field
128132
DeviceIPV6 apijson.Field
129133
DeviceName apijson.Field
134+
DeviceRegistration apijson.Field
130135
DiskReadBps apijson.Field
131136
DiskUsagePct apijson.Field
132137
DiskWriteBps apijson.Field

zero_trust/dexfleetstatusdevice.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ type DEXFleetStatusDeviceListResponse struct {
8989
DeviceIPV4 DEXFleetStatusDeviceListResponseDeviceIPV4 `json:"deviceIpv4"`
9090
DeviceIPV6 DEXFleetStatusDeviceListResponseDeviceIPV6 `json:"deviceIpv6"`
9191
// Device identifier (human readable)
92-
DeviceName string `json:"deviceName"`
92+
DeviceName string `json:"deviceName"`
93+
// Deprecated: use registrationId. Device registration identifier (UUID v4).
94+
//
95+
// Deprecated: Use `registrationId` instead.
96+
DeviceRegistration string `json:"deviceRegistration" api:"nullable"`
9397
DiskReadBps int64 `json:"diskReadBps" api:"nullable"`
9498
DiskUsagePct float64 `json:"diskUsagePct" api:"nullable"`
9599
DiskWriteBps int64 `json:"diskWriteBps" api:"nullable"`
@@ -138,6 +142,7 @@ type dexFleetStatusDeviceListResponseJSON struct {
138142
DeviceIPV4 apijson.Field
139143
DeviceIPV6 apijson.Field
140144
DeviceName apijson.Field
145+
DeviceRegistration apijson.Field
141146
DiskReadBps apijson.Field
142147
DiskUsagePct apijson.Field
143148
DiskWriteBps apijson.Field

zero_trust/dlpentry.go

Lines changed: 74 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ func (r *DLPEntryUpdateResponse) UnmarshalJSON(data []byte) (err error) {
254254
// the specific types for more type safety.
255255
//
256256
// Possible runtime types of the union are [DLPEntryUpdateResponseCustomEntry],
257+
// [DLPEntryUpdateResponseCustomPromptTopicEntry],
257258
// [DLPEntryUpdateResponsePredefinedEntry],
258259
// [DLPEntryUpdateResponseIntegrationEntry],
259260
// [DLPEntryUpdateResponseExactDataEntry],
@@ -264,6 +265,7 @@ func (r DLPEntryUpdateResponse) AsUnion() DLPEntryUpdateResponseUnion {
264265
}
265266

266267
// Union satisfied by [DLPEntryUpdateResponseCustomEntry],
268+
// [DLPEntryUpdateResponseCustomPromptTopicEntry],
267269
// [DLPEntryUpdateResponsePredefinedEntry],
268270
// [DLPEntryUpdateResponseIntegrationEntry],
269271
// [DLPEntryUpdateResponseExactDataEntry],
@@ -281,6 +283,10 @@ func init() {
281283
TypeFilter: gjson.JSON,
282284
Type: reflect.TypeOf(DLPEntryUpdateResponseCustomEntry{}),
283285
},
286+
apijson.UnionVariant{
287+
TypeFilter: gjson.JSON,
288+
Type: reflect.TypeOf(DLPEntryUpdateResponseCustomPromptTopicEntry{}),
289+
},
284290
apijson.UnionVariant{
285291
TypeFilter: gjson.JSON,
286292
Type: reflect.TypeOf(DLPEntryUpdateResponsePredefinedEntry{}),
@@ -359,6 +365,54 @@ func (r DLPEntryUpdateResponseCustomEntryType) IsKnown() bool {
359365
return false
360366
}
361367

368+
type DLPEntryUpdateResponseCustomPromptTopicEntry struct {
369+
ID string `json:"id" api:"required" format:"uuid"`
370+
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
371+
// Deprecated: deprecated
372+
Enabled bool `json:"enabled" api:"required"`
373+
Name string `json:"name" api:"required"`
374+
Type DLPEntryUpdateResponseCustomPromptTopicEntryType `json:"type" api:"required"`
375+
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
376+
JSON dlpEntryUpdateResponseCustomPromptTopicEntryJSON `json:"-"`
377+
}
378+
379+
// dlpEntryUpdateResponseCustomPromptTopicEntryJSON contains the JSON metadata for
380+
// the struct [DLPEntryUpdateResponseCustomPromptTopicEntry]
381+
type dlpEntryUpdateResponseCustomPromptTopicEntryJSON struct {
382+
ID apijson.Field
383+
CreatedAt apijson.Field
384+
Enabled apijson.Field
385+
Name apijson.Field
386+
Type apijson.Field
387+
UpdatedAt apijson.Field
388+
raw string
389+
ExtraFields map[string]apijson.Field
390+
}
391+
392+
func (r *DLPEntryUpdateResponseCustomPromptTopicEntry) UnmarshalJSON(data []byte) (err error) {
393+
return apijson.UnmarshalRoot(data, r)
394+
}
395+
396+
func (r dlpEntryUpdateResponseCustomPromptTopicEntryJSON) RawJSON() string {
397+
return r.raw
398+
}
399+
400+
func (r DLPEntryUpdateResponseCustomPromptTopicEntry) implementsDLPEntryUpdateResponse() {}
401+
402+
type DLPEntryUpdateResponseCustomPromptTopicEntryType string
403+
404+
const (
405+
DLPEntryUpdateResponseCustomPromptTopicEntryTypeCustomPromptTopic DLPEntryUpdateResponseCustomPromptTopicEntryType = "custom_prompt_topic"
406+
)
407+
408+
func (r DLPEntryUpdateResponseCustomPromptTopicEntryType) IsKnown() bool {
409+
switch r {
410+
case DLPEntryUpdateResponseCustomPromptTopicEntryTypeCustomPromptTopic:
411+
return true
412+
}
413+
return false
414+
}
415+
362416
type DLPEntryUpdateResponsePredefinedEntry struct {
363417
ID string `json:"id" api:"required" format:"uuid"`
364418
Confidence DLPEntryUpdateResponsePredefinedEntryConfidence `json:"confidence" api:"required"`
@@ -797,6 +851,7 @@ type DLPEntryUpdateResponseType string
797851

798852
const (
799853
DLPEntryUpdateResponseTypeCustom DLPEntryUpdateResponseType = "custom"
854+
DLPEntryUpdateResponseTypeCustomPromptTopic DLPEntryUpdateResponseType = "custom_prompt_topic"
800855
DLPEntryUpdateResponseTypePredefined DLPEntryUpdateResponseType = "predefined"
801856
DLPEntryUpdateResponseTypeIntegration DLPEntryUpdateResponseType = "integration"
802857
DLPEntryUpdateResponseTypeExactData DLPEntryUpdateResponseType = "exact_data"
@@ -806,7 +861,7 @@ const (
806861

807862
func (r DLPEntryUpdateResponseType) IsKnown() bool {
808863
switch r {
809-
case DLPEntryUpdateResponseTypeCustom, DLPEntryUpdateResponseTypePredefined, DLPEntryUpdateResponseTypeIntegration, DLPEntryUpdateResponseTypeExactData, DLPEntryUpdateResponseTypeDocumentFingerprint, DLPEntryUpdateResponseTypeWordList:
864+
case DLPEntryUpdateResponseTypeCustom, DLPEntryUpdateResponseTypeCustomPromptTopic, DLPEntryUpdateResponseTypePredefined, DLPEntryUpdateResponseTypeIntegration, DLPEntryUpdateResponseTypeExactData, DLPEntryUpdateResponseTypeDocumentFingerprint, DLPEntryUpdateResponseTypeWordList:
810865
return true
811866
}
812867
return false
@@ -880,14 +935,15 @@ func (r *DLPEntryListResponse) UnmarshalJSON(data []byte) (err error) {
880935
// Possible runtime types of the union are [DLPEntryListResponseObject],
881936
// [DLPEntryListResponseObject], [DLPEntryListResponseObject],
882937
// [DLPEntryListResponseObject], [DLPEntryListResponseObject],
883-
// [DLPEntryListResponseObject].
938+
// [DLPEntryListResponseObject], [DLPEntryListResponseObject].
884939
func (r DLPEntryListResponse) AsUnion() DLPEntryListResponseUnion {
885940
return r.union
886941
}
887942

888943
// Union satisfied by [DLPEntryListResponseObject], [DLPEntryListResponseObject],
889944
// [DLPEntryListResponseObject], [DLPEntryListResponseObject],
890-
// [DLPEntryListResponseObject] or [DLPEntryListResponseObject].
945+
// [DLPEntryListResponseObject], [DLPEntryListResponseObject] or
946+
// [DLPEntryListResponseObject].
891947
type DLPEntryListResponseUnion interface {
892948
implementsDLPEntryListResponse()
893949
}
@@ -920,6 +976,10 @@ func init() {
920976
TypeFilter: gjson.JSON,
921977
Type: reflect.TypeOf(DLPEntryListResponseObject{}),
922978
},
979+
apijson.UnionVariant{
980+
TypeFilter: gjson.JSON,
981+
Type: reflect.TypeOf(DLPEntryListResponseObject{}),
982+
},
923983
)
924984
}
925985

@@ -1003,6 +1063,7 @@ type DLPEntryListResponseType string
10031063

10041064
const (
10051065
DLPEntryListResponseTypeCustom DLPEntryListResponseType = "custom"
1066+
DLPEntryListResponseTypeCustomPromptTopic DLPEntryListResponseType = "custom_prompt_topic"
10061067
DLPEntryListResponseTypePredefined DLPEntryListResponseType = "predefined"
10071068
DLPEntryListResponseTypeIntegration DLPEntryListResponseType = "integration"
10081069
DLPEntryListResponseTypeExactData DLPEntryListResponseType = "exact_data"
@@ -1012,7 +1073,7 @@ const (
10121073

10131074
func (r DLPEntryListResponseType) IsKnown() bool {
10141075
switch r {
1015-
case DLPEntryListResponseTypeCustom, DLPEntryListResponseTypePredefined, DLPEntryListResponseTypeIntegration, DLPEntryListResponseTypeExactData, DLPEntryListResponseTypeDocumentFingerprint, DLPEntryListResponseTypeWordList:
1076+
case DLPEntryListResponseTypeCustom, DLPEntryListResponseTypeCustomPromptTopic, DLPEntryListResponseTypePredefined, DLPEntryListResponseTypeIntegration, DLPEntryListResponseTypeExactData, DLPEntryListResponseTypeDocumentFingerprint, DLPEntryListResponseTypeWordList:
10161077
return true
10171078
}
10181079
return false
@@ -1110,14 +1171,15 @@ func (r *DLPEntryGetResponse) UnmarshalJSON(data []byte) (err error) {
11101171
// Possible runtime types of the union are [DLPEntryGetResponseObject],
11111172
// [DLPEntryGetResponseObject], [DLPEntryGetResponseObject],
11121173
// [DLPEntryGetResponseObject], [DLPEntryGetResponseObject],
1113-
// [DLPEntryGetResponseObject].
1174+
// [DLPEntryGetResponseObject], [DLPEntryGetResponseObject].
11141175
func (r DLPEntryGetResponse) AsUnion() DLPEntryGetResponseUnion {
11151176
return r.union
11161177
}
11171178

11181179
// Union satisfied by [DLPEntryGetResponseObject], [DLPEntryGetResponseObject],
11191180
// [DLPEntryGetResponseObject], [DLPEntryGetResponseObject],
1120-
// [DLPEntryGetResponseObject] or [DLPEntryGetResponseObject].
1181+
// [DLPEntryGetResponseObject], [DLPEntryGetResponseObject] or
1182+
// [DLPEntryGetResponseObject].
11211183
type DLPEntryGetResponseUnion interface {
11221184
implementsDLPEntryGetResponse()
11231185
}
@@ -1150,6 +1212,10 @@ func init() {
11501212
TypeFilter: gjson.JSON,
11511213
Type: reflect.TypeOf(DLPEntryGetResponseObject{}),
11521214
},
1215+
apijson.UnionVariant{
1216+
TypeFilter: gjson.JSON,
1217+
Type: reflect.TypeOf(DLPEntryGetResponseObject{}),
1218+
},
11531219
)
11541220
}
11551221

@@ -1259,6 +1325,7 @@ type DLPEntryGetResponseType string
12591325

12601326
const (
12611327
DLPEntryGetResponseTypeCustom DLPEntryGetResponseType = "custom"
1328+
DLPEntryGetResponseTypeCustomPromptTopic DLPEntryGetResponseType = "custom_prompt_topic"
12621329
DLPEntryGetResponseTypePredefined DLPEntryGetResponseType = "predefined"
12631330
DLPEntryGetResponseTypeIntegration DLPEntryGetResponseType = "integration"
12641331
DLPEntryGetResponseTypeExactData DLPEntryGetResponseType = "exact_data"
@@ -1268,7 +1335,7 @@ const (
12681335

12691336
func (r DLPEntryGetResponseType) IsKnown() bool {
12701337
switch r {
1271-
case DLPEntryGetResponseTypeCustom, DLPEntryGetResponseTypePredefined, DLPEntryGetResponseTypeIntegration, DLPEntryGetResponseTypeExactData, DLPEntryGetResponseTypeDocumentFingerprint, DLPEntryGetResponseTypeWordList:
1338+
case DLPEntryGetResponseTypeCustom, DLPEntryGetResponseTypeCustomPromptTopic, DLPEntryGetResponseTypePredefined, DLPEntryGetResponseTypeIntegration, DLPEntryGetResponseTypeExactData, DLPEntryGetResponseTypeDocumentFingerprint, DLPEntryGetResponseTypeWordList:
12721339
return true
12731340
}
12741341
return false

0 commit comments

Comments
 (0)