Skip to content

Commit

Permalink
feat: OpenAPI spec update via Stainless API
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Mar 6, 2024
1 parent 8f4dd03 commit d654382
Show file tree
Hide file tree
Showing 61 changed files with 4,848 additions and 96 deletions.
4 changes: 4 additions & 0 deletions addressingaddressmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AddressingAddressMapDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AddressingAddressMapDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
8 changes: 8 additions & 0 deletions addressingaddressmapaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AddressingAddressMapAccountUpdateResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AddressingAddressMapAccountUpdateResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand All @@ -92,6 +96,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AddressingAddressMapAccountDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AddressingAddressMapAccountDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
8 changes: 8 additions & 0 deletions addressingaddressmapip.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AddressingAddressMapIPUpdateResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AddressingAddressMapIPUpdateResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand All @@ -91,6 +95,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AddressingAddressMapIPDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AddressingAddressMapIPDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
8 changes: 8 additions & 0 deletions addressingaddressmapzone.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AddressingAddressMapZoneUpdateResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AddressingAddressMapZoneUpdateResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand All @@ -110,6 +114,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AddressingAddressMapZoneDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AddressingAddressMapZoneDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions addressingprefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AddressingPrefixDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AddressingPrefixDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions addressingprefixbgpbinding.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AddressingPrefixBGPBindingDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AddressingPrefixBGPBindingDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions alertingv3.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AlertingV3ListResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AlertingV3ListResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions alertingv3destinationeligible.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AlertingV3DestinationEligibleGetResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AlertingV3DestinationEligibleGetResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions alertingv3destinationpagerduty.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AlertingV3DestinationPagerdutyDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AlertingV3DestinationPagerdutyDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions alertingv3destinationwebhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AlertingV3DestinationWebhookDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AlertingV3DestinationWebhookDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions alertingv3policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AlertingV3PolicyDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AlertingV3PolicyDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
43 changes: 41 additions & 2 deletions botmanagement.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/cloudflare/cloudflare-sdk-go/internal/param"
"github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig"
"github.com/cloudflare/cloudflare-sdk-go/option"
"github.com/tidwall/gjson"
)

// BotManagementService contains methods and other services that help with
Expand Down Expand Up @@ -76,7 +77,26 @@ type BotManagementUpdateResponse interface {
}

func init() {
apijson.RegisterUnion(reflect.TypeOf((*BotManagementUpdateResponse)(nil)).Elem(), "")
apijson.RegisterUnion(
reflect.TypeOf((*BotManagementUpdateResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BotManagementUpdateResponseBotManagementBotFightModeConfig{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BotManagementUpdateResponseBotManagementSbfmDefinitelyConfig{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BotManagementUpdateResponseBotManagementSbfmLikelyConfig{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BotManagementUpdateResponseBotManagementBmSubscriptionConfig{}),
},
)
}

type BotManagementUpdateResponseBotManagementBotFightModeConfig struct {
Expand Down Expand Up @@ -298,7 +318,26 @@ type BotManagementGetResponse interface {
}

func init() {
apijson.RegisterUnion(reflect.TypeOf((*BotManagementGetResponse)(nil)).Elem(), "")
apijson.RegisterUnion(
reflect.TypeOf((*BotManagementGetResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BotManagementGetResponseBotManagementBotFightModeConfig{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BotManagementGetResponseBotManagementSbfmDefinitelyConfig{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BotManagementGetResponseBotManagementSbfmLikelyConfig{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BotManagementGetResponseBotManagementBmSubscriptionConfig{}),
},
)
}

type BotManagementGetResponseBotManagementBotFightModeConfig struct {
Expand Down
4 changes: 4 additions & 0 deletions cloudforceonerequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*CloudforceOneRequestDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(CloudforceOneRequestDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions cloudforceonerequestmessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*CloudforceOneRequestMessageDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(CloudforceOneRequestMessageDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions cloudforceonerequestpriority.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*CloudforceOneRequestPriorityDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(CloudforceOneRequestPriorityDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down
4 changes: 4 additions & 0 deletions customnameserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ func init() {
apijson.RegisterUnion(
reflect.TypeOf((*CustomNameserverDeleteResponse)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(CustomNameserverDeleteResponseArray{}),
},
apijson.UnionVariant{
TypeFilter: gjson.String,
Type: reflect.TypeOf(shared.UnionString("")),
Expand Down

0 comments on commit d654382

Please sign in to comment.