Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 11b736e

Browse files
committedMar 17, 2025
feat(api): api update (#4043)
1 parent 9bbd99f commit 11b736e

8 files changed

+1890
-122
lines changed
 

‎.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1617
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8103ad52977aa9c1ce4655e2afd3ade7f6e891aafaa9bd1fbf4630348bc3fd02.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8891f9870c2c46f5bc3d5f2cb7e0ecf351f81838574949a43298f2f0bd303399.yml

‎radar/as112.go

+159
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,12 @@ type AS112TimeseriesParams struct {
236236
Location param.Field[[]string] `query:"location"`
237237
// Array of names used to label the series in the response.
238238
Name param.Field[[]string] `query:"name"`
239+
// Filters results by DNS transport protocol.
240+
Protocol param.Field[AS112TimeseriesParamsProtocol] `query:"protocol"`
241+
// Filters results by DNS query type.
242+
QueryType param.Field[AS112TimeseriesParamsQueryType] `query:"queryType"`
243+
// Filters results by DNS response code.
244+
ResponseCode param.Field[AS112TimeseriesParamsResponseCode] `query:"responseCode"`
239245
}
240246

241247
// URLQuery serializes [AS112TimeseriesParams]'s query parameters as `url.Values`.
@@ -282,6 +288,159 @@ func (r AS112TimeseriesParamsFormat) IsKnown() bool {
282288
return false
283289
}
284290

291+
// Filters results by DNS transport protocol.
292+
type AS112TimeseriesParamsProtocol string
293+
294+
const (
295+
AS112TimeseriesParamsProtocolUdp AS112TimeseriesParamsProtocol = "UDP"
296+
AS112TimeseriesParamsProtocolTCP AS112TimeseriesParamsProtocol = "TCP"
297+
AS112TimeseriesParamsProtocolHTTPS AS112TimeseriesParamsProtocol = "HTTPS"
298+
AS112TimeseriesParamsProtocolTLS AS112TimeseriesParamsProtocol = "TLS"
299+
)
300+
301+
func (r AS112TimeseriesParamsProtocol) IsKnown() bool {
302+
switch r {
303+
case AS112TimeseriesParamsProtocolUdp, AS112TimeseriesParamsProtocolTCP, AS112TimeseriesParamsProtocolHTTPS, AS112TimeseriesParamsProtocolTLS:
304+
return true
305+
}
306+
return false
307+
}
308+
309+
// Filters results by DNS query type.
310+
type AS112TimeseriesParamsQueryType string
311+
312+
const (
313+
AS112TimeseriesParamsQueryTypeA AS112TimeseriesParamsQueryType = "A"
314+
AS112TimeseriesParamsQueryTypeAAAA AS112TimeseriesParamsQueryType = "AAAA"
315+
AS112TimeseriesParamsQueryTypeA6 AS112TimeseriesParamsQueryType = "A6"
316+
AS112TimeseriesParamsQueryTypeAfsdb AS112TimeseriesParamsQueryType = "AFSDB"
317+
AS112TimeseriesParamsQueryTypeAny AS112TimeseriesParamsQueryType = "ANY"
318+
AS112TimeseriesParamsQueryTypeApl AS112TimeseriesParamsQueryType = "APL"
319+
AS112TimeseriesParamsQueryTypeAtma AS112TimeseriesParamsQueryType = "ATMA"
320+
AS112TimeseriesParamsQueryTypeAXFR AS112TimeseriesParamsQueryType = "AXFR"
321+
AS112TimeseriesParamsQueryTypeCAA AS112TimeseriesParamsQueryType = "CAA"
322+
AS112TimeseriesParamsQueryTypeCdnskey AS112TimeseriesParamsQueryType = "CDNSKEY"
323+
AS112TimeseriesParamsQueryTypeCds AS112TimeseriesParamsQueryType = "CDS"
324+
AS112TimeseriesParamsQueryTypeCERT AS112TimeseriesParamsQueryType = "CERT"
325+
AS112TimeseriesParamsQueryTypeCNAME AS112TimeseriesParamsQueryType = "CNAME"
326+
AS112TimeseriesParamsQueryTypeCsync AS112TimeseriesParamsQueryType = "CSYNC"
327+
AS112TimeseriesParamsQueryTypeDhcid AS112TimeseriesParamsQueryType = "DHCID"
328+
AS112TimeseriesParamsQueryTypeDlv AS112TimeseriesParamsQueryType = "DLV"
329+
AS112TimeseriesParamsQueryTypeDname AS112TimeseriesParamsQueryType = "DNAME"
330+
AS112TimeseriesParamsQueryTypeDNSKEY AS112TimeseriesParamsQueryType = "DNSKEY"
331+
AS112TimeseriesParamsQueryTypeDoa AS112TimeseriesParamsQueryType = "DOA"
332+
AS112TimeseriesParamsQueryTypeDS AS112TimeseriesParamsQueryType = "DS"
333+
AS112TimeseriesParamsQueryTypeEid AS112TimeseriesParamsQueryType = "EID"
334+
AS112TimeseriesParamsQueryTypeEui48 AS112TimeseriesParamsQueryType = "EUI48"
335+
AS112TimeseriesParamsQueryTypeEui64 AS112TimeseriesParamsQueryType = "EUI64"
336+
AS112TimeseriesParamsQueryTypeGpos AS112TimeseriesParamsQueryType = "GPOS"
337+
AS112TimeseriesParamsQueryTypeGid AS112TimeseriesParamsQueryType = "GID"
338+
AS112TimeseriesParamsQueryTypeHinfo AS112TimeseriesParamsQueryType = "HINFO"
339+
AS112TimeseriesParamsQueryTypeHip AS112TimeseriesParamsQueryType = "HIP"
340+
AS112TimeseriesParamsQueryTypeHTTPS AS112TimeseriesParamsQueryType = "HTTPS"
341+
AS112TimeseriesParamsQueryTypeIpseckey AS112TimeseriesParamsQueryType = "IPSECKEY"
342+
AS112TimeseriesParamsQueryTypeIsdn AS112TimeseriesParamsQueryType = "ISDN"
343+
AS112TimeseriesParamsQueryTypeIxfr AS112TimeseriesParamsQueryType = "IXFR"
344+
AS112TimeseriesParamsQueryTypeKey AS112TimeseriesParamsQueryType = "KEY"
345+
AS112TimeseriesParamsQueryTypeKx AS112TimeseriesParamsQueryType = "KX"
346+
AS112TimeseriesParamsQueryTypeL32 AS112TimeseriesParamsQueryType = "L32"
347+
AS112TimeseriesParamsQueryTypeL64 AS112TimeseriesParamsQueryType = "L64"
348+
AS112TimeseriesParamsQueryTypeLOC AS112TimeseriesParamsQueryType = "LOC"
349+
AS112TimeseriesParamsQueryTypeLp AS112TimeseriesParamsQueryType = "LP"
350+
AS112TimeseriesParamsQueryTypeMaila AS112TimeseriesParamsQueryType = "MAILA"
351+
AS112TimeseriesParamsQueryTypeMailb AS112TimeseriesParamsQueryType = "MAILB"
352+
AS112TimeseriesParamsQueryTypeMB AS112TimeseriesParamsQueryType = "MB"
353+
AS112TimeseriesParamsQueryTypeMd AS112TimeseriesParamsQueryType = "MD"
354+
AS112TimeseriesParamsQueryTypeMf AS112TimeseriesParamsQueryType = "MF"
355+
AS112TimeseriesParamsQueryTypeMg AS112TimeseriesParamsQueryType = "MG"
356+
AS112TimeseriesParamsQueryTypeMinfo AS112TimeseriesParamsQueryType = "MINFO"
357+
AS112TimeseriesParamsQueryTypeMr AS112TimeseriesParamsQueryType = "MR"
358+
AS112TimeseriesParamsQueryTypeMX AS112TimeseriesParamsQueryType = "MX"
359+
AS112TimeseriesParamsQueryTypeNAPTR AS112TimeseriesParamsQueryType = "NAPTR"
360+
AS112TimeseriesParamsQueryTypeNb AS112TimeseriesParamsQueryType = "NB"
361+
AS112TimeseriesParamsQueryTypeNbstat AS112TimeseriesParamsQueryType = "NBSTAT"
362+
AS112TimeseriesParamsQueryTypeNid AS112TimeseriesParamsQueryType = "NID"
363+
AS112TimeseriesParamsQueryTypeNimloc AS112TimeseriesParamsQueryType = "NIMLOC"
364+
AS112TimeseriesParamsQueryTypeNinfo AS112TimeseriesParamsQueryType = "NINFO"
365+
AS112TimeseriesParamsQueryTypeNS AS112TimeseriesParamsQueryType = "NS"
366+
AS112TimeseriesParamsQueryTypeNsap AS112TimeseriesParamsQueryType = "NSAP"
367+
AS112TimeseriesParamsQueryTypeNsec AS112TimeseriesParamsQueryType = "NSEC"
368+
AS112TimeseriesParamsQueryTypeNsec3 AS112TimeseriesParamsQueryType = "NSEC3"
369+
AS112TimeseriesParamsQueryTypeNsec3Param AS112TimeseriesParamsQueryType = "NSEC3PARAM"
370+
AS112TimeseriesParamsQueryTypeNull AS112TimeseriesParamsQueryType = "NULL"
371+
AS112TimeseriesParamsQueryTypeNxt AS112TimeseriesParamsQueryType = "NXT"
372+
AS112TimeseriesParamsQueryTypeOpenpgpkey AS112TimeseriesParamsQueryType = "OPENPGPKEY"
373+
AS112TimeseriesParamsQueryTypeOpt AS112TimeseriesParamsQueryType = "OPT"
374+
AS112TimeseriesParamsQueryTypePTR AS112TimeseriesParamsQueryType = "PTR"
375+
AS112TimeseriesParamsQueryTypePx AS112TimeseriesParamsQueryType = "PX"
376+
AS112TimeseriesParamsQueryTypeRkey AS112TimeseriesParamsQueryType = "RKEY"
377+
AS112TimeseriesParamsQueryTypeRp AS112TimeseriesParamsQueryType = "RP"
378+
AS112TimeseriesParamsQueryTypeRrsig AS112TimeseriesParamsQueryType = "RRSIG"
379+
AS112TimeseriesParamsQueryTypeRt AS112TimeseriesParamsQueryType = "RT"
380+
AS112TimeseriesParamsQueryTypeSig AS112TimeseriesParamsQueryType = "SIG"
381+
AS112TimeseriesParamsQueryTypeSink AS112TimeseriesParamsQueryType = "SINK"
382+
AS112TimeseriesParamsQueryTypeSMIMEA AS112TimeseriesParamsQueryType = "SMIMEA"
383+
AS112TimeseriesParamsQueryTypeSOA AS112TimeseriesParamsQueryType = "SOA"
384+
AS112TimeseriesParamsQueryTypeSPF AS112TimeseriesParamsQueryType = "SPF"
385+
AS112TimeseriesParamsQueryTypeSRV AS112TimeseriesParamsQueryType = "SRV"
386+
AS112TimeseriesParamsQueryTypeSSHFP AS112TimeseriesParamsQueryType = "SSHFP"
387+
AS112TimeseriesParamsQueryTypeSVCB AS112TimeseriesParamsQueryType = "SVCB"
388+
AS112TimeseriesParamsQueryTypeTa AS112TimeseriesParamsQueryType = "TA"
389+
AS112TimeseriesParamsQueryTypeTalink AS112TimeseriesParamsQueryType = "TALINK"
390+
AS112TimeseriesParamsQueryTypeTkey AS112TimeseriesParamsQueryType = "TKEY"
391+
AS112TimeseriesParamsQueryTypeTLSA AS112TimeseriesParamsQueryType = "TLSA"
392+
AS112TimeseriesParamsQueryTypeTSIG AS112TimeseriesParamsQueryType = "TSIG"
393+
AS112TimeseriesParamsQueryTypeTXT AS112TimeseriesParamsQueryType = "TXT"
394+
AS112TimeseriesParamsQueryTypeUinfo AS112TimeseriesParamsQueryType = "UINFO"
395+
AS112TimeseriesParamsQueryTypeUID AS112TimeseriesParamsQueryType = "UID"
396+
AS112TimeseriesParamsQueryTypeUnspec AS112TimeseriesParamsQueryType = "UNSPEC"
397+
AS112TimeseriesParamsQueryTypeURI AS112TimeseriesParamsQueryType = "URI"
398+
AS112TimeseriesParamsQueryTypeWks AS112TimeseriesParamsQueryType = "WKS"
399+
AS112TimeseriesParamsQueryTypeX25 AS112TimeseriesParamsQueryType = "X25"
400+
AS112TimeseriesParamsQueryTypeZonemd AS112TimeseriesParamsQueryType = "ZONEMD"
401+
)
402+
403+
func (r AS112TimeseriesParamsQueryType) IsKnown() bool {
404+
switch r {
405+
case AS112TimeseriesParamsQueryTypeA, AS112TimeseriesParamsQueryTypeAAAA, AS112TimeseriesParamsQueryTypeA6, AS112TimeseriesParamsQueryTypeAfsdb, AS112TimeseriesParamsQueryTypeAny, AS112TimeseriesParamsQueryTypeApl, AS112TimeseriesParamsQueryTypeAtma, AS112TimeseriesParamsQueryTypeAXFR, AS112TimeseriesParamsQueryTypeCAA, AS112TimeseriesParamsQueryTypeCdnskey, AS112TimeseriesParamsQueryTypeCds, AS112TimeseriesParamsQueryTypeCERT, AS112TimeseriesParamsQueryTypeCNAME, AS112TimeseriesParamsQueryTypeCsync, AS112TimeseriesParamsQueryTypeDhcid, AS112TimeseriesParamsQueryTypeDlv, AS112TimeseriesParamsQueryTypeDname, AS112TimeseriesParamsQueryTypeDNSKEY, AS112TimeseriesParamsQueryTypeDoa, AS112TimeseriesParamsQueryTypeDS, AS112TimeseriesParamsQueryTypeEid, AS112TimeseriesParamsQueryTypeEui48, AS112TimeseriesParamsQueryTypeEui64, AS112TimeseriesParamsQueryTypeGpos, AS112TimeseriesParamsQueryTypeGid, AS112TimeseriesParamsQueryTypeHinfo, AS112TimeseriesParamsQueryTypeHip, AS112TimeseriesParamsQueryTypeHTTPS, AS112TimeseriesParamsQueryTypeIpseckey, AS112TimeseriesParamsQueryTypeIsdn, AS112TimeseriesParamsQueryTypeIxfr, AS112TimeseriesParamsQueryTypeKey, AS112TimeseriesParamsQueryTypeKx, AS112TimeseriesParamsQueryTypeL32, AS112TimeseriesParamsQueryTypeL64, AS112TimeseriesParamsQueryTypeLOC, AS112TimeseriesParamsQueryTypeLp, AS112TimeseriesParamsQueryTypeMaila, AS112TimeseriesParamsQueryTypeMailb, AS112TimeseriesParamsQueryTypeMB, AS112TimeseriesParamsQueryTypeMd, AS112TimeseriesParamsQueryTypeMf, AS112TimeseriesParamsQueryTypeMg, AS112TimeseriesParamsQueryTypeMinfo, AS112TimeseriesParamsQueryTypeMr, AS112TimeseriesParamsQueryTypeMX, AS112TimeseriesParamsQueryTypeNAPTR, AS112TimeseriesParamsQueryTypeNb, AS112TimeseriesParamsQueryTypeNbstat, AS112TimeseriesParamsQueryTypeNid, AS112TimeseriesParamsQueryTypeNimloc, AS112TimeseriesParamsQueryTypeNinfo, AS112TimeseriesParamsQueryTypeNS, AS112TimeseriesParamsQueryTypeNsap, AS112TimeseriesParamsQueryTypeNsec, AS112TimeseriesParamsQueryTypeNsec3, AS112TimeseriesParamsQueryTypeNsec3Param, AS112TimeseriesParamsQueryTypeNull, AS112TimeseriesParamsQueryTypeNxt, AS112TimeseriesParamsQueryTypeOpenpgpkey, AS112TimeseriesParamsQueryTypeOpt, AS112TimeseriesParamsQueryTypePTR, AS112TimeseriesParamsQueryTypePx, AS112TimeseriesParamsQueryTypeRkey, AS112TimeseriesParamsQueryTypeRp, AS112TimeseriesParamsQueryTypeRrsig, AS112TimeseriesParamsQueryTypeRt, AS112TimeseriesParamsQueryTypeSig, AS112TimeseriesParamsQueryTypeSink, AS112TimeseriesParamsQueryTypeSMIMEA, AS112TimeseriesParamsQueryTypeSOA, AS112TimeseriesParamsQueryTypeSPF, AS112TimeseriesParamsQueryTypeSRV, AS112TimeseriesParamsQueryTypeSSHFP, AS112TimeseriesParamsQueryTypeSVCB, AS112TimeseriesParamsQueryTypeTa, AS112TimeseriesParamsQueryTypeTalink, AS112TimeseriesParamsQueryTypeTkey, AS112TimeseriesParamsQueryTypeTLSA, AS112TimeseriesParamsQueryTypeTSIG, AS112TimeseriesParamsQueryTypeTXT, AS112TimeseriesParamsQueryTypeUinfo, AS112TimeseriesParamsQueryTypeUID, AS112TimeseriesParamsQueryTypeUnspec, AS112TimeseriesParamsQueryTypeURI, AS112TimeseriesParamsQueryTypeWks, AS112TimeseriesParamsQueryTypeX25, AS112TimeseriesParamsQueryTypeZonemd:
406+
return true
407+
}
408+
return false
409+
}
410+
411+
// Filters results by DNS response code.
412+
type AS112TimeseriesParamsResponseCode string
413+
414+
const (
415+
AS112TimeseriesParamsResponseCodeNoerror AS112TimeseriesParamsResponseCode = "NOERROR"
416+
AS112TimeseriesParamsResponseCodeFormerr AS112TimeseriesParamsResponseCode = "FORMERR"
417+
AS112TimeseriesParamsResponseCodeServfail AS112TimeseriesParamsResponseCode = "SERVFAIL"
418+
AS112TimeseriesParamsResponseCodeNxdomain AS112TimeseriesParamsResponseCode = "NXDOMAIN"
419+
AS112TimeseriesParamsResponseCodeNotimp AS112TimeseriesParamsResponseCode = "NOTIMP"
420+
AS112TimeseriesParamsResponseCodeRefused AS112TimeseriesParamsResponseCode = "REFUSED"
421+
AS112TimeseriesParamsResponseCodeYxdomain AS112TimeseriesParamsResponseCode = "YXDOMAIN"
422+
AS112TimeseriesParamsResponseCodeYxrrset AS112TimeseriesParamsResponseCode = "YXRRSET"
423+
AS112TimeseriesParamsResponseCodeNxrrset AS112TimeseriesParamsResponseCode = "NXRRSET"
424+
AS112TimeseriesParamsResponseCodeNotauth AS112TimeseriesParamsResponseCode = "NOTAUTH"
425+
AS112TimeseriesParamsResponseCodeNotzone AS112TimeseriesParamsResponseCode = "NOTZONE"
426+
AS112TimeseriesParamsResponseCodeBadsig AS112TimeseriesParamsResponseCode = "BADSIG"
427+
AS112TimeseriesParamsResponseCodeBadkey AS112TimeseriesParamsResponseCode = "BADKEY"
428+
AS112TimeseriesParamsResponseCodeBadtime AS112TimeseriesParamsResponseCode = "BADTIME"
429+
AS112TimeseriesParamsResponseCodeBadmode AS112TimeseriesParamsResponseCode = "BADMODE"
430+
AS112TimeseriesParamsResponseCodeBadname AS112TimeseriesParamsResponseCode = "BADNAME"
431+
AS112TimeseriesParamsResponseCodeBadalg AS112TimeseriesParamsResponseCode = "BADALG"
432+
AS112TimeseriesParamsResponseCodeBadtrunc AS112TimeseriesParamsResponseCode = "BADTRUNC"
433+
AS112TimeseriesParamsResponseCodeBadcookie AS112TimeseriesParamsResponseCode = "BADCOOKIE"
434+
)
435+
436+
func (r AS112TimeseriesParamsResponseCode) IsKnown() bool {
437+
switch r {
438+
case AS112TimeseriesParamsResponseCodeNoerror, AS112TimeseriesParamsResponseCodeFormerr, AS112TimeseriesParamsResponseCodeServfail, AS112TimeseriesParamsResponseCodeNxdomain, AS112TimeseriesParamsResponseCodeNotimp, AS112TimeseriesParamsResponseCodeRefused, AS112TimeseriesParamsResponseCodeYxdomain, AS112TimeseriesParamsResponseCodeYxrrset, AS112TimeseriesParamsResponseCodeNxrrset, AS112TimeseriesParamsResponseCodeNotauth, AS112TimeseriesParamsResponseCodeNotzone, AS112TimeseriesParamsResponseCodeBadsig, AS112TimeseriesParamsResponseCodeBadkey, AS112TimeseriesParamsResponseCodeBadtime, AS112TimeseriesParamsResponseCodeBadmode, AS112TimeseriesParamsResponseCodeBadname, AS112TimeseriesParamsResponseCodeBadalg, AS112TimeseriesParamsResponseCodeBadtrunc, AS112TimeseriesParamsResponseCodeBadcookie:
439+
return true
440+
}
441+
return false
442+
}
443+
285444
type AS112TimeseriesResponseEnvelope struct {
286445
Result AS112TimeseriesResponse `json:"result,required"`
287446
Success bool `json:"success,required"`

‎radar/as112_test.go

+12-9
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@ func TestAS112TimeseriesWithOptionalParams(t *testing.T) {
2929
option.WithAPIEmail("user@example.com"),
3030
)
3131
_, err := client.Radar.AS112.Timeseries(context.TODO(), radar.AS112TimeseriesParams{
32-
AggInterval: cloudflare.F(radar.AS112TimeseriesParamsAggInterval15m),
33-
ASN: cloudflare.F([]string{"string"}),
34-
Continent: cloudflare.F([]string{"string"}),
35-
DateEnd: cloudflare.F([]time.Time{time.Now()}),
36-
DateRange: cloudflare.F([]string{"7d"}),
37-
DateStart: cloudflare.F([]time.Time{time.Now()}),
38-
Format: cloudflare.F(radar.AS112TimeseriesParamsFormatJson),
39-
Location: cloudflare.F([]string{"string"}),
40-
Name: cloudflare.F([]string{"main_series"}),
32+
AggInterval: cloudflare.F(radar.AS112TimeseriesParamsAggInterval15m),
33+
ASN: cloudflare.F([]string{"string"}),
34+
Continent: cloudflare.F([]string{"string"}),
35+
DateEnd: cloudflare.F([]time.Time{time.Now()}),
36+
DateRange: cloudflare.F([]string{"7d"}),
37+
DateStart: cloudflare.F([]time.Time{time.Now()}),
38+
Format: cloudflare.F(radar.AS112TimeseriesParamsFormatJson),
39+
Location: cloudflare.F([]string{"string"}),
40+
Name: cloudflare.F([]string{"main_series"}),
41+
Protocol: cloudflare.F(radar.AS112TimeseriesParamsProtocolUdp),
42+
QueryType: cloudflare.F(radar.AS112TimeseriesParamsQueryTypeA),
43+
ResponseCode: cloudflare.F(radar.AS112TimeseriesParamsResponseCodeNoerror),
4144
})
4245
if err != nil {
4346
var apierr *cloudflare.Error

‎radar/as112summary.go

+802-3
Large diffs are not rendered by default.

‎radar/as112summary_test.go

+47-32
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ func TestAS112SummaryDNSSECWithOptionalParams(t *testing.T) {
2929
option.WithAPIEmail("user@example.com"),
3030
)
3131
_, err := client.Radar.AS112.Summary.DNSSEC(context.TODO(), radar.AS112SummaryDNSSECParams{
32-
ASN: cloudflare.F([]string{"string"}),
33-
Continent: cloudflare.F([]string{"string"}),
34-
DateEnd: cloudflare.F([]time.Time{time.Now()}),
35-
DateRange: cloudflare.F([]string{"7d"}),
36-
DateStart: cloudflare.F([]time.Time{time.Now()}),
37-
Format: cloudflare.F(radar.AS112SummaryDNSSECParamsFormatJson),
38-
Location: cloudflare.F([]string{"string"}),
39-
Name: cloudflare.F([]string{"main_series"}),
32+
ASN: cloudflare.F([]string{"string"}),
33+
Continent: cloudflare.F([]string{"string"}),
34+
DateEnd: cloudflare.F([]time.Time{time.Now()}),
35+
DateRange: cloudflare.F([]string{"7d"}),
36+
DateStart: cloudflare.F([]time.Time{time.Now()}),
37+
Format: cloudflare.F(radar.AS112SummaryDNSSECParamsFormatJson),
38+
Location: cloudflare.F([]string{"string"}),
39+
Name: cloudflare.F([]string{"main_series"}),
40+
Protocol: cloudflare.F(radar.AS112SummaryDNSSECParamsProtocolUdp),
41+
QueryType: cloudflare.F(radar.AS112SummaryDNSSECParamsQueryTypeA),
42+
ResponseCode: cloudflare.F(radar.AS112SummaryDNSSECParamsResponseCodeNoerror),
4043
})
4144
if err != nil {
4245
var apierr *cloudflare.Error
@@ -61,14 +64,17 @@ func TestAS112SummaryEdnsWithOptionalParams(t *testing.T) {
6164
option.WithAPIEmail("user@example.com"),
6265
)
6366
_, err := client.Radar.AS112.Summary.Edns(context.TODO(), radar.AS112SummaryEdnsParams{
64-
ASN: cloudflare.F([]string{"string"}),
65-
Continent: cloudflare.F([]string{"string"}),
66-
DateEnd: cloudflare.F([]time.Time{time.Now()}),
67-
DateRange: cloudflare.F([]string{"7d"}),
68-
DateStart: cloudflare.F([]time.Time{time.Now()}),
69-
Format: cloudflare.F(radar.AS112SummaryEdnsParamsFormatJson),
70-
Location: cloudflare.F([]string{"string"}),
71-
Name: cloudflare.F([]string{"main_series"}),
67+
ASN: cloudflare.F([]string{"string"}),
68+
Continent: cloudflare.F([]string{"string"}),
69+
DateEnd: cloudflare.F([]time.Time{time.Now()}),
70+
DateRange: cloudflare.F([]string{"7d"}),
71+
DateStart: cloudflare.F([]time.Time{time.Now()}),
72+
Format: cloudflare.F(radar.AS112SummaryEdnsParamsFormatJson),
73+
Location: cloudflare.F([]string{"string"}),
74+
Name: cloudflare.F([]string{"main_series"}),
75+
Protocol: cloudflare.F(radar.AS112SummaryEdnsParamsProtocolUdp),
76+
QueryType: cloudflare.F(radar.AS112SummaryEdnsParamsQueryTypeA),
77+
ResponseCode: cloudflare.F(radar.AS112SummaryEdnsParamsResponseCodeNoerror),
7278
})
7379
if err != nil {
7480
var apierr *cloudflare.Error
@@ -93,14 +99,17 @@ func TestAS112SummaryIPVersionWithOptionalParams(t *testing.T) {
9399
option.WithAPIEmail("user@example.com"),
94100
)
95101
_, err := client.Radar.AS112.Summary.IPVersion(context.TODO(), radar.AS112SummaryIPVersionParams{
96-
ASN: cloudflare.F([]string{"string"}),
97-
Continent: cloudflare.F([]string{"string"}),
98-
DateEnd: cloudflare.F([]time.Time{time.Now()}),
99-
DateRange: cloudflare.F([]string{"7d"}),
100-
DateStart: cloudflare.F([]time.Time{time.Now()}),
101-
Format: cloudflare.F(radar.AS112SummaryIPVersionParamsFormatJson),
102-
Location: cloudflare.F([]string{"string"}),
103-
Name: cloudflare.F([]string{"main_series"}),
102+
ASN: cloudflare.F([]string{"string"}),
103+
Continent: cloudflare.F([]string{"string"}),
104+
DateEnd: cloudflare.F([]time.Time{time.Now()}),
105+
DateRange: cloudflare.F([]string{"7d"}),
106+
DateStart: cloudflare.F([]time.Time{time.Now()}),
107+
Format: cloudflare.F(radar.AS112SummaryIPVersionParamsFormatJson),
108+
Location: cloudflare.F([]string{"string"}),
109+
Name: cloudflare.F([]string{"main_series"}),
110+
Protocol: cloudflare.F(radar.AS112SummaryIPVersionParamsProtocolUdp),
111+
QueryType: cloudflare.F(radar.AS112SummaryIPVersionParamsQueryTypeA),
112+
ResponseCode: cloudflare.F(radar.AS112SummaryIPVersionParamsResponseCodeNoerror),
104113
})
105114
if err != nil {
106115
var apierr *cloudflare.Error
@@ -125,14 +134,16 @@ func TestAS112SummaryProtocolWithOptionalParams(t *testing.T) {
125134
option.WithAPIEmail("user@example.com"),
126135
)
127136
_, err := client.Radar.AS112.Summary.Protocol(context.TODO(), radar.AS112SummaryProtocolParams{
128-
ASN: cloudflare.F([]string{"string"}),
129-
Continent: cloudflare.F([]string{"string"}),
130-
DateEnd: cloudflare.F([]time.Time{time.Now()}),
131-
DateRange: cloudflare.F([]string{"7d"}),
132-
DateStart: cloudflare.F([]time.Time{time.Now()}),
133-
Format: cloudflare.F(radar.AS112SummaryProtocolParamsFormatJson),
134-
Location: cloudflare.F([]string{"string"}),
135-
Name: cloudflare.F([]string{"main_series"}),
137+
ASN: cloudflare.F([]string{"string"}),
138+
Continent: cloudflare.F([]string{"string"}),
139+
DateEnd: cloudflare.F([]time.Time{time.Now()}),
140+
DateRange: cloudflare.F([]string{"7d"}),
141+
DateStart: cloudflare.F([]time.Time{time.Now()}),
142+
Format: cloudflare.F(radar.AS112SummaryProtocolParamsFormatJson),
143+
Location: cloudflare.F([]string{"string"}),
144+
Name: cloudflare.F([]string{"main_series"}),
145+
QueryType: cloudflare.F(radar.AS112SummaryProtocolParamsQueryTypeA),
146+
ResponseCode: cloudflare.F(radar.AS112SummaryProtocolParamsResponseCodeNoerror),
136147
})
137148
if err != nil {
138149
var apierr *cloudflare.Error
@@ -166,6 +177,8 @@ func TestAS112SummaryQueryTypeWithOptionalParams(t *testing.T) {
166177
LimitPerGroup: cloudflare.F(int64(10)),
167178
Location: cloudflare.F([]string{"string"}),
168179
Name: cloudflare.F([]string{"main_series"}),
180+
Protocol: cloudflare.F(radar.AS112SummaryQueryTypeParamsProtocolUdp),
181+
ResponseCode: cloudflare.F(radar.AS112SummaryQueryTypeParamsResponseCodeNoerror),
169182
})
170183
if err != nil {
171184
var apierr *cloudflare.Error
@@ -199,6 +212,8 @@ func TestAS112SummaryResponseCodesWithOptionalParams(t *testing.T) {
199212
LimitPerGroup: cloudflare.F(int64(10)),
200213
Location: cloudflare.F([]string{"string"}),
201214
Name: cloudflare.F([]string{"main_series"}),
215+
Protocol: cloudflare.F(radar.AS112SummaryResponseCodesParamsProtocolUdp),
216+
QueryType: cloudflare.F(radar.AS112SummaryResponseCodesParamsQueryTypeA),
202217
})
203218
if err != nil {
204219
var apierr *cloudflare.Error

‎radar/as112timeseriesgroup.go

+810-19
Large diffs are not rendered by default.

‎radar/as112timeseriesgroup_test.go

+51-36
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@ func TestAS112TimeseriesGroupDNSSECWithOptionalParams(t *testing.T) {
2929
option.WithAPIEmail("user@example.com"),
3030
)
3131
_, err := client.Radar.AS112.TimeseriesGroups.DNSSEC(context.TODO(), radar.AS112TimeseriesGroupDNSSECParams{
32-
AggInterval: cloudflare.F(radar.AS112TimeseriesGroupDNSSECParamsAggInterval15m),
33-
ASN: cloudflare.F([]string{"string"}),
34-
Continent: cloudflare.F([]string{"string"}),
35-
DateEnd: cloudflare.F([]time.Time{time.Now()}),
36-
DateRange: cloudflare.F([]string{"7d"}),
37-
DateStart: cloudflare.F([]time.Time{time.Now()}),
38-
Format: cloudflare.F(radar.AS112TimeseriesGroupDNSSECParamsFormatJson),
39-
Location: cloudflare.F([]string{"string"}),
40-
Name: cloudflare.F([]string{"main_series"}),
32+
AggInterval: cloudflare.F(radar.AS112TimeseriesGroupDNSSECParamsAggInterval15m),
33+
ASN: cloudflare.F([]string{"string"}),
34+
Continent: cloudflare.F([]string{"string"}),
35+
DateEnd: cloudflare.F([]time.Time{time.Now()}),
36+
DateRange: cloudflare.F([]string{"7d"}),
37+
DateStart: cloudflare.F([]time.Time{time.Now()}),
38+
Format: cloudflare.F(radar.AS112TimeseriesGroupDNSSECParamsFormatJson),
39+
Location: cloudflare.F([]string{"string"}),
40+
Name: cloudflare.F([]string{"main_series"}),
41+
Protocol: cloudflare.F(radar.AS112TimeseriesGroupDNSSECParamsProtocolUdp),
42+
QueryType: cloudflare.F(radar.AS112TimeseriesGroupDNSSECParamsQueryTypeA),
43+
ResponseCode: cloudflare.F(radar.AS112TimeseriesGroupDNSSECParamsResponseCodeNoerror),
4144
})
4245
if err != nil {
4346
var apierr *cloudflare.Error
@@ -62,15 +65,18 @@ func TestAS112TimeseriesGroupEdnsWithOptionalParams(t *testing.T) {
6265
option.WithAPIEmail("user@example.com"),
6366
)
6467
_, err := client.Radar.AS112.TimeseriesGroups.Edns(context.TODO(), radar.AS112TimeseriesGroupEdnsParams{
65-
AggInterval: cloudflare.F(radar.AS112TimeseriesGroupEdnsParamsAggInterval15m),
66-
ASN: cloudflare.F([]string{"string"}),
67-
Continent: cloudflare.F([]string{"string"}),
68-
DateEnd: cloudflare.F([]time.Time{time.Now()}),
69-
DateRange: cloudflare.F([]string{"7d"}),
70-
DateStart: cloudflare.F([]time.Time{time.Now()}),
71-
Format: cloudflare.F(radar.AS112TimeseriesGroupEdnsParamsFormatJson),
72-
Location: cloudflare.F([]string{"string"}),
73-
Name: cloudflare.F([]string{"main_series"}),
68+
AggInterval: cloudflare.F(radar.AS112TimeseriesGroupEdnsParamsAggInterval15m),
69+
ASN: cloudflare.F([]string{"string"}),
70+
Continent: cloudflare.F([]string{"string"}),
71+
DateEnd: cloudflare.F([]time.Time{time.Now()}),
72+
DateRange: cloudflare.F([]string{"7d"}),
73+
DateStart: cloudflare.F([]time.Time{time.Now()}),
74+
Format: cloudflare.F(radar.AS112TimeseriesGroupEdnsParamsFormatJson),
75+
Location: cloudflare.F([]string{"string"}),
76+
Name: cloudflare.F([]string{"main_series"}),
77+
Protocol: cloudflare.F(radar.AS112TimeseriesGroupEdnsParamsProtocolUdp),
78+
QueryType: cloudflare.F(radar.AS112TimeseriesGroupEdnsParamsQueryTypeA),
79+
ResponseCode: cloudflare.F(radar.AS112TimeseriesGroupEdnsParamsResponseCodeNoerror),
7480
})
7581
if err != nil {
7682
var apierr *cloudflare.Error
@@ -95,15 +101,18 @@ func TestAS112TimeseriesGroupIPVersionWithOptionalParams(t *testing.T) {
95101
option.WithAPIEmail("user@example.com"),
96102
)
97103
_, err := client.Radar.AS112.TimeseriesGroups.IPVersion(context.TODO(), radar.AS112TimeseriesGroupIPVersionParams{
98-
AggInterval: cloudflare.F(radar.AS112TimeseriesGroupIPVersionParamsAggInterval15m),
99-
ASN: cloudflare.F([]string{"string"}),
100-
Continent: cloudflare.F([]string{"string"}),
101-
DateEnd: cloudflare.F([]time.Time{time.Now()}),
102-
DateRange: cloudflare.F([]string{"7d"}),
103-
DateStart: cloudflare.F([]time.Time{time.Now()}),
104-
Format: cloudflare.F(radar.AS112TimeseriesGroupIPVersionParamsFormatJson),
105-
Location: cloudflare.F([]string{"string"}),
106-
Name: cloudflare.F([]string{"main_series"}),
104+
AggInterval: cloudflare.F(radar.AS112TimeseriesGroupIPVersionParamsAggInterval15m),
105+
ASN: cloudflare.F([]string{"string"}),
106+
Continent: cloudflare.F([]string{"string"}),
107+
DateEnd: cloudflare.F([]time.Time{time.Now()}),
108+
DateRange: cloudflare.F([]string{"7d"}),
109+
DateStart: cloudflare.F([]time.Time{time.Now()}),
110+
Format: cloudflare.F(radar.AS112TimeseriesGroupIPVersionParamsFormatJson),
111+
Location: cloudflare.F([]string{"string"}),
112+
Name: cloudflare.F([]string{"main_series"}),
113+
Protocol: cloudflare.F(radar.AS112TimeseriesGroupIPVersionParamsProtocolUdp),
114+
QueryType: cloudflare.F(radar.AS112TimeseriesGroupIPVersionParamsQueryTypeA),
115+
ResponseCode: cloudflare.F(radar.AS112TimeseriesGroupIPVersionParamsResponseCodeNoerror),
107116
})
108117
if err != nil {
109118
var apierr *cloudflare.Error
@@ -128,15 +137,17 @@ func TestAS112TimeseriesGroupProtocolWithOptionalParams(t *testing.T) {
128137
option.WithAPIEmail("user@example.com"),
129138
)
130139
_, err := client.Radar.AS112.TimeseriesGroups.Protocol(context.TODO(), radar.AS112TimeseriesGroupProtocolParams{
131-
AggInterval: cloudflare.F(radar.AS112TimeseriesGroupProtocolParamsAggInterval15m),
132-
ASN: cloudflare.F([]string{"string"}),
133-
Continent: cloudflare.F([]string{"string"}),
134-
DateEnd: cloudflare.F([]time.Time{time.Now()}),
135-
DateRange: cloudflare.F([]string{"7d"}),
136-
DateStart: cloudflare.F([]time.Time{time.Now()}),
137-
Format: cloudflare.F(radar.AS112TimeseriesGroupProtocolParamsFormatJson),
138-
Location: cloudflare.F([]string{"string"}),
139-
Name: cloudflare.F([]string{"main_series"}),
140+
AggInterval: cloudflare.F(radar.AS112TimeseriesGroupProtocolParamsAggInterval15m),
141+
ASN: cloudflare.F([]string{"string"}),
142+
Continent: cloudflare.F([]string{"string"}),
143+
DateEnd: cloudflare.F([]time.Time{time.Now()}),
144+
DateRange: cloudflare.F([]string{"7d"}),
145+
DateStart: cloudflare.F([]time.Time{time.Now()}),
146+
Format: cloudflare.F(radar.AS112TimeseriesGroupProtocolParamsFormatJson),
147+
Location: cloudflare.F([]string{"string"}),
148+
Name: cloudflare.F([]string{"main_series"}),
149+
QueryType: cloudflare.F(radar.AS112TimeseriesGroupProtocolParamsQueryTypeA),
150+
ResponseCode: cloudflare.F(radar.AS112TimeseriesGroupProtocolParamsResponseCodeNoerror),
140151
})
141152
if err != nil {
142153
var apierr *cloudflare.Error
@@ -171,6 +182,8 @@ func TestAS112TimeseriesGroupQueryTypeWithOptionalParams(t *testing.T) {
171182
LimitPerGroup: cloudflare.F(int64(10)),
172183
Location: cloudflare.F([]string{"string"}),
173184
Name: cloudflare.F([]string{"main_series"}),
185+
Protocol: cloudflare.F(radar.AS112TimeseriesGroupQueryTypeParamsProtocolUdp),
186+
ResponseCode: cloudflare.F(radar.AS112TimeseriesGroupQueryTypeParamsResponseCodeNoerror),
174187
})
175188
if err != nil {
176189
var apierr *cloudflare.Error
@@ -205,6 +218,8 @@ func TestAS112TimeseriesGroupResponseCodesWithOptionalParams(t *testing.T) {
205218
LimitPerGroup: cloudflare.F(int64(10)),
206219
Location: cloudflare.F([]string{"string"}),
207220
Name: cloudflare.F([]string{"main_series"}),
221+
Protocol: cloudflare.F(radar.AS112TimeseriesGroupResponseCodesParamsProtocolUdp),
222+
QueryType: cloudflare.F(radar.AS112TimeseriesGroupResponseCodesParamsQueryTypeA),
208223
})
209224
if err != nil {
210225
var apierr *cloudflare.Error

‎radar/dnstimeseriesgroup.go

+8-22
Original file line numberDiff line numberDiff line change
@@ -521,22 +521,15 @@ func (r dnsTimeseriesGroupQueryTypeResponseJSON) RawJSON() string {
521521
}
522522

523523
type DNSTimeseriesGroupQueryTypeResponseSerie0 struct {
524-
A []string `json:"A,required"`
525-
AAAA []string `json:"AAAA,required"`
526-
HTTPS []string `json:"HTTPS,required"`
527-
NS []string `json:"NS,required"`
528-
PTR []string `json:"PTR,required"`
529-
JSON dnsTimeseriesGroupQueryTypeResponseSerie0JSON `json:"-"`
524+
Timestamps []string `json:"timestamps,required"`
525+
ExtraFields map[string][]string `json:"-,extras"`
526+
JSON dnsTimeseriesGroupQueryTypeResponseSerie0JSON `json:"-"`
530527
}
531528

532529
// dnsTimeseriesGroupQueryTypeResponseSerie0JSON contains the JSON metadata for the
533530
// struct [DNSTimeseriesGroupQueryTypeResponseSerie0]
534531
type dnsTimeseriesGroupQueryTypeResponseSerie0JSON struct {
535-
A apijson.Field
536-
AAAA apijson.Field
537-
HTTPS apijson.Field
538-
NS apijson.Field
539-
PTR apijson.Field
532+
Timestamps apijson.Field
540533
raw string
541534
ExtraFields map[string]apijson.Field
542535
}
@@ -573,22 +566,15 @@ func (r dnsTimeseriesGroupResponseCodeResponseJSON) RawJSON() string {
573566
}
574567

575568
type DNSTimeseriesGroupResponseCodeResponseSerie0 struct {
576-
Noerror []string `json:"NOERROR,required"`
577-
Notimp []string `json:"NOTIMP,required"`
578-
Nxdomain []string `json:"NXDOMAIN,required"`
579-
Refused []string `json:"REFUSED,required"`
580-
Servfail []string `json:"SERVFAIL,required"`
581-
JSON dnsTimeseriesGroupResponseCodeResponseSerie0JSON `json:"-"`
569+
Timestamps []string `json:"timestamps,required"`
570+
ExtraFields map[string][]string `json:"-,extras"`
571+
JSON dnsTimeseriesGroupResponseCodeResponseSerie0JSON `json:"-"`
582572
}
583573

584574
// dnsTimeseriesGroupResponseCodeResponseSerie0JSON contains the JSON metadata for
585575
// the struct [DNSTimeseriesGroupResponseCodeResponseSerie0]
586576
type dnsTimeseriesGroupResponseCodeResponseSerie0JSON struct {
587-
Noerror apijson.Field
588-
Notimp apijson.Field
589-
Nxdomain apijson.Field
590-
Refused apijson.Field
591-
Servfail apijson.Field
577+
Timestamps apijson.Field
592578
raw string
593579
ExtraFields map[string]apijson.Field
594580
}

0 commit comments

Comments
 (0)
Please sign in to comment.