What changed:
The Recommendations sub-resource has been removed from the SSL service. The endpoint GET /zones/{zone_id}/ssl/recommendation is no longer exposed by the SDK.
Impact:
Code that reads SSL recommendations via client.SSL.Recommendations.Get(...) will no longer compile.
Removed Types:
SSL.Recommendations.GetmethodRecommendationGetResponseRecommendationGetParamsRecommendationService
Before (v7.6.0):
rec, err := client.SSL.Recommendations.Get(ctx, ssl.RecommendationGetParams{
ZoneID: cloudflare.F("zone-id"),
})After (v7.7.0):
Call the endpoint directly using the low-level request helper:
var rec map[string]interface{}
err := client.Get(ctx, "zones/zone-id/ssl/recommendation", nil, &rec)Actions Needed:
- Remove all
client.SSL.Recommendations.Getcall sites and imports ofRecommendationGetResponse/RecommendationGetParams. - If your code path still needs the recommendation, call the HTTP endpoint directly via
client.Get(...).
What changed:
When the same field name appears on multiple union variants with different Go types, the merged parent struct's field is now typed as interface{} (with a // This field can have the runtime type of ... comment) instead of the variant-struct type. This matches how the code generator already emits sibling merged fields on the same structs (e.g. Values, Fields, AllowedMicrosoftOrganizations).
Impact:
Direct field access on the affected parent fields will no longer compile against the previous type. In practice, direct field access on these fields did not work in v7.6.0 either -- json.Unmarshal panicked with reflect: call of reflect.Value.SetString on struct Value whenever an API response included the field. Callers that only used .AsUnion() for variant handling are unaffected.
Affected Types:
| Package | Struct | Field |
|---|---|---|
ai_gateway |
AIGatewayNewResponseSpendLimitsRulesMetadata |
Mode |
ai_gateway |
AIGatewayUpdateResponseSpendLimitsRulesMetadata |
Mode |
ai_gateway |
AIGatewayListResponseSpendLimitsRulesMetadata |
Mode |
ai_gateway |
AIGatewayDeleteResponseSpendLimitsRulesMetadata |
Mode |
ai_gateway |
AIGatewayGetResponseSpendLimitsRulesMetadata |
Mode |
workflows |
VersionGraphResponseGraphWorkflowPayload |
Type |
zero_trust |
DLPEmailAccountMappingNewResponseAuthRequirements |
Type |
zero_trust |
DLPEmailAccountMappingGetResponseAuthRequirements |
Type |
Before (v7.6.0):
// Panics at json.Unmarshal time -- effectively unreachable code:
resp, _ := client.AIGateway.New(ctx, ai_gateway.AIGatewayNewParams{ /* ... */ })
for _, rule := range resp.SpendLimits.Rules {
for _, meta := range rule.Metadata {
mode := meta.Mode // AIGatewayNewResponseSpendLimitsRulesMetadataMode (variant struct)
_ = mode
}
}After (v7.7.0):
Use .AsUnion() on the parent to switch on the actual variant:
resp, _ := client.AIGateway.New(ctx, ai_gateway.AIGatewayNewParams{ /* ... */ })
for _, rule := range resp.SpendLimits.Rules {
for _, meta := range rule.Metadata {
switch variant := meta.AsUnion().(type) {
case ai_gateway.AIGatewayNewResponseSpendLimitsRulesMetadataMode:
// variant.Mode is an AIGatewayNewResponseSpendLimitsRulesMetadataModeMode
// (e.g. "partition")
case ai_gateway.AIGatewayNewResponseSpendLimitsRulesMetadataObject:
// variant.Mode is an AIGatewayNewResponseSpendLimitsRulesMetadataObjectMode
// (e.g. "filter") and variant.Values is []string
}
}
}If you must read the raw value without a type switch, type-assert on the runtime type documented in the field comment:
if s, ok := meta.Mode.(ai_gateway.AIGatewayNewResponseSpendLimitsRulesMetadataModeMode); ok {
// ...
}Actions Needed:
- Replace direct field access (
x.Mode,x.Type) on the affected structs withx.AsUnion()and a type switch on the concrete variant. - If a type switch is not practical, type-assert on one of the concrete runtime types listed in the field comment.
- Anywhere code was calling into the field expecting a struct, delete the call: it was unreachable in v7.6.0 due to the unmarshal panic.
What changed:
The response types for the four zero_trust.Devices.DEXTests methods have been renamed from per-method types to a single shared type, SchemaHTTP. The field structure is unchanged — only the exported type names differ.
Removed Types:
DeviceDEXTestNewResponseDeviceDEXTestUpdateResponseDeviceDEXTestListResponseDeviceDEXTestGetResponse- Nested types:
DeviceDEXTestNewResponseData,DeviceDEXTestNewResponseTargetPolicy, and theirUpdate/List/Getcounterparts (renamed toSchemaData,SchemaHTTPTargetPolicy).
Impact:
- Code using
:=type inference and field access (res.Enabled,res.Name, etc.) continues to compile unchanged. - Code that references the removed type names directly — e.g., declaring a typed variable, passing to a helper function with a typed parameter, or type-switching — will no longer compile.
Affected methods:
client.ZeroTrust.Devices.DEXTests.Newclient.ZeroTrust.Devices.DEXTests.Updateclient.ZeroTrust.Devices.DEXTests.Listclient.ZeroTrust.Devices.DEXTests.Get
Before (v7.6.0):
var test *zero_trust.DeviceDEXTestNewResponse
test, err = client.ZeroTrust.Devices.DEXTests.New(ctx, params)
func printTest(t *zero_trust.DeviceDEXTestListResponse) { /* ... */ }After (v7.7.0):
var test *zero_trust.SchemaHTTP
test, err = client.ZeroTrust.Devices.DEXTests.New(ctx, params)
func printTest(t *zero_trust.SchemaHTTP) { /* ... */ }Actions Needed:
- Search for
DeviceDEXTest{New,Update,List,Get}Responseand replace withSchemaHTTP. - Search for
DeviceDEXTest{New,Update,List,Get}ResponseData/...TargetPolicyand replace withSchemaData/SchemaHTTPTargetPolicy.
What changed:
client.ZeroTrust.Devices.IPProfiles.List now returns *pagination.V4PagePaginationArray[IPProfile] instead of *pagination.SinglePage[IPProfile].
Impact:
- Code that iterates with
.ListAutoPaging(...)continues to work — the auto-pager has the same.Next()/.Current()API. - Code that reads
.Result(a[]IPProfileon both types) continues to compile. - Code that references
pagination.SinglePage[IPProfile]explicitly in a variable declaration or function signature will no longer compile.
Before (v7.6.0):
var page *pagination.SinglePage[zero_trust.IPProfile]
page, err = client.ZeroTrust.Devices.IPProfiles.List(ctx, params)After (v7.7.0):
var page *pagination.V4PagePaginationArray[zero_trust.IPProfile]
page, err = client.ZeroTrust.Devices.IPProfiles.List(ctx, params)Actions Needed:
- Search for
pagination.SinglePage[zero_trust.IPProfile](andSinglePageAutoPager[zero_trust.IPProfile]) and replace withV4PagePaginationArray[...]/V4PagePaginationArrayAutoPager[...].
ssl.Recommendations.Getmethod removed along withRecommendationGetResponse,RecommendationGetParams, andRecommendationService.- Eight union-merged parent-struct fields changed from a variant-struct type to
interface{}acrossai_gateway,workflows, andzero_trust. zero_trust.Devices.DEXTests.{New,Update,List,Get}response types renamed to sharedSchemaHTTP(field structure unchanged).zero_trust.Devices.IPProfiles.Listpagination changed fromSinglePage[IPProfile]toV4PagePaginationArray[IPProfile].

