Skip to content

Commit 985e989

Browse files
committedJan 30, 2025
feat(api): api update (#3866)
1 parent 8f4a870 commit 985e989

File tree

3 files changed

+2
-69
lines changed

3 files changed

+2
-69
lines changed
 

‎.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1508
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bc8740036f5c85815dd08ce4d1787a79b09e8133dc24fcdf8c594aad2c5cc69d.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fc6440a93f6aee5f11262d075db1abe2123bcba78d70b8ec7bb8dd7c8da69401.yml

‎dns/setting.go

-64
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ type SettingEditResponseZoneDefaults struct {
125125
FlattenAllCNAMEs bool `json:"flatten_all_cnames"`
126126
// Whether to enable Foundation DNS Advanced Nameservers on the zone.
127127
FoundationDNS bool `json:"foundation_dns"`
128-
// Settings for this internal zone.
129-
InternalDNS SettingEditResponseZoneDefaultsInternalDNS `json:"internal_dns"`
130128
// Whether to enable multi-provider DNS, which causes Cloudflare to activate the
131129
// zone even when non-Cloudflare NS records exist, and to respect NS records at the
132130
// zone apex during outbound zone transfers.
@@ -150,7 +148,6 @@ type SettingEditResponseZoneDefaults struct {
150148
type settingEditResponseZoneDefaultsJSON struct {
151149
FlattenAllCNAMEs apijson.Field
152150
FoundationDNS apijson.Field
153-
InternalDNS apijson.Field
154151
MultiProvider apijson.Field
155152
Nameservers apijson.Field
156153
NSTTL apijson.Field
@@ -169,29 +166,6 @@ func (r settingEditResponseZoneDefaultsJSON) RawJSON() string {
169166
return r.raw
170167
}
171168

172-
// Settings for this internal zone.
173-
type SettingEditResponseZoneDefaultsInternalDNS struct {
174-
// The ID of the zone to fallback to.
175-
ReferenceZoneID string `json:"reference_zone_id"`
176-
JSON settingEditResponseZoneDefaultsInternalDNSJSON `json:"-"`
177-
}
178-
179-
// settingEditResponseZoneDefaultsInternalDNSJSON contains the JSON metadata for
180-
// the struct [SettingEditResponseZoneDefaultsInternalDNS]
181-
type settingEditResponseZoneDefaultsInternalDNSJSON struct {
182-
ReferenceZoneID apijson.Field
183-
raw string
184-
ExtraFields map[string]apijson.Field
185-
}
186-
187-
func (r *SettingEditResponseZoneDefaultsInternalDNS) UnmarshalJSON(data []byte) (err error) {
188-
return apijson.UnmarshalRoot(data, r)
189-
}
190-
191-
func (r settingEditResponseZoneDefaultsInternalDNSJSON) RawJSON() string {
192-
return r.raw
193-
}
194-
195169
// Settings determining the nameservers through which the zone should be available.
196170
type SettingEditResponseZoneDefaultsNameservers struct {
197171
// Nameserver type
@@ -322,8 +296,6 @@ type SettingGetResponseZoneDefaults struct {
322296
FlattenAllCNAMEs bool `json:"flatten_all_cnames"`
323297
// Whether to enable Foundation DNS Advanced Nameservers on the zone.
324298
FoundationDNS bool `json:"foundation_dns"`
325-
// Settings for this internal zone.
326-
InternalDNS SettingGetResponseZoneDefaultsInternalDNS `json:"internal_dns"`
327299
// Whether to enable multi-provider DNS, which causes Cloudflare to activate the
328300
// zone even when non-Cloudflare NS records exist, and to respect NS records at the
329301
// zone apex during outbound zone transfers.
@@ -347,7 +319,6 @@ type SettingGetResponseZoneDefaults struct {
347319
type settingGetResponseZoneDefaultsJSON struct {
348320
FlattenAllCNAMEs apijson.Field
349321
FoundationDNS apijson.Field
350-
InternalDNS apijson.Field
351322
MultiProvider apijson.Field
352323
Nameservers apijson.Field
353324
NSTTL apijson.Field
@@ -366,29 +337,6 @@ func (r settingGetResponseZoneDefaultsJSON) RawJSON() string {
366337
return r.raw
367338
}
368339

369-
// Settings for this internal zone.
370-
type SettingGetResponseZoneDefaultsInternalDNS struct {
371-
// The ID of the zone to fallback to.
372-
ReferenceZoneID string `json:"reference_zone_id"`
373-
JSON settingGetResponseZoneDefaultsInternalDNSJSON `json:"-"`
374-
}
375-
376-
// settingGetResponseZoneDefaultsInternalDNSJSON contains the JSON metadata for the
377-
// struct [SettingGetResponseZoneDefaultsInternalDNS]
378-
type settingGetResponseZoneDefaultsInternalDNSJSON struct {
379-
ReferenceZoneID apijson.Field
380-
raw string
381-
ExtraFields map[string]apijson.Field
382-
}
383-
384-
func (r *SettingGetResponseZoneDefaultsInternalDNS) UnmarshalJSON(data []byte) (err error) {
385-
return apijson.UnmarshalRoot(data, r)
386-
}
387-
388-
func (r settingGetResponseZoneDefaultsInternalDNSJSON) RawJSON() string {
389-
return r.raw
390-
}
391-
392340
// Settings determining the nameservers through which the zone should be available.
393341
type SettingGetResponseZoneDefaultsNameservers struct {
394342
// Nameserver type
@@ -510,8 +458,6 @@ type SettingEditParamsZoneDefaults struct {
510458
FlattenAllCNAMEs param.Field[bool] `json:"flatten_all_cnames"`
511459
// Whether to enable Foundation DNS Advanced Nameservers on the zone.
512460
FoundationDNS param.Field[bool] `json:"foundation_dns"`
513-
// Settings for this internal zone.
514-
InternalDNS param.Field[SettingEditParamsZoneDefaultsInternalDNS] `json:"internal_dns"`
515461
// Whether to enable multi-provider DNS, which causes Cloudflare to activate the
516462
// zone even when non-Cloudflare NS records exist, and to respect NS records at the
517463
// zone apex during outbound zone transfers.
@@ -533,16 +479,6 @@ func (r SettingEditParamsZoneDefaults) MarshalJSON() (data []byte, err error) {
533479
return apijson.MarshalRoot(r)
534480
}
535481

536-
// Settings for this internal zone.
537-
type SettingEditParamsZoneDefaultsInternalDNS struct {
538-
// The ID of the zone to fallback to.
539-
ReferenceZoneID param.Field[string] `json:"reference_zone_id"`
540-
}
541-
542-
func (r SettingEditParamsZoneDefaultsInternalDNS) MarshalJSON() (data []byte, err error) {
543-
return apijson.MarshalRoot(r)
544-
}
545-
546482
// Settings determining the nameservers through which the zone should be available.
547483
type SettingEditParamsZoneDefaultsNameservers struct {
548484
// Nameserver type

‎dns/setting_test.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ func TestSettingEditWithOptionalParams(t *testing.T) {
3333
ZoneDefaults: cloudflare.F(dns.SettingEditParamsZoneDefaults{
3434
FlattenAllCNAMEs: cloudflare.F(false),
3535
FoundationDNS: cloudflare.F(false),
36-
InternalDNS: cloudflare.F(dns.SettingEditParamsZoneDefaultsInternalDNS{
37-
ReferenceZoneID: cloudflare.F("reference_zone_id"),
38-
}),
39-
MultiProvider: cloudflare.F(false),
36+
MultiProvider: cloudflare.F(false),
4037
Nameservers: cloudflare.F(dns.SettingEditParamsZoneDefaultsNameservers{
4138
Type: cloudflare.F(dns.SettingEditParamsZoneDefaultsNameserversTypeCloudflareStandard),
4239
}),

0 commit comments

Comments
 (0)
Please sign in to comment.