From 3a0bb65a4a952d2d364724555806fa06416a785b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 07:59:04 +1100 Subject: [PATCH] release: 2.0.0-beta.15 (#1614) * feat(api): update via SDK Studio (#1613) * release: 2.0.0-beta.15 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++ README.md | 2 +- api.md | 106 +++++++++--------- d1/database.go | 4 +- dns/record.go | 8 +- firewall/wafoverride.go | 6 +- hostnames/settingtls.go | 6 +- images/v1key.go | 8 +- images/v1key_test.go | 4 +- images/v1variant.go | 20 ++-- images/v1variant_test.go | 8 +- intel/domain.go | 4 +- intel/domainbulk.go | 4 +- intel/domainhistory.go | 6 +- intel/domainhistory_test.go | 2 +- intel/ip.go | 8 +- intel/miscategorization.go | 8 +- intel/miscategorization_test.go | 25 ++--- internal/version.go | 2 +- load_balancers/preview.go | 4 +- magic_network_monitoring/config.go | 20 ++-- magic_network_monitoring/config_test.go | 10 +- magic_network_monitoring/configfull.go | 4 +- magic_network_monitoring/configfull_test.go | 2 +- magic_network_monitoring/rule.go | 36 +++--- magic_network_monitoring/rule_test.go | 12 +- magic_network_monitoring/ruleadvertisement.go | 6 +- .../ruleadvertisement_test.go | 2 +- mtls_certificates/mtlscertificate.go | 2 +- page_shield/connection.go | 20 ++-- page_shield/script.go | 60 +++++----- pages/project.go | 8 +- pages/projectdeployment.go | 8 +- pages/projectdomain.go | 8 +- queues/consumer.go | 4 +- queues/queue.go | 2 +- registrar/domain.go | 6 +- secondary_dns/acl.go | 30 ++--- secondary_dns/acl_test.go | 10 +- secondary_dns/forceaxfr.go | 4 +- secondary_dns/forceaxfr_test.go | 2 +- secondary_dns/incoming.go | 24 ++-- secondary_dns/incoming_test.go | 8 +- secondary_dns/outgoing.go | 36 +++--- secondary_dns/outgoing_test.go | 14 +-- secondary_dns/outgoingstatus.go | 4 +- secondary_dns/outgoingstatus_test.go | 2 +- secondary_dns/peer.go | 30 ++--- secondary_dns/peer_test.go | 10 +- secondary_dns/tsig.go | 30 ++--- secondary_dns/tsig_test.go | 10 +- stream/embed.go | 4 +- subscriptions/subscription.go | 6 +- subscriptions/subscription_test.go | 4 +- user/loadbalancerpreview.go | 4 +- user/subscription.go | 6 +- user/subscription_test.go | 4 +- vectorize/index.go | 4 +- waiting_rooms/event.go | 30 ++--- waiting_rooms/eventdetail.go | 10 +- waiting_rooms/rule.go | 20 ++-- waiting_rooms/status.go | 4 +- waiting_rooms/waitingroom.go | 20 ++-- workers/accountsetting.go | 4 +- workers/accountsetting_test.go | 2 +- workers/domain.go | 28 ++--- workers/domain_test.go | 12 +- workers/scriptschedule.go | 4 +- workers/scriptschedule_test.go | 2 +- workers/scriptusagemodel.go | 4 +- workers/scriptusagemodel_test.go | 2 +- workers/subdomain.go | 4 +- workers/subdomain_test.go | 2 +- zero_trust/accessapplication.go | 6 +- zero_trust/accessbookmark.go | 20 ++-- zero_trust/accesslogaccessrequest.go | 2 +- zero_trust/device.go | 8 +- zero_trust/device_test.go | 4 +- zero_trust/devicedextest.go | 20 ++-- zero_trust/devicedextest_test.go | 10 +- zero_trust/devicenetwork.go | 20 ++-- zero_trust/devicenetwork_test.go | 10 +- zero_trust/deviceoverridecode.go | 14 +-- zero_trust/deviceoverridecode_test.go | 2 +- zero_trust/devicepolicy.go | 20 ++-- zero_trust/devicepolicy_test.go | 10 +- zero_trust/devicepolicydefaultpolicy.go | 4 +- zero_trust/devicepolicydefaultpolicy_test.go | 2 +- zero_trust/devicepolicyexclude.go | 12 +- zero_trust/devicepolicyexclude_test.go | 6 +- zero_trust/devicepolicyfallbackdomain.go | 12 +- zero_trust/devicepolicyfallbackdomain_test.go | 6 +- zero_trust/devicepolicyinclude.go | 12 +- zero_trust/devicepolicyinclude_test.go | 6 +- zero_trust/deviceposture.go | 20 ++-- zero_trust/deviceposture_test.go | 10 +- zero_trust/devicepostureintegration.go | 20 ++-- zero_trust/devicepostureintegration_test.go | 10 +- zero_trust/devicerevoke.go | 4 +- zero_trust/devicerevoke_test.go | 2 +- zero_trust/devicesetting.go | 8 +- zero_trust/devicesetting_test.go | 4 +- zero_trust/deviceunrevoke.go | 4 +- zero_trust/deviceunrevoke_test.go | 2 +- zero_trust/gateway.go | 8 +- zero_trust/gateway_test.go | 4 +- zero_trust/gatewayauditsshsetting.go | 8 +- zero_trust/gatewayauditsshsetting_test.go | 4 +- zero_trust/gatewayconfiguration.go | 12 +- zero_trust/gatewayconfiguration_test.go | 6 +- zero_trust/gatewaylist.go | 24 ++-- zero_trust/gatewaylist_test.go | 12 +- zero_trust/gatewaylistitem.go | 4 +- zero_trust/gatewaylistitem_test.go | 2 +- zero_trust/gatewaylocation.go | 28 ++--- zero_trust/gatewaylocation_test.go | 10 +- zero_trust/gatewaylogging.go | 8 +- zero_trust/gatewaylogging_test.go | 4 +- zero_trust/gatewayproxyendpoint.go | 30 ++--- zero_trust/gatewayproxyendpoint_test.go | 10 +- zero_trust/gatewayrule.go | 20 ++-- zero_trust/gatewayrule_test.go | 10 +- zones/subscription.go | 4 +- zones/subscription_test.go | 2 +- 125 files changed, 671 insertions(+), 678 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6be9e31bec..39477e0530 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.0.0-beta.14" + ".": "2.0.0-beta.15" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a98c9f9a8f..940a0aa5e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.0.0-beta.15 (2024-03-26) + +Full Changelog: [v2.0.0-beta.14...v2.0.0-beta.15](https://github.com/cloudflare/cloudflare-go/compare/v2.0.0-beta.14...v2.0.0-beta.15) + +### Features + +* **api:** update via SDK Studio ([#1613](https://github.com/cloudflare/cloudflare-go/issues/1613)) ([e4a1ad5](https://github.com/cloudflare/cloudflare-go/commit/e4a1ad5bb5039657b02cd97f6e00a7e2cc887b09)) + ## 2.0.0-beta.14 (2024-03-25) Full Changelog: [v2.0.0-beta.13...v2.0.0-beta.14](https://github.com/cloudflare/cloudflare-go/compare/v2.0.0-beta.13...v2.0.0-beta.14) diff --git a/README.md b/README.md index a1d6ac2e24..14fcfd51fe 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Or to pin the version: ```sh -go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.0.0-beta.14' +go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.0.0-beta.15' ``` diff --git a/api.md b/api.md index f059044f17..3c830c8977 100644 --- a/api.md +++ b/api.md @@ -216,7 +216,7 @@ Response Types: Methods: -- client.User.LoadBalancers.Preview.Get(ctx context.Context, previewID interface{}) (user.LoadBalancingPreviewResult, error) +- client.User.LoadBalancers.Preview.Get(ctx context.Context, previewID string) (user.LoadBalancingPreviewResult, error) ### Analytics @@ -1252,7 +1252,7 @@ Methods: Methods: -- client.LoadBalancers.Previews.Get(ctx context.Context, previewID interface{}, query load_balancers.PreviewGetParams) (user.LoadBalancingPreviewResult, error) +- client.LoadBalancers.Previews.Get(ctx context.Context, previewID string, query load_balancers.PreviewGetParams) (user.LoadBalancingPreviewResult, error) ## Regions @@ -2243,10 +2243,10 @@ Response Types: Methods: - client.SecondaryDNS.ACLs.New(ctx context.Context, params secondary_dns.ACLNewParams) (secondary_dns.SecondaryDNSACL, error) -- client.SecondaryDNS.ACLs.Update(ctx context.Context, aclID interface{}, params secondary_dns.ACLUpdateParams) (secondary_dns.SecondaryDNSACL, error) +- client.SecondaryDNS.ACLs.Update(ctx context.Context, aclID string, params secondary_dns.ACLUpdateParams) (secondary_dns.SecondaryDNSACL, error) - client.SecondaryDNS.ACLs.List(ctx context.Context, query secondary_dns.ACLListParams) ([]secondary_dns.SecondaryDNSACL, error) -- client.SecondaryDNS.ACLs.Delete(ctx context.Context, aclID interface{}, body secondary_dns.ACLDeleteParams) (secondary_dns.ACLDeleteResponse, error) -- client.SecondaryDNS.ACLs.Get(ctx context.Context, aclID interface{}, query secondary_dns.ACLGetParams) (secondary_dns.SecondaryDNSACL, error) +- client.SecondaryDNS.ACLs.Delete(ctx context.Context, aclID string, body secondary_dns.ACLDeleteParams) (secondary_dns.ACLDeleteResponse, error) +- client.SecondaryDNS.ACLs.Get(ctx context.Context, aclID string, query secondary_dns.ACLGetParams) (secondary_dns.SecondaryDNSACL, error) ## Peers @@ -2258,10 +2258,10 @@ Response Types: Methods: - client.SecondaryDNS.Peers.New(ctx context.Context, params secondary_dns.PeerNewParams) (secondary_dns.SecondaryDNSPeer, error) -- client.SecondaryDNS.Peers.Update(ctx context.Context, peerID interface{}, params secondary_dns.PeerUpdateParams) (secondary_dns.SecondaryDNSPeer, error) +- client.SecondaryDNS.Peers.Update(ctx context.Context, peerID string, params secondary_dns.PeerUpdateParams) (secondary_dns.SecondaryDNSPeer, error) - client.SecondaryDNS.Peers.List(ctx context.Context, query secondary_dns.PeerListParams) ([]secondary_dns.SecondaryDNSPeer, error) -- client.SecondaryDNS.Peers.Delete(ctx context.Context, peerID interface{}, body secondary_dns.PeerDeleteParams) (secondary_dns.PeerDeleteResponse, error) -- client.SecondaryDNS.Peers.Get(ctx context.Context, peerID interface{}, query secondary_dns.PeerGetParams) (secondary_dns.SecondaryDNSPeer, error) +- client.SecondaryDNS.Peers.Delete(ctx context.Context, peerID string, body secondary_dns.PeerDeleteParams) (secondary_dns.PeerDeleteResponse, error) +- client.SecondaryDNS.Peers.Get(ctx context.Context, peerID string, query secondary_dns.PeerGetParams) (secondary_dns.SecondaryDNSPeer, error) ## TSIGs @@ -2273,10 +2273,10 @@ Response Types: Methods: - client.SecondaryDNS.TSIGs.New(ctx context.Context, params secondary_dns.TSIGNewParams) (secondary_dns.SecondaryDNSTSIG, error) -- client.SecondaryDNS.TSIGs.Update(ctx context.Context, tsigID interface{}, params secondary_dns.TSIGUpdateParams) (secondary_dns.SecondaryDNSTSIG, error) +- client.SecondaryDNS.TSIGs.Update(ctx context.Context, tsigID string, params secondary_dns.TSIGUpdateParams) (secondary_dns.SecondaryDNSTSIG, error) - client.SecondaryDNS.TSIGs.List(ctx context.Context, query secondary_dns.TSIGListParams) ([]secondary_dns.SecondaryDNSTSIG, error) -- client.SecondaryDNS.TSIGs.Delete(ctx context.Context, tsigID interface{}, body secondary_dns.TSIGDeleteParams) (secondary_dns.TSIGDeleteResponse, error) -- client.SecondaryDNS.TSIGs.Get(ctx context.Context, tsigID interface{}, query secondary_dns.TSIGGetParams) (secondary_dns.SecondaryDNSTSIG, error) +- client.SecondaryDNS.TSIGs.Delete(ctx context.Context, tsigID string, body secondary_dns.TSIGDeleteParams) (secondary_dns.TSIGDeleteResponse, error) +- client.SecondaryDNS.TSIGs.Get(ctx context.Context, tsigID string, query secondary_dns.TSIGGetParams) (secondary_dns.SecondaryDNSTSIG, error) # WaitingRooms @@ -2288,11 +2288,11 @@ Response Types: Methods: - client.WaitingRooms.New(ctx context.Context, zoneIdentifier string, body waiting_rooms.WaitingRoomNewParams) (waiting_rooms.WaitingroomWaitingroom, error) -- client.WaitingRooms.Update(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body waiting_rooms.WaitingRoomUpdateParams) (waiting_rooms.WaitingroomWaitingroom, error) +- client.WaitingRooms.Update(ctx context.Context, zoneIdentifier string, waitingRoomID string, body waiting_rooms.WaitingRoomUpdateParams) (waiting_rooms.WaitingroomWaitingroom, error) - client.WaitingRooms.List(ctx context.Context, zoneIdentifier string) ([]waiting_rooms.WaitingroomWaitingroom, error) -- client.WaitingRooms.Delete(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}) (waiting_rooms.WaitingRoomDeleteResponse, error) -- client.WaitingRooms.Edit(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body waiting_rooms.WaitingRoomEditParams) (waiting_rooms.WaitingroomWaitingroom, error) -- client.WaitingRooms.Get(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}) (waiting_rooms.WaitingroomWaitingroom, error) +- client.WaitingRooms.Delete(ctx context.Context, zoneIdentifier string, waitingRoomID string) (waiting_rooms.WaitingRoomDeleteResponse, error) +- client.WaitingRooms.Edit(ctx context.Context, zoneIdentifier string, waitingRoomID string, body waiting_rooms.WaitingRoomEditParams) (waiting_rooms.WaitingroomWaitingroom, error) +- client.WaitingRooms.Get(ctx context.Context, zoneIdentifier string, waitingRoomID string) (waiting_rooms.WaitingroomWaitingroom, error) ## Page @@ -2313,12 +2313,12 @@ Response Types: Methods: -- client.WaitingRooms.Events.New(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body waiting_rooms.EventNewParams) (waiting_rooms.WaitingroomEventResult, error) -- client.WaitingRooms.Events.Update(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}, body waiting_rooms.EventUpdateParams) (waiting_rooms.WaitingroomEventResult, error) -- client.WaitingRooms.Events.List(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}) ([]waiting_rooms.WaitingroomEventResult, error) -- client.WaitingRooms.Events.Delete(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}) (waiting_rooms.EventDeleteResponse, error) -- client.WaitingRooms.Events.Edit(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}, body waiting_rooms.EventEditParams) (waiting_rooms.WaitingroomEventResult, error) -- client.WaitingRooms.Events.Get(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}) (waiting_rooms.WaitingroomEventResult, error) +- client.WaitingRooms.Events.New(ctx context.Context, zoneIdentifier string, waitingRoomID string, body waiting_rooms.EventNewParams) (waiting_rooms.WaitingroomEventResult, error) +- client.WaitingRooms.Events.Update(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string, body waiting_rooms.EventUpdateParams) (waiting_rooms.WaitingroomEventResult, error) +- client.WaitingRooms.Events.List(ctx context.Context, zoneIdentifier string, waitingRoomID string) ([]waiting_rooms.WaitingroomEventResult, error) +- client.WaitingRooms.Events.Delete(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string) (waiting_rooms.EventDeleteResponse, error) +- client.WaitingRooms.Events.Edit(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string, body waiting_rooms.EventEditParams) (waiting_rooms.WaitingroomEventResult, error) +- client.WaitingRooms.Events.Get(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string) (waiting_rooms.WaitingroomEventResult, error) ### Details @@ -2328,7 +2328,7 @@ Response Types: Methods: -- client.WaitingRooms.Events.Details.Get(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}) (waiting_rooms.WaitingroomEventDetailsResult, error) +- client.WaitingRooms.Events.Details.Get(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string) (waiting_rooms.WaitingroomEventDetailsResult, error) ## Rules @@ -2338,11 +2338,11 @@ Response Types: Methods: -- client.WaitingRooms.Rules.New(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body waiting_rooms.RuleNewParams) ([]waiting_rooms.WaitingroomRuleResult, error) -- client.WaitingRooms.Rules.Update(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body waiting_rooms.RuleUpdateParams) ([]waiting_rooms.WaitingroomRuleResult, error) -- client.WaitingRooms.Rules.List(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}) ([]waiting_rooms.WaitingroomRuleResult, error) -- client.WaitingRooms.Rules.Delete(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, ruleID string) ([]waiting_rooms.WaitingroomRuleResult, error) -- client.WaitingRooms.Rules.Edit(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, ruleID string, body waiting_rooms.RuleEditParams) ([]waiting_rooms.WaitingroomRuleResult, error) +- client.WaitingRooms.Rules.New(ctx context.Context, zoneIdentifier string, waitingRoomID string, body waiting_rooms.RuleNewParams) ([]waiting_rooms.WaitingroomRuleResult, error) +- client.WaitingRooms.Rules.Update(ctx context.Context, zoneIdentifier string, waitingRoomID string, body waiting_rooms.RuleUpdateParams) ([]waiting_rooms.WaitingroomRuleResult, error) +- client.WaitingRooms.Rules.List(ctx context.Context, zoneIdentifier string, waitingRoomID string) ([]waiting_rooms.WaitingroomRuleResult, error) +- client.WaitingRooms.Rules.Delete(ctx context.Context, zoneIdentifier string, waitingRoomID string, ruleID string) ([]waiting_rooms.WaitingroomRuleResult, error) +- client.WaitingRooms.Rules.Edit(ctx context.Context, zoneIdentifier string, waitingRoomID string, ruleID string, body waiting_rooms.RuleEditParams) ([]waiting_rooms.WaitingroomRuleResult, error) ## Statuses @@ -2352,7 +2352,7 @@ Response Types: Methods: -- client.WaitingRooms.Statuses.Get(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}) (waiting_rooms.StatusGetResponse, error) +- client.WaitingRooms.Statuses.Get(ctx context.Context, zoneIdentifier string, waitingRoomID string) (waiting_rooms.StatusGetResponse, error) ## Settings @@ -2590,8 +2590,8 @@ Methods: - client.Workers.Domains.Update(ctx context.Context, params workers.DomainUpdateParams) (workers.WorkersDomain, error) - client.Workers.Domains.List(ctx context.Context, params workers.DomainListParams) ([]workers.WorkersDomain, error) -- client.Workers.Domains.Delete(ctx context.Context, domainID interface{}, body workers.DomainDeleteParams) error -- client.Workers.Domains.Get(ctx context.Context, domainID interface{}, query workers.DomainGetParams) (workers.WorkersDomain, error) +- client.Workers.Domains.Delete(ctx context.Context, domainID string, body workers.DomainDeleteParams) error +- client.Workers.Domains.Get(ctx context.Context, domainID string, query workers.DomainGetParams) (workers.WorkersDomain, error) ## Subdomains @@ -3159,9 +3159,9 @@ Response Types: Methods: -- client.Images.V1.Keys.Update(ctx context.Context, signingKeyName interface{}, body images.V1KeyUpdateParams) (images.ImagesImageKeys, error) +- client.Images.V1.Keys.Update(ctx context.Context, signingKeyName string, body images.V1KeyUpdateParams) (images.ImagesImageKeys, error) - client.Images.V1.Keys.List(ctx context.Context, query images.V1KeyListParams) (images.ImagesImageKeys, error) -- client.Images.V1.Keys.Delete(ctx context.Context, signingKeyName interface{}, body images.V1KeyDeleteParams) (images.ImagesImageKeys, error) +- client.Images.V1.Keys.Delete(ctx context.Context, signingKeyName string, body images.V1KeyDeleteParams) (images.ImagesImageKeys, error) ### Stats @@ -3185,9 +3185,9 @@ Methods: - client.Images.V1.Variants.New(ctx context.Context, params images.V1VariantNewParams) (images.ImageVariant, error) - client.Images.V1.Variants.List(ctx context.Context, query images.V1VariantListParams) (images.ImageVariants, error) -- client.Images.V1.Variants.Delete(ctx context.Context, variantID interface{}, body images.V1VariantDeleteParams) (images.V1VariantDeleteResponse, error) -- client.Images.V1.Variants.Edit(ctx context.Context, variantID interface{}, params images.V1VariantEditParams) (images.ImageVariant, error) -- client.Images.V1.Variants.Get(ctx context.Context, variantID interface{}, query images.V1VariantGetParams) (images.ImageVariant, error) +- client.Images.V1.Variants.Delete(ctx context.Context, variantID string, body images.V1VariantDeleteParams) (images.V1VariantDeleteResponse, error) +- client.Images.V1.Variants.Edit(ctx context.Context, variantID string, params images.V1VariantEditParams) (images.ImageVariant, error) +- client.Images.V1.Variants.Get(ctx context.Context, variantID string, query images.V1VariantGetParams) (images.ImageVariant, error) ### Blobs @@ -3567,9 +3567,9 @@ Methods: - client.MagicNetworkMonitoring.Rules.New(ctx context.Context, body magic_network_monitoring.RuleNewParams) (magic_network_monitoring.MagicVisibilityMNMRule, error) - client.MagicNetworkMonitoring.Rules.Update(ctx context.Context, body magic_network_monitoring.RuleUpdateParams) (magic_network_monitoring.MagicVisibilityMNMRule, error) - client.MagicNetworkMonitoring.Rules.List(ctx context.Context, query magic_network_monitoring.RuleListParams) ([]magic_network_monitoring.MagicVisibilityMNMRule, error) -- client.MagicNetworkMonitoring.Rules.Delete(ctx context.Context, ruleID interface{}, body magic_network_monitoring.RuleDeleteParams) (magic_network_monitoring.MagicVisibilityMNMRule, error) -- client.MagicNetworkMonitoring.Rules.Edit(ctx context.Context, ruleID interface{}, body magic_network_monitoring.RuleEditParams) (magic_network_monitoring.MagicVisibilityMNMRule, error) -- client.MagicNetworkMonitoring.Rules.Get(ctx context.Context, ruleID interface{}, query magic_network_monitoring.RuleGetParams) (magic_network_monitoring.MagicVisibilityMNMRule, error) +- client.MagicNetworkMonitoring.Rules.Delete(ctx context.Context, ruleID string, body magic_network_monitoring.RuleDeleteParams) (magic_network_monitoring.MagicVisibilityMNMRule, error) +- client.MagicNetworkMonitoring.Rules.Edit(ctx context.Context, ruleID string, body magic_network_monitoring.RuleEditParams) (magic_network_monitoring.MagicVisibilityMNMRule, error) +- client.MagicNetworkMonitoring.Rules.Get(ctx context.Context, ruleID string, query magic_network_monitoring.RuleGetParams) (magic_network_monitoring.MagicVisibilityMNMRule, error) ### Advertisements @@ -3579,7 +3579,7 @@ Response Types: Methods: -- client.MagicNetworkMonitoring.Rules.Advertisements.Edit(ctx context.Context, ruleID interface{}, body magic_network_monitoring.RuleAdvertisementEditParams) (magic_network_monitoring.MagicVisibilityMNMRuleAdvertisable, error) +- client.MagicNetworkMonitoring.Rules.Advertisements.Edit(ctx context.Context, ruleID string, body magic_network_monitoring.RuleAdvertisementEditParams) (magic_network_monitoring.MagicVisibilityMNMRuleAdvertisable, error) # MTLSCertificates @@ -3965,13 +3965,9 @@ Methods: ## Embed -Response Types: - -- stream.EmbedGetResponse - Methods: -- client.Stream.Embed.Get(ctx context.Context, identifier string, query stream.EmbedGetParams) (stream.EmbedGetResponse, error) +- client.Stream.Embed.Get(ctx context.Context, identifier string, query stream.EmbedGetParams) (string, error) ## Token @@ -4555,11 +4551,11 @@ Response Types: Methods: -- client.ZeroTrust.Access.Bookmarks.New(ctx context.Context, identifier interface{}, uuid string) (zero_trust.AccessBookmarks, error) -- client.ZeroTrust.Access.Bookmarks.Update(ctx context.Context, identifier interface{}, uuid string) (zero_trust.AccessBookmarks, error) -- client.ZeroTrust.Access.Bookmarks.List(ctx context.Context, identifier interface{}) ([]zero_trust.AccessBookmarks, error) -- client.ZeroTrust.Access.Bookmarks.Delete(ctx context.Context, identifier interface{}, uuid string) (zero_trust.AccessBookmarkDeleteResponse, error) -- client.ZeroTrust.Access.Bookmarks.Get(ctx context.Context, identifier interface{}, uuid string) (zero_trust.AccessBookmarks, error) +- client.ZeroTrust.Access.Bookmarks.New(ctx context.Context, identifier string, uuid string) (zero_trust.AccessBookmarks, error) +- client.ZeroTrust.Access.Bookmarks.Update(ctx context.Context, identifier string, uuid string) (zero_trust.AccessBookmarks, error) +- client.ZeroTrust.Access.Bookmarks.List(ctx context.Context, identifier string) ([]zero_trust.AccessBookmarks, error) +- client.ZeroTrust.Access.Bookmarks.Delete(ctx context.Context, identifier string, uuid string) (zero_trust.AccessBookmarkDeleteResponse, error) +- client.ZeroTrust.Access.Bookmarks.Get(ctx context.Context, identifier string, uuid string) (zero_trust.AccessBookmarks, error) ### Keys @@ -5020,10 +5016,10 @@ Response Types: Methods: - client.ZeroTrust.Gateway.Locations.New(ctx context.Context, params zero_trust.GatewayLocationNewParams) (zero_trust.ZeroTrustGatewayLocations, error) -- client.ZeroTrust.Gateway.Locations.Update(ctx context.Context, locationID interface{}, params zero_trust.GatewayLocationUpdateParams) (zero_trust.ZeroTrustGatewayLocations, error) +- client.ZeroTrust.Gateway.Locations.Update(ctx context.Context, locationID string, params zero_trust.GatewayLocationUpdateParams) (zero_trust.ZeroTrustGatewayLocations, error) - client.ZeroTrust.Gateway.Locations.List(ctx context.Context, query zero_trust.GatewayLocationListParams) ([]zero_trust.ZeroTrustGatewayLocations, error) -- client.ZeroTrust.Gateway.Locations.Delete(ctx context.Context, locationID interface{}, body zero_trust.GatewayLocationDeleteParams) (zero_trust.GatewayLocationDeleteResponse, error) -- client.ZeroTrust.Gateway.Locations.Get(ctx context.Context, locationID interface{}, query zero_trust.GatewayLocationGetParams) (zero_trust.ZeroTrustGatewayLocations, error) +- client.ZeroTrust.Gateway.Locations.Delete(ctx context.Context, locationID string, body zero_trust.GatewayLocationDeleteParams) (zero_trust.GatewayLocationDeleteResponse, error) +- client.ZeroTrust.Gateway.Locations.Get(ctx context.Context, locationID string, query zero_trust.GatewayLocationGetParams) (zero_trust.ZeroTrustGatewayLocations, error) ### Logging @@ -5047,9 +5043,9 @@ Methods: - client.ZeroTrust.Gateway.ProxyEndpoints.New(ctx context.Context, params zero_trust.GatewayProxyEndpointNewParams) (zero_trust.ZeroTrustGatewayProxyEndpoints, error) - client.ZeroTrust.Gateway.ProxyEndpoints.List(ctx context.Context, query zero_trust.GatewayProxyEndpointListParams) ([]zero_trust.ZeroTrustGatewayProxyEndpoints, error) -- client.ZeroTrust.Gateway.ProxyEndpoints.Delete(ctx context.Context, proxyEndpointID interface{}, body zero_trust.GatewayProxyEndpointDeleteParams) (zero_trust.GatewayProxyEndpointDeleteResponse, error) -- client.ZeroTrust.Gateway.ProxyEndpoints.Edit(ctx context.Context, proxyEndpointID interface{}, params zero_trust.GatewayProxyEndpointEditParams) (zero_trust.ZeroTrustGatewayProxyEndpoints, error) -- client.ZeroTrust.Gateway.ProxyEndpoints.Get(ctx context.Context, proxyEndpointID interface{}, query zero_trust.GatewayProxyEndpointGetParams) (zero_trust.ZeroTrustGatewayProxyEndpoints, error) +- client.ZeroTrust.Gateway.ProxyEndpoints.Delete(ctx context.Context, proxyEndpointID string, body zero_trust.GatewayProxyEndpointDeleteParams) (zero_trust.GatewayProxyEndpointDeleteResponse, error) +- client.ZeroTrust.Gateway.ProxyEndpoints.Edit(ctx context.Context, proxyEndpointID string, params zero_trust.GatewayProxyEndpointEditParams) (zero_trust.ZeroTrustGatewayProxyEndpoints, error) +- client.ZeroTrust.Gateway.ProxyEndpoints.Get(ctx context.Context, proxyEndpointID string, query zero_trust.GatewayProxyEndpointGetParams) (zero_trust.ZeroTrustGatewayProxyEndpoints, error) ### Rules diff --git a/d1/database.go b/d1/database.go index f536be795b..fd0f13d12c 100644 --- a/d1/database.go +++ b/d1/database.go @@ -112,7 +112,7 @@ func (r *DatabaseService) Query(ctx context.Context, accountIdentifier string, d type D1CreateDatabase struct { // Specifies the timestamp the resource was created as an ISO8601 string. - CreatedAt interface{} `json:"created_at"` + CreatedAt string `json:"created_at"` Name string `json:"name"` UUID string `json:"uuid"` Version string `json:"version"` @@ -140,7 +140,7 @@ func (r d1CreateDatabaseJSON) RawJSON() string { type D1DatabaseDetails struct { // Specifies the timestamp the resource was created as an ISO8601 string. - CreatedAt interface{} `json:"created_at"` + CreatedAt string `json:"created_at"` // The D1 database's size, in bytes. FileSize float64 `json:"file_size"` Name string `json:"name"` diff --git a/dns/record.go b/dns/record.go index aeb7715125..8937d9910b 100644 --- a/dns/record.go +++ b/dns/record.go @@ -2229,7 +2229,7 @@ func (r DNSRecordNAPTRTTLNumber) IsKnown() bool { type DNSRecordNS struct { // A valid name server host name. - Content interface{} `json:"content,required"` + Content string `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. @@ -4807,7 +4807,7 @@ type RecordNewParamsDNSRecordsNSRecord struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` // A valid name server host name. - Content param.Field[interface{}] `json:"content,required"` + Content param.Field[string] `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. @@ -6618,7 +6618,7 @@ type RecordUpdateParamsDNSRecordsNSRecord struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` // A valid name server host name. - Content param.Field[interface{}] `json:"content,required"` + Content param.Field[string] `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. @@ -8661,7 +8661,7 @@ type RecordEditParamsDNSRecordsNSRecord struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` // A valid name server host name. - Content param.Field[interface{}] `json:"content,required"` + Content param.Field[string] `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. diff --git a/firewall/wafoverride.go b/firewall/wafoverride.go index 2ccddf007a..d2079bc286 100644 --- a/firewall/wafoverride.go +++ b/firewall/wafoverride.go @@ -188,11 +188,11 @@ func (r legacyJhsOverrideJSON) RawJSON() string { type LegacyJhsOverrideRewriteAction struct { // The WAF rule action to apply. Block LegacyJhsOverrideRewriteActionBlock `json:"block"` - Challenge interface{} `json:"challenge"` - Default interface{} `json:"default"` + Challenge string `json:"challenge"` + Default string `json:"default"` // The WAF rule action to apply. Disable LegacyJhsOverrideRewriteActionDisable `json:"disable"` - Simulate interface{} `json:"simulate"` + Simulate string `json:"simulate"` JSON legacyJhsOverrideRewriteActionJSON `json:"-"` } diff --git a/hostnames/settingtls.go b/hostnames/settingtls.go index 26602cb662..f09258e613 100644 --- a/hostnames/settingtls.go +++ b/hostnames/settingtls.go @@ -143,11 +143,11 @@ type TLSCertificatesAndHostnamesSettingObjectDelete struct { // This is the time the tls setting was originally created for this hostname. CreatedAt time.Time `json:"created_at" format:"date-time"` // The hostname for which the tls settings are set. - Hostname string `json:"hostname"` - Status interface{} `json:"status"` + Hostname string `json:"hostname"` + Status string `json:"status"` // This is the time the tls setting was updated. UpdatedAt time.Time `json:"updated_at" format:"date-time"` - Value interface{} `json:"value"` + Value string `json:"value"` JSON tlsCertificatesAndHostnamesSettingObjectDeleteJSON `json:"-"` } diff --git a/images/v1key.go b/images/v1key.go index f577100bde..c65a531c3d 100644 --- a/images/v1key.go +++ b/images/v1key.go @@ -31,10 +31,10 @@ func NewV1KeyService(opts ...option.RequestOption) (r *V1KeyService) { } // Create a new signing key with specified name. Returns all keys available. -func (r *V1KeyService) Update(ctx context.Context, signingKeyName interface{}, body V1KeyUpdateParams, opts ...option.RequestOption) (res *ImagesImageKeys, err error) { +func (r *V1KeyService) Update(ctx context.Context, signingKeyName string, body V1KeyUpdateParams, opts ...option.RequestOption) (res *ImagesImageKeys, err error) { opts = append(r.Options[:], opts...) var env V1KeyUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%s/images/v1/keys/%v", body.AccountID, signingKeyName) + path := fmt.Sprintf("accounts/%s/images/v1/keys/%s", body.AccountID, signingKeyName) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) if err != nil { return @@ -58,10 +58,10 @@ func (r *V1KeyService) List(ctx context.Context, query V1KeyListParams, opts ... // Delete signing key with specified name. Returns all keys available. When last // key is removed, a new default signing key will be generated. -func (r *V1KeyService) Delete(ctx context.Context, signingKeyName interface{}, body V1KeyDeleteParams, opts ...option.RequestOption) (res *ImagesImageKeys, err error) { +func (r *V1KeyService) Delete(ctx context.Context, signingKeyName string, body V1KeyDeleteParams, opts ...option.RequestOption) (res *ImagesImageKeys, err error) { opts = append(r.Options[:], opts...) var env V1KeyDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/images/v1/keys/%v", body.AccountID, signingKeyName) + path := fmt.Sprintf("accounts/%s/images/v1/keys/%s", body.AccountID, signingKeyName) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return diff --git a/images/v1key_test.go b/images/v1key_test.go index 670ae3783c..beb81dbced 100644 --- a/images/v1key_test.go +++ b/images/v1key_test.go @@ -30,7 +30,7 @@ func TestV1KeyUpdate(t *testing.T) { ) _, err := client.Images.V1.Keys.Update( context.TODO(), - "someKey", + "string", images.V1KeyUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, @@ -86,7 +86,7 @@ func TestV1KeyDelete(t *testing.T) { ) _, err := client.Images.V1.Keys.Delete( context.TODO(), - "someKey", + "string", images.V1KeyDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, diff --git a/images/v1variant.go b/images/v1variant.go index 77e9312ab4..ca8575736d 100644 --- a/images/v1variant.go +++ b/images/v1variant.go @@ -60,10 +60,10 @@ func (r *V1VariantService) List(ctx context.Context, query V1VariantListParams, } // Deleting a variant purges the cache for all images associated with the variant. -func (r *V1VariantService) Delete(ctx context.Context, variantID interface{}, body V1VariantDeleteParams, opts ...option.RequestOption) (res *V1VariantDeleteResponse, err error) { +func (r *V1VariantService) Delete(ctx context.Context, variantID string, body V1VariantDeleteParams, opts ...option.RequestOption) (res *V1VariantDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env V1VariantDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/images/v1/variants/%v", body.AccountID, variantID) + path := fmt.Sprintf("accounts/%s/images/v1/variants/%s", body.AccountID, variantID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -73,10 +73,10 @@ func (r *V1VariantService) Delete(ctx context.Context, variantID interface{}, bo } // Updating a variant purges the cache for all images associated with the variant. -func (r *V1VariantService) Edit(ctx context.Context, variantID interface{}, params V1VariantEditParams, opts ...option.RequestOption) (res *ImageVariant, err error) { +func (r *V1VariantService) Edit(ctx context.Context, variantID string, params V1VariantEditParams, opts ...option.RequestOption) (res *ImageVariant, err error) { opts = append(r.Options[:], opts...) var env V1VariantEditResponseEnvelope - path := fmt.Sprintf("accounts/%s/images/v1/variants/%v", params.AccountID, variantID) + path := fmt.Sprintf("accounts/%s/images/v1/variants/%s", params.AccountID, variantID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return @@ -86,10 +86,10 @@ func (r *V1VariantService) Edit(ctx context.Context, variantID interface{}, para } // Fetch details for a single variant. -func (r *V1VariantService) Get(ctx context.Context, variantID interface{}, query V1VariantGetParams, opts ...option.RequestOption) (res *ImageVariant, err error) { +func (r *V1VariantService) Get(ctx context.Context, variantID string, query V1VariantGetParams, opts ...option.RequestOption) (res *ImageVariant, err error) { opts = append(r.Options[:], opts...) var env V1VariantGetResponseEnvelope - path := fmt.Sprintf("accounts/%s/images/v1/variants/%v", query.AccountID, variantID) + path := fmt.Sprintf("accounts/%s/images/v1/variants/%s", query.AccountID, variantID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -119,7 +119,7 @@ func (r imageVariantJSON) RawJSON() string { } type ImageVariantVariant struct { - ID interface{} `json:"id,required"` + ID string `json:"id,required"` // Allows you to define image resizing sizes for different use cases. Options ImageVariantVariantOptions `json:"options,required"` // Indicates whether the variant can access an image without a signature, @@ -258,7 +258,7 @@ func (r imageVariantsVariantsJSON) RawJSON() string { } type ImageVariantsVariantsHero struct { - ID interface{} `json:"id,required"` + ID string `json:"id,required"` // Allows you to define image resizing sizes for different use cases. Options ImageVariantsVariantsHeroOptions `json:"options,required"` // Indicates whether the variant can access an image without a signature, @@ -374,8 +374,8 @@ func init() { type V1VariantNewParams struct { // Account identifier tag. - AccountID param.Field[string] `path:"account_id,required"` - ID param.Field[interface{}] `json:"id,required"` + AccountID param.Field[string] `path:"account_id,required"` + ID param.Field[string] `json:"id,required"` // Allows you to define image resizing sizes for different use cases. Options param.Field[V1VariantNewParamsOptions] `json:"options,required"` // Indicates whether the variant can access an image without a signature, diff --git a/images/v1variant_test.go b/images/v1variant_test.go index 1fd9546afb..e379a4a24a 100644 --- a/images/v1variant_test.go +++ b/images/v1variant_test.go @@ -30,7 +30,7 @@ func TestV1VariantNewWithOptionalParams(t *testing.T) { ) _, err := client.Images.V1.Variants.New(context.TODO(), images.V1VariantNewParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - ID: cloudflare.F[any]("hero"), + ID: cloudflare.F("string"), Options: cloudflare.F(images.V1VariantNewParamsOptions{ Fit: cloudflare.F(images.V1VariantNewParamsOptionsFitScaleDown), Height: cloudflare.F(768.000000), @@ -90,7 +90,7 @@ func TestV1VariantDelete(t *testing.T) { ) _, err := client.Images.V1.Variants.Delete( context.TODO(), - "hero", + "string", images.V1VariantDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, @@ -120,7 +120,7 @@ func TestV1VariantEditWithOptionalParams(t *testing.T) { ) _, err := client.Images.V1.Variants.Edit( context.TODO(), - "hero", + "string", images.V1VariantEditParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Options: cloudflare.F(images.V1VariantEditParamsOptions{ @@ -157,7 +157,7 @@ func TestV1VariantGet(t *testing.T) { ) _, err := client.Images.V1.Variants.Get( context.TODO(), - "hero", + "string", images.V1VariantGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, diff --git a/intel/domain.go b/intel/domain.go index a252bf5eb9..bd62eaa4d8 100644 --- a/intel/domain.go +++ b/intel/domain.go @@ -53,7 +53,7 @@ type IntelDomain struct { // Application that the hostname belongs to. Application IntelDomainApplication `json:"application"` // Current content categories. - ContentCategories interface{} `json:"content_categories"` + ContentCategories []interface{} `json:"content_categories"` Domain string `json:"domain"` InheritedContentCategories []IntelDomainInheritedContentCategory `json:"inherited_content_categories"` // Domain from which `inherited_content_categories` and `inherited_risk_types` are @@ -69,7 +69,7 @@ type IntelDomain struct { // Hostname risk score, which is a value between 0 (lowest risk) to 1 (highest // risk). RiskScore float64 `json:"risk_score"` - RiskTypes interface{} `json:"risk_types"` + RiskTypes []interface{} `json:"risk_types"` JSON intelDomainJSON `json:"-"` } diff --git a/intel/domainbulk.go b/intel/domainbulk.go index 724068b13b..806fabed34 100644 --- a/intel/domainbulk.go +++ b/intel/domainbulk.go @@ -51,7 +51,7 @@ type DomainBulkGetResponse struct { // Application that the hostname belongs to. Application DomainBulkGetResponseApplication `json:"application"` // Current content categories. - ContentCategories interface{} `json:"content_categories"` + ContentCategories []interface{} `json:"content_categories"` Domain string `json:"domain"` InheritedContentCategories []DomainBulkGetResponseInheritedContentCategory `json:"inherited_content_categories"` // Domain from which `inherited_content_categories` and `inherited_risk_types` are @@ -64,7 +64,7 @@ type DomainBulkGetResponse struct { // Hostname risk score, which is a value between 0 (lowest risk) to 1 (highest // risk). RiskScore float64 `json:"risk_score"` - RiskTypes interface{} `json:"risk_types"` + RiskTypes []interface{} `json:"risk_types"` JSON domainBulkGetResponseJSON `json:"-"` } diff --git a/intel/domainhistory.go b/intel/domainhistory.go index 2bda690bf9..597849240b 100644 --- a/intel/domainhistory.go +++ b/intel/domainhistory.go @@ -71,7 +71,7 @@ func (r intelDomainHistoryJSON) RawJSON() string { } type IntelDomainHistoryCategorization struct { - Categories interface{} `json:"categories"` + Categories []interface{} `json:"categories"` End time.Time `json:"end" format:"date"` Start time.Time `json:"start" format:"date"` JSON intelDomainHistoryCategorizationJSON `json:"-"` @@ -97,8 +97,8 @@ func (r intelDomainHistoryCategorizationJSON) RawJSON() string { type DomainHistoryGetParams struct { // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Domain param.Field[interface{}] `query:"domain"` + AccountID param.Field[string] `path:"account_id,required"` + Domain param.Field[string] `query:"domain"` } // URLQuery serializes [DomainHistoryGetParams]'s query parameters as `url.Values`. diff --git a/intel/domainhistory_test.go b/intel/domainhistory_test.go index 8b2b5f1571..8de27a2770 100644 --- a/intel/domainhistory_test.go +++ b/intel/domainhistory_test.go @@ -30,7 +30,7 @@ func TestDomainHistoryGetWithOptionalParams(t *testing.T) { ) _, err := client.Intel.DomainHistory.Get(context.TODO(), intel.DomainHistoryGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Domain: cloudflare.F[any]("example.com"), + Domain: cloudflare.F("example.com"), }) if err != nil { var apierr *cloudflare.Error diff --git a/intel/ip.go b/intel/ip.go index 759bd07747..fcc3213871 100644 --- a/intel/ip.go +++ b/intel/ip.go @@ -53,7 +53,7 @@ type IntelSchemasIP struct { // to. BelongsToRef IntelSchemasIPBelongsToRef `json:"belongs_to_ref"` IP IntelSchemasIPIP `json:"ip" format:"ipv4"` - RiskTypes interface{} `json:"risk_types"` + RiskTypes []interface{} `json:"risk_types"` JSON intelSchemasIPJSON `json:"-"` } @@ -77,9 +77,9 @@ func (r intelSchemasIPJSON) RawJSON() string { // Specifies a reference to the autonomous systems (AS) that the IP address belongs // to. type IntelSchemasIPBelongsToRef struct { - ID interface{} `json:"id"` - Country string `json:"country"` - Description string `json:"description"` + ID string `json:"id"` + Country string `json:"country"` + Description string `json:"description"` // Infrastructure type of this ASN. Type IntelSchemasIPBelongsToRefType `json:"type"` Value string `json:"value"` diff --git a/intel/miscategorization.go b/intel/miscategorization.go index 69ec89555a..e822ea1d48 100644 --- a/intel/miscategorization.go +++ b/intel/miscategorization.go @@ -68,16 +68,16 @@ type MiscategorizationNewParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` // Content category IDs to add. - ContentAdds param.Field[interface{}] `json:"content_adds"` + ContentAdds param.Field[[]float64] `json:"content_adds"` // Content category IDs to remove. - ContentRemoves param.Field[interface{}] `json:"content_removes"` + ContentRemoves param.Field[[]float64] `json:"content_removes"` IndicatorType param.Field[MiscategorizationNewParamsIndicatorType] `json:"indicator_type"` // Provide only if indicator_type is `ipv4` or `ipv6`. IP param.Field[interface{}] `json:"ip"` // Security category IDs to add. - SecurityAdds param.Field[interface{}] `json:"security_adds"` + SecurityAdds param.Field[[]float64] `json:"security_adds"` // Security category IDs to remove. - SecurityRemoves param.Field[interface{}] `json:"security_removes"` + SecurityRemoves param.Field[[]float64] `json:"security_removes"` // Provide only if indicator_type is `domain` or `url`. Example if indicator_type // is `domain`: `example.com`. Example if indicator_type is `url`: // `https://example.com/news/`. diff --git a/intel/miscategorization_test.go b/intel/miscategorization_test.go index 903e033574..11936e603a 100644 --- a/intel/miscategorization_test.go +++ b/intel/miscategorization_test.go @@ -29,23 +29,14 @@ func TestMiscategorizationNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Intel.Miscategorizations.New(context.TODO(), intel.MiscategorizationNewParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - ContentAdds: cloudflare.F[any](map[string]interface{}{ - "0": int64(82), - }), - ContentRemoves: cloudflare.F[any](map[string]interface{}{ - "0": int64(155), - }), - IndicatorType: cloudflare.F(intel.MiscategorizationNewParamsIndicatorTypeDomain), - IP: cloudflare.F[any](map[string]interface{}{}), - SecurityAdds: cloudflare.F[any](map[string]interface{}{ - "0": int64(117), - "1": int64(131), - }), - SecurityRemoves: cloudflare.F[any](map[string]interface{}{ - "0": int64(83), - }), - URL: cloudflare.F("string"), + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + ContentAdds: cloudflare.F([]float64{82.000000}), + ContentRemoves: cloudflare.F([]float64{155.000000}), + IndicatorType: cloudflare.F(intel.MiscategorizationNewParamsIndicatorTypeDomain), + IP: cloudflare.F[any](map[string]interface{}{}), + SecurityAdds: cloudflare.F([]float64{117.000000, 131.000000}), + SecurityRemoves: cloudflare.F([]float64{83.000000}), + URL: cloudflare.F("string"), }) if err != nil { var apierr *cloudflare.Error diff --git a/internal/version.go b/internal/version.go index 602a327ec7..ad6cd28224 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "2.0.0-beta.14" // x-release-please-version +const PackageVersion = "2.0.0-beta.15" // x-release-please-version diff --git a/load_balancers/preview.go b/load_balancers/preview.go index adbeeaa141..6768b33178 100644 --- a/load_balancers/preview.go +++ b/load_balancers/preview.go @@ -32,10 +32,10 @@ func NewPreviewService(opts ...option.RequestOption) (r *PreviewService) { } // Get the result of a previous preview operation using the provided preview_id. -func (r *PreviewService) Get(ctx context.Context, previewID interface{}, query PreviewGetParams, opts ...option.RequestOption) (res *user.LoadBalancingPreviewResult, err error) { +func (r *PreviewService) Get(ctx context.Context, previewID string, query PreviewGetParams, opts ...option.RequestOption) (res *user.LoadBalancingPreviewResult, err error) { opts = append(r.Options[:], opts...) var env PreviewGetResponseEnvelope - path := fmt.Sprintf("accounts/%s/load_balancers/preview/%v", query.AccountID, previewID) + path := fmt.Sprintf("accounts/%s/load_balancers/preview/%s", query.AccountID, previewID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return diff --git a/magic_network_monitoring/config.go b/magic_network_monitoring/config.go index 4549d171b4..e1b58add45 100644 --- a/magic_network_monitoring/config.go +++ b/magic_network_monitoring/config.go @@ -36,7 +36,7 @@ func NewConfigService(opts ...option.RequestOption) (r *ConfigService) { func (r *ConfigService) New(ctx context.Context, body ConfigNewParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error) { opts = append(r.Options[:], opts...) var env ConfigNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/config", body.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/config", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) if err != nil { return @@ -50,7 +50,7 @@ func (r *ConfigService) New(ctx context.Context, body ConfigNewParams, opts ...o func (r *ConfigService) Update(ctx context.Context, body ConfigUpdateParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error) { opts = append(r.Options[:], opts...) var env ConfigUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/config", body.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/config", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) if err != nil { return @@ -63,7 +63,7 @@ func (r *ConfigService) Update(ctx context.Context, body ConfigUpdateParams, opt func (r *ConfigService) Delete(ctx context.Context, body ConfigDeleteParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error) { opts = append(r.Options[:], opts...) var env ConfigDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/config", body.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/config", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -76,7 +76,7 @@ func (r *ConfigService) Delete(ctx context.Context, body ConfigDeleteParams, opt func (r *ConfigService) Edit(ctx context.Context, body ConfigEditParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error) { opts = append(r.Options[:], opts...) var env ConfigEditResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/config", body.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/config", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...) if err != nil { return @@ -89,7 +89,7 @@ func (r *ConfigService) Edit(ctx context.Context, body ConfigEditParams, opts .. func (r *ConfigService) Get(ctx context.Context, query ConfigGetParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error) { opts = append(r.Options[:], opts...) var env ConfigGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/config", query.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/config", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -127,7 +127,7 @@ func (r magicVisibilityMNMConfigJSON) RawJSON() string { } type ConfigNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type ConfigNewResponseEnvelope struct { @@ -220,7 +220,7 @@ func (r ConfigNewResponseEnvelopeSuccess) IsKnown() bool { } type ConfigUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type ConfigUpdateResponseEnvelope struct { @@ -313,7 +313,7 @@ func (r ConfigUpdateResponseEnvelopeSuccess) IsKnown() bool { } type ConfigDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type ConfigDeleteResponseEnvelope struct { @@ -406,7 +406,7 @@ func (r ConfigDeleteResponseEnvelopeSuccess) IsKnown() bool { } type ConfigEditParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type ConfigEditResponseEnvelope struct { @@ -499,7 +499,7 @@ func (r ConfigEditResponseEnvelopeSuccess) IsKnown() bool { } type ConfigGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type ConfigGetResponseEnvelope struct { diff --git a/magic_network_monitoring/config_test.go b/magic_network_monitoring/config_test.go index c41c6194a9..197f0a1845 100644 --- a/magic_network_monitoring/config_test.go +++ b/magic_network_monitoring/config_test.go @@ -29,7 +29,7 @@ func TestConfigNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.MagicNetworkMonitoring.Configs.New(context.TODO(), magic_network_monitoring.ConfigNewParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }) if err != nil { var apierr *cloudflare.Error @@ -55,7 +55,7 @@ func TestConfigUpdate(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.MagicNetworkMonitoring.Configs.Update(context.TODO(), magic_network_monitoring.ConfigUpdateParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }) if err != nil { var apierr *cloudflare.Error @@ -81,7 +81,7 @@ func TestConfigDelete(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.MagicNetworkMonitoring.Configs.Delete(context.TODO(), magic_network_monitoring.ConfigDeleteParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }) if err != nil { var apierr *cloudflare.Error @@ -107,7 +107,7 @@ func TestConfigEdit(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.MagicNetworkMonitoring.Configs.Edit(context.TODO(), magic_network_monitoring.ConfigEditParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }) if err != nil { var apierr *cloudflare.Error @@ -133,7 +133,7 @@ func TestConfigGet(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.MagicNetworkMonitoring.Configs.Get(context.TODO(), magic_network_monitoring.ConfigGetParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }) if err != nil { var apierr *cloudflare.Error diff --git a/magic_network_monitoring/configfull.go b/magic_network_monitoring/configfull.go index 1f57b2f563..9173bae1ae 100644 --- a/magic_network_monitoring/configfull.go +++ b/magic_network_monitoring/configfull.go @@ -34,7 +34,7 @@ func NewConfigFullService(opts ...option.RequestOption) (r *ConfigFullService) { func (r *ConfigFullService) Get(ctx context.Context, query ConfigFullGetParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error) { opts = append(r.Options[:], opts...) var env ConfigFullGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/config/full", query.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/config/full", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -44,7 +44,7 @@ func (r *ConfigFullService) Get(ctx context.Context, query ConfigFullGetParams, } type ConfigFullGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type ConfigFullGetResponseEnvelope struct { diff --git a/magic_network_monitoring/configfull_test.go b/magic_network_monitoring/configfull_test.go index 5bc91aa9f9..f0b2596349 100644 --- a/magic_network_monitoring/configfull_test.go +++ b/magic_network_monitoring/configfull_test.go @@ -29,7 +29,7 @@ func TestConfigFullGet(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.MagicNetworkMonitoring.Configs.Full.Get(context.TODO(), magic_network_monitoring.ConfigFullGetParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }) if err != nil { var apierr *cloudflare.Error diff --git a/magic_network_monitoring/rule.go b/magic_network_monitoring/rule.go index 51c2e17c44..f2c8246c24 100644 --- a/magic_network_monitoring/rule.go +++ b/magic_network_monitoring/rule.go @@ -37,7 +37,7 @@ func NewRuleService(opts ...option.RequestOption) (r *RuleService) { func (r *RuleService) New(ctx context.Context, body RuleNewParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error) { opts = append(r.Options[:], opts...) var env RuleNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/rules", body.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/rules", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) if err != nil { return @@ -50,7 +50,7 @@ func (r *RuleService) New(ctx context.Context, body RuleNewParams, opts ...optio func (r *RuleService) Update(ctx context.Context, body RuleUpdateParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error) { opts = append(r.Options[:], opts...) var env RuleUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/rules", body.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/rules", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) if err != nil { return @@ -63,7 +63,7 @@ func (r *RuleService) Update(ctx context.Context, body RuleUpdateParams, opts .. func (r *RuleService) List(ctx context.Context, query RuleListParams, opts ...option.RequestOption) (res *[]MagicVisibilityMNMRule, err error) { opts = append(r.Options[:], opts...) var env RuleListResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/rules", query.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/rules", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -73,10 +73,10 @@ func (r *RuleService) List(ctx context.Context, query RuleListParams, opts ...op } // Delete a network monitoring rule for account. -func (r *RuleService) Delete(ctx context.Context, ruleID interface{}, body RuleDeleteParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error) { +func (r *RuleService) Delete(ctx context.Context, ruleID string, body RuleDeleteParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error) { opts = append(r.Options[:], opts...) var env RuleDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/rules/%v", body.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/mnm/rules/%s", body.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -86,10 +86,10 @@ func (r *RuleService) Delete(ctx context.Context, ruleID interface{}, body RuleD } // Update a network monitoring rule for account. -func (r *RuleService) Edit(ctx context.Context, ruleID interface{}, body RuleEditParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error) { +func (r *RuleService) Edit(ctx context.Context, ruleID string, body RuleEditParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error) { opts = append(r.Options[:], opts...) var env RuleEditResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/rules/%v", body.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/mnm/rules/%s", body.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...) if err != nil { return @@ -99,10 +99,10 @@ func (r *RuleService) Edit(ctx context.Context, ruleID interface{}, body RuleEdi } // List a single network monitoring rule for account. -func (r *RuleService) Get(ctx context.Context, ruleID interface{}, query RuleGetParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error) { +func (r *RuleService) Get(ctx context.Context, ruleID string, query RuleGetParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error) { opts = append(r.Options[:], opts...) var env RuleGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/rules/%v", query.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/mnm/rules/%s", query.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -125,9 +125,9 @@ type MagicVisibilityMNMRule struct { // The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, // underscore (\_), dash (-), period (.), and tilde (~). You can’t have a space in // the rule name. Max 256 characters. - Name string `json:"name,required"` - Prefixes []string `json:"prefixes,required"` - ID interface{} `json:"id"` + Name string `json:"name,required"` + Prefixes []string `json:"prefixes,required"` + ID string `json:"id"` // The number of bits per second for the rule. When this value is exceeded for the // set duration, an alert notification is sent. Minimum of 1 and no maximum. BandwidthThreshold float64 `json:"bandwidth_threshold"` @@ -160,7 +160,7 @@ func (r magicVisibilityMNMRuleJSON) RawJSON() string { } type RuleNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type RuleNewResponseEnvelope struct { @@ -253,7 +253,7 @@ func (r RuleNewResponseEnvelopeSuccess) IsKnown() bool { } type RuleUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type RuleUpdateResponseEnvelope struct { @@ -346,7 +346,7 @@ func (r RuleUpdateResponseEnvelopeSuccess) IsKnown() bool { } type RuleListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type RuleListResponseEnvelope struct { @@ -472,7 +472,7 @@ func (r ruleListResponseEnvelopeResultInfoJSON) RawJSON() string { } type RuleDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type RuleDeleteResponseEnvelope struct { @@ -565,7 +565,7 @@ func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool { } type RuleEditParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type RuleEditResponseEnvelope struct { @@ -658,7 +658,7 @@ func (r RuleEditResponseEnvelopeSuccess) IsKnown() bool { } type RuleGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type RuleGetResponseEnvelope struct { diff --git a/magic_network_monitoring/rule_test.go b/magic_network_monitoring/rule_test.go index 1428b7461f..eceda1f762 100644 --- a/magic_network_monitoring/rule_test.go +++ b/magic_network_monitoring/rule_test.go @@ -29,7 +29,7 @@ func TestRuleNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.MagicNetworkMonitoring.Rules.New(context.TODO(), magic_network_monitoring.RuleNewParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }) if err != nil { var apierr *cloudflare.Error @@ -55,7 +55,7 @@ func TestRuleUpdate(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.MagicNetworkMonitoring.Rules.Update(context.TODO(), magic_network_monitoring.RuleUpdateParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }) if err != nil { var apierr *cloudflare.Error @@ -81,7 +81,7 @@ func TestRuleList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.MagicNetworkMonitoring.Rules.List(context.TODO(), magic_network_monitoring.RuleListParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }) if err != nil { var apierr *cloudflare.Error @@ -110,7 +110,7 @@ func TestRuleDelete(t *testing.T) { context.TODO(), "2890e6fa406311ed9b5a23f70f6fb8cf", magic_network_monitoring.RuleDeleteParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }, ) if err != nil { @@ -140,7 +140,7 @@ func TestRuleEdit(t *testing.T) { context.TODO(), "2890e6fa406311ed9b5a23f70f6fb8cf", magic_network_monitoring.RuleEditParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }, ) if err != nil { @@ -170,7 +170,7 @@ func TestRuleGet(t *testing.T) { context.TODO(), "2890e6fa406311ed9b5a23f70f6fb8cf", magic_network_monitoring.RuleGetParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }, ) if err != nil { diff --git a/magic_network_monitoring/ruleadvertisement.go b/magic_network_monitoring/ruleadvertisement.go index 63d919ccc4..a21018f76e 100644 --- a/magic_network_monitoring/ruleadvertisement.go +++ b/magic_network_monitoring/ruleadvertisement.go @@ -32,10 +32,10 @@ func NewRuleAdvertisementService(opts ...option.RequestOption) (r *RuleAdvertise } // Update advertisement for rule. -func (r *RuleAdvertisementService) Edit(ctx context.Context, ruleID interface{}, body RuleAdvertisementEditParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRuleAdvertisable, err error) { +func (r *RuleAdvertisementService) Edit(ctx context.Context, ruleID string, body RuleAdvertisementEditParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRuleAdvertisable, err error) { opts = append(r.Options[:], opts...) var env RuleAdvertisementEditResponseEnvelope - path := fmt.Sprintf("accounts/%v/mnm/rules/%v/advertisement", body.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/mnm/rules/%s/advertisement", body.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...) if err != nil { return @@ -69,7 +69,7 @@ func (r magicVisibilityMNMRuleAdvertisableJSON) RawJSON() string { } type RuleAdvertisementEditParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type RuleAdvertisementEditResponseEnvelope struct { diff --git a/magic_network_monitoring/ruleadvertisement_test.go b/magic_network_monitoring/ruleadvertisement_test.go index 53b4533b33..6a7b88379f 100644 --- a/magic_network_monitoring/ruleadvertisement_test.go +++ b/magic_network_monitoring/ruleadvertisement_test.go @@ -32,7 +32,7 @@ func TestRuleAdvertisementEdit(t *testing.T) { context.TODO(), "2890e6fa406311ed9b5a23f70f6fb8cf", magic_network_monitoring.RuleAdvertisementEditParams{ - AccountID: cloudflare.F[any]("6f91088a406011ed95aed352566e8d4c"), + AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), }, ) if err != nil { diff --git a/mtls_certificates/mtlscertificate.go b/mtls_certificates/mtlscertificate.go index cf80d060f3..fce4d9a6c6 100644 --- a/mtls_certificates/mtlscertificate.go +++ b/mtls_certificates/mtlscertificate.go @@ -394,7 +394,7 @@ type MTLSCertificateListResponseEnvelopeResultInfo struct { PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` - TotalPages interface{} `json:"total_pages"` + TotalPages float64 `json:"total_pages"` JSON mtlsCertificateListResponseEnvelopeResultInfoJSON `json:"-"` } diff --git a/page_shield/connection.go b/page_shield/connection.go index a9f5446ffb..c595c58a91 100644 --- a/page_shield/connection.go +++ b/page_shield/connection.go @@ -54,16 +54,16 @@ func (r *ConnectionService) Get(ctx context.Context, connectionID string, query } type PageShieldConnection struct { - ID interface{} `json:"id"` - AddedAt interface{} `json:"added_at"` - DomainReportedMalicious interface{} `json:"domain_reported_malicious"` - FirstPageURL interface{} `json:"first_page_url"` - FirstSeenAt interface{} `json:"first_seen_at"` - Host interface{} `json:"host"` - LastSeenAt interface{} `json:"last_seen_at"` - PageURLs interface{} `json:"page_urls"` - URL interface{} `json:"url"` - URLContainsCdnCgiPath interface{} `json:"url_contains_cdn_cgi_path"` + ID string `json:"id"` + AddedAt string `json:"added_at"` + DomainReportedMalicious bool `json:"domain_reported_malicious"` + FirstPageURL string `json:"first_page_url"` + FirstSeenAt string `json:"first_seen_at"` + Host string `json:"host"` + LastSeenAt string `json:"last_seen_at"` + PageURLs []string `json:"page_urls"` + URL string `json:"url"` + URLContainsCdnCgiPath bool `json:"url_contains_cdn_cgi_path"` JSON pageShieldConnectionJSON `json:"-"` } diff --git a/page_shield/script.go b/page_shield/script.go index e68be416e3..2840fda2f3 100644 --- a/page_shield/script.go +++ b/page_shield/script.go @@ -54,21 +54,21 @@ func (r *ScriptService) Get(ctx context.Context, scriptID string, query ScriptGe } type PageShieldScript struct { - ID interface{} `json:"id"` - AddedAt interface{} `json:"added_at"` - DataflowScore interface{} `json:"dataflow_score"` - DomainReportedMalicious interface{} `json:"domain_reported_malicious"` - FetchedAt interface{} `json:"fetched_at"` - FirstPageURL interface{} `json:"first_page_url"` - FirstSeenAt interface{} `json:"first_seen_at"` - Hash interface{} `json:"hash"` - Host interface{} `json:"host"` - JsIntegrityScore interface{} `json:"js_integrity_score"` - LastSeenAt interface{} `json:"last_seen_at"` - ObfuscationScore interface{} `json:"obfuscation_score"` - PageURLs interface{} `json:"page_urls"` - URL interface{} `json:"url"` - URLContainsCdnCgiPath interface{} `json:"url_contains_cdn_cgi_path"` + ID string `json:"id"` + AddedAt string `json:"added_at"` + DataflowScore float64 `json:"dataflow_score"` + DomainReportedMalicious bool `json:"domain_reported_malicious"` + FetchedAt string `json:"fetched_at"` + FirstPageURL string `json:"first_page_url"` + FirstSeenAt string `json:"first_seen_at"` + Hash string `json:"hash"` + Host string `json:"host"` + JsIntegrityScore float64 `json:"js_integrity_score"` + LastSeenAt string `json:"last_seen_at"` + ObfuscationScore float64 `json:"obfuscation_score"` + PageURLs []string `json:"page_urls"` + URL string `json:"url"` + URLContainsCdnCgiPath bool `json:"url_contains_cdn_cgi_path"` JSON pageShieldScriptJSON `json:"-"` } @@ -103,21 +103,21 @@ func (r pageShieldScriptJSON) RawJSON() string { } type ScriptGetResponse struct { - ID interface{} `json:"id"` - AddedAt interface{} `json:"added_at"` - DataflowScore interface{} `json:"dataflow_score"` - DomainReportedMalicious interface{} `json:"domain_reported_malicious"` - FetchedAt interface{} `json:"fetched_at"` - FirstPageURL interface{} `json:"first_page_url"` - FirstSeenAt interface{} `json:"first_seen_at"` - Hash interface{} `json:"hash"` - Host interface{} `json:"host"` - JsIntegrityScore interface{} `json:"js_integrity_score"` - LastSeenAt interface{} `json:"last_seen_at"` - ObfuscationScore interface{} `json:"obfuscation_score"` - PageURLs interface{} `json:"page_urls"` - URL interface{} `json:"url"` - URLContainsCdnCgiPath interface{} `json:"url_contains_cdn_cgi_path"` + ID string `json:"id"` + AddedAt string `json:"added_at"` + DataflowScore float64 `json:"dataflow_score"` + DomainReportedMalicious bool `json:"domain_reported_malicious"` + FetchedAt string `json:"fetched_at"` + FirstPageURL string `json:"first_page_url"` + FirstSeenAt string `json:"first_seen_at"` + Hash string `json:"hash"` + Host string `json:"host"` + JsIntegrityScore float64 `json:"js_integrity_score"` + LastSeenAt string `json:"last_seen_at"` + ObfuscationScore float64 `json:"obfuscation_score"` + PageURLs []string `json:"page_urls"` + URL string `json:"url"` + URLContainsCdnCgiPath bool `json:"url_contains_cdn_cgi_path"` Versions []ScriptGetResponseVersion `json:"versions,nullable"` JSON scriptGetResponseJSON `json:"-"` } diff --git a/pages/project.go b/pages/project.go index 9c5e1cb221..f70e58ae64 100644 --- a/pages/project.go +++ b/pages/project.go @@ -2738,10 +2738,10 @@ func (r ProjectListResponseEnvelopeSuccess) IsKnown() bool { } type ProjectListResponseEnvelopeResultInfo struct { - Count interface{} `json:"count"` - Page interface{} `json:"page"` - PerPage interface{} `json:"per_page"` - TotalCount interface{} `json:"total_count"` + Count float64 `json:"count"` + Page float64 `json:"page"` + PerPage float64 `json:"per_page"` + TotalCount float64 `json:"total_count"` JSON projectListResponseEnvelopeResultInfoJSON `json:"-"` } diff --git a/pages/projectdeployment.go b/pages/projectdeployment.go index 5448d7cf1a..ba06d1f201 100644 --- a/pages/projectdeployment.go +++ b/pages/projectdeployment.go @@ -337,10 +337,10 @@ func (r ProjectDeploymentListResponseEnvelopeSuccess) IsKnown() bool { } type ProjectDeploymentListResponseEnvelopeResultInfo struct { - Count interface{} `json:"count"` - Page interface{} `json:"page"` - PerPage interface{} `json:"per_page"` - TotalCount interface{} `json:"total_count"` + Count float64 `json:"count"` + Page float64 `json:"page"` + PerPage float64 `json:"per_page"` + TotalCount float64 `json:"total_count"` JSON projectDeploymentListResponseEnvelopeResultInfoJSON `json:"-"` } diff --git a/pages/projectdomain.go b/pages/projectdomain.go index 8a2bea9786..ec0eda34d6 100644 --- a/pages/projectdomain.go +++ b/pages/projectdomain.go @@ -369,10 +369,10 @@ func (r ProjectDomainListResponseEnvelopeSuccess) IsKnown() bool { } type ProjectDomainListResponseEnvelopeResultInfo struct { - Count interface{} `json:"count"` - Page interface{} `json:"page"` - PerPage interface{} `json:"per_page"` - TotalCount interface{} `json:"total_count"` + Count float64 `json:"count"` + Page float64 `json:"page"` + PerPage float64 `json:"per_page"` + TotalCount float64 `json:"total_count"` JSON projectDomainListResponseEnvelopeResultInfoJSON `json:"-"` } diff --git a/queues/consumer.go b/queues/consumer.go index bf43589776..a616944908 100644 --- a/queues/consumer.go +++ b/queues/consumer.go @@ -196,7 +196,7 @@ func (r workersConsumerCreatedSettingsJSON) RawJSON() string { type WorkersConsumerUpdated struct { CreatedOn interface{} `json:"created_on"` - DeadLetterQueue interface{} `json:"dead_letter_queue"` + DeadLetterQueue string `json:"dead_letter_queue"` Environment interface{} `json:"environment"` QueueName interface{} `json:"queue_name"` ScriptName interface{} `json:"script_name"` @@ -725,7 +725,7 @@ type ConsumerGetResponseEnvelopeResultInfo struct { PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` - TotalPages interface{} `json:"total_pages"` + TotalPages float64 `json:"total_pages"` JSON consumerGetResponseEnvelopeResultInfoJSON `json:"-"` } diff --git a/queues/queue.go b/queues/queue.go index e15e516c97..4307dec20e 100644 --- a/queues/queue.go +++ b/queues/queue.go @@ -536,7 +536,7 @@ type QueueListResponseEnvelopeResultInfo struct { PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` - TotalPages interface{} `json:"total_pages"` + TotalPages float64 `json:"total_pages"` JSON queueListResponseEnvelopeResultInfoJSON `json:"-"` } diff --git a/registrar/domain.go b/registrar/domain.go index df2459dd92..78cc2d1d27 100644 --- a/registrar/domain.go +++ b/registrar/domain.go @@ -219,15 +219,15 @@ func (r domainListResponseRegistrantContactJSON) RawJSON() string { // Statuses for domain transfers into Cloudflare Registrar. type DomainListResponseTransferIn struct { // Form of authorization has been accepted by the registrant. - AcceptFoa interface{} `json:"accept_foa"` + AcceptFoa string `json:"accept_foa"` // Shows transfer status with the registry. - ApproveTransfer interface{} `json:"approve_transfer"` + ApproveTransfer string `json:"approve_transfer"` // Indicates if cancellation is still possible. CanCancelTransfer bool `json:"can_cancel_transfer"` // Privacy guards are disabled at the foreign registrar. DisablePrivacy interface{} `json:"disable_privacy"` // Auth code has been entered and verified. - EnterAuthCode interface{} `json:"enter_auth_code"` + EnterAuthCode string `json:"enter_auth_code"` // Domain is unlocked at the foreign registrar. UnlockDomain interface{} `json:"unlock_domain"` JSON domainListResponseTransferInJSON `json:"-"` diff --git a/secondary_dns/acl.go b/secondary_dns/acl.go index 7150876fe9..c0a25fff57 100644 --- a/secondary_dns/acl.go +++ b/secondary_dns/acl.go @@ -34,7 +34,7 @@ func NewACLService(opts ...option.RequestOption) (r *ACLService) { func (r *ACLService) New(ctx context.Context, params ACLNewParams, opts ...option.RequestOption) (res *SecondaryDNSACL, err error) { opts = append(r.Options[:], opts...) var env ACLNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/acls", params.AccountID) + path := fmt.Sprintf("accounts/%s/secondary_dns/acls", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -44,10 +44,10 @@ func (r *ACLService) New(ctx context.Context, params ACLNewParams, opts ...optio } // Modify ACL. -func (r *ACLService) Update(ctx context.Context, aclID interface{}, params ACLUpdateParams, opts ...option.RequestOption) (res *SecondaryDNSACL, err error) { +func (r *ACLService) Update(ctx context.Context, aclID string, params ACLUpdateParams, opts ...option.RequestOption) (res *SecondaryDNSACL, err error) { opts = append(r.Options[:], opts...) var env ACLUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/acls/%v", params.AccountID, aclID) + path := fmt.Sprintf("accounts/%s/secondary_dns/acls/%s", params.AccountID, aclID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -60,7 +60,7 @@ func (r *ACLService) Update(ctx context.Context, aclID interface{}, params ACLUp func (r *ACLService) List(ctx context.Context, query ACLListParams, opts ...option.RequestOption) (res *[]SecondaryDNSACL, err error) { opts = append(r.Options[:], opts...) var env ACLListResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/acls", query.AccountID) + path := fmt.Sprintf("accounts/%s/secondary_dns/acls", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -70,10 +70,10 @@ func (r *ACLService) List(ctx context.Context, query ACLListParams, opts ...opti } // Delete ACL. -func (r *ACLService) Delete(ctx context.Context, aclID interface{}, body ACLDeleteParams, opts ...option.RequestOption) (res *ACLDeleteResponse, err error) { +func (r *ACLService) Delete(ctx context.Context, aclID string, body ACLDeleteParams, opts ...option.RequestOption) (res *ACLDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env ACLDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/acls/%v", body.AccountID, aclID) + path := fmt.Sprintf("accounts/%s/secondary_dns/acls/%s", body.AccountID, aclID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -83,10 +83,10 @@ func (r *ACLService) Delete(ctx context.Context, aclID interface{}, body ACLDele } // Get ACL. -func (r *ACLService) Get(ctx context.Context, aclID interface{}, query ACLGetParams, opts ...option.RequestOption) (res *SecondaryDNSACL, err error) { +func (r *ACLService) Get(ctx context.Context, aclID string, query ACLGetParams, opts ...option.RequestOption) (res *SecondaryDNSACL, err error) { opts = append(r.Options[:], opts...) var env ACLGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/acls/%v", query.AccountID, aclID) + path := fmt.Sprintf("accounts/%s/secondary_dns/acls/%s", query.AccountID, aclID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -96,7 +96,7 @@ func (r *ACLService) Get(ctx context.Context, aclID interface{}, query ACLGetPar } type SecondaryDNSACL struct { - ID interface{} `json:"id,required"` + ID string `json:"id,required"` // Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will // be applied for the entire account. The IP range is used to allow additional // NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from @@ -126,7 +126,7 @@ func (r secondaryDnsaclJSON) RawJSON() string { } type ACLDeleteResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` JSON aclDeleteResponseJSON `json:"-"` } @@ -147,7 +147,7 @@ func (r aclDeleteResponseJSON) RawJSON() string { } type ACLNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` Body param.Field[interface{}] `json:"body,required"` } @@ -245,7 +245,7 @@ func (r ACLNewResponseEnvelopeSuccess) IsKnown() bool { } type ACLUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will // be applied for the entire account. The IP range is used to allow additional // NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from @@ -350,7 +350,7 @@ func (r ACLUpdateResponseEnvelopeSuccess) IsKnown() bool { } type ACLListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type ACLListResponseEnvelope struct { @@ -476,7 +476,7 @@ func (r aclListResponseEnvelopeResultInfoJSON) RawJSON() string { } type ACLDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type ACLDeleteResponseEnvelope struct { @@ -569,7 +569,7 @@ func (r ACLDeleteResponseEnvelopeSuccess) IsKnown() bool { } type ACLGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type ACLGetResponseEnvelope struct { diff --git a/secondary_dns/acl_test.go b/secondary_dns/acl_test.go index fe20a8f40b..c9537ec02d 100644 --- a/secondary_dns/acl_test.go +++ b/secondary_dns/acl_test.go @@ -29,7 +29,7 @@ func TestACLNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.ACLs.New(context.TODO(), secondary_dns.ACLNewParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), Body: cloudflare.F[any](map[string]interface{}{}), }) if err != nil { @@ -59,7 +59,7 @@ func TestACLUpdate(t *testing.T) { context.TODO(), "23ff594956f20c2a721606e94745a8aa", secondary_dns.ACLUpdateParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), IPRange: cloudflare.F("192.0.2.53/28"), Name: cloudflare.F("my-acl-1"), }, @@ -88,7 +88,7 @@ func TestACLList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.ACLs.List(context.TODO(), secondary_dns.ACLListParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), }) if err != nil { var apierr *cloudflare.Error @@ -117,7 +117,7 @@ func TestACLDelete(t *testing.T) { context.TODO(), "23ff594956f20c2a721606e94745a8aa", secondary_dns.ACLDeleteParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), }, ) if err != nil { @@ -147,7 +147,7 @@ func TestACLGet(t *testing.T) { context.TODO(), "23ff594956f20c2a721606e94745a8aa", secondary_dns.ACLGetParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), }, ) if err != nil { diff --git a/secondary_dns/forceaxfr.go b/secondary_dns/forceaxfr.go index 376c385f82..0fa3abf547 100644 --- a/secondary_dns/forceaxfr.go +++ b/secondary_dns/forceaxfr.go @@ -34,7 +34,7 @@ func NewForceAXFRService(opts ...option.RequestOption) (r *ForceAXFRService) { func (r *ForceAXFRService) New(ctx context.Context, body ForceAXFRNewParams, opts ...option.RequestOption) (res *SecondaryDNSForceResult, err error) { opts = append(r.Options[:], opts...) var env ForceAXFRNewResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/force_axfr", body.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/force_axfr", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) if err != nil { return @@ -46,7 +46,7 @@ func (r *ForceAXFRService) New(ctx context.Context, body ForceAXFRNewParams, opt type SecondaryDNSForceResult = string type ForceAXFRNewParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` } type ForceAXFRNewResponseEnvelope struct { diff --git a/secondary_dns/forceaxfr_test.go b/secondary_dns/forceaxfr_test.go index 890ba8b3b5..2bc8ad0602 100644 --- a/secondary_dns/forceaxfr_test.go +++ b/secondary_dns/forceaxfr_test.go @@ -29,7 +29,7 @@ func TestForceAXFRNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.ForceAXFR.New(context.TODO(), secondary_dns.ForceAXFRNewParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), }) if err != nil { var apierr *cloudflare.Error diff --git a/secondary_dns/incoming.go b/secondary_dns/incoming.go index 289c28d0a1..85aa9ab5a5 100644 --- a/secondary_dns/incoming.go +++ b/secondary_dns/incoming.go @@ -34,7 +34,7 @@ func NewIncomingService(opts ...option.RequestOption) (r *IncomingService) { func (r *IncomingService) New(ctx context.Context, params IncomingNewParams, opts ...option.RequestOption) (res *IncomingNewResponse, err error) { opts = append(r.Options[:], opts...) var env IncomingNewResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/incoming", params.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/incoming", params.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -47,7 +47,7 @@ func (r *IncomingService) New(ctx context.Context, params IncomingNewParams, opt func (r *IncomingService) Update(ctx context.Context, params IncomingUpdateParams, opts ...option.RequestOption) (res *IncomingUpdateResponse, err error) { opts = append(r.Options[:], opts...) var env IncomingUpdateResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/incoming", params.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/incoming", params.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -60,7 +60,7 @@ func (r *IncomingService) Update(ctx context.Context, params IncomingUpdateParam func (r *IncomingService) Delete(ctx context.Context, body IncomingDeleteParams, opts ...option.RequestOption) (res *IncomingDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env IncomingDeleteResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/incoming", body.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/incoming", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -73,7 +73,7 @@ func (r *IncomingService) Delete(ctx context.Context, body IncomingDeleteParams, func (r *IncomingService) Get(ctx context.Context, query IncomingGetParams, opts ...option.RequestOption) (res *IncomingGetResponse, err error) { opts = append(r.Options[:], opts...) var env IncomingGetResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/incoming", query.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/incoming", query.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -83,7 +83,7 @@ func (r *IncomingService) Get(ctx context.Context, query IncomingGetParams, opts } type IncomingNewResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` // How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not // applicable for primary zones. AutoRefreshSeconds float64 `json:"auto_refresh_seconds"` @@ -126,7 +126,7 @@ func (r incomingNewResponseJSON) RawJSON() string { } type IncomingUpdateResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` // How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not // applicable for primary zones. AutoRefreshSeconds float64 `json:"auto_refresh_seconds"` @@ -169,7 +169,7 @@ func (r incomingUpdateResponseJSON) RawJSON() string { } type IncomingDeleteResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` JSON incomingDeleteResponseJSON `json:"-"` } @@ -190,7 +190,7 @@ func (r incomingDeleteResponseJSON) RawJSON() string { } type IncomingGetResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` // How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not // applicable for primary zones. AutoRefreshSeconds float64 `json:"auto_refresh_seconds"` @@ -233,7 +233,7 @@ func (r incomingGetResponseJSON) RawJSON() string { } type IncomingNewParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` // How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not // applicable for primary zones. AutoRefreshSeconds param.Field[float64] `json:"auto_refresh_seconds,required"` @@ -337,7 +337,7 @@ func (r IncomingNewResponseEnvelopeSuccess) IsKnown() bool { } type IncomingUpdateParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` // How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not // applicable for primary zones. AutoRefreshSeconds param.Field[float64] `json:"auto_refresh_seconds,required"` @@ -441,7 +441,7 @@ func (r IncomingUpdateResponseEnvelopeSuccess) IsKnown() bool { } type IncomingDeleteParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` } type IncomingDeleteResponseEnvelope struct { @@ -534,7 +534,7 @@ func (r IncomingDeleteResponseEnvelopeSuccess) IsKnown() bool { } type IncomingGetParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` } type IncomingGetResponseEnvelope struct { diff --git a/secondary_dns/incoming_test.go b/secondary_dns/incoming_test.go index a82529532f..589d132d81 100644 --- a/secondary_dns/incoming_test.go +++ b/secondary_dns/incoming_test.go @@ -29,7 +29,7 @@ func TestIncomingNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Incoming.New(context.TODO(), secondary_dns.IncomingNewParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), AutoRefreshSeconds: cloudflare.F(86400.000000), Name: cloudflare.F("www.example.com."), Peers: cloudflare.F([]interface{}{"23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"}), @@ -58,7 +58,7 @@ func TestIncomingUpdate(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Incoming.Update(context.TODO(), secondary_dns.IncomingUpdateParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), AutoRefreshSeconds: cloudflare.F(86400.000000), Name: cloudflare.F("www.example.com."), Peers: cloudflare.F([]interface{}{"23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"}), @@ -87,7 +87,7 @@ func TestIncomingDelete(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Incoming.Delete(context.TODO(), secondary_dns.IncomingDeleteParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), }) if err != nil { var apierr *cloudflare.Error @@ -113,7 +113,7 @@ func TestIncomingGet(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Incoming.Get(context.TODO(), secondary_dns.IncomingGetParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), }) if err != nil { var apierr *cloudflare.Error diff --git a/secondary_dns/outgoing.go b/secondary_dns/outgoing.go index a9049d6c60..734a817450 100644 --- a/secondary_dns/outgoing.go +++ b/secondary_dns/outgoing.go @@ -36,7 +36,7 @@ func NewOutgoingService(opts ...option.RequestOption) (r *OutgoingService) { func (r *OutgoingService) New(ctx context.Context, params OutgoingNewParams, opts ...option.RequestOption) (res *OutgoingNewResponse, err error) { opts = append(r.Options[:], opts...) var env OutgoingNewResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/outgoing", params.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/outgoing", params.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -49,7 +49,7 @@ func (r *OutgoingService) New(ctx context.Context, params OutgoingNewParams, opt func (r *OutgoingService) Update(ctx context.Context, params OutgoingUpdateParams, opts ...option.RequestOption) (res *OutgoingUpdateResponse, err error) { opts = append(r.Options[:], opts...) var env OutgoingUpdateResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/outgoing", params.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/outgoing", params.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -62,7 +62,7 @@ func (r *OutgoingService) Update(ctx context.Context, params OutgoingUpdateParam func (r *OutgoingService) Delete(ctx context.Context, body OutgoingDeleteParams, opts ...option.RequestOption) (res *OutgoingDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env OutgoingDeleteResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/outgoing", body.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/outgoing", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -76,7 +76,7 @@ func (r *OutgoingService) Delete(ctx context.Context, body OutgoingDeleteParams, func (r *OutgoingService) Disable(ctx context.Context, body OutgoingDisableParams, opts ...option.RequestOption) (res *SecondaryDNSDisableTransferResult, err error) { opts = append(r.Options[:], opts...) var env OutgoingDisableResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/outgoing/disable", body.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/outgoing/disable", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) if err != nil { return @@ -89,7 +89,7 @@ func (r *OutgoingService) Disable(ctx context.Context, body OutgoingDisableParam func (r *OutgoingService) Enable(ctx context.Context, body OutgoingEnableParams, opts ...option.RequestOption) (res *SecondaryDNSEnableTransferResult, err error) { opts = append(r.Options[:], opts...) var env OutgoingEnableResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/outgoing/enable", body.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/outgoing/enable", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) if err != nil { return @@ -102,7 +102,7 @@ func (r *OutgoingService) Enable(ctx context.Context, body OutgoingEnableParams, func (r *OutgoingService) ForceNotify(ctx context.Context, body OutgoingForceNotifyParams, opts ...option.RequestOption) (res *SecondaryDNSSchemasForceResult, err error) { opts = append(r.Options[:], opts...) var env OutgoingForceNotifyResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/outgoing/force_notify", body.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/outgoing/force_notify", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) if err != nil { return @@ -115,7 +115,7 @@ func (r *OutgoingService) ForceNotify(ctx context.Context, body OutgoingForceNot func (r *OutgoingService) Get(ctx context.Context, query OutgoingGetParams, opts ...option.RequestOption) (res *OutgoingGetResponse, err error) { opts = append(r.Options[:], opts...) var env OutgoingGetResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/outgoing", query.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/outgoing", query.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -131,7 +131,7 @@ type SecondaryDNSEnableTransferResult = string type SecondaryDNSSchemasForceResult = string type OutgoingNewResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` // The time for a specific event. CheckedTime string `json:"checked_time"` // The time for a specific event. @@ -170,7 +170,7 @@ func (r outgoingNewResponseJSON) RawJSON() string { } type OutgoingUpdateResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` // The time for a specific event. CheckedTime string `json:"checked_time"` // The time for a specific event. @@ -209,7 +209,7 @@ func (r outgoingUpdateResponseJSON) RawJSON() string { } type OutgoingDeleteResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` JSON outgoingDeleteResponseJSON `json:"-"` } @@ -230,7 +230,7 @@ func (r outgoingDeleteResponseJSON) RawJSON() string { } type OutgoingGetResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` // The time for a specific event. CheckedTime string `json:"checked_time"` // The time for a specific event. @@ -269,7 +269,7 @@ func (r outgoingGetResponseJSON) RawJSON() string { } type OutgoingNewParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` // Zone name. Name param.Field[string] `json:"name,required"` // A list of peer tags. @@ -370,7 +370,7 @@ func (r OutgoingNewResponseEnvelopeSuccess) IsKnown() bool { } type OutgoingUpdateParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` // Zone name. Name param.Field[string] `json:"name,required"` // A list of peer tags. @@ -471,7 +471,7 @@ func (r OutgoingUpdateResponseEnvelopeSuccess) IsKnown() bool { } type OutgoingDeleteParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` } type OutgoingDeleteResponseEnvelope struct { @@ -564,7 +564,7 @@ func (r OutgoingDeleteResponseEnvelopeSuccess) IsKnown() bool { } type OutgoingDisableParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` } type OutgoingDisableResponseEnvelope struct { @@ -658,7 +658,7 @@ func (r OutgoingDisableResponseEnvelopeSuccess) IsKnown() bool { } type OutgoingEnableParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` } type OutgoingEnableResponseEnvelope struct { @@ -752,7 +752,7 @@ func (r OutgoingEnableResponseEnvelopeSuccess) IsKnown() bool { } type OutgoingForceNotifyParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` } type OutgoingForceNotifyResponseEnvelope struct { @@ -847,7 +847,7 @@ func (r OutgoingForceNotifyResponseEnvelopeSuccess) IsKnown() bool { } type OutgoingGetParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` } type OutgoingGetResponseEnvelope struct { diff --git a/secondary_dns/outgoing_test.go b/secondary_dns/outgoing_test.go index 54d0400602..4dd5e1c979 100644 --- a/secondary_dns/outgoing_test.go +++ b/secondary_dns/outgoing_test.go @@ -29,7 +29,7 @@ func TestOutgoingNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Outgoing.New(context.TODO(), secondary_dns.OutgoingNewParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), Name: cloudflare.F("www.example.com."), Peers: cloudflare.F([]interface{}{"23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"}), }) @@ -57,7 +57,7 @@ func TestOutgoingUpdate(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Outgoing.Update(context.TODO(), secondary_dns.OutgoingUpdateParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), Name: cloudflare.F("www.example.com."), Peers: cloudflare.F([]interface{}{"23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"}), }) @@ -85,7 +85,7 @@ func TestOutgoingDelete(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Outgoing.Delete(context.TODO(), secondary_dns.OutgoingDeleteParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), }) if err != nil { var apierr *cloudflare.Error @@ -111,7 +111,7 @@ func TestOutgoingDisable(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Outgoing.Disable(context.TODO(), secondary_dns.OutgoingDisableParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), }) if err != nil { var apierr *cloudflare.Error @@ -137,7 +137,7 @@ func TestOutgoingEnable(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Outgoing.Enable(context.TODO(), secondary_dns.OutgoingEnableParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), }) if err != nil { var apierr *cloudflare.Error @@ -163,7 +163,7 @@ func TestOutgoingForceNotify(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Outgoing.ForceNotify(context.TODO(), secondary_dns.OutgoingForceNotifyParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), }) if err != nil { var apierr *cloudflare.Error @@ -189,7 +189,7 @@ func TestOutgoingGet(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Outgoing.Get(context.TODO(), secondary_dns.OutgoingGetParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), }) if err != nil { var apierr *cloudflare.Error diff --git a/secondary_dns/outgoingstatus.go b/secondary_dns/outgoingstatus.go index 0d92750a87..e5c091a176 100644 --- a/secondary_dns/outgoingstatus.go +++ b/secondary_dns/outgoingstatus.go @@ -35,7 +35,7 @@ func NewOutgoingStatusService(opts ...option.RequestOption) (r *OutgoingStatusSe func (r *OutgoingStatusService) Get(ctx context.Context, query OutgoingStatusGetParams, opts ...option.RequestOption) (res *SecondaryDNSEnableTransferResult, err error) { opts = append(r.Options[:], opts...) var env OutgoingStatusGetResponseEnvelope - path := fmt.Sprintf("zones/%v/secondary_dns/outgoing/status", query.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/outgoing/status", query.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -45,7 +45,7 @@ func (r *OutgoingStatusService) Get(ctx context.Context, query OutgoingStatusGet } type OutgoingStatusGetParams struct { - ZoneID param.Field[interface{}] `path:"zone_id,required"` + ZoneID param.Field[string] `path:"zone_id,required"` } type OutgoingStatusGetResponseEnvelope struct { diff --git a/secondary_dns/outgoingstatus_test.go b/secondary_dns/outgoingstatus_test.go index b61374107b..006c0576ee 100644 --- a/secondary_dns/outgoingstatus_test.go +++ b/secondary_dns/outgoingstatus_test.go @@ -29,7 +29,7 @@ func TestOutgoingStatusGet(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Outgoing.Status.Get(context.TODO(), secondary_dns.OutgoingStatusGetParams{ - ZoneID: cloudflare.F[any]("269d8f4853475ca241c4e730be286b20"), + ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), }) if err != nil { var apierr *cloudflare.Error diff --git a/secondary_dns/peer.go b/secondary_dns/peer.go index a929152fab..2536fdbc41 100644 --- a/secondary_dns/peer.go +++ b/secondary_dns/peer.go @@ -34,7 +34,7 @@ func NewPeerService(opts ...option.RequestOption) (r *PeerService) { func (r *PeerService) New(ctx context.Context, params PeerNewParams, opts ...option.RequestOption) (res *SecondaryDNSPeer, err error) { opts = append(r.Options[:], opts...) var env PeerNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/peers", params.AccountID) + path := fmt.Sprintf("accounts/%s/secondary_dns/peers", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -44,10 +44,10 @@ func (r *PeerService) New(ctx context.Context, params PeerNewParams, opts ...opt } // Modify Peer. -func (r *PeerService) Update(ctx context.Context, peerID interface{}, params PeerUpdateParams, opts ...option.RequestOption) (res *SecondaryDNSPeer, err error) { +func (r *PeerService) Update(ctx context.Context, peerID string, params PeerUpdateParams, opts ...option.RequestOption) (res *SecondaryDNSPeer, err error) { opts = append(r.Options[:], opts...) var env PeerUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/peers/%v", params.AccountID, peerID) + path := fmt.Sprintf("accounts/%s/secondary_dns/peers/%s", params.AccountID, peerID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -60,7 +60,7 @@ func (r *PeerService) Update(ctx context.Context, peerID interface{}, params Pee func (r *PeerService) List(ctx context.Context, query PeerListParams, opts ...option.RequestOption) (res *[]SecondaryDNSPeer, err error) { opts = append(r.Options[:], opts...) var env PeerListResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/peers", query.AccountID) + path := fmt.Sprintf("accounts/%s/secondary_dns/peers", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -70,10 +70,10 @@ func (r *PeerService) List(ctx context.Context, query PeerListParams, opts ...op } // Delete Peer. -func (r *PeerService) Delete(ctx context.Context, peerID interface{}, body PeerDeleteParams, opts ...option.RequestOption) (res *PeerDeleteResponse, err error) { +func (r *PeerService) Delete(ctx context.Context, peerID string, body PeerDeleteParams, opts ...option.RequestOption) (res *PeerDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env PeerDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/peers/%v", body.AccountID, peerID) + path := fmt.Sprintf("accounts/%s/secondary_dns/peers/%s", body.AccountID, peerID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -83,10 +83,10 @@ func (r *PeerService) Delete(ctx context.Context, peerID interface{}, body PeerD } // Get Peer. -func (r *PeerService) Get(ctx context.Context, peerID interface{}, query PeerGetParams, opts ...option.RequestOption) (res *SecondaryDNSPeer, err error) { +func (r *PeerService) Get(ctx context.Context, peerID string, query PeerGetParams, opts ...option.RequestOption) (res *SecondaryDNSPeer, err error) { opts = append(r.Options[:], opts...) var env PeerGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/peers/%v", query.AccountID, peerID) + path := fmt.Sprintf("accounts/%s/secondary_dns/peers/%s", query.AccountID, peerID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -96,7 +96,7 @@ func (r *PeerService) Get(ctx context.Context, peerID interface{}, query PeerGet } type SecondaryDNSPeer struct { - ID interface{} `json:"id,required"` + ID string `json:"id,required"` // The name of the peer. Name string `json:"name,required"` // IPv4/IPv6 address of primary or secondary nameserver, depending on what zone @@ -138,7 +138,7 @@ func (r secondaryDNSPeerJSON) RawJSON() string { } type PeerDeleteResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` JSON peerDeleteResponseJSON `json:"-"` } @@ -159,7 +159,7 @@ func (r peerDeleteResponseJSON) RawJSON() string { } type PeerNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` Body param.Field[interface{}] `json:"body,required"` } @@ -257,7 +257,7 @@ func (r PeerNewResponseEnvelopeSuccess) IsKnown() bool { } type PeerUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The name of the peer. Name param.Field[string] `json:"name,required"` // IPv4/IPv6 address of primary or secondary nameserver, depending on what zone @@ -370,7 +370,7 @@ func (r PeerUpdateResponseEnvelopeSuccess) IsKnown() bool { } type PeerListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type PeerListResponseEnvelope struct { @@ -496,7 +496,7 @@ func (r peerListResponseEnvelopeResultInfoJSON) RawJSON() string { } type PeerDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type PeerDeleteResponseEnvelope struct { @@ -589,7 +589,7 @@ func (r PeerDeleteResponseEnvelopeSuccess) IsKnown() bool { } type PeerGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type PeerGetResponseEnvelope struct { diff --git a/secondary_dns/peer_test.go b/secondary_dns/peer_test.go index b471a2890e..0ac8f69d58 100644 --- a/secondary_dns/peer_test.go +++ b/secondary_dns/peer_test.go @@ -29,7 +29,7 @@ func TestPeerNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Peers.New(context.TODO(), secondary_dns.PeerNewParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), Body: cloudflare.F[any](map[string]interface{}{}), }) if err != nil { @@ -59,7 +59,7 @@ func TestPeerUpdateWithOptionalParams(t *testing.T) { context.TODO(), "23ff594956f20c2a721606e94745a8aa", secondary_dns.PeerUpdateParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), Name: cloudflare.F("my-peer-1"), IP: cloudflare.F("192.0.2.53"), IxfrEnable: cloudflare.F(false), @@ -91,7 +91,7 @@ func TestPeerList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.Peers.List(context.TODO(), secondary_dns.PeerListParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), }) if err != nil { var apierr *cloudflare.Error @@ -120,7 +120,7 @@ func TestPeerDelete(t *testing.T) { context.TODO(), "23ff594956f20c2a721606e94745a8aa", secondary_dns.PeerDeleteParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), }, ) if err != nil { @@ -150,7 +150,7 @@ func TestPeerGet(t *testing.T) { context.TODO(), "23ff594956f20c2a721606e94745a8aa", secondary_dns.PeerGetParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), }, ) if err != nil { diff --git a/secondary_dns/tsig.go b/secondary_dns/tsig.go index 0bfd7d2674..f6aea45a52 100644 --- a/secondary_dns/tsig.go +++ b/secondary_dns/tsig.go @@ -34,7 +34,7 @@ func NewTSIGService(opts ...option.RequestOption) (r *TSIGService) { func (r *TSIGService) New(ctx context.Context, params TSIGNewParams, opts ...option.RequestOption) (res *SecondaryDNSTSIG, err error) { opts = append(r.Options[:], opts...) var env TSIGNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/tsigs", params.AccountID) + path := fmt.Sprintf("accounts/%s/secondary_dns/tsigs", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -44,10 +44,10 @@ func (r *TSIGService) New(ctx context.Context, params TSIGNewParams, opts ...opt } // Modify TSIG. -func (r *TSIGService) Update(ctx context.Context, tsigID interface{}, params TSIGUpdateParams, opts ...option.RequestOption) (res *SecondaryDNSTSIG, err error) { +func (r *TSIGService) Update(ctx context.Context, tsigID string, params TSIGUpdateParams, opts ...option.RequestOption) (res *SecondaryDNSTSIG, err error) { opts = append(r.Options[:], opts...) var env TSIGUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/tsigs/%v", params.AccountID, tsigID) + path := fmt.Sprintf("accounts/%s/secondary_dns/tsigs/%s", params.AccountID, tsigID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -60,7 +60,7 @@ func (r *TSIGService) Update(ctx context.Context, tsigID interface{}, params TSI func (r *TSIGService) List(ctx context.Context, query TSIGListParams, opts ...option.RequestOption) (res *[]SecondaryDNSTSIG, err error) { opts = append(r.Options[:], opts...) var env TSIGListResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/tsigs", query.AccountID) + path := fmt.Sprintf("accounts/%s/secondary_dns/tsigs", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -70,10 +70,10 @@ func (r *TSIGService) List(ctx context.Context, query TSIGListParams, opts ...op } // Delete TSIG. -func (r *TSIGService) Delete(ctx context.Context, tsigID interface{}, body TSIGDeleteParams, opts ...option.RequestOption) (res *TSIGDeleteResponse, err error) { +func (r *TSIGService) Delete(ctx context.Context, tsigID string, body TSIGDeleteParams, opts ...option.RequestOption) (res *TSIGDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env TSIGDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/tsigs/%v", body.AccountID, tsigID) + path := fmt.Sprintf("accounts/%s/secondary_dns/tsigs/%s", body.AccountID, tsigID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -83,10 +83,10 @@ func (r *TSIGService) Delete(ctx context.Context, tsigID interface{}, body TSIGD } // Get TSIG. -func (r *TSIGService) Get(ctx context.Context, tsigID interface{}, query TSIGGetParams, opts ...option.RequestOption) (res *SecondaryDNSTSIG, err error) { +func (r *TSIGService) Get(ctx context.Context, tsigID string, query TSIGGetParams, opts ...option.RequestOption) (res *SecondaryDNSTSIG, err error) { opts = append(r.Options[:], opts...) var env TSIGGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/secondary_dns/tsigs/%v", query.AccountID, tsigID) + path := fmt.Sprintf("accounts/%s/secondary_dns/tsigs/%s", query.AccountID, tsigID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -96,7 +96,7 @@ func (r *TSIGService) Get(ctx context.Context, tsigID interface{}, query TSIGGet } type SecondaryDNSTSIG struct { - ID interface{} `json:"id,required"` + ID string `json:"id,required"` // TSIG algorithm. Algo string `json:"algo,required"` // TSIG key name. @@ -126,7 +126,7 @@ func (r secondaryDnstsigJSON) RawJSON() string { } type TSIGDeleteResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` JSON tsigDeleteResponseJSON `json:"-"` } @@ -147,7 +147,7 @@ func (r tsigDeleteResponseJSON) RawJSON() string { } type TSIGNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // TSIG algorithm. Algo param.Field[string] `json:"algo,required"` // TSIG key name. @@ -250,7 +250,7 @@ func (r TSIGNewResponseEnvelopeSuccess) IsKnown() bool { } type TSIGUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // TSIG algorithm. Algo param.Field[string] `json:"algo,required"` // TSIG key name. @@ -353,7 +353,7 @@ func (r TSIGUpdateResponseEnvelopeSuccess) IsKnown() bool { } type TSIGListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type TSIGListResponseEnvelope struct { @@ -479,7 +479,7 @@ func (r tsigListResponseEnvelopeResultInfoJSON) RawJSON() string { } type TSIGDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type TSIGDeleteResponseEnvelope struct { @@ -572,7 +572,7 @@ func (r TSIGDeleteResponseEnvelopeSuccess) IsKnown() bool { } type TSIGGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type TSIGGetResponseEnvelope struct { diff --git a/secondary_dns/tsig_test.go b/secondary_dns/tsig_test.go index 7983bd6499..dbfd256b42 100644 --- a/secondary_dns/tsig_test.go +++ b/secondary_dns/tsig_test.go @@ -29,7 +29,7 @@ func TestTSIGNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.TSIGs.New(context.TODO(), secondary_dns.TSIGNewParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), Algo: cloudflare.F("hmac-sha512."), Name: cloudflare.F("tsig.customer.cf."), Secret: cloudflare.F("caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c"), @@ -61,7 +61,7 @@ func TestTSIGUpdate(t *testing.T) { context.TODO(), "69cd1e104af3e6ed3cb344f263fd0d5a", secondary_dns.TSIGUpdateParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), Algo: cloudflare.F("hmac-sha512."), Name: cloudflare.F("tsig.customer.cf."), Secret: cloudflare.F("caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c"), @@ -91,7 +91,7 @@ func TestTSIGList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.SecondaryDNS.TSIGs.List(context.TODO(), secondary_dns.TSIGListParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), }) if err != nil { var apierr *cloudflare.Error @@ -120,7 +120,7 @@ func TestTSIGDelete(t *testing.T) { context.TODO(), "69cd1e104af3e6ed3cb344f263fd0d5a", secondary_dns.TSIGDeleteParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), }, ) if err != nil { @@ -150,7 +150,7 @@ func TestTSIGGet(t *testing.T) { context.TODO(), "69cd1e104af3e6ed3cb344f263fd0d5a", secondary_dns.TSIGGetParams{ - AccountID: cloudflare.F[any]("01a7362d577a6c3019a474fd6f485823"), + AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), }, ) if err != nil { diff --git a/stream/embed.go b/stream/embed.go index bf7198ffd0..59ed80fd12 100644 --- a/stream/embed.go +++ b/stream/embed.go @@ -32,15 +32,13 @@ func NewEmbedService(opts ...option.RequestOption) (r *EmbedService) { // Fetches an HTML code snippet to embed a video in a web page delivered through // Cloudflare. On success, returns an HTML fragment for use on web pages to display // a video. On failure, returns a JSON response body. -func (r *EmbedService) Get(ctx context.Context, identifier string, query EmbedGetParams, opts ...option.RequestOption) (res *EmbedGetResponse, err error) { +func (r *EmbedService) Get(ctx context.Context, identifier string, query EmbedGetParams, opts ...option.RequestOption) (res *string, err error) { opts = append(r.Options[:], opts...) path := fmt.Sprintf("accounts/%s/stream/%s/embed", query.AccountID, identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) return } -type EmbedGetResponse = interface{} - type EmbedGetParams struct { // The account identifier tag. AccountID param.Field[string] `path:"account_id,required"` diff --git a/subscriptions/subscription.go b/subscriptions/subscription.go index a2ce2a8fba..b1e75188d1 100644 --- a/subscriptions/subscription.go +++ b/subscriptions/subscription.go @@ -261,7 +261,7 @@ func (r SubscriptionListResponseFrequency) IsKnown() bool { // The rate plan applied to the subscription. type SubscriptionListResponseRatePlan struct { // The ID of the rate plan. - ID interface{} `json:"id"` + ID string `json:"id"` // The currency applied to the rate plan subscription. Currency string `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. @@ -447,7 +447,7 @@ func (r SubscriptionNewParamsFrequency) IsKnown() bool { // The rate plan applied to the subscription. type SubscriptionNewParamsRatePlan struct { // The ID of the rate plan. - ID param.Field[interface{}] `json:"id"` + ID param.Field[string] `json:"id"` // The currency applied to the rate plan subscription. Currency param.Field[string] `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. @@ -625,7 +625,7 @@ func (r SubscriptionUpdateParamsFrequency) IsKnown() bool { // The rate plan applied to the subscription. type SubscriptionUpdateParamsRatePlan struct { // The ID of the rate plan. - ID param.Field[interface{}] `json:"id"` + ID param.Field[string] `json:"id"` // The currency applied to the rate plan subscription. Currency param.Field[string] `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. diff --git a/subscriptions/subscription_test.go b/subscriptions/subscription_test.go index 1fdf72ebba..f47f40d87e 100644 --- a/subscriptions/subscription_test.go +++ b/subscriptions/subscription_test.go @@ -55,7 +55,7 @@ func TestSubscriptionNewWithOptionalParams(t *testing.T) { RatePlan: cloudflare.F(subscriptions.SubscriptionNewParamsRatePlan{ Currency: cloudflare.F("USD"), ExternallyManaged: cloudflare.F(false), - ID: cloudflare.F[any]("free"), + ID: cloudflare.F("free"), IsContract: cloudflare.F(false), PublicName: cloudflare.F("Business Plan"), Scope: cloudflare.F("zone"), @@ -115,7 +115,7 @@ func TestSubscriptionUpdateWithOptionalParams(t *testing.T) { RatePlan: cloudflare.F(subscriptions.SubscriptionUpdateParamsRatePlan{ Currency: cloudflare.F("USD"), ExternallyManaged: cloudflare.F(false), - ID: cloudflare.F[any]("free"), + ID: cloudflare.F("free"), IsContract: cloudflare.F(false), PublicName: cloudflare.F("Business Plan"), Scope: cloudflare.F("zone"), diff --git a/user/loadbalancerpreview.go b/user/loadbalancerpreview.go index e845d04e3a..0d9b0eae76 100644 --- a/user/loadbalancerpreview.go +++ b/user/loadbalancerpreview.go @@ -31,10 +31,10 @@ func NewLoadBalancerPreviewService(opts ...option.RequestOption) (r *LoadBalance } // Get the result of a previous preview operation using the provided preview_id. -func (r *LoadBalancerPreviewService) Get(ctx context.Context, previewID interface{}, opts ...option.RequestOption) (res *LoadBalancingPreviewResult, err error) { +func (r *LoadBalancerPreviewService) Get(ctx context.Context, previewID string, opts ...option.RequestOption) (res *LoadBalancingPreviewResult, err error) { opts = append(r.Options[:], opts...) var env LoadBalancerPreviewGetResponseEnvelope - path := fmt.Sprintf("user/load_balancers/preview/%v", previewID) + path := fmt.Sprintf("user/load_balancers/preview/%s", previewID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return diff --git a/user/subscription.go b/user/subscription.go index 625448f05f..538f6d7e2d 100644 --- a/user/subscription.go +++ b/user/subscription.go @@ -265,7 +265,7 @@ func (r SubscriptionGetResponseFrequency) IsKnown() bool { // The rate plan applied to the subscription. type SubscriptionGetResponseRatePlan struct { // The ID of the rate plan. - ID interface{} `json:"id"` + ID string `json:"id"` // The currency applied to the rate plan subscription. Currency string `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. @@ -412,7 +412,7 @@ func (r SubscriptionUpdateParamsFrequency) IsKnown() bool { // The rate plan applied to the subscription. type SubscriptionUpdateParamsRatePlan struct { // The ID of the rate plan. - ID param.Field[interface{}] `json:"id"` + ID param.Field[string] `json:"id"` // The currency applied to the rate plan subscription. Currency param.Field[string] `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. @@ -590,7 +590,7 @@ func (r SubscriptionEditParamsFrequency) IsKnown() bool { // The rate plan applied to the subscription. type SubscriptionEditParamsRatePlan struct { // The ID of the rate plan. - ID param.Field[interface{}] `json:"id"` + ID param.Field[string] `json:"id"` // The currency applied to the rate plan subscription. Currency param.Field[string] `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. diff --git a/user/subscription_test.go b/user/subscription_test.go index 79390aa7fa..be6eeda233 100644 --- a/user/subscription_test.go +++ b/user/subscription_test.go @@ -55,7 +55,7 @@ func TestSubscriptionUpdateWithOptionalParams(t *testing.T) { RatePlan: cloudflare.F(user.SubscriptionUpdateParamsRatePlan{ Currency: cloudflare.F("USD"), ExternallyManaged: cloudflare.F(false), - ID: cloudflare.F[any]("free"), + ID: cloudflare.F("free"), IsContract: cloudflare.F(false), PublicName: cloudflare.F("Business Plan"), Scope: cloudflare.F("zone"), @@ -138,7 +138,7 @@ func TestSubscriptionEditWithOptionalParams(t *testing.T) { RatePlan: cloudflare.F(user.SubscriptionEditParamsRatePlan{ Currency: cloudflare.F("USD"), ExternallyManaged: cloudflare.F(false), - ID: cloudflare.F[any]("free"), + ID: cloudflare.F("free"), IsContract: cloudflare.F(false), PublicName: cloudflare.F("Business Plan"), Scope: cloudflare.F("zone"), diff --git a/vectorize/index.go b/vectorize/index.go index 5d66c7ba7e..7a76731d44 100644 --- a/vectorize/index.go +++ b/vectorize/index.go @@ -168,11 +168,11 @@ func (r *IndexService) Upsert(ctx context.Context, accountIdentifier string, ind type VectorizeCreateIndex struct { Config VectorizeCreateIndexConfig `json:"config"` // Specifies the timestamp the resource was created as an ISO8601 string. - CreatedOn interface{} `json:"created_on"` + CreatedOn string `json:"created_on"` // Specifies the description of the index. Description string `json:"description"` // Specifies the timestamp the resource was modified as an ISO8601 string. - ModifiedOn interface{} `json:"modified_on"` + ModifiedOn string `json:"modified_on"` Name string `json:"name"` JSON vectorizeCreateIndexJSON `json:"-"` } diff --git a/waiting_rooms/event.go b/waiting_rooms/event.go index a9751d456b..e6fe4ddcea 100644 --- a/waiting_rooms/event.go +++ b/waiting_rooms/event.go @@ -39,10 +39,10 @@ func NewEventService(opts ...option.RequestOption) (r *EventService) { // some of the properties in the event's configuration may either override or // inherit from the waiting room's configuration. Note that events cannot overlap // with each other, so only one event can be active at a time. -func (r *EventService) New(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body EventNewParams, opts ...option.RequestOption) (res *WaitingroomEventResult, err error) { +func (r *EventService) New(ctx context.Context, zoneIdentifier string, waitingRoomID string, body EventNewParams, opts ...option.RequestOption) (res *WaitingroomEventResult, err error) { opts = append(r.Options[:], opts...) var env EventNewResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/events", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/events", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...) if err != nil { return @@ -52,10 +52,10 @@ func (r *EventService) New(ctx context.Context, zoneIdentifier string, waitingRo } // Updates a configured event for a waiting room. -func (r *EventService) Update(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}, body EventUpdateParams, opts ...option.RequestOption) (res *WaitingroomEventResult, err error) { +func (r *EventService) Update(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string, body EventUpdateParams, opts ...option.RequestOption) (res *WaitingroomEventResult, err error) { opts = append(r.Options[:], opts...) var env EventUpdateResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/events/%v", zoneIdentifier, waitingRoomID, eventID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/events/%s", zoneIdentifier, waitingRoomID, eventID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...) if err != nil { return @@ -65,10 +65,10 @@ func (r *EventService) Update(ctx context.Context, zoneIdentifier string, waitin } // Lists events for a waiting room. -func (r *EventService) List(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, opts ...option.RequestOption) (res *[]WaitingroomEventResult, err error) { +func (r *EventService) List(ctx context.Context, zoneIdentifier string, waitingRoomID string, opts ...option.RequestOption) (res *[]WaitingroomEventResult, err error) { opts = append(r.Options[:], opts...) var env EventListResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/events", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/events", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -78,10 +78,10 @@ func (r *EventService) List(ctx context.Context, zoneIdentifier string, waitingR } // Deletes an event for a waiting room. -func (r *EventService) Delete(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}, opts ...option.RequestOption) (res *EventDeleteResponse, err error) { +func (r *EventService) Delete(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string, opts ...option.RequestOption) (res *EventDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env EventDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/events/%v", zoneIdentifier, waitingRoomID, eventID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/events/%s", zoneIdentifier, waitingRoomID, eventID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -91,10 +91,10 @@ func (r *EventService) Delete(ctx context.Context, zoneIdentifier string, waitin } // Patches a configured event for a waiting room. -func (r *EventService) Edit(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}, body EventEditParams, opts ...option.RequestOption) (res *WaitingroomEventResult, err error) { +func (r *EventService) Edit(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string, body EventEditParams, opts ...option.RequestOption) (res *WaitingroomEventResult, err error) { opts = append(r.Options[:], opts...) var env EventEditResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/events/%v", zoneIdentifier, waitingRoomID, eventID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/events/%s", zoneIdentifier, waitingRoomID, eventID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &env, opts...) if err != nil { return @@ -104,10 +104,10 @@ func (r *EventService) Edit(ctx context.Context, zoneIdentifier string, waitingR } // Fetches a single configured event for a waiting room. -func (r *EventService) Get(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}, opts ...option.RequestOption) (res *WaitingroomEventResult, err error) { +func (r *EventService) Get(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string, opts ...option.RequestOption) (res *WaitingroomEventResult, err error) { opts = append(r.Options[:], opts...) var env EventGetResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/events/%v", zoneIdentifier, waitingRoomID, eventID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/events/%s", zoneIdentifier, waitingRoomID, eventID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -117,8 +117,8 @@ func (r *EventService) Get(ctx context.Context, zoneIdentifier string, waitingRo } type WaitingroomEventResult struct { - ID interface{} `json:"id"` - CreatedOn time.Time `json:"created_on" format:"date-time"` + ID string `json:"id"` + CreatedOn time.Time `json:"created_on" format:"date-time"` // If set, the event will override the waiting room's `custom_page_html` property // while it is active. If null, the event will inherit it. CustomPageHTML string `json:"custom_page_html,nullable"` @@ -200,7 +200,7 @@ func (r waitingroomEventResultJSON) RawJSON() string { } type EventDeleteResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` JSON eventDeleteResponseJSON `json:"-"` } diff --git a/waiting_rooms/eventdetail.go b/waiting_rooms/eventdetail.go index 917f690c3e..06e17ac589 100644 --- a/waiting_rooms/eventdetail.go +++ b/waiting_rooms/eventdetail.go @@ -33,10 +33,10 @@ func NewEventDetailService(opts ...option.RequestOption) (r *EventDetailService) // Previews an event's configuration as if it was active. Inherited fields from the // waiting room will be displayed with their current values. -func (r *EventDetailService) Get(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, eventID interface{}, opts ...option.RequestOption) (res *WaitingroomEventDetailsResult, err error) { +func (r *EventDetailService) Get(ctx context.Context, zoneIdentifier string, waitingRoomID string, eventID string, opts ...option.RequestOption) (res *WaitingroomEventDetailsResult, err error) { opts = append(r.Options[:], opts...) var env EventDetailGetResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/events/%v/details", zoneIdentifier, waitingRoomID, eventID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/events/%s/details", zoneIdentifier, waitingRoomID, eventID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -46,9 +46,9 @@ func (r *EventDetailService) Get(ctx context.Context, zoneIdentifier string, wai } type WaitingroomEventDetailsResult struct { - ID interface{} `json:"id"` - CreatedOn time.Time `json:"created_on" format:"date-time"` - CustomPageHTML string `json:"custom_page_html"` + ID string `json:"id"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + CustomPageHTML string `json:"custom_page_html"` // A note that you can use to add more details about the event. Description string `json:"description"` DisableSessionRenewal bool `json:"disable_session_renewal"` diff --git a/waiting_rooms/rule.go b/waiting_rooms/rule.go index 880a67899d..9474f94ad2 100644 --- a/waiting_rooms/rule.go +++ b/waiting_rooms/rule.go @@ -33,10 +33,10 @@ func NewRuleService(opts ...option.RequestOption) (r *RuleService) { // Only available for the Waiting Room Advanced subscription. Creates a rule for a // waiting room. -func (r *RuleService) New(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body RuleNewParams, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { +func (r *RuleService) New(ctx context.Context, zoneIdentifier string, waitingRoomID string, body RuleNewParams, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { opts = append(r.Options[:], opts...) var env RuleNewResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/rules", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/rules", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...) if err != nil { return @@ -47,10 +47,10 @@ func (r *RuleService) New(ctx context.Context, zoneIdentifier string, waitingRoo // Only available for the Waiting Room Advanced subscription. Replaces all rules // for a waiting room. -func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body RuleUpdateParams, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { +func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, waitingRoomID string, body RuleUpdateParams, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { opts = append(r.Options[:], opts...) var env RuleUpdateResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/rules", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/rules", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...) if err != nil { return @@ -60,10 +60,10 @@ func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, waiting } // Lists rules for a waiting room. -func (r *RuleService) List(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { +func (r *RuleService) List(ctx context.Context, zoneIdentifier string, waitingRoomID string, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { opts = append(r.Options[:], opts...) var env RuleListResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/rules", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/rules", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -73,10 +73,10 @@ func (r *RuleService) List(ctx context.Context, zoneIdentifier string, waitingRo } // Deletes a rule for a waiting room. -func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, ruleID string, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { +func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, waitingRoomID string, ruleID string, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { opts = append(r.Options[:], opts...) var env RuleDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/rules/%s", zoneIdentifier, waitingRoomID, ruleID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/rules/%s", zoneIdentifier, waitingRoomID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -86,10 +86,10 @@ func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, waiting } // Patches a rule for a waiting room. -func (r *RuleService) Edit(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, ruleID string, body RuleEditParams, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { +func (r *RuleService) Edit(ctx context.Context, zoneIdentifier string, waitingRoomID string, ruleID string, body RuleEditParams, opts ...option.RequestOption) (res *[]WaitingroomRuleResult, err error) { opts = append(r.Options[:], opts...) var env RuleEditResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/rules/%s", zoneIdentifier, waitingRoomID, ruleID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/rules/%s", zoneIdentifier, waitingRoomID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &env, opts...) if err != nil { return diff --git a/waiting_rooms/status.go b/waiting_rooms/status.go index 34bcb8488d..a008a3bb0c 100644 --- a/waiting_rooms/status.go +++ b/waiting_rooms/status.go @@ -47,10 +47,10 @@ func NewStatusService(opts ...option.RequestOption) (r *StatusService) { // currently active on the origin. // 5. `max_estimated_time_minutes`: Integer of the maximum estimated time currently // presented to the users. -func (r *StatusService) Get(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, opts ...option.RequestOption) (res *StatusGetResponse, err error) { +func (r *StatusService) Get(ctx context.Context, zoneIdentifier string, waitingRoomID string, opts ...option.RequestOption) (res *StatusGetResponse, err error) { opts = append(r.Options[:], opts...) var env StatusGetResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v/status", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/status", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return diff --git a/waiting_rooms/waitingroom.go b/waiting_rooms/waitingroom.go index e79c7567a5..983587daae 100644 --- a/waiting_rooms/waitingroom.go +++ b/waiting_rooms/waitingroom.go @@ -56,10 +56,10 @@ func (r *WaitingRoomService) New(ctx context.Context, zoneIdentifier string, bod } // Updates a configured waiting room. -func (r *WaitingRoomService) Update(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body WaitingRoomUpdateParams, opts ...option.RequestOption) (res *WaitingroomWaitingroom, err error) { +func (r *WaitingRoomService) Update(ctx context.Context, zoneIdentifier string, waitingRoomID string, body WaitingRoomUpdateParams, opts ...option.RequestOption) (res *WaitingroomWaitingroom, err error) { opts = append(r.Options[:], opts...) var env WaitingRoomUpdateResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...) if err != nil { return @@ -82,10 +82,10 @@ func (r *WaitingRoomService) List(ctx context.Context, zoneIdentifier string, op } // Deletes a waiting room. -func (r *WaitingRoomService) Delete(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, opts ...option.RequestOption) (res *WaitingRoomDeleteResponse, err error) { +func (r *WaitingRoomService) Delete(ctx context.Context, zoneIdentifier string, waitingRoomID string, opts ...option.RequestOption) (res *WaitingRoomDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env WaitingRoomDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -95,10 +95,10 @@ func (r *WaitingRoomService) Delete(ctx context.Context, zoneIdentifier string, } // Patches a configured waiting room. -func (r *WaitingRoomService) Edit(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, body WaitingRoomEditParams, opts ...option.RequestOption) (res *WaitingroomWaitingroom, err error) { +func (r *WaitingRoomService) Edit(ctx context.Context, zoneIdentifier string, waitingRoomID string, body WaitingRoomEditParams, opts ...option.RequestOption) (res *WaitingroomWaitingroom, err error) { opts = append(r.Options[:], opts...) var env WaitingRoomEditResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &env, opts...) if err != nil { return @@ -108,10 +108,10 @@ func (r *WaitingRoomService) Edit(ctx context.Context, zoneIdentifier string, wa } // Fetches a single configured waiting room. -func (r *WaitingRoomService) Get(ctx context.Context, zoneIdentifier string, waitingRoomID interface{}, opts ...option.RequestOption) (res *WaitingroomWaitingroom, err error) { +func (r *WaitingRoomService) Get(ctx context.Context, zoneIdentifier string, waitingRoomID string, opts ...option.RequestOption) (res *WaitingroomWaitingroom, err error) { opts = append(r.Options[:], opts...) var env WaitingRoomGetResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%v", zoneIdentifier, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s", zoneIdentifier, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -121,7 +121,7 @@ func (r *WaitingRoomService) Get(ctx context.Context, zoneIdentifier string, wai } type WaitingroomWaitingroom struct { - ID interface{} `json:"id"` + ID string `json:"id"` // Only available for the Waiting Room Advanced subscription. Additional hostname // and path combinations to which this waiting room will be applied. There is an // implied wildcard at the end of the path. The hostname and path combination must @@ -623,7 +623,7 @@ func (r WaitingroomWaitingroomQueueingStatusCode) IsKnown() bool { } type WaitingRoomDeleteResponse struct { - ID interface{} `json:"id"` + ID string `json:"id"` JSON waitingRoomDeleteResponseJSON `json:"-"` } diff --git a/workers/accountsetting.go b/workers/accountsetting.go index daf57666b7..c9ad27f1c3 100644 --- a/workers/accountsetting.go +++ b/workers/accountsetting.go @@ -105,8 +105,8 @@ func (r accountSettingGetResponseJSON) RawJSON() string { type AccountSettingUpdateParams struct { // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Body param.Field[interface{}] `json:"body,required"` + AccountID param.Field[string] `path:"account_id,required"` + Body param.Field[string] `json:"body,required"` } func (r AccountSettingUpdateParams) MarshalJSON() (data []byte, err error) { diff --git a/workers/accountsetting_test.go b/workers/accountsetting_test.go index a4e6d2e1ee..bb74eaa742 100644 --- a/workers/accountsetting_test.go +++ b/workers/accountsetting_test.go @@ -30,7 +30,7 @@ func TestAccountSettingUpdate(t *testing.T) { ) _, err := client.Workers.AccountSettings.Update(context.TODO(), workers.AccountSettingUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: cloudflare.F[any]("{'default_usage_model': 'unbound'}"), + Body: cloudflare.F("{'default_usage_model': 'unbound'}"), }) if err != nil { var apierr *cloudflare.Error diff --git a/workers/domain.go b/workers/domain.go index 2ce062ce91..7ad48dd490 100644 --- a/workers/domain.go +++ b/workers/domain.go @@ -36,7 +36,7 @@ func NewDomainService(opts ...option.RequestOption) (r *DomainService) { func (r *DomainService) Update(ctx context.Context, params DomainUpdateParams, opts ...option.RequestOption) (res *WorkersDomain, err error) { opts = append(r.Options[:], opts...) var env DomainUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/workers/domains", params.AccountID) + path := fmt.Sprintf("accounts/%s/workers/domains", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -49,7 +49,7 @@ func (r *DomainService) Update(ctx context.Context, params DomainUpdateParams, o func (r *DomainService) List(ctx context.Context, params DomainListParams, opts ...option.RequestOption) (res *[]WorkersDomain, err error) { opts = append(r.Options[:], opts...) var env DomainListResponseEnvelope - path := fmt.Sprintf("accounts/%v/workers/domains", params.AccountID) + path := fmt.Sprintf("accounts/%s/workers/domains", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) if err != nil { return @@ -59,19 +59,19 @@ func (r *DomainService) List(ctx context.Context, params DomainListParams, opts } // Detaches a Worker from a zone and hostname. -func (r *DomainService) Delete(ctx context.Context, domainID interface{}, body DomainDeleteParams, opts ...option.RequestOption) (err error) { +func (r *DomainService) Delete(ctx context.Context, domainID string, body DomainDeleteParams, opts ...option.RequestOption) (err error) { opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...) - path := fmt.Sprintf("accounts/%v/workers/domains/%v", body.AccountID, domainID) + path := fmt.Sprintf("accounts/%s/workers/domains/%s", body.AccountID, domainID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...) return } // Gets a Worker domain. -func (r *DomainService) Get(ctx context.Context, domainID interface{}, query DomainGetParams, opts ...option.RequestOption) (res *WorkersDomain, err error) { +func (r *DomainService) Get(ctx context.Context, domainID string, query DomainGetParams, opts ...option.RequestOption) (res *WorkersDomain, err error) { opts = append(r.Options[:], opts...) var env DomainGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/workers/domains/%v", query.AccountID, domainID) + path := fmt.Sprintf("accounts/%s/workers/domains/%s", query.AccountID, domainID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -82,7 +82,7 @@ func (r *DomainService) Get(ctx context.Context, domainID interface{}, query Dom type WorkersDomain struct { // Identifer of the Worker Domain. - ID interface{} `json:"id"` + ID string `json:"id"` // Worker environment associated with the zone and hostname. Environment string `json:"environment"` // Hostname of the Worker Domain. @@ -90,7 +90,7 @@ type WorkersDomain struct { // Worker service associated with the zone and hostname. Service string `json:"service"` // Identifier of the zone. - ZoneID interface{} `json:"zone_id"` + ZoneID string `json:"zone_id"` // Name of the zone. ZoneName string `json:"zone_name"` JSON workersDomainJSON `json:"-"` @@ -117,7 +117,7 @@ func (r workersDomainJSON) RawJSON() string { } type DomainUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // Worker environment associated with the zone and hostname. Environment param.Field[string] `json:"environment,required"` // Hostname of the Worker Domain. @@ -125,7 +125,7 @@ type DomainUpdateParams struct { // Worker service associated with the zone and hostname. Service param.Field[string] `json:"service,required"` // Identifier of the zone. - ZoneID param.Field[interface{}] `json:"zone_id,required"` + ZoneID param.Field[string] `json:"zone_id,required"` } func (r DomainUpdateParams) MarshalJSON() (data []byte, err error) { @@ -222,7 +222,7 @@ func (r DomainUpdateResponseEnvelopeSuccess) IsKnown() bool { } type DomainListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // Worker environment associated with the zone and hostname. Environment param.Field[string] `query:"environment"` // Hostname of the Worker Domain. @@ -230,7 +230,7 @@ type DomainListParams struct { // Worker service associated with the zone and hostname. Service param.Field[string] `query:"service"` // Identifier of the zone. - ZoneID param.Field[interface{}] `query:"zone_id"` + ZoneID param.Field[string] `query:"zone_id"` // Name of the zone. ZoneName param.Field[string] `query:"zone_name"` } @@ -333,11 +333,11 @@ func (r DomainListResponseEnvelopeSuccess) IsKnown() bool { } type DomainDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DomainGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DomainGetResponseEnvelope struct { diff --git a/workers/domain_test.go b/workers/domain_test.go index a5c555f078..6f04843c1f 100644 --- a/workers/domain_test.go +++ b/workers/domain_test.go @@ -29,11 +29,11 @@ func TestDomainUpdate(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Workers.Domains.Update(context.TODO(), workers.DomainUpdateParams{ - AccountID: cloudflare.F[any]("9a7806061c88ada191ed06f989cc3dac"), + AccountID: cloudflare.F("9a7806061c88ada191ed06f989cc3dac"), Environment: cloudflare.F("production"), Hostname: cloudflare.F("foo.example.com"), Service: cloudflare.F("foo"), - ZoneID: cloudflare.F[any]("593c9c94de529bbbfaac7c53ced0447d"), + ZoneID: cloudflare.F("593c9c94de529bbbfaac7c53ced0447d"), }) if err != nil { var apierr *cloudflare.Error @@ -59,11 +59,11 @@ func TestDomainListWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Workers.Domains.List(context.TODO(), workers.DomainListParams{ - AccountID: cloudflare.F[any]("9a7806061c88ada191ed06f989cc3dac"), + AccountID: cloudflare.F("9a7806061c88ada191ed06f989cc3dac"), Environment: cloudflare.F("production"), Hostname: cloudflare.F("foo.example.com"), Service: cloudflare.F("foo"), - ZoneID: cloudflare.F[any]("593c9c94de529bbbfaac7c53ced0447d"), + ZoneID: cloudflare.F("593c9c94de529bbbfaac7c53ced0447d"), ZoneName: cloudflare.F("example.com"), }) if err != nil { @@ -93,7 +93,7 @@ func TestDomainDelete(t *testing.T) { context.TODO(), "dbe10b4bc17c295377eabd600e1787fd", workers.DomainDeleteParams{ - AccountID: cloudflare.F[any]("9a7806061c88ada191ed06f989cc3dac"), + AccountID: cloudflare.F("9a7806061c88ada191ed06f989cc3dac"), }, ) if err != nil { @@ -123,7 +123,7 @@ func TestDomainGet(t *testing.T) { context.TODO(), "dbe10b4bc17c295377eabd600e1787fd", workers.DomainGetParams{ - AccountID: cloudflare.F[any]("9a7806061c88ada191ed06f989cc3dac"), + AccountID: cloudflare.F("9a7806061c88ada191ed06f989cc3dac"), }, ) if err != nil { diff --git a/workers/scriptschedule.go b/workers/scriptschedule.go index c882494021..d055c13d2e 100644 --- a/workers/scriptschedule.go +++ b/workers/scriptschedule.go @@ -151,8 +151,8 @@ func (r scriptScheduleGetResponseScheduleJSON) RawJSON() string { type ScriptScheduleUpdateParams struct { // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Body param.Field[interface{}] `json:"body,required"` + AccountID param.Field[string] `path:"account_id,required"` + Body param.Field[string] `json:"body,required"` } func (r ScriptScheduleUpdateParams) MarshalJSON() (data []byte, err error) { diff --git a/workers/scriptschedule_test.go b/workers/scriptschedule_test.go index 698ffb337e..27590d0e6b 100644 --- a/workers/scriptschedule_test.go +++ b/workers/scriptschedule_test.go @@ -33,7 +33,7 @@ func TestScriptScheduleUpdate(t *testing.T) { "this-is_my_script-01", workers.ScriptScheduleUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: cloudflare.F[any]("[{'cron': '*/30 * * * *'}]"), + Body: cloudflare.F("[{'cron': '*/30 * * * *'}]"), }, ) if err != nil { diff --git a/workers/scriptusagemodel.go b/workers/scriptusagemodel.go index 8e34294e40..da43d4930c 100644 --- a/workers/scriptusagemodel.go +++ b/workers/scriptusagemodel.go @@ -102,8 +102,8 @@ func (r scriptUsageModelGetResponseJSON) RawJSON() string { type ScriptUsageModelUpdateParams struct { // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Body param.Field[interface{}] `json:"body,required"` + AccountID param.Field[string] `path:"account_id,required"` + Body param.Field[string] `json:"body,required"` } func (r ScriptUsageModelUpdateParams) MarshalJSON() (data []byte, err error) { diff --git a/workers/scriptusagemodel_test.go b/workers/scriptusagemodel_test.go index d52155d45f..0546a32685 100644 --- a/workers/scriptusagemodel_test.go +++ b/workers/scriptusagemodel_test.go @@ -33,7 +33,7 @@ func TestScriptUsageModelUpdate(t *testing.T) { "this-is_my_script-01", workers.ScriptUsageModelUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: cloudflare.F[any]("{'usage_model': 'unbound'}"), + Body: cloudflare.F("{'usage_model': 'unbound'}"), }, ) if err != nil { diff --git a/workers/subdomain.go b/workers/subdomain.go index 781c969126..fd3302e574 100644 --- a/workers/subdomain.go +++ b/workers/subdomain.go @@ -100,8 +100,8 @@ func (r subdomainGetResponseJSON) RawJSON() string { type SubdomainUpdateParams struct { // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Body param.Field[interface{}] `json:"body,required"` + AccountID param.Field[string] `path:"account_id,required"` + Body param.Field[string] `json:"body,required"` } func (r SubdomainUpdateParams) MarshalJSON() (data []byte, err error) { diff --git a/workers/subdomain_test.go b/workers/subdomain_test.go index 0b53577311..f11d0f91c7 100644 --- a/workers/subdomain_test.go +++ b/workers/subdomain_test.go @@ -30,7 +30,7 @@ func TestSubdomainUpdate(t *testing.T) { ) _, err := client.Workers.Subdomains.Update(context.TODO(), workers.SubdomainUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: cloudflare.F[any]("{'subdomain': 'example-subdomain'}"), + Body: cloudflare.F("{'subdomain': 'example-subdomain'}"), }) if err != nil { var apierr *cloudflare.Error diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go index 0d7d93fbb1..eaa5fdb0f7 100644 --- a/zero_trust/accessapplication.go +++ b/zero_trust/accessapplication.go @@ -1351,7 +1351,7 @@ type AccessAppsBookmarkApplication struct { Aud string `json:"aud"` CreatedAt time.Time `json:"created_at" format:"date-time"` // The URL or domain of the bookmark. - Domain interface{} `json:"domain"` + Domain string `json:"domain"` // The image URL for the logo shown in the App Launcher dashboard. LogoURL string `json:"logo_url"` // The name of the application. @@ -2239,7 +2239,7 @@ type AccessApplicationNewParamsBookmarkApplication struct { ZoneID param.Field[string] `path:"zone_id"` AppLauncherVisible param.Field[interface{}] `json:"app_launcher_visible"` // The URL or domain of the bookmark. - Domain param.Field[interface{}] `json:"domain"` + Domain param.Field[string] `json:"domain"` // The image URL for the logo shown in the App Launcher dashboard. LogoURL param.Field[string] `json:"logo_url"` // The name of the application. @@ -3228,7 +3228,7 @@ type AccessApplicationUpdateParamsBookmarkApplication struct { ZoneID param.Field[string] `path:"zone_id"` AppLauncherVisible param.Field[interface{}] `json:"app_launcher_visible"` // The URL or domain of the bookmark. - Domain param.Field[interface{}] `json:"domain"` + Domain param.Field[string] `json:"domain"` // The image URL for the logo shown in the App Launcher dashboard. LogoURL param.Field[string] `json:"logo_url"` // The name of the application. diff --git a/zero_trust/accessbookmark.go b/zero_trust/accessbookmark.go index 2752dd139d..a97e4b039f 100644 --- a/zero_trust/accessbookmark.go +++ b/zero_trust/accessbookmark.go @@ -32,10 +32,10 @@ func NewAccessBookmarkService(opts ...option.RequestOption) (r *AccessBookmarkSe } // Create a new Bookmark application. -func (r *AccessBookmarkService) New(ctx context.Context, identifier interface{}, uuid string, opts ...option.RequestOption) (res *AccessBookmarks, err error) { +func (r *AccessBookmarkService) New(ctx context.Context, identifier string, uuid string, opts ...option.RequestOption) (res *AccessBookmarks, err error) { opts = append(r.Options[:], opts...) var env AccessBookmarkNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/access/bookmarks/%s", identifier, uuid) + path := fmt.Sprintf("accounts/%s/access/bookmarks/%s", identifier, uuid) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) if err != nil { return @@ -45,10 +45,10 @@ func (r *AccessBookmarkService) New(ctx context.Context, identifier interface{}, } // Updates a configured Bookmark application. -func (r *AccessBookmarkService) Update(ctx context.Context, identifier interface{}, uuid string, opts ...option.RequestOption) (res *AccessBookmarks, err error) { +func (r *AccessBookmarkService) Update(ctx context.Context, identifier string, uuid string, opts ...option.RequestOption) (res *AccessBookmarks, err error) { opts = append(r.Options[:], opts...) var env AccessBookmarkUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/access/bookmarks/%s", identifier, uuid) + path := fmt.Sprintf("accounts/%s/access/bookmarks/%s", identifier, uuid) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) if err != nil { return @@ -58,10 +58,10 @@ func (r *AccessBookmarkService) Update(ctx context.Context, identifier interface } // Lists Bookmark applications. -func (r *AccessBookmarkService) List(ctx context.Context, identifier interface{}, opts ...option.RequestOption) (res *[]AccessBookmarks, err error) { +func (r *AccessBookmarkService) List(ctx context.Context, identifier string, opts ...option.RequestOption) (res *[]AccessBookmarks, err error) { opts = append(r.Options[:], opts...) var env AccessBookmarkListResponseEnvelope - path := fmt.Sprintf("accounts/%v/access/bookmarks", identifier) + path := fmt.Sprintf("accounts/%s/access/bookmarks", identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -71,10 +71,10 @@ func (r *AccessBookmarkService) List(ctx context.Context, identifier interface{} } // Deletes a Bookmark application. -func (r *AccessBookmarkService) Delete(ctx context.Context, identifier interface{}, uuid string, opts ...option.RequestOption) (res *AccessBookmarkDeleteResponse, err error) { +func (r *AccessBookmarkService) Delete(ctx context.Context, identifier string, uuid string, opts ...option.RequestOption) (res *AccessBookmarkDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env AccessBookmarkDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/access/bookmarks/%s", identifier, uuid) + path := fmt.Sprintf("accounts/%s/access/bookmarks/%s", identifier, uuid) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -84,10 +84,10 @@ func (r *AccessBookmarkService) Delete(ctx context.Context, identifier interface } // Fetches a single Bookmark application. -func (r *AccessBookmarkService) Get(ctx context.Context, identifier interface{}, uuid string, opts ...option.RequestOption) (res *AccessBookmarks, err error) { +func (r *AccessBookmarkService) Get(ctx context.Context, identifier string, uuid string, opts ...option.RequestOption) (res *AccessBookmarks, err error) { opts = append(r.Options[:], opts...) var env AccessBookmarkGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/access/bookmarks/%s", identifier, uuid) + path := fmt.Sprintf("accounts/%s/access/bookmarks/%s", identifier, uuid) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return diff --git a/zero_trust/accesslogaccessrequest.go b/zero_trust/accesslogaccessrequest.go index 5830693ed6..7dbd50fbdc 100644 --- a/zero_trust/accesslogaccessrequest.go +++ b/zero_trust/accesslogaccessrequest.go @@ -52,7 +52,7 @@ type AccessAccessRequests struct { // The URL of the Access application. AppDomain string `json:"app_domain"` // The unique identifier for the Access application. - AppUid interface{} `json:"app_uid"` + AppUid string `json:"app_uid"` // The IdP used to authenticate. Connection string `json:"connection"` CreatedAt time.Time `json:"created_at" format:"date-time"` diff --git a/zero_trust/device.go b/zero_trust/device.go index aae96d4b66..dd90eb729c 100644 --- a/zero_trust/device.go +++ b/zero_trust/device.go @@ -54,7 +54,7 @@ func NewDeviceService(opts ...option.RequestOption) (r *DeviceService) { func (r *DeviceService) List(ctx context.Context, query DeviceListParams, opts ...option.RequestOption) (res *[]TeamsDevicesDevices, err error) { opts = append(r.Options[:], opts...) var env DeviceListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -67,7 +67,7 @@ func (r *DeviceService) List(ctx context.Context, query DeviceListParams, opts . func (r *DeviceService) Get(ctx context.Context, deviceID string, query DeviceGetParams, opts ...option.RequestOption) (res *DeviceGetResponse, err error) { opts = append(r.Options[:], opts...) var env DeviceGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/%s", query.AccountID, deviceID) + path := fmt.Sprintf("accounts/%s/devices/%s", query.AccountID, deviceID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -217,7 +217,7 @@ func init() { } type DeviceListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceListResponseEnvelope struct { @@ -343,7 +343,7 @@ func (r deviceListResponseEnvelopeResultInfoJSON) RawJSON() string { } type DeviceGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceGetResponseEnvelope struct { diff --git a/zero_trust/device_test.go b/zero_trust/device_test.go index d5911d3f4b..88dac0a377 100644 --- a/zero_trust/device_test.go +++ b/zero_trust/device_test.go @@ -29,7 +29,7 @@ func TestDeviceList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.List(context.TODO(), zero_trust.DeviceListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -58,7 +58,7 @@ func TestDeviceGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DeviceGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/devicedextest.go b/zero_trust/devicedextest.go index 9031dac86b..d3446246af 100644 --- a/zero_trust/devicedextest.go +++ b/zero_trust/devicedextest.go @@ -35,7 +35,7 @@ func NewDeviceDEXTestService(opts ...option.RequestOption) (r *DeviceDEXTestServ func (r *DeviceDEXTestService) New(ctx context.Context, params DeviceDEXTestNewParams, opts ...option.RequestOption) (res *TeamsDevicesDeviceDEXTestSchemasHTTP, err error) { opts = append(r.Options[:], opts...) var env DeviceDEXTestNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/dex_tests", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/dex_tests", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -48,7 +48,7 @@ func (r *DeviceDEXTestService) New(ctx context.Context, params DeviceDEXTestNewP func (r *DeviceDEXTestService) Update(ctx context.Context, dexTestID string, params DeviceDEXTestUpdateParams, opts ...option.RequestOption) (res *TeamsDevicesDeviceDEXTestSchemasHTTP, err error) { opts = append(r.Options[:], opts...) var env DeviceDEXTestUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/dex_tests/%s", params.AccountID, dexTestID) + path := fmt.Sprintf("accounts/%s/devices/dex_tests/%s", params.AccountID, dexTestID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -61,7 +61,7 @@ func (r *DeviceDEXTestService) Update(ctx context.Context, dexTestID string, par func (r *DeviceDEXTestService) List(ctx context.Context, query DeviceDEXTestListParams, opts ...option.RequestOption) (res *[]TeamsDevicesDeviceDEXTestSchemasHTTP, err error) { opts = append(r.Options[:], opts...) var env DeviceDEXTestListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/dex_tests", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/dex_tests", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -75,7 +75,7 @@ func (r *DeviceDEXTestService) List(ctx context.Context, query DeviceDEXTestList func (r *DeviceDEXTestService) Delete(ctx context.Context, dexTestID string, body DeviceDEXTestDeleteParams, opts ...option.RequestOption) (res *[]TeamsDevicesDeviceDEXTestSchemasHTTP, err error) { opts = append(r.Options[:], opts...) var env DeviceDEXTestDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/dex_tests/%s", body.AccountID, dexTestID) + path := fmt.Sprintf("accounts/%s/devices/dex_tests/%s", body.AccountID, dexTestID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -88,7 +88,7 @@ func (r *DeviceDEXTestService) Delete(ctx context.Context, dexTestID string, bod func (r *DeviceDEXTestService) Get(ctx context.Context, dexTestID string, query DeviceDEXTestGetParams, opts ...option.RequestOption) (res *TeamsDevicesDeviceDEXTestSchemasHTTP, err error) { opts = append(r.Options[:], opts...) var env DeviceDEXTestGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/dex_tests/%s", query.AccountID, dexTestID) + path := fmt.Sprintf("accounts/%s/devices/dex_tests/%s", query.AccountID, dexTestID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -163,7 +163,7 @@ func (r teamsDevicesDeviceDEXTestSchemasHTTPDataJSON) RawJSON() string { } type DeviceDEXTestNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The configuration object which contains the details for the WARP client to // conduct the test. Data param.Field[DeviceDEXTestNewParamsData] `json:"data,required"` @@ -286,7 +286,7 @@ func (r DeviceDEXTestNewResponseEnvelopeSuccess) IsKnown() bool { } type DeviceDEXTestUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The configuration object which contains the details for the WARP client to // conduct the test. Data param.Field[DeviceDEXTestUpdateParamsData] `json:"data,required"` @@ -409,7 +409,7 @@ func (r DeviceDEXTestUpdateResponseEnvelopeSuccess) IsKnown() bool { } type DeviceDEXTestListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceDEXTestListResponseEnvelope struct { @@ -502,7 +502,7 @@ func (r DeviceDEXTestListResponseEnvelopeSuccess) IsKnown() bool { } type DeviceDEXTestDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceDEXTestDeleteResponseEnvelope struct { @@ -595,7 +595,7 @@ func (r DeviceDEXTestDeleteResponseEnvelopeSuccess) IsKnown() bool { } type DeviceDEXTestGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceDEXTestGetResponseEnvelope struct { diff --git a/zero_trust/devicedextest_test.go b/zero_trust/devicedextest_test.go index 9a912fbc9c..0829ee4438 100644 --- a/zero_trust/devicedextest_test.go +++ b/zero_trust/devicedextest_test.go @@ -29,7 +29,7 @@ func TestDeviceDEXTestNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.DEXTests.New(context.TODO(), zero_trust.DeviceDEXTestNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Data: cloudflare.F(zero_trust.DeviceDEXTestNewParamsData{ Host: cloudflare.F("https://dash.cloudflare.com"), Kind: cloudflare.F("http"), @@ -67,7 +67,7 @@ func TestDeviceDEXTestUpdateWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DeviceDEXTestUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Data: cloudflare.F(zero_trust.DeviceDEXTestUpdateParamsData{ Host: cloudflare.F("https://dash.cloudflare.com"), Kind: cloudflare.F("http"), @@ -103,7 +103,7 @@ func TestDeviceDEXTestList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.DEXTests.List(context.TODO(), zero_trust.DeviceDEXTestListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -132,7 +132,7 @@ func TestDeviceDEXTestDelete(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DeviceDEXTestDeleteParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { @@ -162,7 +162,7 @@ func TestDeviceDEXTestGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DeviceDEXTestGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/devicenetwork.go b/zero_trust/devicenetwork.go index 3ea3dafb57..1cbcf63a79 100644 --- a/zero_trust/devicenetwork.go +++ b/zero_trust/devicenetwork.go @@ -35,7 +35,7 @@ func NewDeviceNetworkService(opts ...option.RequestOption) (r *DeviceNetworkServ func (r *DeviceNetworkService) New(ctx context.Context, params DeviceNetworkNewParams, opts ...option.RequestOption) (res *TeamsDevicesDeviceManagedNetworks, err error) { opts = append(r.Options[:], opts...) var env DeviceNetworkNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/networks", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/networks", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -48,7 +48,7 @@ func (r *DeviceNetworkService) New(ctx context.Context, params DeviceNetworkNewP func (r *DeviceNetworkService) Update(ctx context.Context, networkID string, params DeviceNetworkUpdateParams, opts ...option.RequestOption) (res *TeamsDevicesDeviceManagedNetworks, err error) { opts = append(r.Options[:], opts...) var env DeviceNetworkUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/networks/%s", params.AccountID, networkID) + path := fmt.Sprintf("accounts/%s/devices/networks/%s", params.AccountID, networkID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -61,7 +61,7 @@ func (r *DeviceNetworkService) Update(ctx context.Context, networkID string, par func (r *DeviceNetworkService) List(ctx context.Context, query DeviceNetworkListParams, opts ...option.RequestOption) (res *[]TeamsDevicesDeviceManagedNetworks, err error) { opts = append(r.Options[:], opts...) var env DeviceNetworkListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/networks", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/networks", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -75,7 +75,7 @@ func (r *DeviceNetworkService) List(ctx context.Context, query DeviceNetworkList func (r *DeviceNetworkService) Delete(ctx context.Context, networkID string, body DeviceNetworkDeleteParams, opts ...option.RequestOption) (res *[]TeamsDevicesDeviceManagedNetworks, err error) { opts = append(r.Options[:], opts...) var env DeviceNetworkDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/networks/%s", body.AccountID, networkID) + path := fmt.Sprintf("accounts/%s/devices/networks/%s", body.AccountID, networkID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -88,7 +88,7 @@ func (r *DeviceNetworkService) Delete(ctx context.Context, networkID string, bod func (r *DeviceNetworkService) Get(ctx context.Context, networkID string, query DeviceNetworkGetParams, opts ...option.RequestOption) (res *TeamsDevicesDeviceManagedNetworks, err error) { opts = append(r.Options[:], opts...) var env DeviceNetworkGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/networks/%s", query.AccountID, networkID) + path := fmt.Sprintf("accounts/%s/devices/networks/%s", query.AccountID, networkID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -175,7 +175,7 @@ func (r TeamsDevicesDeviceManagedNetworksType) IsKnown() bool { } type DeviceNetworkNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The configuration object containing information for the WARP client to detect // the managed network. Config param.Field[DeviceNetworkNewParamsConfig] `json:"config,required"` @@ -310,7 +310,7 @@ func (r DeviceNetworkNewResponseEnvelopeSuccess) IsKnown() bool { } type DeviceNetworkUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The configuration object containing information for the WARP client to detect // the managed network. Config param.Field[DeviceNetworkUpdateParamsConfig] `json:"config"` @@ -445,7 +445,7 @@ func (r DeviceNetworkUpdateResponseEnvelopeSuccess) IsKnown() bool { } type DeviceNetworkListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceNetworkListResponseEnvelope struct { @@ -571,7 +571,7 @@ func (r deviceNetworkListResponseEnvelopeResultInfoJSON) RawJSON() string { } type DeviceNetworkDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceNetworkDeleteResponseEnvelope struct { @@ -697,7 +697,7 @@ func (r deviceNetworkDeleteResponseEnvelopeResultInfoJSON) RawJSON() string { } type DeviceNetworkGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceNetworkGetResponseEnvelope struct { diff --git a/zero_trust/devicenetwork_test.go b/zero_trust/devicenetwork_test.go index 3a70ea1bea..ef5b7f7e10 100644 --- a/zero_trust/devicenetwork_test.go +++ b/zero_trust/devicenetwork_test.go @@ -29,7 +29,7 @@ func TestDeviceNetworkNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Networks.New(context.TODO(), zero_trust.DeviceNetworkNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Config: cloudflare.F(zero_trust.DeviceNetworkNewParamsConfig{ Sha256: cloudflare.F("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"), TLSSockaddr: cloudflare.F("foo.bar:1234"), @@ -64,7 +64,7 @@ func TestDeviceNetworkUpdateWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DeviceNetworkUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Config: cloudflare.F(zero_trust.DeviceNetworkUpdateParamsConfig{ Sha256: cloudflare.F("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"), TLSSockaddr: cloudflare.F("foo.bar:1234"), @@ -97,7 +97,7 @@ func TestDeviceNetworkList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Networks.List(context.TODO(), zero_trust.DeviceNetworkListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -126,7 +126,7 @@ func TestDeviceNetworkDelete(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DeviceNetworkDeleteParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { @@ -156,7 +156,7 @@ func TestDeviceNetworkGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DeviceNetworkGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/deviceoverridecode.go b/zero_trust/deviceoverridecode.go index d02c9b166b..ef2a3a0695 100644 --- a/zero_trust/deviceoverridecode.go +++ b/zero_trust/deviceoverridecode.go @@ -36,7 +36,7 @@ func NewDeviceOverrideCodeService(opts ...option.RequestOption) (r *DeviceOverri func (r *DeviceOverrideCodeService) List(ctx context.Context, deviceID string, query DeviceOverrideCodeListParams, opts ...option.RequestOption) (res *DeviceOverrideCodeListResponse, err error) { opts = append(r.Options[:], opts...) var env DeviceOverrideCodeListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/%s/override_codes", query.AccountID, deviceID) + path := fmt.Sprintf("accounts/%s/devices/%s/override_codes", query.AccountID, deviceID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -68,15 +68,15 @@ func (r deviceOverrideCodeListResponseJSON) RawJSON() string { type DeviceOverrideCodeListResponseDisableForTime struct { // Override code that is valid for 1 hour. - Number1 interface{} `json:"1"` + Number1 string `json:"1"` // Override code that is valid for 12 hour2. - Number12 interface{} `json:"12"` + Number12 string `json:"12"` // Override code that is valid for 24 hour.2. - Number24 interface{} `json:"24"` + Number24 string `json:"24"` // Override code that is valid for 3 hours. - Number3 interface{} `json:"3"` + Number3 string `json:"3"` // Override code that is valid for 6 hours. - Number6 interface{} `json:"6"` + Number6 string `json:"6"` JSON deviceOverrideCodeListResponseDisableForTimeJSON `json:"-"` } @@ -101,7 +101,7 @@ func (r deviceOverrideCodeListResponseDisableForTimeJSON) RawJSON() string { } type DeviceOverrideCodeListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceOverrideCodeListResponseEnvelope struct { diff --git a/zero_trust/deviceoverridecode_test.go b/zero_trust/deviceoverridecode_test.go index 9fba7d6c51..0c18875002 100644 --- a/zero_trust/deviceoverridecode_test.go +++ b/zero_trust/deviceoverridecode_test.go @@ -32,7 +32,7 @@ func TestDeviceOverrideCodeList(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DeviceOverrideCodeListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/devicepolicy.go b/zero_trust/devicepolicy.go index 13118e4040..0bec7aa5b6 100644 --- a/zero_trust/devicepolicy.go +++ b/zero_trust/devicepolicy.go @@ -44,7 +44,7 @@ func NewDevicePolicyService(opts ...option.RequestOption) (r *DevicePolicyServic func (r *DevicePolicyService) New(ctx context.Context, params DevicePolicyNewParams, opts ...option.RequestOption) (res *TeamsDevicesDeviceSettingsPolicy, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/policy", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -57,7 +57,7 @@ func (r *DevicePolicyService) New(ctx context.Context, params DevicePolicyNewPar func (r *DevicePolicyService) List(ctx context.Context, query DevicePolicyListParams, opts ...option.RequestOption) (res *[]TeamsDevicesDeviceSettingsPolicy, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policies", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/policies", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -71,7 +71,7 @@ func (r *DevicePolicyService) List(ctx context.Context, query DevicePolicyListPa func (r *DevicePolicyService) Delete(ctx context.Context, policyID string, body DevicePolicyDeleteParams, opts ...option.RequestOption) (res *[]TeamsDevicesDeviceSettingsPolicy, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/%s", body.AccountID, policyID) + path := fmt.Sprintf("accounts/%s/devices/policy/%s", body.AccountID, policyID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -84,7 +84,7 @@ func (r *DevicePolicyService) Delete(ctx context.Context, policyID string, body func (r *DevicePolicyService) Edit(ctx context.Context, policyID string, params DevicePolicyEditParams, opts ...option.RequestOption) (res *TeamsDevicesDeviceSettingsPolicy, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyEditResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/%s", params.AccountID, policyID) + path := fmt.Sprintf("accounts/%s/devices/policy/%s", params.AccountID, policyID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return @@ -97,7 +97,7 @@ func (r *DevicePolicyService) Edit(ctx context.Context, policyID string, params func (r *DevicePolicyService) Get(ctx context.Context, policyID string, query DevicePolicyGetParams, opts ...option.RequestOption) (res *TeamsDevicesDeviceSettingsPolicy, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/%s", query.AccountID, policyID) + path := fmt.Sprintf("accounts/%s/devices/policy/%s", query.AccountID, policyID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -229,7 +229,7 @@ type DevicePolicyEditResponse = interface{} type DevicePolicyGetResponse = interface{} type DevicePolicyNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The wirefilter expression to match devices. Match param.Field[string] `json:"match,required"` // The name of the device settings profile. @@ -411,7 +411,7 @@ func (r devicePolicyNewResponseEnvelopeResultInfoJSON) RawJSON() string { } type DevicePolicyListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyListResponseEnvelope struct { @@ -537,7 +537,7 @@ func (r devicePolicyListResponseEnvelopeResultInfoJSON) RawJSON() string { } type DevicePolicyDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyDeleteResponseEnvelope struct { @@ -663,7 +663,7 @@ func (r devicePolicyDeleteResponseEnvelopeResultInfoJSON) RawJSON() string { } type DevicePolicyEditParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // Whether to allow the user to switch WARP between modes. AllowModeSwitch param.Field[bool] `json:"allow_mode_switch"` // Whether to receive update notifications when a new version of the client is @@ -837,7 +837,7 @@ func (r devicePolicyEditResponseEnvelopeResultInfoJSON) RawJSON() string { } type DevicePolicyGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyGetResponseEnvelope struct { diff --git a/zero_trust/devicepolicy_test.go b/zero_trust/devicepolicy_test.go index 97a319d51b..b3e6a6b85f 100644 --- a/zero_trust/devicepolicy_test.go +++ b/zero_trust/devicepolicy_test.go @@ -29,7 +29,7 @@ func TestDevicePolicyNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Policies.New(context.TODO(), zero_trust.DevicePolicyNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Match: cloudflare.F("user.identity == \"test@cloudflare.com\""), Name: cloudflare.F("Allow Developers"), Precedence: cloudflare.F(100.000000), @@ -75,7 +75,7 @@ func TestDevicePolicyList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Policies.List(context.TODO(), zero_trust.DevicePolicyListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -104,7 +104,7 @@ func TestDevicePolicyDelete(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePolicyDeleteParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { @@ -134,7 +134,7 @@ func TestDevicePolicyEditWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePolicyEditParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), AllowModeSwitch: cloudflare.F(true), AllowUpdates: cloudflare.F(true), AllowedToLeave: cloudflare.F(true), @@ -182,7 +182,7 @@ func TestDevicePolicyGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePolicyGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/devicepolicydefaultpolicy.go b/zero_trust/devicepolicydefaultpolicy.go index 999b98023a..35ee35e40c 100644 --- a/zero_trust/devicepolicydefaultpolicy.go +++ b/zero_trust/devicepolicydefaultpolicy.go @@ -35,7 +35,7 @@ func NewDevicePolicyDefaultPolicyService(opts ...option.RequestOption) (r *Devic func (r *DevicePolicyDefaultPolicyService) Get(ctx context.Context, query DevicePolicyDefaultPolicyGetParams, opts ...option.RequestOption) (res *[]DevicePolicyDefaultPolicyGetResponse, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyDefaultPolicyGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/policy", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -47,7 +47,7 @@ func (r *DevicePolicyDefaultPolicyService) Get(ctx context.Context, query Device type DevicePolicyDefaultPolicyGetResponse = interface{} type DevicePolicyDefaultPolicyGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyDefaultPolicyGetResponseEnvelope struct { diff --git a/zero_trust/devicepolicydefaultpolicy_test.go b/zero_trust/devicepolicydefaultpolicy_test.go index a47a8f7c33..e2164d411a 100644 --- a/zero_trust/devicepolicydefaultpolicy_test.go +++ b/zero_trust/devicepolicydefaultpolicy_test.go @@ -29,7 +29,7 @@ func TestDevicePolicyDefaultPolicyGet(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Policies.DefaultPolicy.Get(context.TODO(), zero_trust.DevicePolicyDefaultPolicyGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error diff --git a/zero_trust/devicepolicyexclude.go b/zero_trust/devicepolicyexclude.go index e8a3ca51ae..cd3d6fe720 100644 --- a/zero_trust/devicepolicyexclude.go +++ b/zero_trust/devicepolicyexclude.go @@ -35,7 +35,7 @@ func NewDevicePolicyExcludeService(opts ...option.RequestOption) (r *DevicePolic func (r *DevicePolicyExcludeService) Update(ctx context.Context, params DevicePolicyExcludeUpdateParams, opts ...option.RequestOption) (res *[]TeamsDevicesSplitTunnel, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyExcludeUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/exclude", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/policy/exclude", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -48,7 +48,7 @@ func (r *DevicePolicyExcludeService) Update(ctx context.Context, params DevicePo func (r *DevicePolicyExcludeService) List(ctx context.Context, query DevicePolicyExcludeListParams, opts ...option.RequestOption) (res *[]TeamsDevicesSplitTunnel, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyExcludeListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/exclude", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/policy/exclude", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -62,7 +62,7 @@ func (r *DevicePolicyExcludeService) List(ctx context.Context, query DevicePolic func (r *DevicePolicyExcludeService) Get(ctx context.Context, policyID string, query DevicePolicyExcludeGetParams, opts ...option.RequestOption) (res *[]TeamsDevicesSplitTunnel, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyExcludeGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/%s/exclude", query.AccountID, policyID) + path := fmt.Sprintf("accounts/%s/devices/policy/%s/exclude", query.AccountID, policyID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -117,7 +117,7 @@ func (r TeamsDevicesSplitTunnelParam) MarshalJSON() (data []byte, err error) { } type DevicePolicyExcludeUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` Body param.Field[[]TeamsDevicesSplitTunnelParam] `json:"body,required"` } @@ -248,7 +248,7 @@ func (r devicePolicyExcludeUpdateResponseEnvelopeResultInfoJSON) RawJSON() strin } type DevicePolicyExcludeListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyExcludeListResponseEnvelope struct { @@ -374,7 +374,7 @@ func (r devicePolicyExcludeListResponseEnvelopeResultInfoJSON) RawJSON() string } type DevicePolicyExcludeGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyExcludeGetResponseEnvelope struct { diff --git a/zero_trust/devicepolicyexclude_test.go b/zero_trust/devicepolicyexclude_test.go index 62d9b5c2b7..f2b2f2d184 100644 --- a/zero_trust/devicepolicyexclude_test.go +++ b/zero_trust/devicepolicyexclude_test.go @@ -29,7 +29,7 @@ func TestDevicePolicyExcludeUpdate(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Policies.Excludes.Update(context.TODO(), zero_trust.DevicePolicyExcludeUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Body: cloudflare.F([]zero_trust.TeamsDevicesSplitTunnelParam{{ Address: cloudflare.F("192.0.2.0/24"), Description: cloudflare.F("Exclude testing domains from the tunnel"), @@ -68,7 +68,7 @@ func TestDevicePolicyExcludeList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Policies.Excludes.List(context.TODO(), zero_trust.DevicePolicyExcludeListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -97,7 +97,7 @@ func TestDevicePolicyExcludeGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePolicyExcludeGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/devicepolicyfallbackdomain.go b/zero_trust/devicepolicyfallbackdomain.go index 8d5fd79de0..8faafbb81d 100644 --- a/zero_trust/devicepolicyfallbackdomain.go +++ b/zero_trust/devicepolicyfallbackdomain.go @@ -37,7 +37,7 @@ func NewDevicePolicyFallbackDomainService(opts ...option.RequestOption) (r *Devi func (r *DevicePolicyFallbackDomainService) Update(ctx context.Context, policyID string, params DevicePolicyFallbackDomainUpdateParams, opts ...option.RequestOption) (res *[]TeamsDevicesFallbackDomain, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyFallbackDomainUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/%s/fallback_domains", params.AccountID, policyID) + path := fmt.Sprintf("accounts/%s/devices/policy/%s/fallback_domains", params.AccountID, policyID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -51,7 +51,7 @@ func (r *DevicePolicyFallbackDomainService) Update(ctx context.Context, policyID func (r *DevicePolicyFallbackDomainService) List(ctx context.Context, query DevicePolicyFallbackDomainListParams, opts ...option.RequestOption) (res *[]TeamsDevicesFallbackDomain, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyFallbackDomainListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/fallback_domains", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/policy/fallback_domains", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -66,7 +66,7 @@ func (r *DevicePolicyFallbackDomainService) List(ctx context.Context, query Devi func (r *DevicePolicyFallbackDomainService) Get(ctx context.Context, policyID string, query DevicePolicyFallbackDomainGetParams, opts ...option.RequestOption) (res *[]TeamsDevicesFallbackDomain, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyFallbackDomainGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/%s/fallback_domains", query.AccountID, policyID) + path := fmt.Sprintf("accounts/%s/devices/policy/%s/fallback_domains", query.AccountID, policyID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -117,7 +117,7 @@ func (r TeamsDevicesFallbackDomainParam) MarshalJSON() (data []byte, err error) } type DevicePolicyFallbackDomainUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` Body param.Field[[]TeamsDevicesFallbackDomainParam] `json:"body,required"` } @@ -250,7 +250,7 @@ func (r devicePolicyFallbackDomainUpdateResponseEnvelopeResultInfoJSON) RawJSON( } type DevicePolicyFallbackDomainListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyFallbackDomainListResponseEnvelope struct { @@ -377,7 +377,7 @@ func (r devicePolicyFallbackDomainListResponseEnvelopeResultInfoJSON) RawJSON() } type DevicePolicyFallbackDomainGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyFallbackDomainGetResponseEnvelope struct { diff --git a/zero_trust/devicepolicyfallbackdomain_test.go b/zero_trust/devicepolicyfallbackdomain_test.go index 1b0589dfcf..c015223b04 100644 --- a/zero_trust/devicepolicyfallbackdomain_test.go +++ b/zero_trust/devicepolicyfallbackdomain_test.go @@ -32,7 +32,7 @@ func TestDevicePolicyFallbackDomainUpdate(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePolicyFallbackDomainUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Body: cloudflare.F([]zero_trust.TeamsDevicesFallbackDomainParam{{ Description: cloudflare.F("Domain bypass for local development"), DNSServer: cloudflare.F([]interface{}{map[string]interface{}{}, map[string]interface{}{}, map[string]interface{}{}}), @@ -72,7 +72,7 @@ func TestDevicePolicyFallbackDomainList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Policies.FallbackDomains.List(context.TODO(), zero_trust.DevicePolicyFallbackDomainListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -101,7 +101,7 @@ func TestDevicePolicyFallbackDomainGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePolicyFallbackDomainGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/devicepolicyinclude.go b/zero_trust/devicepolicyinclude.go index 940921315e..5d8a9dd376 100644 --- a/zero_trust/devicepolicyinclude.go +++ b/zero_trust/devicepolicyinclude.go @@ -35,7 +35,7 @@ func NewDevicePolicyIncludeService(opts ...option.RequestOption) (r *DevicePolic func (r *DevicePolicyIncludeService) Update(ctx context.Context, params DevicePolicyIncludeUpdateParams, opts ...option.RequestOption) (res *[]TeamsDevicesSplitTunnelInclude, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyIncludeUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/include", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/policy/include", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -48,7 +48,7 @@ func (r *DevicePolicyIncludeService) Update(ctx context.Context, params DevicePo func (r *DevicePolicyIncludeService) List(ctx context.Context, query DevicePolicyIncludeListParams, opts ...option.RequestOption) (res *[]TeamsDevicesSplitTunnelInclude, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyIncludeListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/include", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/policy/include", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -62,7 +62,7 @@ func (r *DevicePolicyIncludeService) List(ctx context.Context, query DevicePolic func (r *DevicePolicyIncludeService) Get(ctx context.Context, policyID string, query DevicePolicyIncludeGetParams, opts ...option.RequestOption) (res *[]TeamsDevicesSplitTunnelInclude, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyIncludeGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/policy/%s/include", query.AccountID, policyID) + path := fmt.Sprintf("accounts/%s/devices/policy/%s/include", query.AccountID, policyID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -117,7 +117,7 @@ func (r TeamsDevicesSplitTunnelIncludeParam) MarshalJSON() (data []byte, err err } type DevicePolicyIncludeUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` Body param.Field[[]TeamsDevicesSplitTunnelIncludeParam] `json:"body,required"` } @@ -248,7 +248,7 @@ func (r devicePolicyIncludeUpdateResponseEnvelopeResultInfoJSON) RawJSON() strin } type DevicePolicyIncludeListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyIncludeListResponseEnvelope struct { @@ -374,7 +374,7 @@ func (r devicePolicyIncludeListResponseEnvelopeResultInfoJSON) RawJSON() string } type DevicePolicyIncludeGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePolicyIncludeGetResponseEnvelope struct { diff --git a/zero_trust/devicepolicyinclude_test.go b/zero_trust/devicepolicyinclude_test.go index 64052e0a37..9342f844fe 100644 --- a/zero_trust/devicepolicyinclude_test.go +++ b/zero_trust/devicepolicyinclude_test.go @@ -29,7 +29,7 @@ func TestDevicePolicyIncludeUpdate(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Policies.Includes.Update(context.TODO(), zero_trust.DevicePolicyIncludeUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Body: cloudflare.F([]zero_trust.TeamsDevicesSplitTunnelIncludeParam{{ Address: cloudflare.F("192.0.2.0/24"), Description: cloudflare.F("Include testing domains from the tunnel"), @@ -68,7 +68,7 @@ func TestDevicePolicyIncludeList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Policies.Includes.List(context.TODO(), zero_trust.DevicePolicyIncludeListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -97,7 +97,7 @@ func TestDevicePolicyIncludeGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePolicyIncludeGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/deviceposture.go b/zero_trust/deviceposture.go index ff06ef9e61..56e33ece66 100644 --- a/zero_trust/deviceposture.go +++ b/zero_trust/deviceposture.go @@ -39,7 +39,7 @@ func NewDevicePostureService(opts ...option.RequestOption) (r *DevicePostureServ func (r *DevicePostureService) New(ctx context.Context, params DevicePostureNewParams, opts ...option.RequestOption) (res *TeamsDevicesDevicePostureRules, err error) { opts = append(r.Options[:], opts...) var env DevicePostureNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/posture", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -52,7 +52,7 @@ func (r *DevicePostureService) New(ctx context.Context, params DevicePostureNewP func (r *DevicePostureService) Update(ctx context.Context, ruleID string, params DevicePostureUpdateParams, opts ...option.RequestOption) (res *TeamsDevicesDevicePostureRules, err error) { opts = append(r.Options[:], opts...) var env DevicePostureUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture/%s", params.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/devices/posture/%s", params.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -65,7 +65,7 @@ func (r *DevicePostureService) Update(ctx context.Context, ruleID string, params func (r *DevicePostureService) List(ctx context.Context, query DevicePostureListParams, opts ...option.RequestOption) (res *[]TeamsDevicesDevicePostureRules, err error) { opts = append(r.Options[:], opts...) var env DevicePostureListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/posture", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -78,7 +78,7 @@ func (r *DevicePostureService) List(ctx context.Context, query DevicePostureList func (r *DevicePostureService) Delete(ctx context.Context, ruleID string, body DevicePostureDeleteParams, opts ...option.RequestOption) (res *DevicePostureDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env DevicePostureDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture/%s", body.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/devices/posture/%s", body.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -91,7 +91,7 @@ func (r *DevicePostureService) Delete(ctx context.Context, ruleID string, body D func (r *DevicePostureService) Get(ctx context.Context, ruleID string, query DevicePostureGetParams, opts ...option.RequestOption) (res *TeamsDevicesDevicePostureRules, err error) { opts = append(r.Options[:], opts...) var env DevicePostureGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture/%s", query.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/devices/posture/%s", query.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -1241,7 +1241,7 @@ func (r devicePostureDeleteResponseJSON) RawJSON() string { } type DevicePostureNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The name of the device posture rule. Name param.Field[string] `json:"name,required"` // The type of device posture rule. @@ -2073,7 +2073,7 @@ func (r DevicePostureNewResponseEnvelopeSuccess) IsKnown() bool { } type DevicePostureUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The name of the device posture rule. Name param.Field[string] `json:"name,required"` // The type of device posture rule. @@ -2905,7 +2905,7 @@ func (r DevicePostureUpdateResponseEnvelopeSuccess) IsKnown() bool { } type DevicePostureListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePostureListResponseEnvelope struct { @@ -3031,7 +3031,7 @@ func (r devicePostureListResponseEnvelopeResultInfoJSON) RawJSON() string { } type DevicePostureDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePostureDeleteResponseEnvelope struct { @@ -3124,7 +3124,7 @@ func (r DevicePostureDeleteResponseEnvelopeSuccess) IsKnown() bool { } type DevicePostureGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePostureGetResponseEnvelope struct { diff --git a/zero_trust/deviceposture_test.go b/zero_trust/deviceposture_test.go index 4caff6ff23..87da9dcc0a 100644 --- a/zero_trust/deviceposture_test.go +++ b/zero_trust/deviceposture_test.go @@ -29,7 +29,7 @@ func TestDevicePostureNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Posture.New(context.TODO(), zero_trust.DevicePostureNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Name: cloudflare.F("Admin Serial Numbers"), Type: cloudflare.F(zero_trust.DevicePostureNewParamsTypeFile), Description: cloudflare.F("The rule for admin serial numbers"), @@ -77,7 +77,7 @@ func TestDevicePostureUpdateWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePostureUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Name: cloudflare.F("Admin Serial Numbers"), Type: cloudflare.F(zero_trust.DevicePostureUpdateParamsTypeFile), Description: cloudflare.F("The rule for admin serial numbers"), @@ -123,7 +123,7 @@ func TestDevicePostureList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Posture.List(context.TODO(), zero_trust.DevicePostureListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -152,7 +152,7 @@ func TestDevicePostureDelete(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePostureDeleteParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { @@ -182,7 +182,7 @@ func TestDevicePostureGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePostureGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/devicepostureintegration.go b/zero_trust/devicepostureintegration.go index 78ff9e3dfd..a56cfa8ea3 100644 --- a/zero_trust/devicepostureintegration.go +++ b/zero_trust/devicepostureintegration.go @@ -38,7 +38,7 @@ func NewDevicePostureIntegrationService(opts ...option.RequestOption) (r *Device func (r *DevicePostureIntegrationService) New(ctx context.Context, params DevicePostureIntegrationNewParams, opts ...option.RequestOption) (res *TeamsDevicesDevicePostureIntegrations, err error) { opts = append(r.Options[:], opts...) var env DevicePostureIntegrationNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture/integration", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/posture/integration", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -51,7 +51,7 @@ func (r *DevicePostureIntegrationService) New(ctx context.Context, params Device func (r *DevicePostureIntegrationService) List(ctx context.Context, query DevicePostureIntegrationListParams, opts ...option.RequestOption) (res *[]TeamsDevicesDevicePostureIntegrations, err error) { opts = append(r.Options[:], opts...) var env DevicePostureIntegrationListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture/integration", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/posture/integration", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -64,7 +64,7 @@ func (r *DevicePostureIntegrationService) List(ctx context.Context, query Device func (r *DevicePostureIntegrationService) Delete(ctx context.Context, integrationID string, body DevicePostureIntegrationDeleteParams, opts ...option.RequestOption) (res *DevicePostureIntegrationDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env DevicePostureIntegrationDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture/integration/%s", body.AccountID, integrationID) + path := fmt.Sprintf("accounts/%s/devices/posture/integration/%s", body.AccountID, integrationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -77,7 +77,7 @@ func (r *DevicePostureIntegrationService) Delete(ctx context.Context, integratio func (r *DevicePostureIntegrationService) Edit(ctx context.Context, integrationID string, params DevicePostureIntegrationEditParams, opts ...option.RequestOption) (res *TeamsDevicesDevicePostureIntegrations, err error) { opts = append(r.Options[:], opts...) var env DevicePostureIntegrationEditResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture/integration/%s", params.AccountID, integrationID) + path := fmt.Sprintf("accounts/%s/devices/posture/integration/%s", params.AccountID, integrationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return @@ -90,7 +90,7 @@ func (r *DevicePostureIntegrationService) Edit(ctx context.Context, integrationI func (r *DevicePostureIntegrationService) Get(ctx context.Context, integrationID string, query DevicePostureIntegrationGetParams, opts ...option.RequestOption) (res *TeamsDevicesDevicePostureIntegrations, err error) { opts = append(r.Options[:], opts...) var env DevicePostureIntegrationGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/posture/integration/%s", query.AccountID, integrationID) + path := fmt.Sprintf("accounts/%s/devices/posture/integration/%s", query.AccountID, integrationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -202,7 +202,7 @@ func init() { } type DevicePostureIntegrationNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The configuration object containing third-party integration information. Config param.Field[DevicePostureIntegrationNewParamsConfig] `json:"config,required"` // The interval between each posture check with the third-party API. Use `m` for @@ -461,7 +461,7 @@ func (r DevicePostureIntegrationNewResponseEnvelopeSuccess) IsKnown() bool { } type DevicePostureIntegrationListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePostureIntegrationListResponseEnvelope struct { @@ -587,7 +587,7 @@ func (r devicePostureIntegrationListResponseEnvelopeResultInfoJSON) RawJSON() st } type DevicePostureIntegrationDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePostureIntegrationDeleteResponseEnvelope struct { @@ -680,7 +680,7 @@ func (r DevicePostureIntegrationDeleteResponseEnvelopeSuccess) IsKnown() bool { } type DevicePostureIntegrationEditParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The configuration object containing third-party integration information. Config param.Field[DevicePostureIntegrationEditParamsConfig] `json:"config"` // The interval between each posture check with the third-party API. Use `m` for @@ -939,7 +939,7 @@ func (r DevicePostureIntegrationEditResponseEnvelopeSuccess) IsKnown() bool { } type DevicePostureIntegrationGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DevicePostureIntegrationGetResponseEnvelope struct { diff --git a/zero_trust/devicepostureintegration_test.go b/zero_trust/devicepostureintegration_test.go index 3c6bb996d9..8b60cf4449 100644 --- a/zero_trust/devicepostureintegration_test.go +++ b/zero_trust/devicepostureintegration_test.go @@ -29,7 +29,7 @@ func TestDevicePostureIntegrationNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Posture.Integrations.New(context.TODO(), zero_trust.DevicePostureIntegrationNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Config: cloudflare.F[zero_trust.DevicePostureIntegrationNewParamsConfig](zero_trust.DevicePostureIntegrationNewParamsConfigTeamsDevicesWorkspaceOneConfigRequest(zero_trust.DevicePostureIntegrationNewParamsConfigTeamsDevicesWorkspaceOneConfigRequest{ APIURL: cloudflare.F("https://as123.awmdm.com/API"), AuthURL: cloudflare.F("https://na.uemauth.vmwservices.com/connect/token"), @@ -64,7 +64,7 @@ func TestDevicePostureIntegrationList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Posture.Integrations.List(context.TODO(), zero_trust.DevicePostureIntegrationListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -93,7 +93,7 @@ func TestDevicePostureIntegrationDelete(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePostureIntegrationDeleteParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { @@ -123,7 +123,7 @@ func TestDevicePostureIntegrationEditWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePostureIntegrationEditParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Config: cloudflare.F[zero_trust.DevicePostureIntegrationEditParamsConfig](zero_trust.DevicePostureIntegrationEditParamsConfigTeamsDevicesWorkspaceOneConfigRequest(zero_trust.DevicePostureIntegrationEditParamsConfigTeamsDevicesWorkspaceOneConfigRequest{ APIURL: cloudflare.F("https://as123.awmdm.com/API"), AuthURL: cloudflare.F("https://na.uemauth.vmwservices.com/connect/token"), @@ -162,7 +162,7 @@ func TestDevicePostureIntegrationGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePostureIntegrationGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/devicerevoke.go b/zero_trust/devicerevoke.go index f72660d33b..cd28e4d32c 100644 --- a/zero_trust/devicerevoke.go +++ b/zero_trust/devicerevoke.go @@ -38,7 +38,7 @@ func NewDeviceRevokeService(opts ...option.RequestOption) (r *DeviceRevokeServic func (r *DeviceRevokeService) New(ctx context.Context, params DeviceRevokeNewParams, opts ...option.RequestOption) (res *DeviceRevokeNewResponse, err error) { opts = append(r.Options[:], opts...) var env DeviceRevokeNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/revoke", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/revoke", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -65,7 +65,7 @@ func init() { } type DeviceRevokeNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // A list of device ids to revoke. Body param.Field[[]string] `json:"body,required"` } diff --git a/zero_trust/devicerevoke_test.go b/zero_trust/devicerevoke_test.go index 47acfc4598..5937a6e35f 100644 --- a/zero_trust/devicerevoke_test.go +++ b/zero_trust/devicerevoke_test.go @@ -29,7 +29,7 @@ func TestDeviceRevokeNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Revoke.New(context.TODO(), zero_trust.DeviceRevokeNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Body: cloudflare.F([]string{"f174e90a-fafe-4643-bbbc-4a0ed4fc8415", "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", "f174e90a-fafe-4643-bbbc-4a0ed4fc8415"}), }) if err != nil { diff --git a/zero_trust/devicesetting.go b/zero_trust/devicesetting.go index 64c4dfe487..b4896c7932 100644 --- a/zero_trust/devicesetting.go +++ b/zero_trust/devicesetting.go @@ -35,7 +35,7 @@ func NewDeviceSettingService(opts ...option.RequestOption) (r *DeviceSettingServ func (r *DeviceSettingService) Update(ctx context.Context, params DeviceSettingUpdateParams, opts ...option.RequestOption) (res *TeamsDevicesZeroTrustAccountDeviceSettings, err error) { opts = append(r.Options[:], opts...) var env DeviceSettingUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/settings", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/settings", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -48,7 +48,7 @@ func (r *DeviceSettingService) Update(ctx context.Context, params DeviceSettingU func (r *DeviceSettingService) List(ctx context.Context, query DeviceSettingListParams, opts ...option.RequestOption) (res *TeamsDevicesZeroTrustAccountDeviceSettings, err error) { opts = append(r.Options[:], opts...) var env DeviceSettingListResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/settings", query.AccountID) + path := fmt.Sprintf("accounts/%s/devices/settings", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -89,7 +89,7 @@ func (r teamsDevicesZeroTrustAccountDeviceSettingsJSON) RawJSON() string { } type DeviceSettingUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // Enable gateway proxy filtering on TCP. GatewayProxyEnabled param.Field[bool] `json:"gateway_proxy_enabled"` // Enable gateway proxy filtering on UDP. @@ -194,7 +194,7 @@ func (r DeviceSettingUpdateResponseEnvelopeSuccess) IsKnown() bool { } type DeviceSettingListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type DeviceSettingListResponseEnvelope struct { diff --git a/zero_trust/devicesetting_test.go b/zero_trust/devicesetting_test.go index 0ba12dbe75..16ef4ca63b 100644 --- a/zero_trust/devicesetting_test.go +++ b/zero_trust/devicesetting_test.go @@ -29,7 +29,7 @@ func TestDeviceSettingUpdateWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Settings.Update(context.TODO(), zero_trust.DeviceSettingUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), GatewayProxyEnabled: cloudflare.F(true), GatewayUdpProxyEnabled: cloudflare.F(true), RootCertificateInstallationEnabled: cloudflare.F(true), @@ -59,7 +59,7 @@ func TestDeviceSettingList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Settings.List(context.TODO(), zero_trust.DeviceSettingListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error diff --git a/zero_trust/deviceunrevoke.go b/zero_trust/deviceunrevoke.go index 2d49663d96..872b2409b0 100644 --- a/zero_trust/deviceunrevoke.go +++ b/zero_trust/deviceunrevoke.go @@ -38,7 +38,7 @@ func NewDeviceUnrevokeService(opts ...option.RequestOption) (r *DeviceUnrevokeSe func (r *DeviceUnrevokeService) New(ctx context.Context, params DeviceUnrevokeNewParams, opts ...option.RequestOption) (res *DeviceUnrevokeNewResponse, err error) { opts = append(r.Options[:], opts...) var env DeviceUnrevokeNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/devices/unrevoke", params.AccountID) + path := fmt.Sprintf("accounts/%s/devices/unrevoke", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -65,7 +65,7 @@ func init() { } type DeviceUnrevokeNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // A list of device ids to unrevoke. Body param.Field[[]string] `json:"body,required"` } diff --git a/zero_trust/deviceunrevoke_test.go b/zero_trust/deviceunrevoke_test.go index 0a2677820d..4536f0f66e 100644 --- a/zero_trust/deviceunrevoke_test.go +++ b/zero_trust/deviceunrevoke_test.go @@ -29,7 +29,7 @@ func TestDeviceUnrevokeNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Devices.Unrevoke.New(context.TODO(), zero_trust.DeviceUnrevokeNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Body: cloudflare.F([]string{"f174e90a-fafe-4643-bbbc-4a0ed4fc8415", "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", "f174e90a-fafe-4643-bbbc-4a0ed4fc8415"}), }) if err != nil { diff --git a/zero_trust/gateway.go b/zero_trust/gateway.go index 486c1bc9b0..156c7b335a 100644 --- a/zero_trust/gateway.go +++ b/zero_trust/gateway.go @@ -52,7 +52,7 @@ func NewGatewayService(opts ...option.RequestOption) (r *GatewayService) { func (r *GatewayService) New(ctx context.Context, body GatewayNewParams, opts ...option.RequestOption) (res *GatewayNewResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway", body.AccountID) + path := fmt.Sprintf("accounts/%s/gateway", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) if err != nil { return @@ -65,7 +65,7 @@ func (r *GatewayService) New(ctx context.Context, body GatewayNewParams, opts .. func (r *GatewayService) List(ctx context.Context, query GatewayListParams, opts ...option.RequestOption) (res *GatewayListResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayListResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway", query.AccountID) + path := fmt.Sprintf("accounts/%s/gateway", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -131,7 +131,7 @@ func (r gatewayListResponseJSON) RawJSON() string { } type GatewayNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayNewResponseEnvelope struct { @@ -224,7 +224,7 @@ func (r GatewayNewResponseEnvelopeSuccess) IsKnown() bool { } type GatewayListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayListResponseEnvelope struct { diff --git a/zero_trust/gateway_test.go b/zero_trust/gateway_test.go index 0092c89844..ca2f547924 100644 --- a/zero_trust/gateway_test.go +++ b/zero_trust/gateway_test.go @@ -29,7 +29,7 @@ func TestGatewayNew(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.New(context.TODO(), zero_trust.GatewayNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -55,7 +55,7 @@ func TestGatewayList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.List(context.TODO(), zero_trust.GatewayListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error diff --git a/zero_trust/gatewayauditsshsetting.go b/zero_trust/gatewayauditsshsetting.go index a008b90e66..582105ca3d 100644 --- a/zero_trust/gatewayauditsshsetting.go +++ b/zero_trust/gatewayauditsshsetting.go @@ -36,7 +36,7 @@ func NewGatewayAuditSSHSettingService(opts ...option.RequestOption) (r *GatewayA func (r *GatewayAuditSSHSettingService) Update(ctx context.Context, params GatewayAuditSSHSettingUpdateParams, opts ...option.RequestOption) (res *ZeroTrustGatewaySettings, err error) { opts = append(r.Options[:], opts...) var env GatewayAuditSSHSettingUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/audit_ssh_settings", params.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/audit_ssh_settings", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -49,7 +49,7 @@ func (r *GatewayAuditSSHSettingService) Update(ctx context.Context, params Gatew func (r *GatewayAuditSSHSettingService) Get(ctx context.Context, query GatewayAuditSSHSettingGetParams, opts ...option.RequestOption) (res *ZeroTrustGatewaySettings, err error) { opts = append(r.Options[:], opts...) var env GatewayAuditSSHSettingGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/audit_ssh_settings", query.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/audit_ssh_settings", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -88,7 +88,7 @@ func (r zeroTrustGatewaySettingsJSON) RawJSON() string { } type GatewayAuditSSHSettingUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // SSH encryption public key PublicKey param.Field[string] `json:"public_key,required"` // Seed ID @@ -189,7 +189,7 @@ func (r GatewayAuditSSHSettingUpdateResponseEnvelopeSuccess) IsKnown() bool { } type GatewayAuditSSHSettingGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayAuditSSHSettingGetResponseEnvelope struct { diff --git a/zero_trust/gatewayauditsshsetting_test.go b/zero_trust/gatewayauditsshsetting_test.go index 2858eec799..ba7fc64520 100644 --- a/zero_trust/gatewayauditsshsetting_test.go +++ b/zero_trust/gatewayauditsshsetting_test.go @@ -29,7 +29,7 @@ func TestGatewayAuditSSHSettingUpdateWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.AuditSSHSettings.Update(context.TODO(), zero_trust.GatewayAuditSSHSettingUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), PublicKey: cloudflare.F("1pyl6I1tL7xfJuFYVzXlUW8uXXlpxegHXBzGCBKaSFA="), SeedID: cloudflare.F("f174e90a-fafe-4643-bbbc-4a0ed4fc8415"), }) @@ -57,7 +57,7 @@ func TestGatewayAuditSSHSettingGet(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.AuditSSHSettings.Get(context.TODO(), zero_trust.GatewayAuditSSHSettingGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error diff --git a/zero_trust/gatewayconfiguration.go b/zero_trust/gatewayconfiguration.go index b382a2ddcd..6f0cf06198 100644 --- a/zero_trust/gatewayconfiguration.go +++ b/zero_trust/gatewayconfiguration.go @@ -36,7 +36,7 @@ func NewGatewayConfigurationService(opts ...option.RequestOption) (r *GatewayCon func (r *GatewayConfigurationService) Update(ctx context.Context, params GatewayConfigurationUpdateParams, opts ...option.RequestOption) (res *GatewayConfigurationUpdateResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayConfigurationUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/configuration", params.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/configuration", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -53,7 +53,7 @@ func (r *GatewayConfigurationService) Update(ctx context.Context, params Gateway func (r *GatewayConfigurationService) Edit(ctx context.Context, params GatewayConfigurationEditParams, opts ...option.RequestOption) (res *GatewayConfigurationEditResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayConfigurationEditResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/configuration", params.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/configuration", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return @@ -66,7 +66,7 @@ func (r *GatewayConfigurationService) Edit(ctx context.Context, params GatewayCo func (r *GatewayConfigurationService) Get(ctx context.Context, query GatewayConfigurationGetParams, opts ...option.RequestOption) (res *GatewayConfigurationGetResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayConfigurationGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/configuration", query.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/configuration", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -1243,7 +1243,7 @@ func (r gatewayConfigurationGetResponseSettingsTLSDecryptJSON) RawJSON() string } type GatewayConfigurationUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // account settings. Settings param.Field[GatewayConfigurationUpdateParamsSettings] `json:"settings"` } @@ -1515,7 +1515,7 @@ func (r GatewayConfigurationUpdateResponseEnvelopeSuccess) IsKnown() bool { } type GatewayConfigurationEditParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // account settings. Settings param.Field[GatewayConfigurationEditParamsSettings] `json:"settings"` } @@ -1787,7 +1787,7 @@ func (r GatewayConfigurationEditResponseEnvelopeSuccess) IsKnown() bool { } type GatewayConfigurationGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayConfigurationGetResponseEnvelope struct { diff --git a/zero_trust/gatewayconfiguration_test.go b/zero_trust/gatewayconfiguration_test.go index b17041e07f..6e39d2fab6 100644 --- a/zero_trust/gatewayconfiguration_test.go +++ b/zero_trust/gatewayconfiguration_test.go @@ -29,7 +29,7 @@ func TestGatewayConfigurationUpdateWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Configurations.Update(context.TODO(), zero_trust.GatewayConfigurationUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Settings: cloudflare.F(zero_trust.GatewayConfigurationUpdateParamsSettings{ ActivityLog: cloudflare.F(zero_trust.GatewayConfigurationUpdateParamsSettingsActivityLog{ Enabled: cloudflare.F(true), @@ -104,7 +104,7 @@ func TestGatewayConfigurationEditWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Configurations.Edit(context.TODO(), zero_trust.GatewayConfigurationEditParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Settings: cloudflare.F(zero_trust.GatewayConfigurationEditParamsSettings{ ActivityLog: cloudflare.F(zero_trust.GatewayConfigurationEditParamsSettingsActivityLog{ Enabled: cloudflare.F(true), @@ -179,7 +179,7 @@ func TestGatewayConfigurationGet(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Configurations.Get(context.TODO(), zero_trust.GatewayConfigurationGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error diff --git a/zero_trust/gatewaylist.go b/zero_trust/gatewaylist.go index 2ca791b8f9..8f181caa6b 100644 --- a/zero_trust/gatewaylist.go +++ b/zero_trust/gatewaylist.go @@ -41,7 +41,7 @@ func NewGatewayListService(opts ...option.RequestOption) (r *GatewayListService) func (r *GatewayListService) New(ctx context.Context, params GatewayListNewParams, opts ...option.RequestOption) (res *GatewayListNewResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayListNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/lists", params.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/lists", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -54,7 +54,7 @@ func (r *GatewayListService) New(ctx context.Context, params GatewayListNewParam func (r *GatewayListService) Update(ctx context.Context, listID string, params GatewayListUpdateParams, opts ...option.RequestOption) (res *ZeroTrustGatewayLists, err error) { opts = append(r.Options[:], opts...) var env GatewayListUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/lists/%s", params.AccountID, listID) + path := fmt.Sprintf("accounts/%s/gateway/lists/%s", params.AccountID, listID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -67,7 +67,7 @@ func (r *GatewayListService) Update(ctx context.Context, listID string, params G func (r *GatewayListService) List(ctx context.Context, query GatewayListListParams, opts ...option.RequestOption) (res *[]ZeroTrustGatewayLists, err error) { opts = append(r.Options[:], opts...) var env GatewayListListResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/lists", query.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/lists", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -80,7 +80,7 @@ func (r *GatewayListService) List(ctx context.Context, query GatewayListListPara func (r *GatewayListService) Delete(ctx context.Context, listID string, body GatewayListDeleteParams, opts ...option.RequestOption) (res *GatewayListDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayListDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/lists/%s", body.AccountID, listID) + path := fmt.Sprintf("accounts/%s/gateway/lists/%s", body.AccountID, listID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -93,7 +93,7 @@ func (r *GatewayListService) Delete(ctx context.Context, listID string, body Gat func (r *GatewayListService) Edit(ctx context.Context, listID string, params GatewayListEditParams, opts ...option.RequestOption) (res *ZeroTrustGatewayLists, err error) { opts = append(r.Options[:], opts...) var env GatewayListEditResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/lists/%s", params.AccountID, listID) + path := fmt.Sprintf("accounts/%s/gateway/lists/%s", params.AccountID, listID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return @@ -106,7 +106,7 @@ func (r *GatewayListService) Edit(ctx context.Context, listID string, params Gat func (r *GatewayListService) Get(ctx context.Context, listID string, query GatewayListGetParams, opts ...option.RequestOption) (res *ZeroTrustGatewayLists, err error) { opts = append(r.Options[:], opts...) var env GatewayListGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/lists/%s", query.AccountID, listID) + path := fmt.Sprintf("accounts/%s/gateway/lists/%s", query.AccountID, listID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -271,7 +271,7 @@ func init() { } type GatewayListNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The name of the list. Name param.Field[string] `json:"name,required"` // The type of list. @@ -404,7 +404,7 @@ func (r GatewayListNewResponseEnvelopeSuccess) IsKnown() bool { } type GatewayListUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The name of the list. Name param.Field[string] `json:"name,required"` // The description of the list. @@ -505,7 +505,7 @@ func (r GatewayListUpdateResponseEnvelopeSuccess) IsKnown() bool { } type GatewayListListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayListListResponseEnvelope struct { @@ -631,7 +631,7 @@ func (r gatewayListListResponseEnvelopeResultInfoJSON) RawJSON() string { } type GatewayListDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayListDeleteResponseEnvelope struct { @@ -724,7 +724,7 @@ func (r GatewayListDeleteResponseEnvelopeSuccess) IsKnown() bool { } type GatewayListEditParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The items in the list. Append param.Field[[]GatewayListEditParamsAppend] `json:"append"` // A list of the item values you want to remove. @@ -834,7 +834,7 @@ func (r GatewayListEditResponseEnvelopeSuccess) IsKnown() bool { } type GatewayListGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayListGetResponseEnvelope struct { diff --git a/zero_trust/gatewaylist_test.go b/zero_trust/gatewaylist_test.go index a13cc09f61..d8f07064e6 100644 --- a/zero_trust/gatewaylist_test.go +++ b/zero_trust/gatewaylist_test.go @@ -29,7 +29,7 @@ func TestGatewayListNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Lists.New(context.TODO(), zero_trust.GatewayListNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Name: cloudflare.F("Admin Serial Numbers"), Type: cloudflare.F(zero_trust.GatewayListNewParamsTypeSerial), Description: cloudflare.F("The serial numbers for administrators"), @@ -68,7 +68,7 @@ func TestGatewayListUpdateWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayListUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Name: cloudflare.F("Admin Serial Numbers"), Description: cloudflare.F("The serial numbers for administrators"), }, @@ -97,7 +97,7 @@ func TestGatewayListList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Lists.List(context.TODO(), zero_trust.GatewayListListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -126,7 +126,7 @@ func TestGatewayListDelete(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayListDeleteParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { @@ -156,7 +156,7 @@ func TestGatewayListEditWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayListEditParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Append: cloudflare.F([]zero_trust.GatewayListEditParamsAppend{{ Value: cloudflare.F("8GE8721REF"), }, { @@ -194,7 +194,7 @@ func TestGatewayListGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayListGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/gatewaylistitem.go b/zero_trust/gatewaylistitem.go index 5b74269de7..e9b8609bbf 100644 --- a/zero_trust/gatewaylistitem.go +++ b/zero_trust/gatewaylistitem.go @@ -36,7 +36,7 @@ func NewGatewayListItemService(opts ...option.RequestOption) (r *GatewayListItem func (r *GatewayListItemService) List(ctx context.Context, listID string, query GatewayListItemListParams, opts ...option.RequestOption) (res *[][]GatewayListItemListResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayListItemListResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/lists/%s/items", query.AccountID, listID) + path := fmt.Sprintf("accounts/%s/gateway/lists/%s/items", query.AccountID, listID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -70,7 +70,7 @@ func (r gatewayListItemListResponseJSON) RawJSON() string { } type GatewayListItemListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayListItemListResponseEnvelope struct { diff --git a/zero_trust/gatewaylistitem_test.go b/zero_trust/gatewaylistitem_test.go index ea1a546efa..603526ab09 100644 --- a/zero_trust/gatewaylistitem_test.go +++ b/zero_trust/gatewaylistitem_test.go @@ -32,7 +32,7 @@ func TestGatewayListItemList(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayListItemListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/gatewaylocation.go b/zero_trust/gatewaylocation.go index 92f9c5a9d0..79ef7ecef5 100644 --- a/zero_trust/gatewaylocation.go +++ b/zero_trust/gatewaylocation.go @@ -39,7 +39,7 @@ func NewGatewayLocationService(opts ...option.RequestOption) (r *GatewayLocation func (r *GatewayLocationService) New(ctx context.Context, params GatewayLocationNewParams, opts ...option.RequestOption) (res *ZeroTrustGatewayLocations, err error) { opts = append(r.Options[:], opts...) var env GatewayLocationNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/locations", params.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/locations", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -49,10 +49,10 @@ func (r *GatewayLocationService) New(ctx context.Context, params GatewayLocation } // Updates a configured Zero Trust Gateway location. -func (r *GatewayLocationService) Update(ctx context.Context, locationID interface{}, params GatewayLocationUpdateParams, opts ...option.RequestOption) (res *ZeroTrustGatewayLocations, err error) { +func (r *GatewayLocationService) Update(ctx context.Context, locationID string, params GatewayLocationUpdateParams, opts ...option.RequestOption) (res *ZeroTrustGatewayLocations, err error) { opts = append(r.Options[:], opts...) var env GatewayLocationUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/locations/%v", params.AccountID, locationID) + path := fmt.Sprintf("accounts/%s/gateway/locations/%s", params.AccountID, locationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -65,7 +65,7 @@ func (r *GatewayLocationService) Update(ctx context.Context, locationID interfac func (r *GatewayLocationService) List(ctx context.Context, query GatewayLocationListParams, opts ...option.RequestOption) (res *[]ZeroTrustGatewayLocations, err error) { opts = append(r.Options[:], opts...) var env GatewayLocationListResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/locations", query.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/locations", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -75,10 +75,10 @@ func (r *GatewayLocationService) List(ctx context.Context, query GatewayLocation } // Deletes a configured Zero Trust Gateway location. -func (r *GatewayLocationService) Delete(ctx context.Context, locationID interface{}, body GatewayLocationDeleteParams, opts ...option.RequestOption) (res *GatewayLocationDeleteResponse, err error) { +func (r *GatewayLocationService) Delete(ctx context.Context, locationID string, body GatewayLocationDeleteParams, opts ...option.RequestOption) (res *GatewayLocationDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayLocationDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/locations/%v", body.AccountID, locationID) + path := fmt.Sprintf("accounts/%s/gateway/locations/%s", body.AccountID, locationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -88,10 +88,10 @@ func (r *GatewayLocationService) Delete(ctx context.Context, locationID interfac } // Fetches a single Zero Trust Gateway location. -func (r *GatewayLocationService) Get(ctx context.Context, locationID interface{}, query GatewayLocationGetParams, opts ...option.RequestOption) (res *ZeroTrustGatewayLocations, err error) { +func (r *GatewayLocationService) Get(ctx context.Context, locationID string, query GatewayLocationGetParams, opts ...option.RequestOption) (res *ZeroTrustGatewayLocations, err error) { opts = append(r.Options[:], opts...) var env GatewayLocationGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/locations/%v", query.AccountID, locationID) + path := fmt.Sprintf("accounts/%s/gateway/locations/%s", query.AccountID, locationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -101,7 +101,7 @@ func (r *GatewayLocationService) Get(ctx context.Context, locationID interface{} } type ZeroTrustGatewayLocations struct { - ID interface{} `json:"id"` + ID string `json:"id"` // True if the location is the default location. ClientDefault bool `json:"client_default"` CreatedAt time.Time `json:"created_at" format:"date-time"` @@ -186,7 +186,7 @@ func init() { } type GatewayLocationNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The name of the location. Name param.Field[string] `json:"name,required"` // True if the location is the default location. @@ -300,7 +300,7 @@ func (r GatewayLocationNewResponseEnvelopeSuccess) IsKnown() bool { } type GatewayLocationUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The name of the location. Name param.Field[string] `json:"name,required"` // True if the location is the default location. @@ -414,7 +414,7 @@ func (r GatewayLocationUpdateResponseEnvelopeSuccess) IsKnown() bool { } type GatewayLocationListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayLocationListResponseEnvelope struct { @@ -540,7 +540,7 @@ func (r gatewayLocationListResponseEnvelopeResultInfoJSON) RawJSON() string { } type GatewayLocationDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayLocationDeleteResponseEnvelope struct { @@ -633,7 +633,7 @@ func (r GatewayLocationDeleteResponseEnvelopeSuccess) IsKnown() bool { } type GatewayLocationGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayLocationGetResponseEnvelope struct { diff --git a/zero_trust/gatewaylocation_test.go b/zero_trust/gatewaylocation_test.go index 1d631ba945..dd86198310 100644 --- a/zero_trust/gatewaylocation_test.go +++ b/zero_trust/gatewaylocation_test.go @@ -29,7 +29,7 @@ func TestGatewayLocationNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Locations.New(context.TODO(), zero_trust.GatewayLocationNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Name: cloudflare.F("Austin Office Location"), ClientDefault: cloudflare.F(false), EcsSupport: cloudflare.F(false), @@ -68,7 +68,7 @@ func TestGatewayLocationUpdateWithOptionalParams(t *testing.T) { context.TODO(), "ed35569b41ce4d1facfe683550f54086", zero_trust.GatewayLocationUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Name: cloudflare.F("Austin Office Location"), ClientDefault: cloudflare.F(false), EcsSupport: cloudflare.F(false), @@ -105,7 +105,7 @@ func TestGatewayLocationList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Locations.List(context.TODO(), zero_trust.GatewayLocationListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -134,7 +134,7 @@ func TestGatewayLocationDelete(t *testing.T) { context.TODO(), "ed35569b41ce4d1facfe683550f54086", zero_trust.GatewayLocationDeleteParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { @@ -164,7 +164,7 @@ func TestGatewayLocationGet(t *testing.T) { context.TODO(), "ed35569b41ce4d1facfe683550f54086", zero_trust.GatewayLocationGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/gatewaylogging.go b/zero_trust/gatewaylogging.go index ccfd836af3..c26a14cde6 100644 --- a/zero_trust/gatewaylogging.go +++ b/zero_trust/gatewaylogging.go @@ -35,7 +35,7 @@ func NewGatewayLoggingService(opts ...option.RequestOption) (r *GatewayLoggingSe func (r *GatewayLoggingService) Update(ctx context.Context, params GatewayLoggingUpdateParams, opts ...option.RequestOption) (res *ZeroTrustGatewayGatewayAccountLoggingSettings, err error) { opts = append(r.Options[:], opts...) var env GatewayLoggingUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/logging", params.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/logging", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -48,7 +48,7 @@ func (r *GatewayLoggingService) Update(ctx context.Context, params GatewayLoggin func (r *GatewayLoggingService) Get(ctx context.Context, query GatewayLoggingGetParams, opts ...option.RequestOption) (res *ZeroTrustGatewayGatewayAccountLoggingSettings, err error) { opts = append(r.Options[:], opts...) var env GatewayLoggingGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/logging", query.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/logging", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -114,7 +114,7 @@ func (r zeroTrustGatewayGatewayAccountLoggingSettingsSettingsByRuleTypeJSON) Raw } type GatewayLoggingUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // Redact personally identifiable information from activity logging (PII fields // are: source IP, user email, user ID, device ID, URL, referrer, user agent). RedactPii param.Field[bool] `json:"redact_pii"` @@ -230,7 +230,7 @@ func (r GatewayLoggingUpdateResponseEnvelopeSuccess) IsKnown() bool { } type GatewayLoggingGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayLoggingGetResponseEnvelope struct { diff --git a/zero_trust/gatewaylogging_test.go b/zero_trust/gatewaylogging_test.go index 63b74a66ba..521341fdfd 100644 --- a/zero_trust/gatewaylogging_test.go +++ b/zero_trust/gatewaylogging_test.go @@ -29,7 +29,7 @@ func TestGatewayLoggingUpdateWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Logging.Update(context.TODO(), zero_trust.GatewayLoggingUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), RedactPii: cloudflare.F(true), SettingsByRuleType: cloudflare.F(zero_trust.GatewayLoggingUpdateParamsSettingsByRuleType{ DNS: cloudflare.F[any](map[string]interface{}{}), @@ -61,7 +61,7 @@ func TestGatewayLoggingGet(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Logging.Get(context.TODO(), zero_trust.GatewayLoggingGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error diff --git a/zero_trust/gatewayproxyendpoint.go b/zero_trust/gatewayproxyendpoint.go index 8f64c10d15..52da0def8c 100644 --- a/zero_trust/gatewayproxyendpoint.go +++ b/zero_trust/gatewayproxyendpoint.go @@ -39,7 +39,7 @@ func NewGatewayProxyEndpointService(opts ...option.RequestOption) (r *GatewayPro func (r *GatewayProxyEndpointService) New(ctx context.Context, params GatewayProxyEndpointNewParams, opts ...option.RequestOption) (res *ZeroTrustGatewayProxyEndpoints, err error) { opts = append(r.Options[:], opts...) var env GatewayProxyEndpointNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/proxy_endpoints", params.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/proxy_endpoints", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -52,7 +52,7 @@ func (r *GatewayProxyEndpointService) New(ctx context.Context, params GatewayPro func (r *GatewayProxyEndpointService) List(ctx context.Context, query GatewayProxyEndpointListParams, opts ...option.RequestOption) (res *[]ZeroTrustGatewayProxyEndpoints, err error) { opts = append(r.Options[:], opts...) var env GatewayProxyEndpointListResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/proxy_endpoints", query.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/proxy_endpoints", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -62,10 +62,10 @@ func (r *GatewayProxyEndpointService) List(ctx context.Context, query GatewayPro } // Deletes a configured Zero Trust Gateway proxy endpoint. -func (r *GatewayProxyEndpointService) Delete(ctx context.Context, proxyEndpointID interface{}, body GatewayProxyEndpointDeleteParams, opts ...option.RequestOption) (res *GatewayProxyEndpointDeleteResponse, err error) { +func (r *GatewayProxyEndpointService) Delete(ctx context.Context, proxyEndpointID string, body GatewayProxyEndpointDeleteParams, opts ...option.RequestOption) (res *GatewayProxyEndpointDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayProxyEndpointDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/proxy_endpoints/%v", body.AccountID, proxyEndpointID) + path := fmt.Sprintf("accounts/%s/gateway/proxy_endpoints/%s", body.AccountID, proxyEndpointID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -75,10 +75,10 @@ func (r *GatewayProxyEndpointService) Delete(ctx context.Context, proxyEndpointI } // Updates a configured Zero Trust Gateway proxy endpoint. -func (r *GatewayProxyEndpointService) Edit(ctx context.Context, proxyEndpointID interface{}, params GatewayProxyEndpointEditParams, opts ...option.RequestOption) (res *ZeroTrustGatewayProxyEndpoints, err error) { +func (r *GatewayProxyEndpointService) Edit(ctx context.Context, proxyEndpointID string, params GatewayProxyEndpointEditParams, opts ...option.RequestOption) (res *ZeroTrustGatewayProxyEndpoints, err error) { opts = append(r.Options[:], opts...) var env GatewayProxyEndpointEditResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/proxy_endpoints/%v", params.AccountID, proxyEndpointID) + path := fmt.Sprintf("accounts/%s/gateway/proxy_endpoints/%s", params.AccountID, proxyEndpointID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return @@ -88,10 +88,10 @@ func (r *GatewayProxyEndpointService) Edit(ctx context.Context, proxyEndpointID } // Fetches all Zero Trust Gateway proxy endpoints for an account. -func (r *GatewayProxyEndpointService) Get(ctx context.Context, proxyEndpointID interface{}, query GatewayProxyEndpointGetParams, opts ...option.RequestOption) (res *ZeroTrustGatewayProxyEndpoints, err error) { +func (r *GatewayProxyEndpointService) Get(ctx context.Context, proxyEndpointID string, query GatewayProxyEndpointGetParams, opts ...option.RequestOption) (res *ZeroTrustGatewayProxyEndpoints, err error) { opts = append(r.Options[:], opts...) var env GatewayProxyEndpointGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/proxy_endpoints/%v", query.AccountID, proxyEndpointID) + path := fmt.Sprintf("accounts/%s/gateway/proxy_endpoints/%s", query.AccountID, proxyEndpointID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -101,8 +101,8 @@ func (r *GatewayProxyEndpointService) Get(ctx context.Context, proxyEndpointID i } type ZeroTrustGatewayProxyEndpoints struct { - ID interface{} `json:"id"` - CreatedAt time.Time `json:"created_at" format:"date-time"` + ID string `json:"id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` // A list of CIDRs to restrict ingress connections. IPs []string `json:"ips"` // The name of the proxy endpoint. @@ -152,7 +152,7 @@ func init() { } type GatewayProxyEndpointNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // A list of CIDRs to restrict ingress connections. IPs param.Field[[]string] `json:"ips,required"` // The name of the proxy endpoint. @@ -255,7 +255,7 @@ func (r GatewayProxyEndpointNewResponseEnvelopeSuccess) IsKnown() bool { } type GatewayProxyEndpointListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayProxyEndpointListResponseEnvelope struct { @@ -381,7 +381,7 @@ func (r gatewayProxyEndpointListResponseEnvelopeResultInfoJSON) RawJSON() string } type GatewayProxyEndpointDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayProxyEndpointDeleteResponseEnvelope struct { @@ -474,7 +474,7 @@ func (r GatewayProxyEndpointDeleteResponseEnvelopeSuccess) IsKnown() bool { } type GatewayProxyEndpointEditParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // A list of CIDRs to restrict ingress connections. IPs param.Field[[]string] `json:"ips"` // The name of the proxy endpoint. @@ -577,7 +577,7 @@ func (r GatewayProxyEndpointEditResponseEnvelopeSuccess) IsKnown() bool { } type GatewayProxyEndpointGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayProxyEndpointGetResponseEnvelope struct { diff --git a/zero_trust/gatewayproxyendpoint_test.go b/zero_trust/gatewayproxyendpoint_test.go index c7ab8c838c..5e974cc53c 100644 --- a/zero_trust/gatewayproxyendpoint_test.go +++ b/zero_trust/gatewayproxyendpoint_test.go @@ -29,7 +29,7 @@ func TestGatewayProxyEndpointNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.ProxyEndpoints.New(context.TODO(), zero_trust.GatewayProxyEndpointNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), IPs: cloudflare.F([]string{"192.0.2.1/32", "192.0.2.1/32", "192.0.2.1/32"}), Name: cloudflare.F("Devops team"), Subdomain: cloudflare.F("oli3n9zkz5.proxy.cloudflare-gateway.com"), @@ -58,7 +58,7 @@ func TestGatewayProxyEndpointList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.ProxyEndpoints.List(context.TODO(), zero_trust.GatewayProxyEndpointListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -87,7 +87,7 @@ func TestGatewayProxyEndpointDelete(t *testing.T) { context.TODO(), "ed35569b41ce4d1facfe683550f54086", zero_trust.GatewayProxyEndpointDeleteParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { @@ -117,7 +117,7 @@ func TestGatewayProxyEndpointEditWithOptionalParams(t *testing.T) { context.TODO(), "ed35569b41ce4d1facfe683550f54086", zero_trust.GatewayProxyEndpointEditParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), IPs: cloudflare.F([]string{"192.0.2.1/32", "192.0.2.1/32", "192.0.2.1/32"}), Name: cloudflare.F("Devops team"), Subdomain: cloudflare.F("oli3n9zkz5.proxy.cloudflare-gateway.com"), @@ -150,7 +150,7 @@ func TestGatewayProxyEndpointGet(t *testing.T) { context.TODO(), "ed35569b41ce4d1facfe683550f54086", zero_trust.GatewayProxyEndpointGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zero_trust/gatewayrule.go b/zero_trust/gatewayrule.go index 5d8021398c..6bd5e908ae 100644 --- a/zero_trust/gatewayrule.go +++ b/zero_trust/gatewayrule.go @@ -39,7 +39,7 @@ func NewGatewayRuleService(opts ...option.RequestOption) (r *GatewayRuleService) func (r *GatewayRuleService) New(ctx context.Context, params GatewayRuleNewParams, opts ...option.RequestOption) (res *ZeroTrustGatewayRules, err error) { opts = append(r.Options[:], opts...) var env GatewayRuleNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/rules", params.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/rules", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -52,7 +52,7 @@ func (r *GatewayRuleService) New(ctx context.Context, params GatewayRuleNewParam func (r *GatewayRuleService) Update(ctx context.Context, ruleID string, params GatewayRuleUpdateParams, opts ...option.RequestOption) (res *ZeroTrustGatewayRules, err error) { opts = append(r.Options[:], opts...) var env GatewayRuleUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/rules/%s", params.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/gateway/rules/%s", params.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -65,7 +65,7 @@ func (r *GatewayRuleService) Update(ctx context.Context, ruleID string, params G func (r *GatewayRuleService) List(ctx context.Context, query GatewayRuleListParams, opts ...option.RequestOption) (res *[]ZeroTrustGatewayRules, err error) { opts = append(r.Options[:], opts...) var env GatewayRuleListResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/rules", query.AccountID) + path := fmt.Sprintf("accounts/%s/gateway/rules", query.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -78,7 +78,7 @@ func (r *GatewayRuleService) List(ctx context.Context, query GatewayRuleListPara func (r *GatewayRuleService) Delete(ctx context.Context, ruleID string, body GatewayRuleDeleteParams, opts ...option.RequestOption) (res *GatewayRuleDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env GatewayRuleDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/rules/%s", body.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/gateway/rules/%s", body.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -91,7 +91,7 @@ func (r *GatewayRuleService) Delete(ctx context.Context, ruleID string, body Gat func (r *GatewayRuleService) Get(ctx context.Context, ruleID string, query GatewayRuleGetParams, opts ...option.RequestOption) (res *ZeroTrustGatewayRules, err error) { opts = append(r.Options[:], opts...) var env GatewayRuleGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/gateway/rules/%s", query.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/gateway/rules/%s", query.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -718,7 +718,7 @@ func init() { } type GatewayRuleNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The action to preform when the associated traffic, identity, and device posture // expressions are either absent or evaluate to `true`. Action param.Field[GatewayRuleNewParamsAction] `json:"action,required"` @@ -1163,7 +1163,7 @@ func (r GatewayRuleNewResponseEnvelopeSuccess) IsKnown() bool { } type GatewayRuleUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The action to preform when the associated traffic, identity, and device posture // expressions are either absent or evaluate to `true`. Action param.Field[GatewayRuleUpdateParamsAction] `json:"action,required"` @@ -1608,7 +1608,7 @@ func (r GatewayRuleUpdateResponseEnvelopeSuccess) IsKnown() bool { } type GatewayRuleListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayRuleListResponseEnvelope struct { @@ -1734,7 +1734,7 @@ func (r gatewayRuleListResponseEnvelopeResultInfoJSON) RawJSON() string { } type GatewayRuleDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayRuleDeleteResponseEnvelope struct { @@ -1827,7 +1827,7 @@ func (r GatewayRuleDeleteResponseEnvelopeSuccess) IsKnown() bool { } type GatewayRuleGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type GatewayRuleGetResponseEnvelope struct { diff --git a/zero_trust/gatewayrule_test.go b/zero_trust/gatewayrule_test.go index dab17b0381..a1a16f1d0a 100644 --- a/zero_trust/gatewayrule_test.go +++ b/zero_trust/gatewayrule_test.go @@ -29,7 +29,7 @@ func TestGatewayRuleNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Rules.New(context.TODO(), zero_trust.GatewayRuleNewParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Action: cloudflare.F(zero_trust.GatewayRuleNewParamsActionAllow), Name: cloudflare.F("block bad websites"), Description: cloudflare.F("Block bad websites based on their host name."), @@ -166,7 +166,7 @@ func TestGatewayRuleUpdateWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayRuleUpdateParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), Action: cloudflare.F(zero_trust.GatewayRuleUpdateParamsActionAllow), Name: cloudflare.F("block bad websites"), Description: cloudflare.F("Block bad websites based on their host name."), @@ -301,7 +301,7 @@ func TestGatewayRuleList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Gateway.Rules.List(context.TODO(), zero_trust.GatewayRuleListParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }) if err != nil { var apierr *cloudflare.Error @@ -330,7 +330,7 @@ func TestGatewayRuleDelete(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayRuleDeleteParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { @@ -360,7 +360,7 @@ func TestGatewayRuleGet(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayRuleGetParams{ - AccountID: cloudflare.F[any]("699d98642c564d2e855e9661899b7252"), + AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), }, ) if err != nil { diff --git a/zones/subscription.go b/zones/subscription.go index 6e27d66f58..93cd9e2142 100644 --- a/zones/subscription.go +++ b/zones/subscription.go @@ -218,7 +218,7 @@ func (r SubscriptionListResponseFrequency) IsKnown() bool { // The rate plan applied to the subscription. type SubscriptionListResponseRatePlan struct { // The ID of the rate plan. - ID interface{} `json:"id"` + ID string `json:"id"` // The currency applied to the rate plan subscription. Currency string `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. @@ -382,7 +382,7 @@ func (r SubscriptionNewParamsFrequency) IsKnown() bool { // The rate plan applied to the subscription. type SubscriptionNewParamsRatePlan struct { // The ID of the rate plan. - ID param.Field[interface{}] `json:"id"` + ID param.Field[string] `json:"id"` // The currency applied to the rate plan subscription. Currency param.Field[string] `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. diff --git a/zones/subscription_test.go b/zones/subscription_test.go index b860175391..ea25589707 100644 --- a/zones/subscription_test.go +++ b/zones/subscription_test.go @@ -55,7 +55,7 @@ func TestSubscriptionNewWithOptionalParams(t *testing.T) { RatePlan: cloudflare.F(zones.SubscriptionNewParamsRatePlan{ Currency: cloudflare.F("USD"), ExternallyManaged: cloudflare.F(false), - ID: cloudflare.F[any]("free"), + ID: cloudflare.F("free"), IsContract: cloudflare.F(false), PublicName: cloudflare.F("Business Plan"), Scope: cloudflare.F("zone"),