Skip to content

Commit 3f484b4

Browse files
chore(api): update composite API spec
1 parent e7341f8 commit 3f484b4

File tree

6 files changed

+144
-23
lines changed

6 files changed

+144
-23
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2028
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2b935132316d46fe098e11238cf09f7861e29754870e6775c31d53108b357a35.yml
3-
openapi_spec_hash: 3c786e10f8e2cea0b76e820dbd848eab
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3bcd5973c2baae10ef49b19c7928b0a5c762f4a6e755f56c2d62c26b54083398.yml
3+
openapi_spec_hash: df51921c4c4f3e4a9797751252db0538
44
config_hash: a4197f3e022bd501a828d1252b76e06e

magic_cloud_networking/onramp.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20478,8 +20478,8 @@ func (r onRampPlanResponseMessagesSourceJSON) RawJSON() string {
2047820478
type OnRampNewParams struct {
2047920479
AccountID param.Field[string] `path:"account_id,required"`
2048020480
CloudType param.Field[OnRampNewParamsCloudType] `json:"cloud_type,required"`
20481-
// if set to true, install_routes_in_cloud and install_routes_in_magic_wan should
20482-
// be set to false
20481+
// Enables BGP routing. When enabling this feature, set both
20482+
// install_routes_in_cloud and install_routes_in_magic_wan to false.
2048320483
DynamicRouting param.Field[bool] `json:"dynamic_routing,required"`
2048420484
InstallRoutesInCloud param.Field[bool] `json:"install_routes_in_cloud,required"`
2048520485
InstallRoutesInMagicWAN param.Field[bool] `json:"install_routes_in_magic_wan,required"`
@@ -20488,8 +20488,7 @@ type OnRampNewParams struct {
2048820488
AdoptedHubID param.Field[string] `json:"adopted_hub_id" format:"uuid"`
2048920489
AttachedHubs param.Field[[]string] `json:"attached_hubs" format:"uuid"`
2049020490
AttachedVPCs param.Field[[]string] `json:"attached_vpcs" format:"uuid"`
20491-
// the ASN to use on the cloud side. If unset or zero, the cloud's default will be
20492-
// used.
20491+
// Sets the cloud-side ASN. If unset or zero, the cloud's default ASN takes effect.
2049320492
CloudASN param.Field[int64] `json:"cloud_asn"`
2049420493
Description param.Field[string] `json:"description"`
2049520494
HubProviderID param.Field[string] `json:"hub_provider_id" format:"uuid"`

origin_ca_certificates/origincacertificate.go

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,14 @@ func (r *OriginCACertificateService) Get(ctx context.Context, certificateID stri
122122
type OriginCACertificate struct {
123123
// The Certificate Signing Request (CSR). Must be newline-encoded.
124124
Csr string `json:"csr,required"`
125-
// Array of hostnames or wildcard names (e.g., \*.example.com) bound to the
126-
// certificate.
125+
// Array of hostnames or wildcard names bound to the certificate. Hostnames must be
126+
// fully qualified domain names (FQDNs) belonging to zones on your account (e.g.,
127+
// `example.com` or `sub.example.com`). Wildcards are supported only as a `*.`
128+
// prefix for a single level (e.g., `*.example.com`). Double wildcards
129+
// (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not
130+
// allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is
131+
// valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically
132+
// converted to punycode.
127133
Hostnames []string `json:"hostnames,required"`
128134
// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
129135
// or "keyless-certificate" (for Keyless SSL servers).
@@ -189,8 +195,14 @@ func (r originCACertificateDeleteResponseJSON) RawJSON() string {
189195
type OriginCACertificateNewParams struct {
190196
// The Certificate Signing Request (CSR). Must be newline-encoded.
191197
Csr param.Field[string] `json:"csr,required"`
192-
// Array of hostnames or wildcard names (e.g., \*.example.com) bound to the
193-
// certificate.
198+
// Array of hostnames or wildcard names bound to the certificate. Hostnames must be
199+
// fully qualified domain names (FQDNs) belonging to zones on your account (e.g.,
200+
// `example.com` or `sub.example.com`). Wildcards are supported only as a `*.`
201+
// prefix for a single level (e.g., `*.example.com`). Double wildcards
202+
// (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not
203+
// allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is
204+
// valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically
205+
// converted to punycode.
194206
Hostnames param.Field[[]string] `json:"hostnames,required"`
195207
// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
196208
// or "keyless-certificate" (for Keyless SSL servers).

origin_ca_certificates/origincacertificate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestOriginCACertificateNewWithOptionalParams(t *testing.T) {
3232
)
3333
_, err := client.OriginCACertificates.New(context.TODO(), origin_ca_certificates.OriginCACertificateNewParams{
3434
Csr: cloudflare.F("-----BEGIN CERTIFICATE REQUEST-----\nMIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz\nY28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL\nHu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8\n4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc\nN8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi\ng7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I\nuOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG\nCSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt\ncGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx\npTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/\nauRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH\nyc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J\nhXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs\ndcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ==\n-----END CERTIFICATE REQUEST-----"),
35-
Hostnames: cloudflare.F([]string{"example.com", "*.example.com"}),
35+
Hostnames: cloudflare.F([]string{"example.com", "*.example.com", "sub.example.com"}),
3636
RequestType: cloudflare.F(shared.CertificateRequestTypeOriginRSA),
3737
RequestedValidity: cloudflare.F(ssl.RequestValidity5475),
3838
})

zero_trust/dlppayloadlog.go

Lines changed: 119 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,28 @@ func (r *DLPPayloadLogService) Get(ctx context.Context, query DLPPayloadLogGetPa
7070
}
7171

7272
type DLPPayloadLogUpdateResponse struct {
73-
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
73+
// Masking level for payload logs.
74+
//
75+
// - `full`: The entire payload is masked.
76+
// - `partial`: Only partial payload content is masked.
77+
// - `clear`: No masking is applied to the payload content.
78+
// - `default`: DLP uses its default masking behavior.
79+
MaskingLevel DLPPayloadLogUpdateResponseMaskingLevel `json:"masking_level,required"`
80+
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
81+
// Base64-encoded public key for encrypting payload logs. Null when payload logging
82+
// is disabled.
7483
PublicKey string `json:"public_key,nullable"`
7584
JSON dlpPayloadLogUpdateResponseJSON `json:"-"`
7685
}
7786

7887
// dlpPayloadLogUpdateResponseJSON contains the JSON metadata for the struct
7988
// [DLPPayloadLogUpdateResponse]
8089
type dlpPayloadLogUpdateResponseJSON struct {
81-
UpdatedAt apijson.Field
82-
PublicKey apijson.Field
83-
raw string
84-
ExtraFields map[string]apijson.Field
90+
MaskingLevel apijson.Field
91+
UpdatedAt apijson.Field
92+
PublicKey apijson.Field
93+
raw string
94+
ExtraFields map[string]apijson.Field
8595
}
8696

8797
func (r *DLPPayloadLogUpdateResponse) UnmarshalJSON(data []byte) (err error) {
@@ -92,19 +102,52 @@ func (r dlpPayloadLogUpdateResponseJSON) RawJSON() string {
92102
return r.raw
93103
}
94104

105+
// Masking level for payload logs.
106+
//
107+
// - `full`: The entire payload is masked.
108+
// - `partial`: Only partial payload content is masked.
109+
// - `clear`: No masking is applied to the payload content.
110+
// - `default`: DLP uses its default masking behavior.
111+
type DLPPayloadLogUpdateResponseMaskingLevel string
112+
113+
const (
114+
DLPPayloadLogUpdateResponseMaskingLevelFull DLPPayloadLogUpdateResponseMaskingLevel = "full"
115+
DLPPayloadLogUpdateResponseMaskingLevelPartial DLPPayloadLogUpdateResponseMaskingLevel = "partial"
116+
DLPPayloadLogUpdateResponseMaskingLevelClear DLPPayloadLogUpdateResponseMaskingLevel = "clear"
117+
DLPPayloadLogUpdateResponseMaskingLevelDefault DLPPayloadLogUpdateResponseMaskingLevel = "default"
118+
)
119+
120+
func (r DLPPayloadLogUpdateResponseMaskingLevel) IsKnown() bool {
121+
switch r {
122+
case DLPPayloadLogUpdateResponseMaskingLevelFull, DLPPayloadLogUpdateResponseMaskingLevelPartial, DLPPayloadLogUpdateResponseMaskingLevelClear, DLPPayloadLogUpdateResponseMaskingLevelDefault:
123+
return true
124+
}
125+
return false
126+
}
127+
95128
type DLPPayloadLogGetResponse struct {
96-
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
129+
// Masking level for payload logs.
130+
//
131+
// - `full`: The entire payload is masked.
132+
// - `partial`: Only partial payload content is masked.
133+
// - `clear`: No masking is applied to the payload content.
134+
// - `default`: DLP uses its default masking behavior.
135+
MaskingLevel DLPPayloadLogGetResponseMaskingLevel `json:"masking_level,required"`
136+
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
137+
// Base64-encoded public key for encrypting payload logs. Null when payload logging
138+
// is disabled.
97139
PublicKey string `json:"public_key,nullable"`
98140
JSON dlpPayloadLogGetResponseJSON `json:"-"`
99141
}
100142

101143
// dlpPayloadLogGetResponseJSON contains the JSON metadata for the struct
102144
// [DLPPayloadLogGetResponse]
103145
type dlpPayloadLogGetResponseJSON struct {
104-
UpdatedAt apijson.Field
105-
PublicKey apijson.Field
106-
raw string
107-
ExtraFields map[string]apijson.Field
146+
MaskingLevel apijson.Field
147+
UpdatedAt apijson.Field
148+
PublicKey apijson.Field
149+
raw string
150+
ExtraFields map[string]apijson.Field
108151
}
109152

110153
func (r *DLPPayloadLogGetResponse) UnmarshalJSON(data []byte) (err error) {
@@ -115,15 +158,81 @@ func (r dlpPayloadLogGetResponseJSON) RawJSON() string {
115158
return r.raw
116159
}
117160

161+
// Masking level for payload logs.
162+
//
163+
// - `full`: The entire payload is masked.
164+
// - `partial`: Only partial payload content is masked.
165+
// - `clear`: No masking is applied to the payload content.
166+
// - `default`: DLP uses its default masking behavior.
167+
type DLPPayloadLogGetResponseMaskingLevel string
168+
169+
const (
170+
DLPPayloadLogGetResponseMaskingLevelFull DLPPayloadLogGetResponseMaskingLevel = "full"
171+
DLPPayloadLogGetResponseMaskingLevelPartial DLPPayloadLogGetResponseMaskingLevel = "partial"
172+
DLPPayloadLogGetResponseMaskingLevelClear DLPPayloadLogGetResponseMaskingLevel = "clear"
173+
DLPPayloadLogGetResponseMaskingLevelDefault DLPPayloadLogGetResponseMaskingLevel = "default"
174+
)
175+
176+
func (r DLPPayloadLogGetResponseMaskingLevel) IsKnown() bool {
177+
switch r {
178+
case DLPPayloadLogGetResponseMaskingLevelFull, DLPPayloadLogGetResponseMaskingLevelPartial, DLPPayloadLogGetResponseMaskingLevelClear, DLPPayloadLogGetResponseMaskingLevelDefault:
179+
return true
180+
}
181+
return false
182+
}
183+
118184
type DLPPayloadLogUpdateParams struct {
119185
AccountID param.Field[string] `path:"account_id,required"`
186+
// Masking level for payload logs.
187+
//
188+
// - `full`: The entire payload is masked.
189+
// - `partial`: Only partial payload content is masked.
190+
// - `clear`: No masking is applied to the payload content.
191+
// - `default`: DLP uses its default masking behavior.
192+
MaskingLevel param.Field[DLPPayloadLogUpdateParamsMaskingLevel] `json:"masking_level"`
193+
// Base64-encoded public key for encrypting payload logs.
194+
//
195+
// - Set to null or empty string to disable payload logging.
196+
// - Set to a non-empty base64 string to enable payload logging with the given key.
197+
//
198+
// For customers with configurable payload masking feature rolled out:
199+
//
200+
// - If the field is missing, the existing setting will be kept. Note that this is
201+
// different from setting to null or empty string.
202+
//
203+
// For all other customers:
204+
//
205+
// - If the field is missing, the existing setting will be cleared.
120206
PublicKey param.Field[string] `json:"public_key"`
121207
}
122208

123209
func (r DLPPayloadLogUpdateParams) MarshalJSON() (data []byte, err error) {
124210
return apijson.MarshalRoot(r)
125211
}
126212

213+
// Masking level for payload logs.
214+
//
215+
// - `full`: The entire payload is masked.
216+
// - `partial`: Only partial payload content is masked.
217+
// - `clear`: No masking is applied to the payload content.
218+
// - `default`: DLP uses its default masking behavior.
219+
type DLPPayloadLogUpdateParamsMaskingLevel string
220+
221+
const (
222+
DLPPayloadLogUpdateParamsMaskingLevelFull DLPPayloadLogUpdateParamsMaskingLevel = "full"
223+
DLPPayloadLogUpdateParamsMaskingLevelPartial DLPPayloadLogUpdateParamsMaskingLevel = "partial"
224+
DLPPayloadLogUpdateParamsMaskingLevelClear DLPPayloadLogUpdateParamsMaskingLevel = "clear"
225+
DLPPayloadLogUpdateParamsMaskingLevelDefault DLPPayloadLogUpdateParamsMaskingLevel = "default"
226+
)
227+
228+
func (r DLPPayloadLogUpdateParamsMaskingLevel) IsKnown() bool {
229+
switch r {
230+
case DLPPayloadLogUpdateParamsMaskingLevelFull, DLPPayloadLogUpdateParamsMaskingLevelPartial, DLPPayloadLogUpdateParamsMaskingLevelClear, DLPPayloadLogUpdateParamsMaskingLevelDefault:
231+
return true
232+
}
233+
return false
234+
}
235+
127236
type DLPPayloadLogUpdateResponseEnvelope struct {
128237
Errors []DLPPayloadLogUpdateResponseEnvelopeErrors `json:"errors,required"`
129238
Messages []DLPPayloadLogUpdateResponseEnvelopeMessages `json:"messages,required"`

zero_trust/dlppayloadlog_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ func TestDLPPayloadLogUpdateWithOptionalParams(t *testing.T) {
2828
option.WithAPIEmail("user@example.com"),
2929
)
3030
_, err := client.ZeroTrust.DLP.PayloadLogs.Update(context.TODO(), zero_trust.DLPPayloadLogUpdateParams{
31-
AccountID: cloudflare.F("account_id"),
32-
PublicKey: cloudflare.F("public_key"),
31+
AccountID: cloudflare.F("account_id"),
32+
MaskingLevel: cloudflare.F(zero_trust.DLPPayloadLogUpdateParamsMaskingLevelFull),
33+
PublicKey: cloudflare.F("public_key"),
3334
})
3435
if err != nil {
3536
var apierr *cloudflare.Error

0 commit comments

Comments
 (0)