diff --git a/go/internal/openapi/model_custom_strings_override.go b/go/internal/openapi/model_custom_strings_override.go index 62410657e..b2c549019 100644 --- a/go/internal/openapi/model_custom_strings_override.go +++ b/go/internal/openapi/model_custom_strings_override.go @@ -16,6 +16,7 @@ import ( // CustomStringsOverride struct for CustomStringsOverride type CustomStringsOverride struct { + ChannelsHelp NullableString `json:"channelsHelp,omitempty"` ChannelsMany NullableString `json:"channelsMany,omitempty"` ChannelsOne NullableString `json:"channelsOne,omitempty"` } @@ -37,6 +38,48 @@ func NewCustomStringsOverrideWithDefaults() *CustomStringsOverride { return &this } +// GetChannelsHelp returns the ChannelsHelp field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CustomStringsOverride) GetChannelsHelp() string { + if o == nil || o.ChannelsHelp.Get() == nil { + var ret string + return ret + } + return *o.ChannelsHelp.Get() +} + +// GetChannelsHelpOk returns a tuple with the ChannelsHelp field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CustomStringsOverride) GetChannelsHelpOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ChannelsHelp.Get(), o.ChannelsHelp.IsSet() +} + +// HasChannelsHelp returns a boolean if a field has been set. +func (o *CustomStringsOverride) HasChannelsHelp() bool { + if o != nil && o.ChannelsHelp.IsSet() { + return true + } + + return false +} + +// SetChannelsHelp gets a reference to the given NullableString and assigns it to the ChannelsHelp field. +func (o *CustomStringsOverride) SetChannelsHelp(v string) { + o.ChannelsHelp.Set(&v) +} +// SetChannelsHelpNil sets the value for ChannelsHelp to be an explicit nil +func (o *CustomStringsOverride) SetChannelsHelpNil() { + o.ChannelsHelp.Set(nil) +} + +// UnsetChannelsHelp ensures that no value is present for ChannelsHelp, not even an explicit nil +func (o *CustomStringsOverride) UnsetChannelsHelp() { + o.ChannelsHelp.Unset() +} + // GetChannelsMany returns the ChannelsMany field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomStringsOverride) GetChannelsMany() string { if o == nil || o.ChannelsMany.Get() == nil { @@ -123,6 +166,9 @@ func (o *CustomStringsOverride) UnsetChannelsOne() { func (o CustomStringsOverride) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.ChannelsHelp.IsSet() { + toSerialize["channelsHelp"] = o.ChannelsHelp.Get() + } if o.ChannelsMany.IsSet() { toSerialize["channelsMany"] = o.ChannelsMany.Get() } diff --git a/go/internal/openapi/model_message_attempt_endpoint_out.go b/go/internal/openapi/model_message_attempt_endpoint_out.go index 487b250f8..236429498 100644 --- a/go/internal/openapi/model_message_attempt_endpoint_out.go +++ b/go/internal/openapi/model_message_attempt_endpoint_out.go @@ -25,6 +25,7 @@ type MessageAttemptEndpointOut struct { // The msg's ID MsgId string `json:"msgId"` Response string `json:"response"` + // Response duration in milliseconds. ResponseDurationMs int64 `json:"responseDurationMs"` ResponseStatusCode int32 `json:"responseStatusCode"` Status MessageStatus `json:"status"` diff --git a/go/internal/openapi/model_message_attempt_out.go b/go/internal/openapi/model_message_attempt_out.go index 1c0e6e979..0289135d7 100644 --- a/go/internal/openapi/model_message_attempt_out.go +++ b/go/internal/openapi/model_message_attempt_out.go @@ -25,6 +25,7 @@ type MessageAttemptOut struct { // The msg's ID MsgId string `json:"msgId"` Response string `json:"response"` + // Response duration in milliseconds. ResponseDurationMs int64 `json:"responseDurationMs"` ResponseStatusCode int32 `json:"responseStatusCode"` Status MessageStatus `json:"status"` diff --git a/go/internal/openapi/model_snowflake_config.go b/go/internal/openapi/model_snowflake_config.go new file mode 100644 index 000000000..683af71c6 --- /dev/null +++ b/go/internal/openapi/model_snowflake_config.go @@ -0,0 +1,274 @@ +/* + * Svix API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 1.1.1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// SnowflakeConfig struct for SnowflakeConfig +type SnowflakeConfig struct { + AccountIdentifier string `json:"accountIdentifier"` + DbName *string `json:"dbName,omitempty"` + PrivateKey string `json:"privateKey"` + SchemaName *string `json:"schemaName,omitempty"` + TableName *string `json:"tableName,omitempty"` + UserId string `json:"userId"` +} + +// NewSnowflakeConfig instantiates a new SnowflakeConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSnowflakeConfig(accountIdentifier string, privateKey string, userId string) *SnowflakeConfig { + this := SnowflakeConfig{} + this.AccountIdentifier = accountIdentifier + this.PrivateKey = privateKey + this.UserId = userId + return &this +} + +// NewSnowflakeConfigWithDefaults instantiates a new SnowflakeConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSnowflakeConfigWithDefaults() *SnowflakeConfig { + this := SnowflakeConfig{} + return &this +} + +// GetAccountIdentifier returns the AccountIdentifier field value +func (o *SnowflakeConfig) GetAccountIdentifier() string { + if o == nil { + var ret string + return ret + } + + return o.AccountIdentifier +} + +// GetAccountIdentifierOk returns a tuple with the AccountIdentifier field value +// and a boolean to check if the value has been set. +func (o *SnowflakeConfig) GetAccountIdentifierOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountIdentifier, true +} + +// SetAccountIdentifier sets field value +func (o *SnowflakeConfig) SetAccountIdentifier(v string) { + o.AccountIdentifier = v +} + +// GetDbName returns the DbName field value if set, zero value otherwise. +func (o *SnowflakeConfig) GetDbName() string { + if o == nil || o.DbName == nil { + var ret string + return ret + } + return *o.DbName +} + +// GetDbNameOk returns a tuple with the DbName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnowflakeConfig) GetDbNameOk() (*string, bool) { + if o == nil || o.DbName == nil { + return nil, false + } + return o.DbName, true +} + +// HasDbName returns a boolean if a field has been set. +func (o *SnowflakeConfig) HasDbName() bool { + if o != nil && o.DbName != nil { + return true + } + + return false +} + +// SetDbName gets a reference to the given string and assigns it to the DbName field. +func (o *SnowflakeConfig) SetDbName(v string) { + o.DbName = &v +} + +// GetPrivateKey returns the PrivateKey field value +func (o *SnowflakeConfig) GetPrivateKey() string { + if o == nil { + var ret string + return ret + } + + return o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value +// and a boolean to check if the value has been set. +func (o *SnowflakeConfig) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrivateKey, true +} + +// SetPrivateKey sets field value +func (o *SnowflakeConfig) SetPrivateKey(v string) { + o.PrivateKey = v +} + +// GetSchemaName returns the SchemaName field value if set, zero value otherwise. +func (o *SnowflakeConfig) GetSchemaName() string { + if o == nil || o.SchemaName == nil { + var ret string + return ret + } + return *o.SchemaName +} + +// GetSchemaNameOk returns a tuple with the SchemaName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnowflakeConfig) GetSchemaNameOk() (*string, bool) { + if o == nil || o.SchemaName == nil { + return nil, false + } + return o.SchemaName, true +} + +// HasSchemaName returns a boolean if a field has been set. +func (o *SnowflakeConfig) HasSchemaName() bool { + if o != nil && o.SchemaName != nil { + return true + } + + return false +} + +// SetSchemaName gets a reference to the given string and assigns it to the SchemaName field. +func (o *SnowflakeConfig) SetSchemaName(v string) { + o.SchemaName = &v +} + +// GetTableName returns the TableName field value if set, zero value otherwise. +func (o *SnowflakeConfig) GetTableName() string { + if o == nil || o.TableName == nil { + var ret string + return ret + } + return *o.TableName +} + +// GetTableNameOk returns a tuple with the TableName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnowflakeConfig) GetTableNameOk() (*string, bool) { + if o == nil || o.TableName == nil { + return nil, false + } + return o.TableName, true +} + +// HasTableName returns a boolean if a field has been set. +func (o *SnowflakeConfig) HasTableName() bool { + if o != nil && o.TableName != nil { + return true + } + + return false +} + +// SetTableName gets a reference to the given string and assigns it to the TableName field. +func (o *SnowflakeConfig) SetTableName(v string) { + o.TableName = &v +} + +// GetUserId returns the UserId field value +func (o *SnowflakeConfig) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *SnowflakeConfig) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *SnowflakeConfig) SetUserId(v string) { + o.UserId = v +} + +func (o SnowflakeConfig) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["accountIdentifier"] = o.AccountIdentifier + } + if o.DbName != nil { + toSerialize["dbName"] = o.DbName + } + if true { + toSerialize["privateKey"] = o.PrivateKey + } + if o.SchemaName != nil { + toSerialize["schemaName"] = o.SchemaName + } + if o.TableName != nil { + toSerialize["tableName"] = o.TableName + } + if true { + toSerialize["userId"] = o.UserId + } + return json.Marshal(toSerialize) +} + +type NullableSnowflakeConfig struct { + value *SnowflakeConfig + isSet bool +} + +func (v NullableSnowflakeConfig) Get() *SnowflakeConfig { + return v.value +} + +func (v *NullableSnowflakeConfig) Set(val *SnowflakeConfig) { + v.value = val + v.isSet = true +} + +func (v NullableSnowflakeConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableSnowflakeConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSnowflakeConfig(val *SnowflakeConfig) *NullableSnowflakeConfig { + return &NullableSnowflakeConfig{value: val, isSet: true} +} + +func (v NullableSnowflakeConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSnowflakeConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/internal/openapi/model_stream_in.go b/go/internal/openapi/model_stream_in.go index bf4f6d90a..3e9930553 100644 --- a/go/internal/openapi/model_stream_in.go +++ b/go/internal/openapi/model_stream_in.go @@ -17,8 +17,7 @@ import ( // StreamIn struct for StreamIn type StreamIn struct { Description string `json:"description"` - // Optional unique identifier for the stream - Uid NullableString `json:"uid,omitempty"` + Uid *string `json:"uid,omitempty"` } // NewStreamIn instantiates a new StreamIn object @@ -63,46 +62,36 @@ func (o *StreamIn) SetDescription(v string) { o.Description = v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *StreamIn) GetUid() string { - if o == nil || o.Uid.Get() == nil { + if o == nil || o.Uid == nil { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *StreamIn) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || o.Uid == nil { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *StreamIn) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && o.Uid != nil { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *StreamIn) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *StreamIn) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *StreamIn) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } func (o StreamIn) MarshalJSON() ([]byte, error) { @@ -110,8 +99,8 @@ func (o StreamIn) MarshalJSON() ([]byte, error) { if true { toSerialize["description"] = o.Description } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if o.Uid != nil { + toSerialize["uid"] = o.Uid } return json.Marshal(toSerialize) } diff --git a/go/internal/openapi/model_stream_out.go b/go/internal/openapi/model_stream_out.go index 1817e78f7..8e2b7ecb6 100644 --- a/go/internal/openapi/model_stream_out.go +++ b/go/internal/openapi/model_stream_out.go @@ -20,7 +20,7 @@ type StreamOut struct { CreatedAt time.Time `json:"createdAt"` Description NullableString `json:"description,omitempty"` Id string `json:"id"` - Uid NullableString `json:"uid,omitempty"` + Uid *string `json:"uid,omitempty"` UpdatedAt time.Time `json:"updatedAt"` } @@ -134,46 +134,36 @@ func (o *StreamOut) SetId(v string) { o.Id = v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *StreamOut) GetUid() string { - if o == nil || o.Uid.Get() == nil { + if o == nil || o.Uid == nil { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *StreamOut) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || o.Uid == nil { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *StreamOut) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && o.Uid != nil { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *StreamOut) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *StreamOut) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *StreamOut) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } // GetUpdatedAt returns the UpdatedAt field value @@ -211,8 +201,8 @@ func (o StreamOut) MarshalJSON() ([]byte, error) { if true { toSerialize["id"] = o.Id } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if o.Uid != nil { + toSerialize["uid"] = o.Uid } if true { toSerialize["updatedAt"] = o.UpdatedAt diff --git a/go/internal/openapi/model_stream_patch.go b/go/internal/openapi/model_stream_patch.go index 516f2e188..d61d7ef71 100644 --- a/go/internal/openapi/model_stream_patch.go +++ b/go/internal/openapi/model_stream_patch.go @@ -17,8 +17,7 @@ import ( // StreamPatch struct for StreamPatch type StreamPatch struct { Description *string `json:"description,omitempty"` - // Optional unique identifier for the stream - Uid NullableString `json:"uid,omitempty"` + Uid *string `json:"uid,omitempty"` } // NewStreamPatch instantiates a new StreamPatch object @@ -70,46 +69,36 @@ func (o *StreamPatch) SetDescription(v string) { o.Description = &v } -// GetUid returns the Uid field value if set, zero value otherwise (both if not set or set to explicit null). +// GetUid returns the Uid field value if set, zero value otherwise. func (o *StreamPatch) GetUid() string { - if o == nil || o.Uid.Get() == nil { + if o == nil || o.Uid == nil { var ret string return ret } - return *o.Uid.Get() + return *o.Uid } // GetUidOk returns a tuple with the Uid field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *StreamPatch) GetUidOk() (*string, bool) { - if o == nil { + if o == nil || o.Uid == nil { return nil, false } - return o.Uid.Get(), o.Uid.IsSet() + return o.Uid, true } // HasUid returns a boolean if a field has been set. func (o *StreamPatch) HasUid() bool { - if o != nil && o.Uid.IsSet() { + if o != nil && o.Uid != nil { return true } return false } -// SetUid gets a reference to the given NullableString and assigns it to the Uid field. +// SetUid gets a reference to the given string and assigns it to the Uid field. func (o *StreamPatch) SetUid(v string) { - o.Uid.Set(&v) -} -// SetUidNil sets the value for Uid to be an explicit nil -func (o *StreamPatch) SetUidNil() { - o.Uid.Set(nil) -} - -// UnsetUid ensures that no value is present for Uid, not even an explicit nil -func (o *StreamPatch) UnsetUid() { - o.Uid.Unset() + o.Uid = &v } func (o StreamPatch) MarshalJSON() ([]byte, error) { @@ -117,8 +106,8 @@ func (o StreamPatch) MarshalJSON() ([]byte, error) { if o.Description != nil { toSerialize["description"] = o.Description } - if o.Uid.IsSet() { - toSerialize["uid"] = o.Uid.Get() + if o.Uid != nil { + toSerialize["uid"] = o.Uid } return json.Marshal(toSerialize) } diff --git a/go/internal/openapi/model_stream_sink_in.go b/go/internal/openapi/model_stream_sink_in.go index 0962ad2ea..946d585ba 100644 --- a/go/internal/openapi/model_stream_sink_in.go +++ b/go/internal/openapi/model_stream_sink_in.go @@ -20,6 +20,7 @@ type StreamSinkIn struct { StreamSinkInOneOf *StreamSinkInOneOf StreamSinkInOneOf1 *StreamSinkInOneOf1 StreamSinkInOneOf2 *StreamSinkInOneOf2 + StreamSinkInOneOf3 *StreamSinkInOneOf3 } // StreamSinkInOneOfAsStreamSinkIn is a convenience function that returns StreamSinkInOneOf wrapped in StreamSinkIn @@ -37,6 +38,11 @@ func StreamSinkInOneOf2AsStreamSinkIn(v *StreamSinkInOneOf2) StreamSinkIn { return StreamSinkIn{ StreamSinkInOneOf2: v} } +// StreamSinkInOneOf3AsStreamSinkIn is a convenience function that returns StreamSinkInOneOf3 wrapped in StreamSinkIn +func StreamSinkInOneOf3AsStreamSinkIn(v *StreamSinkInOneOf3) StreamSinkIn { + return StreamSinkIn{ StreamSinkInOneOf3: v} +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *StreamSinkIn) UnmarshalJSON(data []byte) error { @@ -81,11 +87,25 @@ func (dst *StreamSinkIn) UnmarshalJSON(data []byte) error { dst.StreamSinkInOneOf2 = nil } + // try to unmarshal data into StreamSinkInOneOf3 + err = json.Unmarshal(data, &dst.StreamSinkInOneOf3) + if err == nil { + jsonStreamSinkInOneOf3, _ := json.Marshal(dst.StreamSinkInOneOf3) + if string(jsonStreamSinkInOneOf3) == "{}" { // empty struct + dst.StreamSinkInOneOf3 = nil + } else { + match++ + } + } else { + dst.StreamSinkInOneOf3 = nil + } + if match > 1 { // more than 1 match // reset to nil dst.StreamSinkInOneOf = nil dst.StreamSinkInOneOf1 = nil dst.StreamSinkInOneOf2 = nil + dst.StreamSinkInOneOf3 = nil return fmt.Errorf("Data matches more than one schema in oneOf(StreamSinkIn)") } else if match == 1 { @@ -109,6 +129,10 @@ func (src StreamSinkIn) MarshalJSON() ([]byte, error) { return json.Marshal(&src.StreamSinkInOneOf2) } + if src.StreamSinkInOneOf3 != nil { + return json.Marshal(&src.StreamSinkInOneOf3) + } + return nil, nil // no data in oneOf schemas } @@ -126,6 +150,10 @@ func (obj *StreamSinkIn) GetActualInstance() (interface{}) { return obj.StreamSinkInOneOf2 } + if obj.StreamSinkInOneOf3 != nil { + return obj.StreamSinkInOneOf3 + } + // all schemas are nil return nil } diff --git a/go/internal/openapi/model_stream_sink_in_one_of_3.go b/go/internal/openapi/model_stream_sink_in_one_of_3.go new file mode 100644 index 000000000..98003cb2d --- /dev/null +++ b/go/internal/openapi/model_stream_sink_in_one_of_3.go @@ -0,0 +1,137 @@ +/* + * Svix API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * API version: 1.1.1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// StreamSinkInOneOf3 struct for StreamSinkInOneOf3 +type StreamSinkInOneOf3 struct { + Config SnowflakeConfig `json:"config"` + Type string `json:"type"` +} + +// NewStreamSinkInOneOf3 instantiates a new StreamSinkInOneOf3 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStreamSinkInOneOf3(config SnowflakeConfig, type_ string) *StreamSinkInOneOf3 { + this := StreamSinkInOneOf3{} + this.Config = config + this.Type = type_ + return &this +} + +// NewStreamSinkInOneOf3WithDefaults instantiates a new StreamSinkInOneOf3 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStreamSinkInOneOf3WithDefaults() *StreamSinkInOneOf3 { + this := StreamSinkInOneOf3{} + return &this +} + +// GetConfig returns the Config field value +func (o *StreamSinkInOneOf3) GetConfig() SnowflakeConfig { + if o == nil { + var ret SnowflakeConfig + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *StreamSinkInOneOf3) GetConfigOk() (*SnowflakeConfig, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *StreamSinkInOneOf3) SetConfig(v SnowflakeConfig) { + o.Config = v +} + +// GetType returns the Type field value +func (o *StreamSinkInOneOf3) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *StreamSinkInOneOf3) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *StreamSinkInOneOf3) SetType(v string) { + o.Type = v +} + +func (o StreamSinkInOneOf3) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["config"] = o.Config + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableStreamSinkInOneOf3 struct { + value *StreamSinkInOneOf3 + isSet bool +} + +func (v NullableStreamSinkInOneOf3) Get() *StreamSinkInOneOf3 { + return v.value +} + +func (v *NullableStreamSinkInOneOf3) Set(val *StreamSinkInOneOf3) { + v.value = val + v.isSet = true +} + +func (v NullableStreamSinkInOneOf3) IsSet() bool { + return v.isSet +} + +func (v *NullableStreamSinkInOneOf3) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStreamSinkInOneOf3(val *StreamSinkInOneOf3) *NullableStreamSinkInOneOf3 { + return &NullableStreamSinkInOneOf3{value: val, isSet: true} +} + +func (v NullableStreamSinkInOneOf3) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStreamSinkInOneOf3) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/internal/openapi/model_stream_sink_out.go b/go/internal/openapi/model_stream_sink_out.go index a301c651e..b8d146e9a 100644 --- a/go/internal/openapi/model_stream_sink_out.go +++ b/go/internal/openapi/model_stream_sink_out.go @@ -20,6 +20,7 @@ type StreamSinkOut struct { StreamSinkInOneOf *StreamSinkInOneOf StreamSinkInOneOf1 *StreamSinkInOneOf1 StreamSinkInOneOf2 *StreamSinkInOneOf2 + StreamSinkInOneOf3 *StreamSinkInOneOf3 } // StreamSinkInOneOfAsStreamSinkOut is a convenience function that returns StreamSinkInOneOf wrapped in StreamSinkOut @@ -37,6 +38,11 @@ func StreamSinkInOneOf2AsStreamSinkOut(v *StreamSinkInOneOf2) StreamSinkOut { return StreamSinkOut{ StreamSinkInOneOf2: v} } +// StreamSinkInOneOf3AsStreamSinkOut is a convenience function that returns StreamSinkInOneOf3 wrapped in StreamSinkOut +func StreamSinkInOneOf3AsStreamSinkOut(v *StreamSinkInOneOf3) StreamSinkOut { + return StreamSinkOut{ StreamSinkInOneOf3: v} +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *StreamSinkOut) UnmarshalJSON(data []byte) error { @@ -81,11 +87,25 @@ func (dst *StreamSinkOut) UnmarshalJSON(data []byte) error { dst.StreamSinkInOneOf2 = nil } + // try to unmarshal data into StreamSinkInOneOf3 + err = json.Unmarshal(data, &dst.StreamSinkInOneOf3) + if err == nil { + jsonStreamSinkInOneOf3, _ := json.Marshal(dst.StreamSinkInOneOf3) + if string(jsonStreamSinkInOneOf3) == "{}" { // empty struct + dst.StreamSinkInOneOf3 = nil + } else { + match++ + } + } else { + dst.StreamSinkInOneOf3 = nil + } + if match > 1 { // more than 1 match // reset to nil dst.StreamSinkInOneOf = nil dst.StreamSinkInOneOf1 = nil dst.StreamSinkInOneOf2 = nil + dst.StreamSinkInOneOf3 = nil return fmt.Errorf("Data matches more than one schema in oneOf(StreamSinkOut)") } else if match == 1 { @@ -109,6 +129,10 @@ func (src StreamSinkOut) MarshalJSON() ([]byte, error) { return json.Marshal(&src.StreamSinkInOneOf2) } + if src.StreamSinkInOneOf3 != nil { + return json.Marshal(&src.StreamSinkInOneOf3) + } + return nil, nil // no data in oneOf schemas } @@ -126,6 +150,10 @@ func (obj *StreamSinkOut) GetActualInstance() (interface{}) { return obj.StreamSinkInOneOf2 } + if obj.StreamSinkInOneOf3 != nil { + return obj.StreamSinkInOneOf3 + } + // all schemas are nil return nil } diff --git a/go/internal/openapi/model_stream_sink_patch.go b/go/internal/openapi/model_stream_sink_patch.go index facc6a586..1d7bcbcba 100644 --- a/go/internal/openapi/model_stream_sink_patch.go +++ b/go/internal/openapi/model_stream_sink_patch.go @@ -20,6 +20,7 @@ type StreamSinkPatch struct { StreamSinkInOneOf *StreamSinkInOneOf StreamSinkInOneOf1 *StreamSinkInOneOf1 StreamSinkInOneOf2 *StreamSinkInOneOf2 + StreamSinkInOneOf3 *StreamSinkInOneOf3 } // StreamSinkInOneOfAsStreamSinkPatch is a convenience function that returns StreamSinkInOneOf wrapped in StreamSinkPatch @@ -37,6 +38,11 @@ func StreamSinkInOneOf2AsStreamSinkPatch(v *StreamSinkInOneOf2) StreamSinkPatch return StreamSinkPatch{ StreamSinkInOneOf2: v} } +// StreamSinkInOneOf3AsStreamSinkPatch is a convenience function that returns StreamSinkInOneOf3 wrapped in StreamSinkPatch +func StreamSinkInOneOf3AsStreamSinkPatch(v *StreamSinkInOneOf3) StreamSinkPatch { + return StreamSinkPatch{ StreamSinkInOneOf3: v} +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *StreamSinkPatch) UnmarshalJSON(data []byte) error { @@ -81,11 +87,25 @@ func (dst *StreamSinkPatch) UnmarshalJSON(data []byte) error { dst.StreamSinkInOneOf2 = nil } + // try to unmarshal data into StreamSinkInOneOf3 + err = json.Unmarshal(data, &dst.StreamSinkInOneOf3) + if err == nil { + jsonStreamSinkInOneOf3, _ := json.Marshal(dst.StreamSinkInOneOf3) + if string(jsonStreamSinkInOneOf3) == "{}" { // empty struct + dst.StreamSinkInOneOf3 = nil + } else { + match++ + } + } else { + dst.StreamSinkInOneOf3 = nil + } + if match > 1 { // more than 1 match // reset to nil dst.StreamSinkInOneOf = nil dst.StreamSinkInOneOf1 = nil dst.StreamSinkInOneOf2 = nil + dst.StreamSinkInOneOf3 = nil return fmt.Errorf("Data matches more than one schema in oneOf(StreamSinkPatch)") } else if match == 1 { @@ -109,6 +129,10 @@ func (src StreamSinkPatch) MarshalJSON() ([]byte, error) { return json.Marshal(&src.StreamSinkInOneOf2) } + if src.StreamSinkInOneOf3 != nil { + return json.Marshal(&src.StreamSinkInOneOf3) + } + return nil, nil // no data in oneOf schemas } @@ -126,6 +150,10 @@ func (obj *StreamSinkPatch) GetActualInstance() (interface{}) { return obj.StreamSinkInOneOf2 } + if obj.StreamSinkInOneOf3 != nil { + return obj.StreamSinkInOneOf3 + } + // all schemas are nil return nil } diff --git a/openapi.json b/openapi.json index e120f7bea..71de35380 100644 --- a/openapi.json +++ b/openapi.json @@ -588,6 +588,10 @@ }, "CustomStringsOverride": { "properties": { + "channelsHelp": { + "nullable": true, + "type": "string" + }, "channelsMany": { "nullable": true, "type": "string" @@ -3007,6 +3011,7 @@ "type": "string" }, "responseDurationMs": { + "description": "Response duration in milliseconds.", "format": "int64", "type": "integer" }, @@ -3266,6 +3271,7 @@ "type": "string" }, "responseDurationMs": { + "description": "Response duration in milliseconds.", "format": "int64", "type": "integer" }, @@ -4738,6 +4744,34 @@ }, "type": "object" }, + "SnowflakeConfig": { + "properties": { + "accountIdentifier": { + "type": "string" + }, + "dbName": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "tableName": { + "type": "string" + }, + "userId": { + "type": "string" + } + }, + "required": [ + "accountIdentifier", + "privateKey", + "userId" + ], + "type": "object" + }, "StatisticsPeriod": { "description": "Period length for a statistics data point", "enum": [ @@ -4774,9 +4808,9 @@ "type": "string" }, "uid": { + "$ref": "#/components/schemas/StreamUid", "description": "Optional unique identifier for the stream", - "nullable": true, - "type": "string" + "nullable": true } }, "required": [ @@ -4798,8 +4832,8 @@ "type": "string" }, "uid": { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/StreamUid", + "nullable": true }, "updatedAt": { "format": "date-time", @@ -4819,9 +4853,9 @@ "type": "string" }, "uid": { + "$ref": "#/components/schemas/StreamUid", "description": "Optional unique identifier for the stream", - "nullable": true, - "type": "string" + "nullable": true } }, "type": "object" @@ -4881,6 +4915,24 @@ "type" ], "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SnowflakeConfig" + }, + "type": { + "enum": [ + "snowflake" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" } ], "properties": { @@ -4905,8 +4957,8 @@ "$ref": "#/components/schemas/SinkStatusIn" }, "uid": { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/StreamSinkUid", + "nullable": true } }, "required": [ @@ -4969,6 +5021,24 @@ "type" ], "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SnowflakeConfig" + }, + "type": { + "enum": [ + "snowflake" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" } ], "properties": { @@ -5002,8 +5072,8 @@ "$ref": "#/components/schemas/SinkStatus" }, "uid": { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/StreamSinkUid", + "nullable": true }, "updatedAt": { "format": "date-time", @@ -5076,6 +5146,24 @@ "type" ], "type": "object" + }, + { + "properties": { + "config": { + "$ref": "#/components/schemas/SnowflakeConfig" + }, + "type": { + "enum": [ + "snowflake" + ], + "type": "string" + } + }, + "required": [ + "config", + "type" + ], + "type": "object" } ], "properties": { @@ -5105,12 +5193,24 @@ "nullable": true }, "uid": { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/StreamSinkUid", + "nullable": true } }, "type": "object" }, + "StreamSinkUid": { + "maxLength": 60, + "minLength": 1, + "pattern": "^(?!sink_)[a-zA-Z0-9_-]+$", + "type": "string" + }, + "StreamUid": { + "maxLength": 60, + "minLength": 1, + "pattern": "^(?!strm_)[a-zA-Z0-9_-]+$", + "type": "string" + }, "TemplateIn": { "properties": { "description": { @@ -27524,4 +27624,4 @@ } } } -} +} \ No newline at end of file