From 37c724da8aee898d767fe87d1f89be67b91ae7f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 20:28:22 +0000 Subject: [PATCH 1/3] feat(api): update via SDK Studio (#1576) --- spectrum/app.go | 209 +++++++++++++++++++++---------------------- spectrum/app_test.go | 12 +-- workers/ai.go | 28 +++++- 3 files changed, 130 insertions(+), 119 deletions(-) diff --git a/spectrum/app.go b/spectrum/app.go index e2fbe80a4f4..dfb5a587682 100644 --- a/spectrum/app.go +++ b/spectrum/app.go @@ -220,9 +220,8 @@ const ( // The anycast edge IP configuration for the hostname of this application. // -// Union satisfied by -// [spectrum.AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable] or -// [spectrum.AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable]. +// Union satisfied by [spectrum.AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs] or +// [spectrum.AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs]. type AppNewResponseEdgeIPs interface { implementsSpectrumAppNewResponseEdgeIPs() } @@ -233,102 +232,100 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable{}), + Type: reflect.TypeOf(AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable{}), + Type: reflect.TypeOf(AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs{}), }, ) } -type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable struct { +type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. - Connectivity AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity `json:"connectivity"` + Connectivity AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity `json:"connectivity"` // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. - Type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType `json:"type"` - JSON appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON `json:"-"` + Type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsType `json:"type"` + JSON appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON `json:"-"` } -// appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON contains the JSON -// metadata for the struct [AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable] -type appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON struct { +// appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON contains the JSON metadata for +// the struct [AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs] +type appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON struct { Connectivity apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable) UnmarshalJSON(data []byte) (err error) { +func (r *AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON) RawJSON() string { +func (r appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON) RawJSON() string { return r.raw } -func (r AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable) implementsSpectrumAppNewResponseEdgeIPs() { -} +func (r AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs) implementsSpectrumAppNewResponseEdgeIPs() {} // The IP versions supported for inbound connections on Spectrum anycast IPs. -type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity string +type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity string const ( - AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "all" - AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV4 AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv4" - AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV6 AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv6" + AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "all" + AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV4 AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv4" + AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV6 AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv6" ) // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. -type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType string +type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsType string const ( - AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType = "dynamic" + AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsType = "dynamic" ) -type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable struct { +type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs struct { // The array of customer owned IPs we broadcast via anycast for this hostname and // application. IPs []string `json:"ips"` // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. - Type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType `json:"type"` - JSON appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON `json:"-"` + Type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType `json:"type"` + JSON appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON `json:"-"` } -// appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON contains the -// JSON metadata for the struct -// [AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable] -type appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON struct { +// appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON contains the JSON +// metadata for the struct [AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs] +type appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON struct { IPs apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) UnmarshalJSON(data []byte) (err error) { +func (r *AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON) RawJSON() string { +func (r appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON) RawJSON() string { return r.raw } -func (r AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) implementsSpectrumAppNewResponseEdgeIPs() { +func (r AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) implementsSpectrumAppNewResponseEdgeIPs() { } // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. -type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType string +type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType string const ( - AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableTypeStatic AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType = "static" + AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsTypeStatic AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType = "static" ) // The name and type of DNS record for the Spectrum application. @@ -542,9 +539,8 @@ const ( // The anycast edge IP configuration for the hostname of this application. // -// Union satisfied by -// [spectrum.AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable] or -// [spectrum.AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable]. +// Union satisfied by [spectrum.AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs] +// or [spectrum.AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs]. type AppUpdateResponseEdgeIPs interface { implementsSpectrumAppUpdateResponseEdgeIPs() } @@ -555,103 +551,101 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable{}), + Type: reflect.TypeOf(AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable{}), + Type: reflect.TypeOf(AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs{}), }, ) } -type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable struct { +type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. - Connectivity AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity `json:"connectivity"` + Connectivity AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity `json:"connectivity"` // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. - Type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType `json:"type"` - JSON appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON `json:"-"` + Type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsType `json:"type"` + JSON appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON `json:"-"` } -// appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON contains the JSON -// metadata for the struct -// [AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable] -type appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON struct { +// appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON contains the JSON metadata +// for the struct [AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs] +type appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON struct { Connectivity apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable) UnmarshalJSON(data []byte) (err error) { +func (r *AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON) RawJSON() string { +func (r appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON) RawJSON() string { return r.raw } -func (r AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable) implementsSpectrumAppUpdateResponseEdgeIPs() { +func (r AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs) implementsSpectrumAppUpdateResponseEdgeIPs() { } // The IP versions supported for inbound connections on Spectrum anycast IPs. -type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity string +type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity string const ( - AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "all" - AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV4 AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv4" - AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV6 AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv6" + AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "all" + AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV4 AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv4" + AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV6 AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv6" ) // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. -type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType string +type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsType string const ( - AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType = "dynamic" + AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsType = "dynamic" ) -type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable struct { +type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs struct { // The array of customer owned IPs we broadcast via anycast for this hostname and // application. IPs []string `json:"ips"` // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. - Type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType `json:"type"` - JSON appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON `json:"-"` + Type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType `json:"type"` + JSON appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON `json:"-"` } -// appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON contains the -// JSON metadata for the struct -// [AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable] -type appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON struct { +// appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON contains the JSON +// metadata for the struct [AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs] +type appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON struct { IPs apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) UnmarshalJSON(data []byte) (err error) { +func (r *AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON) RawJSON() string { +func (r appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON) RawJSON() string { return r.raw } -func (r AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) implementsSpectrumAppUpdateResponseEdgeIPs() { +func (r AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) implementsSpectrumAppUpdateResponseEdgeIPs() { } // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. -type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType string +type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType string const ( - AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableTypeStatic AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType = "static" + AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsTypeStatic AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType = "static" ) // The name and type of DNS record for the Spectrum application. @@ -897,70 +891,68 @@ type AppNewParamsOriginPort interface { // The anycast edge IP configuration for the hostname of this application. // -// Satisfied by [spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable], -// [spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable]. +// Satisfied by [spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs], +// [spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs]. type AppNewParamsEdgeIPs interface { implementsSpectrumAppNewParamsEdgeIPs() } -type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable struct { +type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. - Connectivity param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity] `json:"connectivity"` + Connectivity param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity] `json:"connectivity"` // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. - Type param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType] `json:"type"` + Type param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsType] `json:"type"` } -func (r AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable) MarshalJSON() (data []byte, err error) { +func (r AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable) implementsSpectrumAppNewParamsEdgeIPs() { -} +func (r AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs) implementsSpectrumAppNewParamsEdgeIPs() {} // The IP versions supported for inbound connections on Spectrum anycast IPs. -type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity string +type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity string const ( - AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "all" - AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV4 AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv4" - AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV6 AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv6" + AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "all" + AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV4 AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv4" + AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV6 AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv6" ) // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. -type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType string +type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsType string const ( - AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType = "dynamic" + AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsType = "dynamic" ) -type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable struct { +type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs struct { // The array of customer owned IPs we broadcast via anycast for this hostname and // application. IPs param.Field[[]string] `json:"ips"` // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. - Type param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType] `json:"type"` + Type param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType] `json:"type"` } -func (r AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) MarshalJSON() (data []byte, err error) { +func (r AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) implementsSpectrumAppNewParamsEdgeIPs() { -} +func (r AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) implementsSpectrumAppNewParamsEdgeIPs() {} // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. -type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType string +type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType string const ( - AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableTypeStatic AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType = "static" + AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsTypeStatic AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType = "static" ) // Enables Proxy Protocol to the origin. Refer to @@ -1180,70 +1172,69 @@ type AppUpdateParamsOriginPort interface { // The anycast edge IP configuration for the hostname of this application. // -// Satisfied by [spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable], -// [spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable]. +// Satisfied by [spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs], +// [spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs]. type AppUpdateParamsEdgeIPs interface { implementsSpectrumAppUpdateParamsEdgeIPs() } -type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable struct { +type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. - Connectivity param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity] `json:"connectivity"` + Connectivity param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity] `json:"connectivity"` // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. - Type param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType] `json:"type"` + Type param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsType] `json:"type"` } -func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable) MarshalJSON() (data []byte, err error) { +func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable) implementsSpectrumAppUpdateParamsEdgeIPs() { -} +func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs) implementsSpectrumAppUpdateParamsEdgeIPs() {} // The IP versions supported for inbound connections on Spectrum anycast IPs. -type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity string +type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity string const ( - AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "all" - AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV4 AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv4" - AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV6 AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv6" + AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "all" + AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV4 AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv4" + AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV6 AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv6" ) // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. -type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType string +type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsType string const ( - AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType = "dynamic" + AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsType = "dynamic" ) -type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable struct { +type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs struct { // The array of customer owned IPs we broadcast via anycast for this hostname and // application. IPs param.Field[[]string] `json:"ips"` // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. - Type param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType] `json:"type"` + Type param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType] `json:"type"` } -func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) MarshalJSON() (data []byte, err error) { +func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) implementsSpectrumAppUpdateParamsEdgeIPs() { +func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) implementsSpectrumAppUpdateParamsEdgeIPs() { } // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. -type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType string +type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType string const ( - AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableTypeStatic AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType = "static" + AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsTypeStatic AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType = "static" ) // Enables Proxy Protocol to the origin. Refer to diff --git a/spectrum/app_test.go b/spectrum/app_test.go index 8266ce280ce..6928e17587c 100644 --- a/spectrum/app_test.go +++ b/spectrum/app_test.go @@ -45,9 +45,9 @@ func TestAppNewWithOptionalParams(t *testing.T) { OriginPort: cloudflare.F[spectrum.AppNewParamsOriginPort](shared.UnionInt(int64(22))), Protocol: cloudflare.F("tcp/22"), ArgoSmartRouting: cloudflare.F(true), - EdgeIPs: cloudflare.F[spectrum.AppNewParamsEdgeIPs](spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable(spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable{ - Connectivity: cloudflare.F(spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll), - Type: cloudflare.F(spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic), + EdgeIPs: cloudflare.F[spectrum.AppNewParamsEdgeIPs](spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs(spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs{ + Connectivity: cloudflare.F(spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll), + Type: cloudflare.F(spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic), })), IPFirewall: cloudflare.F(true), ProxyProtocol: cloudflare.F(spectrum.AppNewParamsProxyProtocolOff), @@ -95,9 +95,9 @@ func TestAppUpdateWithOptionalParams(t *testing.T) { OriginPort: cloudflare.F[spectrum.AppUpdateParamsOriginPort](shared.UnionInt(int64(22))), Protocol: cloudflare.F("tcp/22"), ArgoSmartRouting: cloudflare.F(true), - EdgeIPs: cloudflare.F[spectrum.AppUpdateParamsEdgeIPs](spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable(spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable{ - Connectivity: cloudflare.F(spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll), - Type: cloudflare.F(spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic), + EdgeIPs: cloudflare.F[spectrum.AppUpdateParamsEdgeIPs](spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs(spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs{ + Connectivity: cloudflare.F(spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll), + Type: cloudflare.F(spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic), })), IPFirewall: cloudflare.F(true), ProxyProtocol: cloudflare.F(spectrum.AppUpdateParamsProxyProtocolOff), diff --git a/workers/ai.go b/workers/ai.go index a9944e3c2b5..58528eba796 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -333,11 +333,11 @@ func (r AIRunParams) MarshalMultipart() (data []byte, contentType string, err er // [workers.AIRunParamsBodySentenceSimilarity], // [workers.AIRunParamsBodyTextEmbeddings], [shared.UnionString], // [workers.AIRunParamsBodyObject], [shared.UnionString], -// [workers.AIRunParamsBodyObject], [shared.UnionString], +// [workers.AIRunParamsBodyWorkersAIImageClassification], [shared.UnionString], +// [workers.AIRunParamsBodyWorkersAIBodyDetection], // [workers.AIRunParamsBodyObject], [workers.AIRunParamsBodyObject], -// [workers.AIRunParamsBodyObject], [workers.AIRunParamsBodyTranslation], -// [workers.AIRunParamsBodySummarization], [shared.UnionString], -// [workers.AIRunParamsBodyObject]. +// [workers.AIRunParamsBodyTranslation], [workers.AIRunParamsBodySummarization], +// [shared.UnionString], [workers.AIRunParamsBodyObject]. type AIRunParamsBody interface { ImplementsWorkersAIRunParamsBody() } @@ -409,6 +409,26 @@ func (r AIRunParamsBodyObject) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodyObject) ImplementsWorkersAIRunParamsBody() {} +type AIRunParamsBodyWorkersAIImageClassification struct { + Image param.Field[[]float64] `json:"image"` +} + +func (r AIRunParamsBodyWorkersAIImageClassification) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AIRunParamsBodyWorkersAIImageClassification) ImplementsWorkersAIRunParamsBody() {} + +type AIRunParamsBodyWorkersAIBodyDetection struct { + Image param.Field[[]float64] `json:"image"` +} + +func (r AIRunParamsBodyWorkersAIBodyDetection) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AIRunParamsBodyWorkersAIBodyDetection) ImplementsWorkersAIRunParamsBody() {} + type AIRunParamsBodyTranslation struct { TargetLang param.Field[string] `json:"target_lang,required"` Text param.Field[string] `json:"text,required"` From 1e98ca0dad9445b08ce02ac90b7830461377690c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 20:47:09 +0000 Subject: [PATCH 2/3] feat(api): update via SDK Studio (#1578) --- spectrum/app.go | 204 +++++++++++++++++++++---------------------- spectrum/app_test.go | 12 +-- workers/ai.go | 22 ++--- 3 files changed, 117 insertions(+), 121 deletions(-) diff --git a/spectrum/app.go b/spectrum/app.go index dfb5a587682..78ab833eb8b 100644 --- a/spectrum/app.go +++ b/spectrum/app.go @@ -220,8 +220,8 @@ const ( // The anycast edge IP configuration for the hostname of this application. // -// Union satisfied by [spectrum.AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs] or -// [spectrum.AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs]. +// Union satisfied by [spectrum.AppNewResponseEdgeIPsEyeballIPs] or +// [spectrum.AppNewResponseEdgeIPsCustomerOwnedIPs]. type AppNewResponseEdgeIPs interface { implementsSpectrumAppNewResponseEdgeIPs() } @@ -232,100 +232,99 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs{}), + Type: reflect.TypeOf(AppNewResponseEdgeIPsEyeballIPs{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs{}), + Type: reflect.TypeOf(AppNewResponseEdgeIPsCustomerOwnedIPs{}), }, ) } -type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs struct { +type AppNewResponseEdgeIPsEyeballIPs struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. - Connectivity AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity `json:"connectivity"` + Connectivity AppNewResponseEdgeIPsEyeballIPsConnectivity `json:"connectivity"` // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. - Type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsType `json:"type"` - JSON appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON `json:"-"` + Type AppNewResponseEdgeIPsEyeballIPsType `json:"type"` + JSON appNewResponseEdgeIPsEyeballIPsJSON `json:"-"` } -// appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON contains the JSON metadata for -// the struct [AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs] -type appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON struct { +// appNewResponseEdgeIPsEyeballIPsJSON contains the JSON metadata for the struct +// [AppNewResponseEdgeIPsEyeballIPs] +type appNewResponseEdgeIPsEyeballIPsJSON struct { Connectivity apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs) UnmarshalJSON(data []byte) (err error) { +func (r *AppNewResponseEdgeIPsEyeballIPs) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON) RawJSON() string { +func (r appNewResponseEdgeIPsEyeballIPsJSON) RawJSON() string { return r.raw } -func (r AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPs) implementsSpectrumAppNewResponseEdgeIPs() {} +func (r AppNewResponseEdgeIPsEyeballIPs) implementsSpectrumAppNewResponseEdgeIPs() {} // The IP versions supported for inbound connections on Spectrum anycast IPs. -type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity string +type AppNewResponseEdgeIPsEyeballIPsConnectivity string const ( - AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "all" - AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV4 AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv4" - AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV6 AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv6" + AppNewResponseEdgeIPsEyeballIPsConnectivityAll AppNewResponseEdgeIPsEyeballIPsConnectivity = "all" + AppNewResponseEdgeIPsEyeballIPsConnectivityIPV4 AppNewResponseEdgeIPsEyeballIPsConnectivity = "ipv4" + AppNewResponseEdgeIPsEyeballIPsConnectivityIPV6 AppNewResponseEdgeIPsEyeballIPsConnectivity = "ipv6" ) // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. -type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsType string +type AppNewResponseEdgeIPsEyeballIPsType string const ( - AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsType = "dynamic" + AppNewResponseEdgeIPsEyeballIPsTypeDynamic AppNewResponseEdgeIPsEyeballIPsType = "dynamic" ) -type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs struct { +type AppNewResponseEdgeIPsCustomerOwnedIPs struct { // The array of customer owned IPs we broadcast via anycast for this hostname and // application. IPs []string `json:"ips"` // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. - Type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType `json:"type"` - JSON appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON `json:"-"` + Type AppNewResponseEdgeIPsCustomerOwnedIPsType `json:"type"` + JSON appNewResponseEdgeIPsCustomerOwnedIPsJSON `json:"-"` } -// appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON contains the JSON -// metadata for the struct [AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs] -type appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON struct { +// appNewResponseEdgeIPsCustomerOwnedIPsJSON contains the JSON metadata for the +// struct [AppNewResponseEdgeIPsCustomerOwnedIPs] +type appNewResponseEdgeIPsCustomerOwnedIPsJSON struct { IPs apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) UnmarshalJSON(data []byte) (err error) { +func (r *AppNewResponseEdgeIPsCustomerOwnedIPs) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON) RawJSON() string { +func (r appNewResponseEdgeIPsCustomerOwnedIPsJSON) RawJSON() string { return r.raw } -func (r AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) implementsSpectrumAppNewResponseEdgeIPs() { -} +func (r AppNewResponseEdgeIPsCustomerOwnedIPs) implementsSpectrumAppNewResponseEdgeIPs() {} // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. -type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType string +type AppNewResponseEdgeIPsCustomerOwnedIPsType string const ( - AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsTypeStatic AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType = "static" + AppNewResponseEdgeIPsCustomerOwnedIPsTypeStatic AppNewResponseEdgeIPsCustomerOwnedIPsType = "static" ) // The name and type of DNS record for the Spectrum application. @@ -539,8 +538,8 @@ const ( // The anycast edge IP configuration for the hostname of this application. // -// Union satisfied by [spectrum.AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs] -// or [spectrum.AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs]. +// Union satisfied by [spectrum.AppUpdateResponseEdgeIPsEyeballIPs] or +// [spectrum.AppUpdateResponseEdgeIPsCustomerOwnedIPs]. type AppUpdateResponseEdgeIPs interface { implementsSpectrumAppUpdateResponseEdgeIPs() } @@ -551,101 +550,99 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs{}), + Type: reflect.TypeOf(AppUpdateResponseEdgeIPsEyeballIPs{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs{}), + Type: reflect.TypeOf(AppUpdateResponseEdgeIPsCustomerOwnedIPs{}), }, ) } -type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs struct { +type AppUpdateResponseEdgeIPsEyeballIPs struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. - Connectivity AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity `json:"connectivity"` + Connectivity AppUpdateResponseEdgeIPsEyeballIPsConnectivity `json:"connectivity"` // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. - Type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsType `json:"type"` - JSON appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON `json:"-"` + Type AppUpdateResponseEdgeIPsEyeballIPsType `json:"type"` + JSON appUpdateResponseEdgeIPsEyeballIPsJSON `json:"-"` } -// appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON contains the JSON metadata -// for the struct [AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs] -type appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON struct { +// appUpdateResponseEdgeIPsEyeballIPsJSON contains the JSON metadata for the struct +// [AppUpdateResponseEdgeIPsEyeballIPs] +type appUpdateResponseEdgeIPsEyeballIPsJSON struct { Connectivity apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs) UnmarshalJSON(data []byte) (err error) { +func (r *AppUpdateResponseEdgeIPsEyeballIPs) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsJSON) RawJSON() string { +func (r appUpdateResponseEdgeIPsEyeballIPsJSON) RawJSON() string { return r.raw } -func (r AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPs) implementsSpectrumAppUpdateResponseEdgeIPs() { -} +func (r AppUpdateResponseEdgeIPsEyeballIPs) implementsSpectrumAppUpdateResponseEdgeIPs() {} // The IP versions supported for inbound connections on Spectrum anycast IPs. -type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity string +type AppUpdateResponseEdgeIPsEyeballIPsConnectivity string const ( - AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "all" - AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV4 AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv4" - AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV6 AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv6" + AppUpdateResponseEdgeIPsEyeballIPsConnectivityAll AppUpdateResponseEdgeIPsEyeballIPsConnectivity = "all" + AppUpdateResponseEdgeIPsEyeballIPsConnectivityIPV4 AppUpdateResponseEdgeIPsEyeballIPsConnectivity = "ipv4" + AppUpdateResponseEdgeIPsEyeballIPsConnectivityIPV6 AppUpdateResponseEdgeIPsEyeballIPsConnectivity = "ipv6" ) // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. -type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsType string +type AppUpdateResponseEdgeIPsEyeballIPsType string const ( - AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsType = "dynamic" + AppUpdateResponseEdgeIPsEyeballIPsTypeDynamic AppUpdateResponseEdgeIPsEyeballIPsType = "dynamic" ) -type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs struct { +type AppUpdateResponseEdgeIPsCustomerOwnedIPs struct { // The array of customer owned IPs we broadcast via anycast for this hostname and // application. IPs []string `json:"ips"` // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. - Type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType `json:"type"` - JSON appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON `json:"-"` + Type AppUpdateResponseEdgeIPsCustomerOwnedIPsType `json:"type"` + JSON appUpdateResponseEdgeIPsCustomerOwnedIPsJSON `json:"-"` } -// appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON contains the JSON -// metadata for the struct [AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs] -type appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON struct { +// appUpdateResponseEdgeIPsCustomerOwnedIPsJSON contains the JSON metadata for the +// struct [AppUpdateResponseEdgeIPsCustomerOwnedIPs] +type appUpdateResponseEdgeIPsCustomerOwnedIPsJSON struct { IPs apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) UnmarshalJSON(data []byte) (err error) { +func (r *AppUpdateResponseEdgeIPsCustomerOwnedIPs) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsJSON) RawJSON() string { +func (r appUpdateResponseEdgeIPsCustomerOwnedIPsJSON) RawJSON() string { return r.raw } -func (r AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) implementsSpectrumAppUpdateResponseEdgeIPs() { -} +func (r AppUpdateResponseEdgeIPsCustomerOwnedIPs) implementsSpectrumAppUpdateResponseEdgeIPs() {} // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. -type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType string +type AppUpdateResponseEdgeIPsCustomerOwnedIPsType string const ( - AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsTypeStatic AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType = "static" + AppUpdateResponseEdgeIPsCustomerOwnedIPsTypeStatic AppUpdateResponseEdgeIPsCustomerOwnedIPsType = "static" ) // The name and type of DNS record for the Spectrum application. @@ -891,68 +888,68 @@ type AppNewParamsOriginPort interface { // The anycast edge IP configuration for the hostname of this application. // -// Satisfied by [spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs], -// [spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs]. +// Satisfied by [spectrum.AppNewParamsEdgeIPsEyeballIPs], +// [spectrum.AppNewParamsEdgeIPsCustomerOwnedIPs]. type AppNewParamsEdgeIPs interface { implementsSpectrumAppNewParamsEdgeIPs() } -type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs struct { +type AppNewParamsEdgeIPsEyeballIPs struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. - Connectivity param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity] `json:"connectivity"` + Connectivity param.Field[AppNewParamsEdgeIPsEyeballIPsConnectivity] `json:"connectivity"` // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. - Type param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsType] `json:"type"` + Type param.Field[AppNewParamsEdgeIPsEyeballIPsType] `json:"type"` } -func (r AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs) MarshalJSON() (data []byte, err error) { +func (r AppNewParamsEdgeIPsEyeballIPs) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs) implementsSpectrumAppNewParamsEdgeIPs() {} +func (r AppNewParamsEdgeIPsEyeballIPs) implementsSpectrumAppNewParamsEdgeIPs() {} // The IP versions supported for inbound connections on Spectrum anycast IPs. -type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity string +type AppNewParamsEdgeIPsEyeballIPsConnectivity string const ( - AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "all" - AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV4 AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv4" - AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV6 AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv6" + AppNewParamsEdgeIPsEyeballIPsConnectivityAll AppNewParamsEdgeIPsEyeballIPsConnectivity = "all" + AppNewParamsEdgeIPsEyeballIPsConnectivityIPV4 AppNewParamsEdgeIPsEyeballIPsConnectivity = "ipv4" + AppNewParamsEdgeIPsEyeballIPsConnectivityIPV6 AppNewParamsEdgeIPsEyeballIPsConnectivity = "ipv6" ) // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. -type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsType string +type AppNewParamsEdgeIPsEyeballIPsType string const ( - AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsType = "dynamic" + AppNewParamsEdgeIPsEyeballIPsTypeDynamic AppNewParamsEdgeIPsEyeballIPsType = "dynamic" ) -type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs struct { +type AppNewParamsEdgeIPsCustomerOwnedIPs struct { // The array of customer owned IPs we broadcast via anycast for this hostname and // application. IPs param.Field[[]string] `json:"ips"` // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. - Type param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType] `json:"type"` + Type param.Field[AppNewParamsEdgeIPsCustomerOwnedIPsType] `json:"type"` } -func (r AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) MarshalJSON() (data []byte, err error) { +func (r AppNewParamsEdgeIPsCustomerOwnedIPs) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) implementsSpectrumAppNewParamsEdgeIPs() {} +func (r AppNewParamsEdgeIPsCustomerOwnedIPs) implementsSpectrumAppNewParamsEdgeIPs() {} // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. -type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType string +type AppNewParamsEdgeIPsCustomerOwnedIPsType string const ( - AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsTypeStatic AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType = "static" + AppNewParamsEdgeIPsCustomerOwnedIPsTypeStatic AppNewParamsEdgeIPsCustomerOwnedIPsType = "static" ) // Enables Proxy Protocol to the origin. Refer to @@ -1172,69 +1169,68 @@ type AppUpdateParamsOriginPort interface { // The anycast edge IP configuration for the hostname of this application. // -// Satisfied by [spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs], -// [spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs]. +// Satisfied by [spectrum.AppUpdateParamsEdgeIPsEyeballIPs], +// [spectrum.AppUpdateParamsEdgeIPsCustomerOwnedIPs]. type AppUpdateParamsEdgeIPs interface { implementsSpectrumAppUpdateParamsEdgeIPs() } -type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs struct { +type AppUpdateParamsEdgeIPsEyeballIPs struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. - Connectivity param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity] `json:"connectivity"` + Connectivity param.Field[AppUpdateParamsEdgeIPsEyeballIPsConnectivity] `json:"connectivity"` // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. - Type param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsType] `json:"type"` + Type param.Field[AppUpdateParamsEdgeIPsEyeballIPsType] `json:"type"` } -func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs) MarshalJSON() (data []byte, err error) { +func (r AppUpdateParamsEdgeIPsEyeballIPs) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs) implementsSpectrumAppUpdateParamsEdgeIPs() {} +func (r AppUpdateParamsEdgeIPsEyeballIPs) implementsSpectrumAppUpdateParamsEdgeIPs() {} // The IP versions supported for inbound connections on Spectrum anycast IPs. -type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity string +type AppUpdateParamsEdgeIPsEyeballIPsConnectivity string const ( - AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "all" - AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV4 AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv4" - AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityIPV6 AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivity = "ipv6" + AppUpdateParamsEdgeIPsEyeballIPsConnectivityAll AppUpdateParamsEdgeIPsEyeballIPsConnectivity = "all" + AppUpdateParamsEdgeIPsEyeballIPsConnectivityIPV4 AppUpdateParamsEdgeIPsEyeballIPsConnectivity = "ipv4" + AppUpdateParamsEdgeIPsEyeballIPsConnectivityIPV6 AppUpdateParamsEdgeIPsEyeballIPsConnectivity = "ipv6" ) // The type of edge IP configuration specified. Dynamically allocated edge IPs use // Spectrum anycast IPs in accordance with the connectivity you specify. Only valid // with CNAME DNS names. -type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsType string +type AppUpdateParamsEdgeIPsEyeballIPsType string const ( - AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsType = "dynamic" + AppUpdateParamsEdgeIPsEyeballIPsTypeDynamic AppUpdateParamsEdgeIPsEyeballIPsType = "dynamic" ) -type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs struct { +type AppUpdateParamsEdgeIPsCustomerOwnedIPs struct { // The array of customer owned IPs we broadcast via anycast for this hostname and // application. IPs param.Field[[]string] `json:"ips"` // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. - Type param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType] `json:"type"` + Type param.Field[AppUpdateParamsEdgeIPsCustomerOwnedIPsType] `json:"type"` } -func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) MarshalJSON() (data []byte, err error) { +func (r AppUpdateParamsEdgeIPsCustomerOwnedIPs) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPs) implementsSpectrumAppUpdateParamsEdgeIPs() { -} +func (r AppUpdateParamsEdgeIPsCustomerOwnedIPs) implementsSpectrumAppUpdateParamsEdgeIPs() {} // The type of edge IP configuration specified. Statically allocated edge IPs use // customer IPs in accordance with the ips array you specify. Only valid with // ADDRESS DNS names. -type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType string +type AppUpdateParamsEdgeIPsCustomerOwnedIPsType string const ( - AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsTypeStatic AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsType = "static" + AppUpdateParamsEdgeIPsCustomerOwnedIPsTypeStatic AppUpdateParamsEdgeIPsCustomerOwnedIPsType = "static" ) // Enables Proxy Protocol to the origin. Refer to diff --git a/spectrum/app_test.go b/spectrum/app_test.go index 6928e17587c..08e45762718 100644 --- a/spectrum/app_test.go +++ b/spectrum/app_test.go @@ -45,9 +45,9 @@ func TestAppNewWithOptionalParams(t *testing.T) { OriginPort: cloudflare.F[spectrum.AppNewParamsOriginPort](shared.UnionInt(int64(22))), Protocol: cloudflare.F("tcp/22"), ArgoSmartRouting: cloudflare.F(true), - EdgeIPs: cloudflare.F[spectrum.AppNewParamsEdgeIPs](spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs(spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPs{ - Connectivity: cloudflare.F(spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll), - Type: cloudflare.F(spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic), + EdgeIPs: cloudflare.F[spectrum.AppNewParamsEdgeIPs](spectrum.AppNewParamsEdgeIPsEyeballIPs(spectrum.AppNewParamsEdgeIPsEyeballIPs{ + Connectivity: cloudflare.F(spectrum.AppNewParamsEdgeIPsEyeballIPsConnectivityAll), + Type: cloudflare.F(spectrum.AppNewParamsEdgeIPsEyeballIPsTypeDynamic), })), IPFirewall: cloudflare.F(true), ProxyProtocol: cloudflare.F(spectrum.AppNewParamsProxyProtocolOff), @@ -95,9 +95,9 @@ func TestAppUpdateWithOptionalParams(t *testing.T) { OriginPort: cloudflare.F[spectrum.AppUpdateParamsOriginPort](shared.UnionInt(int64(22))), Protocol: cloudflare.F("tcp/22"), ArgoSmartRouting: cloudflare.F(true), - EdgeIPs: cloudflare.F[spectrum.AppUpdateParamsEdgeIPs](spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs(spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPs{ - Connectivity: cloudflare.F(spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsConnectivityAll), - Type: cloudflare.F(spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsTypeDynamic), + EdgeIPs: cloudflare.F[spectrum.AppUpdateParamsEdgeIPs](spectrum.AppUpdateParamsEdgeIPsEyeballIPs(spectrum.AppUpdateParamsEdgeIPsEyeballIPs{ + Connectivity: cloudflare.F(spectrum.AppUpdateParamsEdgeIPsEyeballIPsConnectivityAll), + Type: cloudflare.F(spectrum.AppUpdateParamsEdgeIPsEyeballIPsTypeDynamic), })), IPFirewall: cloudflare.F(true), ProxyProtocol: cloudflare.F(spectrum.AppUpdateParamsProxyProtocolOff), diff --git a/workers/ai.go b/workers/ai.go index 58528eba796..3ba7702cc19 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -333,11 +333,11 @@ func (r AIRunParams) MarshalMultipart() (data []byte, contentType string, err er // [workers.AIRunParamsBodySentenceSimilarity], // [workers.AIRunParamsBodyTextEmbeddings], [shared.UnionString], // [workers.AIRunParamsBodyObject], [shared.UnionString], -// [workers.AIRunParamsBodyWorkersAIImageClassification], [shared.UnionString], -// [workers.AIRunParamsBodyWorkersAIBodyDetection], -// [workers.AIRunParamsBodyObject], [workers.AIRunParamsBodyObject], -// [workers.AIRunParamsBodyTranslation], [workers.AIRunParamsBodySummarization], -// [shared.UnionString], [workers.AIRunParamsBodyObject]. +// [workers.AIRunParamsBodyImageClassification], [shared.UnionString], +// [workers.AIRunParamsBodyObjectDetection], [workers.AIRunParamsBodyObject], +// [workers.AIRunParamsBodyObject], [workers.AIRunParamsBodyTranslation], +// [workers.AIRunParamsBodySummarization], [shared.UnionString], +// [workers.AIRunParamsBodyObject]. type AIRunParamsBody interface { ImplementsWorkersAIRunParamsBody() } @@ -409,25 +409,25 @@ func (r AIRunParamsBodyObject) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodyObject) ImplementsWorkersAIRunParamsBody() {} -type AIRunParamsBodyWorkersAIImageClassification struct { +type AIRunParamsBodyImageClassification struct { Image param.Field[[]float64] `json:"image"` } -func (r AIRunParamsBodyWorkersAIImageClassification) MarshalJSON() (data []byte, err error) { +func (r AIRunParamsBodyImageClassification) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AIRunParamsBodyWorkersAIImageClassification) ImplementsWorkersAIRunParamsBody() {} +func (r AIRunParamsBodyImageClassification) ImplementsWorkersAIRunParamsBody() {} -type AIRunParamsBodyWorkersAIBodyDetection struct { +type AIRunParamsBodyObjectDetection struct { Image param.Field[[]float64] `json:"image"` } -func (r AIRunParamsBodyWorkersAIBodyDetection) MarshalJSON() (data []byte, err error) { +func (r AIRunParamsBodyObjectDetection) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AIRunParamsBodyWorkersAIBodyDetection) ImplementsWorkersAIRunParamsBody() {} +func (r AIRunParamsBodyObjectDetection) ImplementsWorkersAIRunParamsBody() {} type AIRunParamsBodyTranslation struct { TargetLang param.Field[string] `json:"target_lang,required"` From ac620ac11806f12565b1435596e29aa00843c099 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 20:47:35 +0000 Subject: [PATCH 3/3] release: 2.0.0-beta.9 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a5e923217cf..3058182b1f3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.0.0-beta.8" + ".": "2.0.0-beta.9" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index becd6115b8b..367b4d83dad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 2.0.0-beta.9 (2024-03-18) + +Full Changelog: [v2.0.0-beta.8...v2.0.0-beta.9](https://github.com/cloudflare/cloudflare-go/compare/v2.0.0-beta.8...v2.0.0-beta.9) + +### Features + +* **api:** update via SDK Studio ([#1576](https://github.com/cloudflare/cloudflare-go/issues/1576)) ([37c724d](https://github.com/cloudflare/cloudflare-go/commit/37c724da8aee898d767fe87d1f89be67b91ae7f5)) +* **api:** update via SDK Studio ([#1578](https://github.com/cloudflare/cloudflare-go/issues/1578)) ([1e98ca0](https://github.com/cloudflare/cloudflare-go/commit/1e98ca0dad9445b08ce02ac90b7830461377690c)) + ## 2.0.0-beta.8 (2024-03-18) Full Changelog: [v2.0.0-beta.7...v2.0.0-beta.8](https://github.com/cloudflare/cloudflare-go/compare/v2.0.0-beta.7...v2.0.0-beta.8) diff --git a/README.md b/README.md index e70a50a0e04..4fb7d2577f3 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Or to pin the version: ```sh -go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.0.0-beta.8' +go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.0.0-beta.9' ``` diff --git a/internal/version.go b/internal/version.go index 45fb32a8236..71b8a93966e 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "2.0.0-beta.8" // x-release-please-version +const PackageVersion = "2.0.0-beta.9" // x-release-please-version