From b8a39cbcea253760c59298a8e6a77d9627ad5524 Mon Sep 17 00:00:00 2001 From: Daniel Cohen <4705646+dacohen@users.noreply.github.com> Date: Thu, 16 May 2024 16:13:24 -0400 Subject: [PATCH] Add NullableBool function (#1322) ## Motivation The `AppPortalAccess` function in the golang SDK takes a `ReadOnly` parameter, of type `NullableBool`. However, the `NullableBool` struct and associated functions aren't accessible outside the SDK, so it's not possible to construct a `NullableBool` to pass into this function. For other types (`NullableString`, `NullableInt32`), there's a set of wrapper functions defined in the `svix` package. ## Solution Add a `NullableBool` function to the svix package, next to the existing wrapper functions. --- go/svix.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/svix.go b/go/svix.go index 950e6e5b5..b7986f482 100644 --- a/go/svix.go +++ b/go/svix.go @@ -47,6 +47,9 @@ func NullableInt32(num *int32) *openapi.NullableInt32 { func Int32(i int32) *int32 { return &i } +func NullableBool(b *bool) *openapi.NullableBool { + return openapi.NewNullableBool(b) +} func New(token string, options *SvixOptions) *Svix { conf := openapi.NewConfiguration()