From 724e8dcf02b41f68754e147229ec24c2c8f50502 Mon Sep 17 00:00:00 2001 From: svix-lucho <133019767+svix-lucho@users.noreply.github.com> Date: Thu, 28 Nov 2024 12:26:51 -0300 Subject: [PATCH] Bump OpenAPI spec and regenerate libs (#1537) --- go/internal/openapi/api_environment.go | 175 ---- go/internal/openapi/api_message_attempt.go | 273 ++++++ go/internal/openapi/model_count_out.go | 188 ++++ go/internal/openapi/model_environment_in.go | 99 +-- go/internal/openapi/model_environment_out.go | 42 +- go/internal/openapi/model_settings_in.go | 870 ------------------- go/internal/openapi/model_settings_out.go | 870 ------------------- openapi.json | 865 +++++++++--------- 8 files changed, 945 insertions(+), 2437 deletions(-) create mode 100644 go/internal/openapi/model_count_out.go delete mode 100644 go/internal/openapi/model_settings_in.go delete mode 100644 go/internal/openapi/model_settings_out.go diff --git a/go/internal/openapi/api_environment.go b/go/internal/openapi/api_environment.go index a852115f0..591918b0a 100644 --- a/go/internal/openapi/api_environment.go +++ b/go/internal/openapi/api_environment.go @@ -207,181 +207,6 @@ func (a *EnvironmentAPIService) V1EnvironmentExportExecute(r ApiV1EnvironmentExp return localVarReturnValue, localVarHTTPResponse, nil } -type ApiV1EnvironmentExportGetRequest struct { - ctx context.Context - ApiService *EnvironmentAPIService -} - -func (r ApiV1EnvironmentExportGetRequest) Execute() (*EnvironmentOut, *http.Response, error) { - return r.ApiService.V1EnvironmentExportGetExecute(r) -} - -/* -V1EnvironmentExportGet Export Environment Configuration - -Download a JSON file containing all org-settings and event types - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiV1EnvironmentExportGetRequest -*/ -func (a *EnvironmentAPIService) V1EnvironmentExportGet(ctx context.Context) ApiV1EnvironmentExportGetRequest { - return ApiV1EnvironmentExportGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return EnvironmentOut -func (a *EnvironmentAPIService) V1EnvironmentExportGetExecute(r ApiV1EnvironmentExportGetRequest) (*EnvironmentOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *EnvironmentOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EnvironmentAPIService.V1EnvironmentExportGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/environment/export" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v HttpErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v HttpErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v HttpErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v HttpErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v HttpErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v HTTPValidationError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v HttpErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - type ApiV1EnvironmentImportRequest struct { ctx context.Context ApiService *EnvironmentAPIService diff --git a/go/internal/openapi/api_message_attempt.go b/go/internal/openapi/api_message_attempt.go index 084595f65..231576d40 100644 --- a/go/internal/openapi/api_message_attempt.go +++ b/go/internal/openapi/api_message_attempt.go @@ -25,6 +25,279 @@ import ( // MessageAttemptAPIService MessageAttemptAPI service type MessageAttemptAPIService service +type ApiV1MessageAttemptCountByEndpointRequest struct { + ctx context.Context + ApiService *MessageAttemptAPIService + appId string + endpointId string + status *MessageStatus + statusCodeClass *StatusCodeClass + channel *string + tag *string + before *time.Time + after *time.Time + eventTypes *[]string +} + +// Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3) +func (r ApiV1MessageAttemptCountByEndpointRequest) Status(status MessageStatus) ApiV1MessageAttemptCountByEndpointRequest { + r.status = &status + return r +} + +// Filter response based on the HTTP status code +func (r ApiV1MessageAttemptCountByEndpointRequest) StatusCodeClass(statusCodeClass StatusCodeClass) ApiV1MessageAttemptCountByEndpointRequest { + r.statusCodeClass = &statusCodeClass + return r +} + +// Filter response based on the channel +func (r ApiV1MessageAttemptCountByEndpointRequest) Channel(channel string) ApiV1MessageAttemptCountByEndpointRequest { + r.channel = &channel + return r +} + +// Filter response based on the tag +func (r ApiV1MessageAttemptCountByEndpointRequest) Tag(tag string) ApiV1MessageAttemptCountByEndpointRequest { + r.tag = &tag + return r +} + +// Only include items created before a certain date +func (r ApiV1MessageAttemptCountByEndpointRequest) Before(before time.Time) ApiV1MessageAttemptCountByEndpointRequest { + r.before = &before + return r +} + +// Only include items created after a certain date +func (r ApiV1MessageAttemptCountByEndpointRequest) After(after time.Time) ApiV1MessageAttemptCountByEndpointRequest { + r.after = &after + return r +} + +// Filter response based on the event type +func (r ApiV1MessageAttemptCountByEndpointRequest) EventTypes(eventTypes []string) ApiV1MessageAttemptCountByEndpointRequest { + r.eventTypes = &eventTypes + return r +} + +func (r ApiV1MessageAttemptCountByEndpointRequest) Execute() (*CountOut, *http.Response, error) { + return r.ApiService.V1MessageAttemptCountByEndpointExecute(r) +} + +/* +V1MessageAttemptCountByEndpoint Count Attempts By Endpoint + +Like `v1.message-attempt.list-by-endpoint` but returning a count only. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId The app's ID or UID + @param endpointId The ep's ID or UID + @return ApiV1MessageAttemptCountByEndpointRequest +*/ +func (a *MessageAttemptAPIService) V1MessageAttemptCountByEndpoint(ctx context.Context, appId string, endpointId string) ApiV1MessageAttemptCountByEndpointRequest { + return ApiV1MessageAttemptCountByEndpointRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + endpointId: endpointId, + } +} + +// Execute executes the request +// @return CountOut +func (a *MessageAttemptAPIService) V1MessageAttemptCountByEndpointExecute(r ApiV1MessageAttemptCountByEndpointRequest) (*CountOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CountOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAttemptAPIService.V1MessageAttemptCountByEndpoint") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/count" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", url.PathEscape(parameterValueToString(r.endpointId, "endpointId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.appId) < 1 { + return localVarReturnValue, nil, reportError("appId must have at least 1 elements") + } + if strlen(r.appId) > 256 { + return localVarReturnValue, nil, reportError("appId must have less than 256 elements") + } + if strlen(r.endpointId) < 1 { + return localVarReturnValue, nil, reportError("endpointId must have at least 1 elements") + } + if strlen(r.endpointId) > 256 { + return localVarReturnValue, nil, reportError("endpointId must have less than 256 elements") + } + + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + if r.statusCodeClass != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status_code_class", r.statusCodeClass, "form", "") + } + if r.channel != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "channel", r.channel, "form", "") + } + if r.tag != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "form", "") + } + if r.before != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "before", r.before, "form", "") + } + if r.after != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "after", r.after, "form", "") + } + if r.eventTypes != nil { + t := *r.eventTypes + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "event_types", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "event_types", t, "form", "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiV1MessageAttemptExpungeContentRequest struct { ctx context.Context ApiService *MessageAttemptAPIService diff --git a/go/internal/openapi/model_count_out.go b/go/internal/openapi/model_count_out.go new file mode 100644 index 000000000..82065e8fb --- /dev/null +++ b/go/internal/openapi/model_count_out.go @@ -0,0 +1,188 @@ +/* +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" + "bytes" + "fmt" +) + +// checks if the CountOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CountOut{} + +// CountOut struct for CountOut +type CountOut struct { + // There's a ceiling to how many attempts we count. When the limit is reached, this will be `true` to indicate the actual count is higher than given. + Approximated bool `json:"approximated"` + // The count of attempts matching the query. + Count int32 `json:"count"` +} + +type _CountOut CountOut + +// NewCountOut instantiates a new CountOut 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 NewCountOut(approximated bool, count int32) *CountOut { + this := CountOut{} + this.Approximated = approximated + this.Count = count + return &this +} + +// NewCountOutWithDefaults instantiates a new CountOut 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 NewCountOutWithDefaults() *CountOut { + this := CountOut{} + return &this +} + +// GetApproximated returns the Approximated field value +func (o *CountOut) GetApproximated() bool { + if o == nil { + var ret bool + return ret + } + + return o.Approximated +} + +// GetApproximatedOk returns a tuple with the Approximated field value +// and a boolean to check if the value has been set. +func (o *CountOut) GetApproximatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Approximated, true +} + +// SetApproximated sets field value +func (o *CountOut) SetApproximated(v bool) { + o.Approximated = v +} + +// GetCount returns the Count field value +func (o *CountOut) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *CountOut) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *CountOut) SetCount(v int32) { + o.Count = v +} + +func (o CountOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CountOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["approximated"] = o.Approximated + toSerialize["count"] = o.Count + return toSerialize, nil +} + +func (o *CountOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "approximated", + "count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCountOut := _CountOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCountOut) + + if err != nil { + return err + } + + *o = CountOut(varCountOut) + + return err +} + +type NullableCountOut struct { + value *CountOut + isSet bool +} + +func (v NullableCountOut) Get() *CountOut { + return v.value +} + +func (v *NullableCountOut) Set(val *CountOut) { + v.value = val + v.isSet = true +} + +func (v NullableCountOut) IsSet() bool { + return v.isSet +} + +func (v *NullableCountOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCountOut(val *CountOut) *NullableCountOut { + return &NullableCountOut{value: val, isSet: true} +} + +func (v NullableCountOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCountOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/internal/openapi/model_environment_in.go b/go/internal/openapi/model_environment_in.go index fbdd4a64b..8a916b095 100644 --- a/go/internal/openapi/model_environment_in.go +++ b/go/internal/openapi/model_environment_in.go @@ -12,7 +12,6 @@ package openapi import ( "encoding/json" - "time" "bytes" "fmt" ) @@ -22,11 +21,9 @@ var _ MappedNullable = &EnvironmentIn{} // EnvironmentIn struct for EnvironmentIn type EnvironmentIn struct { - CreatedAt time.Time `json:"createdAt"` EventTypes []EventTypeIn `json:"eventTypes,omitempty"` - Settings *SettingsIn `json:"settings,omitempty"` + Settings map[string]map[string]interface{} `json:"settings"` TransformationTemplates []TemplateIn `json:"transformationTemplates,omitempty"` - Version int32 `json:"version"` } type _EnvironmentIn EnvironmentIn @@ -35,10 +32,9 @@ type _EnvironmentIn EnvironmentIn // 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 NewEnvironmentIn(createdAt time.Time, version int32) *EnvironmentIn { +func NewEnvironmentIn(settings map[string]map[string]interface{}) *EnvironmentIn { this := EnvironmentIn{} - this.CreatedAt = createdAt - this.Version = version + this.Settings = settings return &this } @@ -50,30 +46,6 @@ func NewEnvironmentInWithDefaults() *EnvironmentIn { return &this } -// GetCreatedAt returns the CreatedAt field value -func (o *EnvironmentIn) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *EnvironmentIn) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *EnvironmentIn) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - // GetEventTypes returns the EventTypes field value if set, zero value otherwise (both if not set or set to explicit null). func (o *EnvironmentIn) GetEventTypes() []EventTypeIn { if o == nil { @@ -107,36 +79,30 @@ func (o *EnvironmentIn) SetEventTypes(v []EventTypeIn) { o.EventTypes = v } -// GetSettings returns the Settings field value if set, zero value otherwise. -func (o *EnvironmentIn) GetSettings() SettingsIn { - if o == nil || IsNil(o.Settings) { - var ret SettingsIn +// GetSettings returns the Settings field value +// If the value is explicit nil, the zero value for map[string]map[string]interface{} will be returned +func (o *EnvironmentIn) GetSettings() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} return ret } - return *o.Settings + + return o.Settings } -// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise +// GetSettingsOk returns a tuple with the Settings field value // and a boolean to check if the value has been set. -func (o *EnvironmentIn) GetSettingsOk() (*SettingsIn, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentIn) GetSettingsOk() (map[string]map[string]interface{}, bool) { if o == nil || IsNil(o.Settings) { - return nil, false + return map[string]map[string]interface{}{}, false } return o.Settings, true } -// HasSettings returns a boolean if a field has been set. -func (o *EnvironmentIn) HasSettings() bool { - if o != nil && !IsNil(o.Settings) { - return true - } - - return false -} - -// SetSettings gets a reference to the given SettingsIn and assigns it to the Settings field. -func (o *EnvironmentIn) SetSettings(v SettingsIn) { - o.Settings = &v +// SetSettings sets field value +func (o *EnvironmentIn) SetSettings(v map[string]map[string]interface{}) { + o.Settings = v } // GetTransformationTemplates returns the TransformationTemplates field value if set, zero value otherwise (both if not set or set to explicit null). @@ -172,30 +138,6 @@ func (o *EnvironmentIn) SetTransformationTemplates(v []TemplateIn) { o.TransformationTemplates = v } -// GetVersion returns the Version field value -func (o *EnvironmentIn) GetVersion() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *EnvironmentIn) GetVersionOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *EnvironmentIn) SetVersion(v int32) { - o.Version = v -} - func (o EnvironmentIn) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -206,17 +148,15 @@ func (o EnvironmentIn) MarshalJSON() ([]byte, error) { func (o EnvironmentIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["createdAt"] = o.CreatedAt if o.EventTypes != nil { toSerialize["eventTypes"] = o.EventTypes } - if !IsNil(o.Settings) { + if o.Settings != nil { toSerialize["settings"] = o.Settings } if o.TransformationTemplates != nil { toSerialize["transformationTemplates"] = o.TransformationTemplates } - toSerialize["version"] = o.Version return toSerialize, nil } @@ -225,8 +165,7 @@ func (o *EnvironmentIn) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "createdAt", - "version", + "settings", } allProperties := make(map[string]interface{}) diff --git a/go/internal/openapi/model_environment_out.go b/go/internal/openapi/model_environment_out.go index 697938bec..b6fcdd16c 100644 --- a/go/internal/openapi/model_environment_out.go +++ b/go/internal/openapi/model_environment_out.go @@ -24,7 +24,7 @@ var _ MappedNullable = &EnvironmentOut{} type EnvironmentOut struct { CreatedAt time.Time `json:"createdAt"` EventTypes []EventTypeOut `json:"eventTypes"` - Settings *SettingsOut `json:"settings,omitempty"` + Settings map[string]map[string]interface{} `json:"settings"` TransformationTemplates []TemplateOut `json:"transformationTemplates"` Version *int32 `json:"version,omitempty"` } @@ -35,10 +35,11 @@ type _EnvironmentOut EnvironmentOut // 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 NewEnvironmentOut(createdAt time.Time, eventTypes []EventTypeOut, transformationTemplates []TemplateOut) *EnvironmentOut { +func NewEnvironmentOut(createdAt time.Time, eventTypes []EventTypeOut, settings map[string]map[string]interface{}, transformationTemplates []TemplateOut) *EnvironmentOut { this := EnvironmentOut{} this.CreatedAt = createdAt this.EventTypes = eventTypes + this.Settings = settings this.TransformationTemplates = transformationTemplates var version int32 = 1 this.Version = &version @@ -103,36 +104,30 @@ func (o *EnvironmentOut) SetEventTypes(v []EventTypeOut) { o.EventTypes = v } -// GetSettings returns the Settings field value if set, zero value otherwise. -func (o *EnvironmentOut) GetSettings() SettingsOut { - if o == nil || IsNil(o.Settings) { - var ret SettingsOut +// GetSettings returns the Settings field value +// If the value is explicit nil, the zero value for map[string]map[string]interface{} will be returned +func (o *EnvironmentOut) GetSettings() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} return ret } - return *o.Settings + + return o.Settings } -// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise +// GetSettingsOk returns a tuple with the Settings field value // and a boolean to check if the value has been set. -func (o *EnvironmentOut) GetSettingsOk() (*SettingsOut, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnvironmentOut) GetSettingsOk() (map[string]map[string]interface{}, bool) { if o == nil || IsNil(o.Settings) { - return nil, false + return map[string]map[string]interface{}{}, false } return o.Settings, true } -// HasSettings returns a boolean if a field has been set. -func (o *EnvironmentOut) HasSettings() bool { - if o != nil && !IsNil(o.Settings) { - return true - } - - return false -} - -// SetSettings gets a reference to the given SettingsOut and assigns it to the Settings field. -func (o *EnvironmentOut) SetSettings(v SettingsOut) { - o.Settings = &v +// SetSettings sets field value +func (o *EnvironmentOut) SetSettings(v map[string]map[string]interface{}) { + o.Settings = v } // GetTransformationTemplates returns the TransformationTemplates field value @@ -203,7 +198,7 @@ func (o EnvironmentOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["createdAt"] = o.CreatedAt toSerialize["eventTypes"] = o.EventTypes - if !IsNil(o.Settings) { + if o.Settings != nil { toSerialize["settings"] = o.Settings } toSerialize["transformationTemplates"] = o.TransformationTemplates @@ -220,6 +215,7 @@ func (o *EnvironmentOut) UnmarshalJSON(data []byte) (err error) { requiredProperties := []string{ "createdAt", "eventTypes", + "settings", "transformationTemplates", } diff --git a/go/internal/openapi/model_settings_in.go b/go/internal/openapi/model_settings_in.go deleted file mode 100644 index eafa89094..000000000 --- a/go/internal/openapi/model_settings_in.go +++ /dev/null @@ -1,870 +0,0 @@ -/* -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" -) - -// checks if the SettingsIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SettingsIn{} - -// SettingsIn struct for SettingsIn -type SettingsIn struct { - ColorPaletteDark *CustomColorPalette `json:"colorPaletteDark,omitempty"` - ColorPaletteLight *CustomColorPalette `json:"colorPaletteLight,omitempty"` - CustomBaseFontSize NullableInt32 `json:"customBaseFontSize,omitempty"` - CustomColor NullableString `json:"customColor,omitempty"` - CustomFontFamily NullableString `json:"customFontFamily,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_ ]+$"` - CustomFontFamilyUrl NullableString `json:"customFontFamilyUrl,omitempty"` - CustomLogoUrl NullableString `json:"customLogoUrl,omitempty"` - CustomStringsOverride *CustomStringsOverride `json:"customStringsOverride,omitempty"` - CustomThemeOverride *CustomThemeOverride `json:"customThemeOverride,omitempty"` - DisableEndpointOnFailure *bool `json:"disableEndpointOnFailure,omitempty"` - DisplayName NullableString `json:"displayName,omitempty"` - EnableChannels *bool `json:"enableChannels,omitempty"` - EnableIntegrationManagement *bool `json:"enableIntegrationManagement,omitempty"` - EnableTransformations *bool `json:"enableTransformations,omitempty"` - EnforceHttps *bool `json:"enforceHttps,omitempty"` - EventCatalogPublished *bool `json:"eventCatalogPublished,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - ShowUseSvixPlay *bool `json:"showUseSvixPlay,omitempty"` - WipeSuccessfulPayload *bool `json:"wipeSuccessfulPayload,omitempty"` -} - -// NewSettingsIn instantiates a new SettingsIn 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 NewSettingsIn() *SettingsIn { - this := SettingsIn{} - var disableEndpointOnFailure bool = true - this.DisableEndpointOnFailure = &disableEndpointOnFailure - var enableChannels bool = false - this.EnableChannels = &enableChannels - var enableIntegrationManagement bool = false - this.EnableIntegrationManagement = &enableIntegrationManagement - var enableTransformations bool = false - this.EnableTransformations = &enableTransformations - var enforceHttps bool = true - this.EnforceHttps = &enforceHttps - var eventCatalogPublished bool = false - this.EventCatalogPublished = &eventCatalogPublished - var readOnly bool = false - this.ReadOnly = &readOnly - var showUseSvixPlay bool = true - this.ShowUseSvixPlay = &showUseSvixPlay - var wipeSuccessfulPayload bool = false - this.WipeSuccessfulPayload = &wipeSuccessfulPayload - return &this -} - -// NewSettingsInWithDefaults instantiates a new SettingsIn 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 NewSettingsInWithDefaults() *SettingsIn { - this := SettingsIn{} - var disableEndpointOnFailure bool = true - this.DisableEndpointOnFailure = &disableEndpointOnFailure - var enableChannels bool = false - this.EnableChannels = &enableChannels - var enableIntegrationManagement bool = false - this.EnableIntegrationManagement = &enableIntegrationManagement - var enableTransformations bool = false - this.EnableTransformations = &enableTransformations - var enforceHttps bool = true - this.EnforceHttps = &enforceHttps - var eventCatalogPublished bool = false - this.EventCatalogPublished = &eventCatalogPublished - var readOnly bool = false - this.ReadOnly = &readOnly - var showUseSvixPlay bool = true - this.ShowUseSvixPlay = &showUseSvixPlay - var wipeSuccessfulPayload bool = false - this.WipeSuccessfulPayload = &wipeSuccessfulPayload - return &this -} - -// GetColorPaletteDark returns the ColorPaletteDark field value if set, zero value otherwise. -func (o *SettingsIn) GetColorPaletteDark() CustomColorPalette { - if o == nil || IsNil(o.ColorPaletteDark) { - var ret CustomColorPalette - return ret - } - return *o.ColorPaletteDark -} - -// GetColorPaletteDarkOk returns a tuple with the ColorPaletteDark field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetColorPaletteDarkOk() (*CustomColorPalette, bool) { - if o == nil || IsNil(o.ColorPaletteDark) { - return nil, false - } - return o.ColorPaletteDark, true -} - -// HasColorPaletteDark returns a boolean if a field has been set. -func (o *SettingsIn) HasColorPaletteDark() bool { - if o != nil && !IsNil(o.ColorPaletteDark) { - return true - } - - return false -} - -// SetColorPaletteDark gets a reference to the given CustomColorPalette and assigns it to the ColorPaletteDark field. -func (o *SettingsIn) SetColorPaletteDark(v CustomColorPalette) { - o.ColorPaletteDark = &v -} - -// GetColorPaletteLight returns the ColorPaletteLight field value if set, zero value otherwise. -func (o *SettingsIn) GetColorPaletteLight() CustomColorPalette { - if o == nil || IsNil(o.ColorPaletteLight) { - var ret CustomColorPalette - return ret - } - return *o.ColorPaletteLight -} - -// GetColorPaletteLightOk returns a tuple with the ColorPaletteLight field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetColorPaletteLightOk() (*CustomColorPalette, bool) { - if o == nil || IsNil(o.ColorPaletteLight) { - return nil, false - } - return o.ColorPaletteLight, true -} - -// HasColorPaletteLight returns a boolean if a field has been set. -func (o *SettingsIn) HasColorPaletteLight() bool { - if o != nil && !IsNil(o.ColorPaletteLight) { - return true - } - - return false -} - -// SetColorPaletteLight gets a reference to the given CustomColorPalette and assigns it to the ColorPaletteLight field. -func (o *SettingsIn) SetColorPaletteLight(v CustomColorPalette) { - o.ColorPaletteLight = &v -} - -// GetCustomBaseFontSize returns the CustomBaseFontSize field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsIn) GetCustomBaseFontSize() int32 { - if o == nil || IsNil(o.CustomBaseFontSize.Get()) { - var ret int32 - return ret - } - return *o.CustomBaseFontSize.Get() -} - -// GetCustomBaseFontSizeOk returns a tuple with the CustomBaseFontSize 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 *SettingsIn) GetCustomBaseFontSizeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.CustomBaseFontSize.Get(), o.CustomBaseFontSize.IsSet() -} - -// HasCustomBaseFontSize returns a boolean if a field has been set. -func (o *SettingsIn) HasCustomBaseFontSize() bool { - if o != nil && o.CustomBaseFontSize.IsSet() { - return true - } - - return false -} - -// SetCustomBaseFontSize gets a reference to the given NullableInt32 and assigns it to the CustomBaseFontSize field. -func (o *SettingsIn) SetCustomBaseFontSize(v int32) { - o.CustomBaseFontSize.Set(&v) -} -// SetCustomBaseFontSizeNil sets the value for CustomBaseFontSize to be an explicit nil -func (o *SettingsIn) SetCustomBaseFontSizeNil() { - o.CustomBaseFontSize.Set(nil) -} - -// UnsetCustomBaseFontSize ensures that no value is present for CustomBaseFontSize, not even an explicit nil -func (o *SettingsIn) UnsetCustomBaseFontSize() { - o.CustomBaseFontSize.Unset() -} - -// GetCustomColor returns the CustomColor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsIn) GetCustomColor() string { - if o == nil || IsNil(o.CustomColor.Get()) { - var ret string - return ret - } - return *o.CustomColor.Get() -} - -// GetCustomColorOk returns a tuple with the CustomColor 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 *SettingsIn) GetCustomColorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CustomColor.Get(), o.CustomColor.IsSet() -} - -// HasCustomColor returns a boolean if a field has been set. -func (o *SettingsIn) HasCustomColor() bool { - if o != nil && o.CustomColor.IsSet() { - return true - } - - return false -} - -// SetCustomColor gets a reference to the given NullableString and assigns it to the CustomColor field. -func (o *SettingsIn) SetCustomColor(v string) { - o.CustomColor.Set(&v) -} -// SetCustomColorNil sets the value for CustomColor to be an explicit nil -func (o *SettingsIn) SetCustomColorNil() { - o.CustomColor.Set(nil) -} - -// UnsetCustomColor ensures that no value is present for CustomColor, not even an explicit nil -func (o *SettingsIn) UnsetCustomColor() { - o.CustomColor.Unset() -} - -// GetCustomFontFamily returns the CustomFontFamily field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsIn) GetCustomFontFamily() string { - if o == nil || IsNil(o.CustomFontFamily.Get()) { - var ret string - return ret - } - return *o.CustomFontFamily.Get() -} - -// GetCustomFontFamilyOk returns a tuple with the CustomFontFamily 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 *SettingsIn) GetCustomFontFamilyOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CustomFontFamily.Get(), o.CustomFontFamily.IsSet() -} - -// HasCustomFontFamily returns a boolean if a field has been set. -func (o *SettingsIn) HasCustomFontFamily() bool { - if o != nil && o.CustomFontFamily.IsSet() { - return true - } - - return false -} - -// SetCustomFontFamily gets a reference to the given NullableString and assigns it to the CustomFontFamily field. -func (o *SettingsIn) SetCustomFontFamily(v string) { - o.CustomFontFamily.Set(&v) -} -// SetCustomFontFamilyNil sets the value for CustomFontFamily to be an explicit nil -func (o *SettingsIn) SetCustomFontFamilyNil() { - o.CustomFontFamily.Set(nil) -} - -// UnsetCustomFontFamily ensures that no value is present for CustomFontFamily, not even an explicit nil -func (o *SettingsIn) UnsetCustomFontFamily() { - o.CustomFontFamily.Unset() -} - -// GetCustomFontFamilyUrl returns the CustomFontFamilyUrl field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsIn) GetCustomFontFamilyUrl() string { - if o == nil || IsNil(o.CustomFontFamilyUrl.Get()) { - var ret string - return ret - } - return *o.CustomFontFamilyUrl.Get() -} - -// GetCustomFontFamilyUrlOk returns a tuple with the CustomFontFamilyUrl 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 *SettingsIn) GetCustomFontFamilyUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CustomFontFamilyUrl.Get(), o.CustomFontFamilyUrl.IsSet() -} - -// HasCustomFontFamilyUrl returns a boolean if a field has been set. -func (o *SettingsIn) HasCustomFontFamilyUrl() bool { - if o != nil && o.CustomFontFamilyUrl.IsSet() { - return true - } - - return false -} - -// SetCustomFontFamilyUrl gets a reference to the given NullableString and assigns it to the CustomFontFamilyUrl field. -func (o *SettingsIn) SetCustomFontFamilyUrl(v string) { - o.CustomFontFamilyUrl.Set(&v) -} -// SetCustomFontFamilyUrlNil sets the value for CustomFontFamilyUrl to be an explicit nil -func (o *SettingsIn) SetCustomFontFamilyUrlNil() { - o.CustomFontFamilyUrl.Set(nil) -} - -// UnsetCustomFontFamilyUrl ensures that no value is present for CustomFontFamilyUrl, not even an explicit nil -func (o *SettingsIn) UnsetCustomFontFamilyUrl() { - o.CustomFontFamilyUrl.Unset() -} - -// GetCustomLogoUrl returns the CustomLogoUrl field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsIn) GetCustomLogoUrl() string { - if o == nil || IsNil(o.CustomLogoUrl.Get()) { - var ret string - return ret - } - return *o.CustomLogoUrl.Get() -} - -// GetCustomLogoUrlOk returns a tuple with the CustomLogoUrl 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 *SettingsIn) GetCustomLogoUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CustomLogoUrl.Get(), o.CustomLogoUrl.IsSet() -} - -// HasCustomLogoUrl returns a boolean if a field has been set. -func (o *SettingsIn) HasCustomLogoUrl() bool { - if o != nil && o.CustomLogoUrl.IsSet() { - return true - } - - return false -} - -// SetCustomLogoUrl gets a reference to the given NullableString and assigns it to the CustomLogoUrl field. -func (o *SettingsIn) SetCustomLogoUrl(v string) { - o.CustomLogoUrl.Set(&v) -} -// SetCustomLogoUrlNil sets the value for CustomLogoUrl to be an explicit nil -func (o *SettingsIn) SetCustomLogoUrlNil() { - o.CustomLogoUrl.Set(nil) -} - -// UnsetCustomLogoUrl ensures that no value is present for CustomLogoUrl, not even an explicit nil -func (o *SettingsIn) UnsetCustomLogoUrl() { - o.CustomLogoUrl.Unset() -} - -// GetCustomStringsOverride returns the CustomStringsOverride field value if set, zero value otherwise. -func (o *SettingsIn) GetCustomStringsOverride() CustomStringsOverride { - if o == nil || IsNil(o.CustomStringsOverride) { - var ret CustomStringsOverride - return ret - } - return *o.CustomStringsOverride -} - -// GetCustomStringsOverrideOk returns a tuple with the CustomStringsOverride field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetCustomStringsOverrideOk() (*CustomStringsOverride, bool) { - if o == nil || IsNil(o.CustomStringsOverride) { - return nil, false - } - return o.CustomStringsOverride, true -} - -// HasCustomStringsOverride returns a boolean if a field has been set. -func (o *SettingsIn) HasCustomStringsOverride() bool { - if o != nil && !IsNil(o.CustomStringsOverride) { - return true - } - - return false -} - -// SetCustomStringsOverride gets a reference to the given CustomStringsOverride and assigns it to the CustomStringsOverride field. -func (o *SettingsIn) SetCustomStringsOverride(v CustomStringsOverride) { - o.CustomStringsOverride = &v -} - -// GetCustomThemeOverride returns the CustomThemeOverride field value if set, zero value otherwise. -func (o *SettingsIn) GetCustomThemeOverride() CustomThemeOverride { - if o == nil || IsNil(o.CustomThemeOverride) { - var ret CustomThemeOverride - return ret - } - return *o.CustomThemeOverride -} - -// GetCustomThemeOverrideOk returns a tuple with the CustomThemeOverride field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetCustomThemeOverrideOk() (*CustomThemeOverride, bool) { - if o == nil || IsNil(o.CustomThemeOverride) { - return nil, false - } - return o.CustomThemeOverride, true -} - -// HasCustomThemeOverride returns a boolean if a field has been set. -func (o *SettingsIn) HasCustomThemeOverride() bool { - if o != nil && !IsNil(o.CustomThemeOverride) { - return true - } - - return false -} - -// SetCustomThemeOverride gets a reference to the given CustomThemeOverride and assigns it to the CustomThemeOverride field. -func (o *SettingsIn) SetCustomThemeOverride(v CustomThemeOverride) { - o.CustomThemeOverride = &v -} - -// GetDisableEndpointOnFailure returns the DisableEndpointOnFailure field value if set, zero value otherwise. -func (o *SettingsIn) GetDisableEndpointOnFailure() bool { - if o == nil || IsNil(o.DisableEndpointOnFailure) { - var ret bool - return ret - } - return *o.DisableEndpointOnFailure -} - -// GetDisableEndpointOnFailureOk returns a tuple with the DisableEndpointOnFailure field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetDisableEndpointOnFailureOk() (*bool, bool) { - if o == nil || IsNil(o.DisableEndpointOnFailure) { - return nil, false - } - return o.DisableEndpointOnFailure, true -} - -// HasDisableEndpointOnFailure returns a boolean if a field has been set. -func (o *SettingsIn) HasDisableEndpointOnFailure() bool { - if o != nil && !IsNil(o.DisableEndpointOnFailure) { - return true - } - - return false -} - -// SetDisableEndpointOnFailure gets a reference to the given bool and assigns it to the DisableEndpointOnFailure field. -func (o *SettingsIn) SetDisableEndpointOnFailure(v bool) { - o.DisableEndpointOnFailure = &v -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsIn) GetDisplayName() string { - if o == nil || IsNil(o.DisplayName.Get()) { - var ret string - return ret - } - return *o.DisplayName.Get() -} - -// GetDisplayNameOk returns a tuple with the DisplayName 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 *SettingsIn) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DisplayName.Get(), o.DisplayName.IsSet() -} - -// HasDisplayName returns a boolean if a field has been set. -func (o *SettingsIn) HasDisplayName() bool { - if o != nil && o.DisplayName.IsSet() { - return true - } - - return false -} - -// SetDisplayName gets a reference to the given NullableString and assigns it to the DisplayName field. -func (o *SettingsIn) SetDisplayName(v string) { - o.DisplayName.Set(&v) -} -// SetDisplayNameNil sets the value for DisplayName to be an explicit nil -func (o *SettingsIn) SetDisplayNameNil() { - o.DisplayName.Set(nil) -} - -// UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil -func (o *SettingsIn) UnsetDisplayName() { - o.DisplayName.Unset() -} - -// GetEnableChannels returns the EnableChannels field value if set, zero value otherwise. -func (o *SettingsIn) GetEnableChannels() bool { - if o == nil || IsNil(o.EnableChannels) { - var ret bool - return ret - } - return *o.EnableChannels -} - -// GetEnableChannelsOk returns a tuple with the EnableChannels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetEnableChannelsOk() (*bool, bool) { - if o == nil || IsNil(o.EnableChannels) { - return nil, false - } - return o.EnableChannels, true -} - -// HasEnableChannels returns a boolean if a field has been set. -func (o *SettingsIn) HasEnableChannels() bool { - if o != nil && !IsNil(o.EnableChannels) { - return true - } - - return false -} - -// SetEnableChannels gets a reference to the given bool and assigns it to the EnableChannels field. -func (o *SettingsIn) SetEnableChannels(v bool) { - o.EnableChannels = &v -} - -// GetEnableIntegrationManagement returns the EnableIntegrationManagement field value if set, zero value otherwise. -func (o *SettingsIn) GetEnableIntegrationManagement() bool { - if o == nil || IsNil(o.EnableIntegrationManagement) { - var ret bool - return ret - } - return *o.EnableIntegrationManagement -} - -// GetEnableIntegrationManagementOk returns a tuple with the EnableIntegrationManagement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetEnableIntegrationManagementOk() (*bool, bool) { - if o == nil || IsNil(o.EnableIntegrationManagement) { - return nil, false - } - return o.EnableIntegrationManagement, true -} - -// HasEnableIntegrationManagement returns a boolean if a field has been set. -func (o *SettingsIn) HasEnableIntegrationManagement() bool { - if o != nil && !IsNil(o.EnableIntegrationManagement) { - return true - } - - return false -} - -// SetEnableIntegrationManagement gets a reference to the given bool and assigns it to the EnableIntegrationManagement field. -func (o *SettingsIn) SetEnableIntegrationManagement(v bool) { - o.EnableIntegrationManagement = &v -} - -// GetEnableTransformations returns the EnableTransformations field value if set, zero value otherwise. -func (o *SettingsIn) GetEnableTransformations() bool { - if o == nil || IsNil(o.EnableTransformations) { - var ret bool - return ret - } - return *o.EnableTransformations -} - -// GetEnableTransformationsOk returns a tuple with the EnableTransformations field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetEnableTransformationsOk() (*bool, bool) { - if o == nil || IsNil(o.EnableTransformations) { - return nil, false - } - return o.EnableTransformations, true -} - -// HasEnableTransformations returns a boolean if a field has been set. -func (o *SettingsIn) HasEnableTransformations() bool { - if o != nil && !IsNil(o.EnableTransformations) { - return true - } - - return false -} - -// SetEnableTransformations gets a reference to the given bool and assigns it to the EnableTransformations field. -func (o *SettingsIn) SetEnableTransformations(v bool) { - o.EnableTransformations = &v -} - -// GetEnforceHttps returns the EnforceHttps field value if set, zero value otherwise. -func (o *SettingsIn) GetEnforceHttps() bool { - if o == nil || IsNil(o.EnforceHttps) { - var ret bool - return ret - } - return *o.EnforceHttps -} - -// GetEnforceHttpsOk returns a tuple with the EnforceHttps field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetEnforceHttpsOk() (*bool, bool) { - if o == nil || IsNil(o.EnforceHttps) { - return nil, false - } - return o.EnforceHttps, true -} - -// HasEnforceHttps returns a boolean if a field has been set. -func (o *SettingsIn) HasEnforceHttps() bool { - if o != nil && !IsNil(o.EnforceHttps) { - return true - } - - return false -} - -// SetEnforceHttps gets a reference to the given bool and assigns it to the EnforceHttps field. -func (o *SettingsIn) SetEnforceHttps(v bool) { - o.EnforceHttps = &v -} - -// GetEventCatalogPublished returns the EventCatalogPublished field value if set, zero value otherwise. -func (o *SettingsIn) GetEventCatalogPublished() bool { - if o == nil || IsNil(o.EventCatalogPublished) { - var ret bool - return ret - } - return *o.EventCatalogPublished -} - -// GetEventCatalogPublishedOk returns a tuple with the EventCatalogPublished field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetEventCatalogPublishedOk() (*bool, bool) { - if o == nil || IsNil(o.EventCatalogPublished) { - return nil, false - } - return o.EventCatalogPublished, true -} - -// HasEventCatalogPublished returns a boolean if a field has been set. -func (o *SettingsIn) HasEventCatalogPublished() bool { - if o != nil && !IsNil(o.EventCatalogPublished) { - return true - } - - return false -} - -// SetEventCatalogPublished gets a reference to the given bool and assigns it to the EventCatalogPublished field. -func (o *SettingsIn) SetEventCatalogPublished(v bool) { - o.EventCatalogPublished = &v -} - -// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. -func (o *SettingsIn) GetReadOnly() bool { - if o == nil || IsNil(o.ReadOnly) { - var ret bool - return ret - } - return *o.ReadOnly -} - -// GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetReadOnlyOk() (*bool, bool) { - if o == nil || IsNil(o.ReadOnly) { - return nil, false - } - return o.ReadOnly, true -} - -// HasReadOnly returns a boolean if a field has been set. -func (o *SettingsIn) HasReadOnly() bool { - if o != nil && !IsNil(o.ReadOnly) { - return true - } - - return false -} - -// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. -func (o *SettingsIn) SetReadOnly(v bool) { - o.ReadOnly = &v -} - -// GetShowUseSvixPlay returns the ShowUseSvixPlay field value if set, zero value otherwise. -func (o *SettingsIn) GetShowUseSvixPlay() bool { - if o == nil || IsNil(o.ShowUseSvixPlay) { - var ret bool - return ret - } - return *o.ShowUseSvixPlay -} - -// GetShowUseSvixPlayOk returns a tuple with the ShowUseSvixPlay field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetShowUseSvixPlayOk() (*bool, bool) { - if o == nil || IsNil(o.ShowUseSvixPlay) { - return nil, false - } - return o.ShowUseSvixPlay, true -} - -// HasShowUseSvixPlay returns a boolean if a field has been set. -func (o *SettingsIn) HasShowUseSvixPlay() bool { - if o != nil && !IsNil(o.ShowUseSvixPlay) { - return true - } - - return false -} - -// SetShowUseSvixPlay gets a reference to the given bool and assigns it to the ShowUseSvixPlay field. -func (o *SettingsIn) SetShowUseSvixPlay(v bool) { - o.ShowUseSvixPlay = &v -} - -// GetWipeSuccessfulPayload returns the WipeSuccessfulPayload field value if set, zero value otherwise. -func (o *SettingsIn) GetWipeSuccessfulPayload() bool { - if o == nil || IsNil(o.WipeSuccessfulPayload) { - var ret bool - return ret - } - return *o.WipeSuccessfulPayload -} - -// GetWipeSuccessfulPayloadOk returns a tuple with the WipeSuccessfulPayload field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsIn) GetWipeSuccessfulPayloadOk() (*bool, bool) { - if o == nil || IsNil(o.WipeSuccessfulPayload) { - return nil, false - } - return o.WipeSuccessfulPayload, true -} - -// HasWipeSuccessfulPayload returns a boolean if a field has been set. -func (o *SettingsIn) HasWipeSuccessfulPayload() bool { - if o != nil && !IsNil(o.WipeSuccessfulPayload) { - return true - } - - return false -} - -// SetWipeSuccessfulPayload gets a reference to the given bool and assigns it to the WipeSuccessfulPayload field. -func (o *SettingsIn) SetWipeSuccessfulPayload(v bool) { - o.WipeSuccessfulPayload = &v -} - -func (o SettingsIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SettingsIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ColorPaletteDark) { - toSerialize["colorPaletteDark"] = o.ColorPaletteDark - } - if !IsNil(o.ColorPaletteLight) { - toSerialize["colorPaletteLight"] = o.ColorPaletteLight - } - if o.CustomBaseFontSize.IsSet() { - toSerialize["customBaseFontSize"] = o.CustomBaseFontSize.Get() - } - if o.CustomColor.IsSet() { - toSerialize["customColor"] = o.CustomColor.Get() - } - if o.CustomFontFamily.IsSet() { - toSerialize["customFontFamily"] = o.CustomFontFamily.Get() - } - if o.CustomFontFamilyUrl.IsSet() { - toSerialize["customFontFamilyUrl"] = o.CustomFontFamilyUrl.Get() - } - if o.CustomLogoUrl.IsSet() { - toSerialize["customLogoUrl"] = o.CustomLogoUrl.Get() - } - if !IsNil(o.CustomStringsOverride) { - toSerialize["customStringsOverride"] = o.CustomStringsOverride - } - if !IsNil(o.CustomThemeOverride) { - toSerialize["customThemeOverride"] = o.CustomThemeOverride - } - if !IsNil(o.DisableEndpointOnFailure) { - toSerialize["disableEndpointOnFailure"] = o.DisableEndpointOnFailure - } - if o.DisplayName.IsSet() { - toSerialize["displayName"] = o.DisplayName.Get() - } - if !IsNil(o.EnableChannels) { - toSerialize["enableChannels"] = o.EnableChannels - } - if !IsNil(o.EnableIntegrationManagement) { - toSerialize["enableIntegrationManagement"] = o.EnableIntegrationManagement - } - if !IsNil(o.EnableTransformations) { - toSerialize["enableTransformations"] = o.EnableTransformations - } - if !IsNil(o.EnforceHttps) { - toSerialize["enforceHttps"] = o.EnforceHttps - } - if !IsNil(o.EventCatalogPublished) { - toSerialize["eventCatalogPublished"] = o.EventCatalogPublished - } - if !IsNil(o.ReadOnly) { - toSerialize["readOnly"] = o.ReadOnly - } - if !IsNil(o.ShowUseSvixPlay) { - toSerialize["showUseSvixPlay"] = o.ShowUseSvixPlay - } - if !IsNil(o.WipeSuccessfulPayload) { - toSerialize["wipeSuccessfulPayload"] = o.WipeSuccessfulPayload - } - return toSerialize, nil -} - -type NullableSettingsIn struct { - value *SettingsIn - isSet bool -} - -func (v NullableSettingsIn) Get() *SettingsIn { - return v.value -} - -func (v *NullableSettingsIn) Set(val *SettingsIn) { - v.value = val - v.isSet = true -} - -func (v NullableSettingsIn) IsSet() bool { - return v.isSet -} - -func (v *NullableSettingsIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSettingsIn(val *SettingsIn) *NullableSettingsIn { - return &NullableSettingsIn{value: val, isSet: true} -} - -func (v NullableSettingsIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSettingsIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/go/internal/openapi/model_settings_out.go b/go/internal/openapi/model_settings_out.go deleted file mode 100644 index d82acc74e..000000000 --- a/go/internal/openapi/model_settings_out.go +++ /dev/null @@ -1,870 +0,0 @@ -/* -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" -) - -// checks if the SettingsOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SettingsOut{} - -// SettingsOut struct for SettingsOut -type SettingsOut struct { - ColorPaletteDark *CustomColorPalette `json:"colorPaletteDark,omitempty"` - ColorPaletteLight *CustomColorPalette `json:"colorPaletteLight,omitempty"` - CustomBaseFontSize NullableInt32 `json:"customBaseFontSize,omitempty"` - CustomColor NullableString `json:"customColor,omitempty"` - CustomFontFamily NullableString `json:"customFontFamily,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_ ]+$"` - CustomFontFamilyUrl NullableString `json:"customFontFamilyUrl,omitempty"` - CustomLogoUrl NullableString `json:"customLogoUrl,omitempty"` - CustomStringsOverride *CustomStringsOverride `json:"customStringsOverride,omitempty"` - CustomThemeOverride *CustomThemeOverride `json:"customThemeOverride,omitempty"` - DisableEndpointOnFailure *bool `json:"disableEndpointOnFailure,omitempty"` - DisplayName NullableString `json:"displayName,omitempty"` - EnableChannels *bool `json:"enableChannels,omitempty"` - EnableIntegrationManagement *bool `json:"enableIntegrationManagement,omitempty"` - EnableTransformations *bool `json:"enableTransformations,omitempty"` - EnforceHttps *bool `json:"enforceHttps,omitempty"` - EventCatalogPublished *bool `json:"eventCatalogPublished,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - ShowUseSvixPlay *bool `json:"showUseSvixPlay,omitempty"` - WipeSuccessfulPayload *bool `json:"wipeSuccessfulPayload,omitempty"` -} - -// NewSettingsOut instantiates a new SettingsOut 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 NewSettingsOut() *SettingsOut { - this := SettingsOut{} - var disableEndpointOnFailure bool = true - this.DisableEndpointOnFailure = &disableEndpointOnFailure - var enableChannels bool = false - this.EnableChannels = &enableChannels - var enableIntegrationManagement bool = false - this.EnableIntegrationManagement = &enableIntegrationManagement - var enableTransformations bool = false - this.EnableTransformations = &enableTransformations - var enforceHttps bool = true - this.EnforceHttps = &enforceHttps - var eventCatalogPublished bool = false - this.EventCatalogPublished = &eventCatalogPublished - var readOnly bool = false - this.ReadOnly = &readOnly - var showUseSvixPlay bool = true - this.ShowUseSvixPlay = &showUseSvixPlay - var wipeSuccessfulPayload bool = false - this.WipeSuccessfulPayload = &wipeSuccessfulPayload - return &this -} - -// NewSettingsOutWithDefaults instantiates a new SettingsOut 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 NewSettingsOutWithDefaults() *SettingsOut { - this := SettingsOut{} - var disableEndpointOnFailure bool = true - this.DisableEndpointOnFailure = &disableEndpointOnFailure - var enableChannels bool = false - this.EnableChannels = &enableChannels - var enableIntegrationManagement bool = false - this.EnableIntegrationManagement = &enableIntegrationManagement - var enableTransformations bool = false - this.EnableTransformations = &enableTransformations - var enforceHttps bool = true - this.EnforceHttps = &enforceHttps - var eventCatalogPublished bool = false - this.EventCatalogPublished = &eventCatalogPublished - var readOnly bool = false - this.ReadOnly = &readOnly - var showUseSvixPlay bool = true - this.ShowUseSvixPlay = &showUseSvixPlay - var wipeSuccessfulPayload bool = false - this.WipeSuccessfulPayload = &wipeSuccessfulPayload - return &this -} - -// GetColorPaletteDark returns the ColorPaletteDark field value if set, zero value otherwise. -func (o *SettingsOut) GetColorPaletteDark() CustomColorPalette { - if o == nil || IsNil(o.ColorPaletteDark) { - var ret CustomColorPalette - return ret - } - return *o.ColorPaletteDark -} - -// GetColorPaletteDarkOk returns a tuple with the ColorPaletteDark field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetColorPaletteDarkOk() (*CustomColorPalette, bool) { - if o == nil || IsNil(o.ColorPaletteDark) { - return nil, false - } - return o.ColorPaletteDark, true -} - -// HasColorPaletteDark returns a boolean if a field has been set. -func (o *SettingsOut) HasColorPaletteDark() bool { - if o != nil && !IsNil(o.ColorPaletteDark) { - return true - } - - return false -} - -// SetColorPaletteDark gets a reference to the given CustomColorPalette and assigns it to the ColorPaletteDark field. -func (o *SettingsOut) SetColorPaletteDark(v CustomColorPalette) { - o.ColorPaletteDark = &v -} - -// GetColorPaletteLight returns the ColorPaletteLight field value if set, zero value otherwise. -func (o *SettingsOut) GetColorPaletteLight() CustomColorPalette { - if o == nil || IsNil(o.ColorPaletteLight) { - var ret CustomColorPalette - return ret - } - return *o.ColorPaletteLight -} - -// GetColorPaletteLightOk returns a tuple with the ColorPaletteLight field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetColorPaletteLightOk() (*CustomColorPalette, bool) { - if o == nil || IsNil(o.ColorPaletteLight) { - return nil, false - } - return o.ColorPaletteLight, true -} - -// HasColorPaletteLight returns a boolean if a field has been set. -func (o *SettingsOut) HasColorPaletteLight() bool { - if o != nil && !IsNil(o.ColorPaletteLight) { - return true - } - - return false -} - -// SetColorPaletteLight gets a reference to the given CustomColorPalette and assigns it to the ColorPaletteLight field. -func (o *SettingsOut) SetColorPaletteLight(v CustomColorPalette) { - o.ColorPaletteLight = &v -} - -// GetCustomBaseFontSize returns the CustomBaseFontSize field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsOut) GetCustomBaseFontSize() int32 { - if o == nil || IsNil(o.CustomBaseFontSize.Get()) { - var ret int32 - return ret - } - return *o.CustomBaseFontSize.Get() -} - -// GetCustomBaseFontSizeOk returns a tuple with the CustomBaseFontSize 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 *SettingsOut) GetCustomBaseFontSizeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.CustomBaseFontSize.Get(), o.CustomBaseFontSize.IsSet() -} - -// HasCustomBaseFontSize returns a boolean if a field has been set. -func (o *SettingsOut) HasCustomBaseFontSize() bool { - if o != nil && o.CustomBaseFontSize.IsSet() { - return true - } - - return false -} - -// SetCustomBaseFontSize gets a reference to the given NullableInt32 and assigns it to the CustomBaseFontSize field. -func (o *SettingsOut) SetCustomBaseFontSize(v int32) { - o.CustomBaseFontSize.Set(&v) -} -// SetCustomBaseFontSizeNil sets the value for CustomBaseFontSize to be an explicit nil -func (o *SettingsOut) SetCustomBaseFontSizeNil() { - o.CustomBaseFontSize.Set(nil) -} - -// UnsetCustomBaseFontSize ensures that no value is present for CustomBaseFontSize, not even an explicit nil -func (o *SettingsOut) UnsetCustomBaseFontSize() { - o.CustomBaseFontSize.Unset() -} - -// GetCustomColor returns the CustomColor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsOut) GetCustomColor() string { - if o == nil || IsNil(o.CustomColor.Get()) { - var ret string - return ret - } - return *o.CustomColor.Get() -} - -// GetCustomColorOk returns a tuple with the CustomColor 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 *SettingsOut) GetCustomColorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CustomColor.Get(), o.CustomColor.IsSet() -} - -// HasCustomColor returns a boolean if a field has been set. -func (o *SettingsOut) HasCustomColor() bool { - if o != nil && o.CustomColor.IsSet() { - return true - } - - return false -} - -// SetCustomColor gets a reference to the given NullableString and assigns it to the CustomColor field. -func (o *SettingsOut) SetCustomColor(v string) { - o.CustomColor.Set(&v) -} -// SetCustomColorNil sets the value for CustomColor to be an explicit nil -func (o *SettingsOut) SetCustomColorNil() { - o.CustomColor.Set(nil) -} - -// UnsetCustomColor ensures that no value is present for CustomColor, not even an explicit nil -func (o *SettingsOut) UnsetCustomColor() { - o.CustomColor.Unset() -} - -// GetCustomFontFamily returns the CustomFontFamily field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsOut) GetCustomFontFamily() string { - if o == nil || IsNil(o.CustomFontFamily.Get()) { - var ret string - return ret - } - return *o.CustomFontFamily.Get() -} - -// GetCustomFontFamilyOk returns a tuple with the CustomFontFamily 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 *SettingsOut) GetCustomFontFamilyOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CustomFontFamily.Get(), o.CustomFontFamily.IsSet() -} - -// HasCustomFontFamily returns a boolean if a field has been set. -func (o *SettingsOut) HasCustomFontFamily() bool { - if o != nil && o.CustomFontFamily.IsSet() { - return true - } - - return false -} - -// SetCustomFontFamily gets a reference to the given NullableString and assigns it to the CustomFontFamily field. -func (o *SettingsOut) SetCustomFontFamily(v string) { - o.CustomFontFamily.Set(&v) -} -// SetCustomFontFamilyNil sets the value for CustomFontFamily to be an explicit nil -func (o *SettingsOut) SetCustomFontFamilyNil() { - o.CustomFontFamily.Set(nil) -} - -// UnsetCustomFontFamily ensures that no value is present for CustomFontFamily, not even an explicit nil -func (o *SettingsOut) UnsetCustomFontFamily() { - o.CustomFontFamily.Unset() -} - -// GetCustomFontFamilyUrl returns the CustomFontFamilyUrl field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsOut) GetCustomFontFamilyUrl() string { - if o == nil || IsNil(o.CustomFontFamilyUrl.Get()) { - var ret string - return ret - } - return *o.CustomFontFamilyUrl.Get() -} - -// GetCustomFontFamilyUrlOk returns a tuple with the CustomFontFamilyUrl 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 *SettingsOut) GetCustomFontFamilyUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CustomFontFamilyUrl.Get(), o.CustomFontFamilyUrl.IsSet() -} - -// HasCustomFontFamilyUrl returns a boolean if a field has been set. -func (o *SettingsOut) HasCustomFontFamilyUrl() bool { - if o != nil && o.CustomFontFamilyUrl.IsSet() { - return true - } - - return false -} - -// SetCustomFontFamilyUrl gets a reference to the given NullableString and assigns it to the CustomFontFamilyUrl field. -func (o *SettingsOut) SetCustomFontFamilyUrl(v string) { - o.CustomFontFamilyUrl.Set(&v) -} -// SetCustomFontFamilyUrlNil sets the value for CustomFontFamilyUrl to be an explicit nil -func (o *SettingsOut) SetCustomFontFamilyUrlNil() { - o.CustomFontFamilyUrl.Set(nil) -} - -// UnsetCustomFontFamilyUrl ensures that no value is present for CustomFontFamilyUrl, not even an explicit nil -func (o *SettingsOut) UnsetCustomFontFamilyUrl() { - o.CustomFontFamilyUrl.Unset() -} - -// GetCustomLogoUrl returns the CustomLogoUrl field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsOut) GetCustomLogoUrl() string { - if o == nil || IsNil(o.CustomLogoUrl.Get()) { - var ret string - return ret - } - return *o.CustomLogoUrl.Get() -} - -// GetCustomLogoUrlOk returns a tuple with the CustomLogoUrl 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 *SettingsOut) GetCustomLogoUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CustomLogoUrl.Get(), o.CustomLogoUrl.IsSet() -} - -// HasCustomLogoUrl returns a boolean if a field has been set. -func (o *SettingsOut) HasCustomLogoUrl() bool { - if o != nil && o.CustomLogoUrl.IsSet() { - return true - } - - return false -} - -// SetCustomLogoUrl gets a reference to the given NullableString and assigns it to the CustomLogoUrl field. -func (o *SettingsOut) SetCustomLogoUrl(v string) { - o.CustomLogoUrl.Set(&v) -} -// SetCustomLogoUrlNil sets the value for CustomLogoUrl to be an explicit nil -func (o *SettingsOut) SetCustomLogoUrlNil() { - o.CustomLogoUrl.Set(nil) -} - -// UnsetCustomLogoUrl ensures that no value is present for CustomLogoUrl, not even an explicit nil -func (o *SettingsOut) UnsetCustomLogoUrl() { - o.CustomLogoUrl.Unset() -} - -// GetCustomStringsOverride returns the CustomStringsOverride field value if set, zero value otherwise. -func (o *SettingsOut) GetCustomStringsOverride() CustomStringsOverride { - if o == nil || IsNil(o.CustomStringsOverride) { - var ret CustomStringsOverride - return ret - } - return *o.CustomStringsOverride -} - -// GetCustomStringsOverrideOk returns a tuple with the CustomStringsOverride field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetCustomStringsOverrideOk() (*CustomStringsOverride, bool) { - if o == nil || IsNil(o.CustomStringsOverride) { - return nil, false - } - return o.CustomStringsOverride, true -} - -// HasCustomStringsOverride returns a boolean if a field has been set. -func (o *SettingsOut) HasCustomStringsOverride() bool { - if o != nil && !IsNil(o.CustomStringsOverride) { - return true - } - - return false -} - -// SetCustomStringsOverride gets a reference to the given CustomStringsOverride and assigns it to the CustomStringsOverride field. -func (o *SettingsOut) SetCustomStringsOverride(v CustomStringsOverride) { - o.CustomStringsOverride = &v -} - -// GetCustomThemeOverride returns the CustomThemeOverride field value if set, zero value otherwise. -func (o *SettingsOut) GetCustomThemeOverride() CustomThemeOverride { - if o == nil || IsNil(o.CustomThemeOverride) { - var ret CustomThemeOverride - return ret - } - return *o.CustomThemeOverride -} - -// GetCustomThemeOverrideOk returns a tuple with the CustomThemeOverride field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetCustomThemeOverrideOk() (*CustomThemeOverride, bool) { - if o == nil || IsNil(o.CustomThemeOverride) { - return nil, false - } - return o.CustomThemeOverride, true -} - -// HasCustomThemeOverride returns a boolean if a field has been set. -func (o *SettingsOut) HasCustomThemeOverride() bool { - if o != nil && !IsNil(o.CustomThemeOverride) { - return true - } - - return false -} - -// SetCustomThemeOverride gets a reference to the given CustomThemeOverride and assigns it to the CustomThemeOverride field. -func (o *SettingsOut) SetCustomThemeOverride(v CustomThemeOverride) { - o.CustomThemeOverride = &v -} - -// GetDisableEndpointOnFailure returns the DisableEndpointOnFailure field value if set, zero value otherwise. -func (o *SettingsOut) GetDisableEndpointOnFailure() bool { - if o == nil || IsNil(o.DisableEndpointOnFailure) { - var ret bool - return ret - } - return *o.DisableEndpointOnFailure -} - -// GetDisableEndpointOnFailureOk returns a tuple with the DisableEndpointOnFailure field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetDisableEndpointOnFailureOk() (*bool, bool) { - if o == nil || IsNil(o.DisableEndpointOnFailure) { - return nil, false - } - return o.DisableEndpointOnFailure, true -} - -// HasDisableEndpointOnFailure returns a boolean if a field has been set. -func (o *SettingsOut) HasDisableEndpointOnFailure() bool { - if o != nil && !IsNil(o.DisableEndpointOnFailure) { - return true - } - - return false -} - -// SetDisableEndpointOnFailure gets a reference to the given bool and assigns it to the DisableEndpointOnFailure field. -func (o *SettingsOut) SetDisableEndpointOnFailure(v bool) { - o.DisableEndpointOnFailure = &v -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SettingsOut) GetDisplayName() string { - if o == nil || IsNil(o.DisplayName.Get()) { - var ret string - return ret - } - return *o.DisplayName.Get() -} - -// GetDisplayNameOk returns a tuple with the DisplayName 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 *SettingsOut) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DisplayName.Get(), o.DisplayName.IsSet() -} - -// HasDisplayName returns a boolean if a field has been set. -func (o *SettingsOut) HasDisplayName() bool { - if o != nil && o.DisplayName.IsSet() { - return true - } - - return false -} - -// SetDisplayName gets a reference to the given NullableString and assigns it to the DisplayName field. -func (o *SettingsOut) SetDisplayName(v string) { - o.DisplayName.Set(&v) -} -// SetDisplayNameNil sets the value for DisplayName to be an explicit nil -func (o *SettingsOut) SetDisplayNameNil() { - o.DisplayName.Set(nil) -} - -// UnsetDisplayName ensures that no value is present for DisplayName, not even an explicit nil -func (o *SettingsOut) UnsetDisplayName() { - o.DisplayName.Unset() -} - -// GetEnableChannels returns the EnableChannels field value if set, zero value otherwise. -func (o *SettingsOut) GetEnableChannels() bool { - if o == nil || IsNil(o.EnableChannels) { - var ret bool - return ret - } - return *o.EnableChannels -} - -// GetEnableChannelsOk returns a tuple with the EnableChannels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetEnableChannelsOk() (*bool, bool) { - if o == nil || IsNil(o.EnableChannels) { - return nil, false - } - return o.EnableChannels, true -} - -// HasEnableChannels returns a boolean if a field has been set. -func (o *SettingsOut) HasEnableChannels() bool { - if o != nil && !IsNil(o.EnableChannels) { - return true - } - - return false -} - -// SetEnableChannels gets a reference to the given bool and assigns it to the EnableChannels field. -func (o *SettingsOut) SetEnableChannels(v bool) { - o.EnableChannels = &v -} - -// GetEnableIntegrationManagement returns the EnableIntegrationManagement field value if set, zero value otherwise. -func (o *SettingsOut) GetEnableIntegrationManagement() bool { - if o == nil || IsNil(o.EnableIntegrationManagement) { - var ret bool - return ret - } - return *o.EnableIntegrationManagement -} - -// GetEnableIntegrationManagementOk returns a tuple with the EnableIntegrationManagement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetEnableIntegrationManagementOk() (*bool, bool) { - if o == nil || IsNil(o.EnableIntegrationManagement) { - return nil, false - } - return o.EnableIntegrationManagement, true -} - -// HasEnableIntegrationManagement returns a boolean if a field has been set. -func (o *SettingsOut) HasEnableIntegrationManagement() bool { - if o != nil && !IsNil(o.EnableIntegrationManagement) { - return true - } - - return false -} - -// SetEnableIntegrationManagement gets a reference to the given bool and assigns it to the EnableIntegrationManagement field. -func (o *SettingsOut) SetEnableIntegrationManagement(v bool) { - o.EnableIntegrationManagement = &v -} - -// GetEnableTransformations returns the EnableTransformations field value if set, zero value otherwise. -func (o *SettingsOut) GetEnableTransformations() bool { - if o == nil || IsNil(o.EnableTransformations) { - var ret bool - return ret - } - return *o.EnableTransformations -} - -// GetEnableTransformationsOk returns a tuple with the EnableTransformations field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetEnableTransformationsOk() (*bool, bool) { - if o == nil || IsNil(o.EnableTransformations) { - return nil, false - } - return o.EnableTransformations, true -} - -// HasEnableTransformations returns a boolean if a field has been set. -func (o *SettingsOut) HasEnableTransformations() bool { - if o != nil && !IsNil(o.EnableTransformations) { - return true - } - - return false -} - -// SetEnableTransformations gets a reference to the given bool and assigns it to the EnableTransformations field. -func (o *SettingsOut) SetEnableTransformations(v bool) { - o.EnableTransformations = &v -} - -// GetEnforceHttps returns the EnforceHttps field value if set, zero value otherwise. -func (o *SettingsOut) GetEnforceHttps() bool { - if o == nil || IsNil(o.EnforceHttps) { - var ret bool - return ret - } - return *o.EnforceHttps -} - -// GetEnforceHttpsOk returns a tuple with the EnforceHttps field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetEnforceHttpsOk() (*bool, bool) { - if o == nil || IsNil(o.EnforceHttps) { - return nil, false - } - return o.EnforceHttps, true -} - -// HasEnforceHttps returns a boolean if a field has been set. -func (o *SettingsOut) HasEnforceHttps() bool { - if o != nil && !IsNil(o.EnforceHttps) { - return true - } - - return false -} - -// SetEnforceHttps gets a reference to the given bool and assigns it to the EnforceHttps field. -func (o *SettingsOut) SetEnforceHttps(v bool) { - o.EnforceHttps = &v -} - -// GetEventCatalogPublished returns the EventCatalogPublished field value if set, zero value otherwise. -func (o *SettingsOut) GetEventCatalogPublished() bool { - if o == nil || IsNil(o.EventCatalogPublished) { - var ret bool - return ret - } - return *o.EventCatalogPublished -} - -// GetEventCatalogPublishedOk returns a tuple with the EventCatalogPublished field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetEventCatalogPublishedOk() (*bool, bool) { - if o == nil || IsNil(o.EventCatalogPublished) { - return nil, false - } - return o.EventCatalogPublished, true -} - -// HasEventCatalogPublished returns a boolean if a field has been set. -func (o *SettingsOut) HasEventCatalogPublished() bool { - if o != nil && !IsNil(o.EventCatalogPublished) { - return true - } - - return false -} - -// SetEventCatalogPublished gets a reference to the given bool and assigns it to the EventCatalogPublished field. -func (o *SettingsOut) SetEventCatalogPublished(v bool) { - o.EventCatalogPublished = &v -} - -// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. -func (o *SettingsOut) GetReadOnly() bool { - if o == nil || IsNil(o.ReadOnly) { - var ret bool - return ret - } - return *o.ReadOnly -} - -// GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetReadOnlyOk() (*bool, bool) { - if o == nil || IsNil(o.ReadOnly) { - return nil, false - } - return o.ReadOnly, true -} - -// HasReadOnly returns a boolean if a field has been set. -func (o *SettingsOut) HasReadOnly() bool { - if o != nil && !IsNil(o.ReadOnly) { - return true - } - - return false -} - -// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. -func (o *SettingsOut) SetReadOnly(v bool) { - o.ReadOnly = &v -} - -// GetShowUseSvixPlay returns the ShowUseSvixPlay field value if set, zero value otherwise. -func (o *SettingsOut) GetShowUseSvixPlay() bool { - if o == nil || IsNil(o.ShowUseSvixPlay) { - var ret bool - return ret - } - return *o.ShowUseSvixPlay -} - -// GetShowUseSvixPlayOk returns a tuple with the ShowUseSvixPlay field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetShowUseSvixPlayOk() (*bool, bool) { - if o == nil || IsNil(o.ShowUseSvixPlay) { - return nil, false - } - return o.ShowUseSvixPlay, true -} - -// HasShowUseSvixPlay returns a boolean if a field has been set. -func (o *SettingsOut) HasShowUseSvixPlay() bool { - if o != nil && !IsNil(o.ShowUseSvixPlay) { - return true - } - - return false -} - -// SetShowUseSvixPlay gets a reference to the given bool and assigns it to the ShowUseSvixPlay field. -func (o *SettingsOut) SetShowUseSvixPlay(v bool) { - o.ShowUseSvixPlay = &v -} - -// GetWipeSuccessfulPayload returns the WipeSuccessfulPayload field value if set, zero value otherwise. -func (o *SettingsOut) GetWipeSuccessfulPayload() bool { - if o == nil || IsNil(o.WipeSuccessfulPayload) { - var ret bool - return ret - } - return *o.WipeSuccessfulPayload -} - -// GetWipeSuccessfulPayloadOk returns a tuple with the WipeSuccessfulPayload field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsOut) GetWipeSuccessfulPayloadOk() (*bool, bool) { - if o == nil || IsNil(o.WipeSuccessfulPayload) { - return nil, false - } - return o.WipeSuccessfulPayload, true -} - -// HasWipeSuccessfulPayload returns a boolean if a field has been set. -func (o *SettingsOut) HasWipeSuccessfulPayload() bool { - if o != nil && !IsNil(o.WipeSuccessfulPayload) { - return true - } - - return false -} - -// SetWipeSuccessfulPayload gets a reference to the given bool and assigns it to the WipeSuccessfulPayload field. -func (o *SettingsOut) SetWipeSuccessfulPayload(v bool) { - o.WipeSuccessfulPayload = &v -} - -func (o SettingsOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SettingsOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ColorPaletteDark) { - toSerialize["colorPaletteDark"] = o.ColorPaletteDark - } - if !IsNil(o.ColorPaletteLight) { - toSerialize["colorPaletteLight"] = o.ColorPaletteLight - } - if o.CustomBaseFontSize.IsSet() { - toSerialize["customBaseFontSize"] = o.CustomBaseFontSize.Get() - } - if o.CustomColor.IsSet() { - toSerialize["customColor"] = o.CustomColor.Get() - } - if o.CustomFontFamily.IsSet() { - toSerialize["customFontFamily"] = o.CustomFontFamily.Get() - } - if o.CustomFontFamilyUrl.IsSet() { - toSerialize["customFontFamilyUrl"] = o.CustomFontFamilyUrl.Get() - } - if o.CustomLogoUrl.IsSet() { - toSerialize["customLogoUrl"] = o.CustomLogoUrl.Get() - } - if !IsNil(o.CustomStringsOverride) { - toSerialize["customStringsOverride"] = o.CustomStringsOverride - } - if !IsNil(o.CustomThemeOverride) { - toSerialize["customThemeOverride"] = o.CustomThemeOverride - } - if !IsNil(o.DisableEndpointOnFailure) { - toSerialize["disableEndpointOnFailure"] = o.DisableEndpointOnFailure - } - if o.DisplayName.IsSet() { - toSerialize["displayName"] = o.DisplayName.Get() - } - if !IsNil(o.EnableChannels) { - toSerialize["enableChannels"] = o.EnableChannels - } - if !IsNil(o.EnableIntegrationManagement) { - toSerialize["enableIntegrationManagement"] = o.EnableIntegrationManagement - } - if !IsNil(o.EnableTransformations) { - toSerialize["enableTransformations"] = o.EnableTransformations - } - if !IsNil(o.EnforceHttps) { - toSerialize["enforceHttps"] = o.EnforceHttps - } - if !IsNil(o.EventCatalogPublished) { - toSerialize["eventCatalogPublished"] = o.EventCatalogPublished - } - if !IsNil(o.ReadOnly) { - toSerialize["readOnly"] = o.ReadOnly - } - if !IsNil(o.ShowUseSvixPlay) { - toSerialize["showUseSvixPlay"] = o.ShowUseSvixPlay - } - if !IsNil(o.WipeSuccessfulPayload) { - toSerialize["wipeSuccessfulPayload"] = o.WipeSuccessfulPayload - } - return toSerialize, nil -} - -type NullableSettingsOut struct { - value *SettingsOut - isSet bool -} - -func (v NullableSettingsOut) Get() *SettingsOut { - return v.value -} - -func (v *NullableSettingsOut) Set(val *SettingsOut) { - v.value = val - v.isSet = true -} - -func (v NullableSettingsOut) IsSet() bool { - return v.isSet -} - -func (v *NullableSettingsOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSettingsOut(val *SettingsOut) *NullableSettingsOut { - return &NullableSettingsOut{value: val, isSet: true} -} - -func (v NullableSettingsOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSettingsOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/openapi.json b/openapi.json index e15a79707..75f9617f2 100644 --- a/openapi.json +++ b/openapi.json @@ -559,6 +559,25 @@ ], "type": "object" }, + "CountOut": { + "properties": { + "approximated": { + "description": "There's a ceiling to how many attempts we count. When the limit is reached, this will be `true` to indicate the actual count is higher than given.", + "type": "boolean" + }, + "count": { + "description": "The count of attempts matching the query.", + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "approximated", + "count" + ], + "type": "object" + }, "CreateMessageTokenIn": { "properties": { "expiry": { @@ -1692,10 +1711,6 @@ }, "EnvironmentIn": { "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, "eventTypes": { "items": { "$ref": "#/components/schemas/EventTypeIn" @@ -1704,8 +1719,11 @@ "type": "array" }, "settings": { - "$ref": "#/components/schemas/SettingsIn", - "nullable": true + "additionalProperties": { + "type": "object" + }, + "nullable": true, + "type": "object" }, "transformationTemplates": { "items": { @@ -1713,15 +1731,10 @@ }, "nullable": true, "type": "array" - }, - "version": { - "format": "int", - "type": "integer" } }, "required": [ - "createdAt", - "version" + "settings" ], "type": "object" }, @@ -1738,8 +1751,11 @@ "type": "array" }, "settings": { - "$ref": "#/components/schemas/SettingsOut", - "nullable": true + "additionalProperties": { + "type": "object" + }, + "nullable": true, + "type": "object" }, "transformationTemplates": { "items": { @@ -1756,6 +1772,7 @@ "required": [ "createdAt", "eventTypes", + "settings", "transformationTemplates" ], "type": "object" @@ -4519,188 +4536,6 @@ ], "type": "object" }, - "SettingsIn": { - "properties": { - "colorPaletteDark": { - "$ref": "#/components/schemas/CustomColorPalette", - "nullable": true - }, - "colorPaletteLight": { - "$ref": "#/components/schemas/CustomColorPalette", - "nullable": true - }, - "customBaseFontSize": { - "format": "int", - "nullable": true, - "type": "integer" - }, - "customColor": { - "format": "color", - "nullable": true, - "type": "string" - }, - "customFontFamily": { - "example": "Open Sans", - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_ ]+$", - "type": "string" - }, - "customFontFamilyUrl": { - "format": "uri", - "maxLength": 65536, - "minLength": 1, - "nullable": true, - "type": "string" - }, - "customLogoUrl": { - "format": "uri", - "maxLength": 65536, - "minLength": 1, - "nullable": true, - "type": "string" - }, - "customStringsOverride": { - "$ref": "#/components/schemas/CustomStringsOverride", - "nullable": true - }, - "customThemeOverride": { - "$ref": "#/components/schemas/CustomThemeOverride", - "nullable": true - }, - "disableEndpointOnFailure": { - "default": true, - "type": "boolean" - }, - "displayName": { - "nullable": true, - "type": "string" - }, - "enableChannels": { - "default": false, - "type": "boolean" - }, - "enableIntegrationManagement": { - "default": false, - "type": "boolean" - }, - "enableTransformations": { - "default": false, - "type": "boolean" - }, - "enforceHttps": { - "default": true, - "type": "boolean" - }, - "eventCatalogPublished": { - "default": false, - "type": "boolean" - }, - "readOnly": { - "default": false, - "type": "boolean" - }, - "showUseSvixPlay": { - "default": true, - "type": "boolean" - }, - "wipeSuccessfulPayload": { - "default": false, - "type": "boolean" - } - }, - "type": "object" - }, - "SettingsOut": { - "properties": { - "colorPaletteDark": { - "$ref": "#/components/schemas/CustomColorPalette", - "nullable": true - }, - "colorPaletteLight": { - "$ref": "#/components/schemas/CustomColorPalette", - "nullable": true - }, - "customBaseFontSize": { - "format": "int", - "nullable": true, - "type": "integer" - }, - "customColor": { - "format": "color", - "nullable": true, - "type": "string" - }, - "customFontFamily": { - "example": "Open Sans", - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_ ]+$", - "type": "string" - }, - "customFontFamilyUrl": { - "format": "uri", - "maxLength": 65536, - "minLength": 1, - "nullable": true, - "type": "string" - }, - "customLogoUrl": { - "format": "uri", - "maxLength": 65536, - "minLength": 1, - "nullable": true, - "type": "string" - }, - "customStringsOverride": { - "$ref": "#/components/schemas/CustomStringsOverride", - "nullable": true - }, - "customThemeOverride": { - "$ref": "#/components/schemas/CustomThemeOverride", - "nullable": true - }, - "disableEndpointOnFailure": { - "default": true, - "type": "boolean" - }, - "displayName": { - "nullable": true, - "type": "string" - }, - "enableChannels": { - "default": false, - "type": "boolean" - }, - "enableIntegrationManagement": { - "default": false, - "type": "boolean" - }, - "enableTransformations": { - "default": false, - "type": "boolean" - }, - "enforceHttps": { - "default": true, - "type": "boolean" - }, - "eventCatalogPublished": { - "default": false, - "type": "boolean" - }, - "readOnly": { - "default": false, - "type": "boolean" - }, - "showUseSvixPlay": { - "default": true, - "type": "boolean" - }, - "wipeSuccessfulPayload": { - "default": false, - "type": "boolean" - } - }, - "type": "object" - }, "SinkHttpConfig": { "properties": { "headers": { @@ -7425,17 +7260,355 @@ "lang": "Shell", "source": "svix application patch \"app_id\" '{\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n}'" }, - { - "label": "cURL", - "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" - } - ] - }, - "put": { - "description": "Update an application.", - "operationId": "v1.application.update", - "parameters": [ + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" + } + ] + }, + "put": { + "description": "Update an application.", + "operationId": "v1.application.update", + "parameters": [ + { + "description": "The app's ID or UID", + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "description": "The app's ID or UID", + "example": "unique-app-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationIn" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationOut" + } + } + }, + "description": "" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationOut" + } + } + }, + "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Bad request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Not Found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Conflict" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Too Many Requests" + } + }, + "security": [ + { + "HTTPBearer": [] + } + ], + "summary": "Update Application", + "tags": [ + "Application" + ], + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.update(\"app_id\", {\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-app-identifier\"\n});" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const applicationOut = await svix.application.update(\"app_id\", {\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-app-identifier\"\n});" + }, + { + "label": "Python", + "lang": "Python", + "source": "application_out = svix.application.update(\"app_id\", ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-app-identifier\"\n))" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "application_out = await svix.application.update(\"app_id\", ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-app-identifier\"\n))" + }, + { + "label": "Go", + "lang": "Go", + "source": "applicationOut, err := svixClient.Application.Update(ctx, \"app_id\", &ApplicationIn{\n Name: \"My first application\",\n RateLimit: nil,\n Uid: \"unique-app-identifier\",\n})" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val applicationOut = svix.application.update(\"app_id\", ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-app-identifier\")\n)" + }, + { + "label": "Java", + "lang": "Java", + "source": "ApplicationOut applicationOut = svix.getApplication().update(\"app_id\", new ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-app-identifier\")\n)" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "application_out = svix.application.update(\"app_id\", Svix::ApplicationIn.new({\n \"name\": \"My first application\",\n \"rate_limit\": nil,\n \"uid\": \"unique-app-identifier\"\n}))" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let application_out = svix.application().update(\"app_id\", ApplicationIn {\n name: \"My first application\".to_string(),\n rate_limit: None,\n uid: Some(\"unique-app-identifier\".to_string()),\n}).await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var applicationOut = await svix.Application.UpdateAsync(\"app_id\", new ApplicationIn{\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-app-identifier\"\n})" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix application update \"app_id\" '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n}'" + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" + } + ] + } + }, + "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}": { + "get": { + "description": "List attempts by endpoint id\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.\n", + "operationId": "v1.message-attempt.list-by-endpoint", + "parameters": [ + { + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/MessageStatus", + "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "nullable": true + }, + "style": "form" + }, + { + "description": "Filter response based on the HTTP status code", + "explode": false, + "in": "query", + "name": "status_code_class", + "schema": { + "$ref": "#/components/schemas/StatusCodeClass", + "description": "Filter response based on the HTTP status code", + "nullable": true + }, + "style": "form" + }, + { + "description": "Filter response based on the channel", + "in": "query", + "name": "channel", + "schema": { + "description": "Filter response based on the channel", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Filter response based on the tag", + "in": "query", + "name": "tag", + "schema": { + "description": "Filter response based on the tag", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Only include items created before a certain date", + "in": "query", + "name": "before", + "schema": { + "description": "Only include items created before a certain date", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "Only include items created after a certain date", + "in": "query", + "name": "after", + "schema": { + "description": "Only include items created after a certain date", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "When `true` attempt content is included in the response", + "in": "query", + "name": "with_content", + "schema": { + "default": true, + "description": "When `true` attempt content is included in the response", + "type": "boolean" + }, + "style": "form" + }, + { + "description": "When `true`, the message information is included in the response", + "in": "query", + "name": "with_msg", + "schema": { + "default": false, + "description": "When `true`, the message information is included in the response", + "type": "boolean" + }, + "style": "form" + }, + { + "description": "Filter response based on the event type", + "in": "query", + "name": "event_types", + "schema": { + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" + }, { "description": "The app's ID or UID", "in": "path", @@ -7450,34 +7623,29 @@ "type": "string" }, "style": "simple" + }, + { + "description": "The ep's ID or UID", + "in": "path", + "name": "endpoint_id", + "required": true, + "schema": { + "description": "The ep's ID or UID", + "example": "unique-ep-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplicationOut" - } - } - }, - "description": "" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationOut" + "$ref": "#/components/schemas/ListResponse_MessageAttemptOut_" } } }, @@ -7559,106 +7727,82 @@ "HTTPBearer": [] } ], - "summary": "Update Application", + "summary": "List Attempts By Endpoint", "tags": [ - "Application" + "Message Attempt" ], "x-codeSamples": [ { "label": "JavaScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.update(\"app_id\", {\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-app-identifier\"\n});" + "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const applicationOut = await svix.application.update(\"app_id\", {\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-app-identifier\"\n});" + "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "application_out = svix.application.update(\"app_id\", ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-app-identifier\"\n))" + "source": "list_response_message_attempt_out = svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\", options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "application_out = await svix.application.update(\"app_id\", ApplicationIn(\n name=\"My first application\",\n rate_limit=None,\n uid=\"unique-app-identifier\"\n))" + "source": "list_response_message_attempt_out = await svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\", options=...)" }, { "label": "Go", "lang": "Go", - "source": "applicationOut, err := svixClient.Application.Update(ctx, \"app_id\", &ApplicationIn{\n Name: \"My first application\",\n RateLimit: nil,\n Uid: \"unique-app-identifier\",\n})" + "source": "listResponseMessageAttemptOut, err := svixClient.MessageAttempt.ListByEndpoint(ctx, \"app_id\", \"endpoint_id\", nil)" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val applicationOut = svix.application.update(\"app_id\", ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-app-identifier\")\n)" + "source": "val listResponseMessageAttemptOut = svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "ApplicationOut applicationOut = svix.getApplication().update(\"app_id\", new ApplicationIn()\n .name(\"My first application\")\n .rateLimit(null)\n .uid(\"unique-app-identifier\")\n)" + "source": "ListResponseMessageAttemptOut listResponseMessageAttemptOut = svix.getMessageAttempt().listByEndpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Ruby", "lang": "Ruby", - "source": "application_out = svix.application.update(\"app_id\", Svix::ApplicationIn.new({\n \"name\": \"My first application\",\n \"rate_limit\": nil,\n \"uid\": \"unique-app-identifier\"\n}))" + "source": "list_response_message_attempt_out = svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let application_out = svix.application().update(\"app_id\", ApplicationIn {\n name: \"My first application\".to_string(),\n rate_limit: None,\n uid: Some(\"unique-app-identifier\".to_string()),\n}).await?;" + "source": "let list_response_message_attempt_out = svix.message_attempt().list_by_endpoint(\"app_id\", \"endpoint_id\", None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var applicationOut = await svix.Application.UpdateAsync(\"app_id\", new ApplicationIn{\n name: \"My first application\",\n rateLimit: null,\n uid: \"unique-app-identifier\"\n})" + "source": "var listResponseMessageAttemptOut = await svix.MessageAttempt.ListByEndpointAsync(\"app_id\", \"endpoint_id\")" }, { "label": "CLI", "lang": "Shell", - "source": "svix application update \"app_id\" '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n}'" + "source": "svix message-attempt list-by-endpoint \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}": { + "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/count": { "get": { - "description": "List attempts by endpoint id\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.\n", - "operationId": "v1.message-attempt.list-by-endpoint", + "description": "Like `v1.message-attempt.list-by-endpoint` but returning a count only.", + "operationId": "v1.message-attempt.count-by-endpoint", "parameters": [ - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "example": "atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "nullable": true, - "type": "string" - }, - "style": "form" - }, { "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, "in": "query", "name": "status", "schema": { @@ -7666,11 +7810,11 @@ "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", "nullable": true }, - "style": "form", - "explode": false + "style": "form" }, { "description": "Filter response based on the HTTP status code", + "explode": false, "in": "query", "name": "status_code_class", "schema": { @@ -7732,28 +7876,6 @@ }, "style": "form" }, - { - "description": "When `true` attempt content is included in the response", - "in": "query", - "name": "with_content", - "schema": { - "default": true, - "description": "When `true` attempt content is included in the response", - "type": "boolean" - }, - "style": "form" - }, - { - "description": "When `true`, the message information is included in the response", - "in": "query", - "name": "with_msg", - "schema": { - "default": false, - "description": "When `true`, the message information is included in the response", - "type": "boolean" - }, - "style": "form" - }, { "description": "Filter response based on the event type", "in": "query", @@ -7809,7 +7931,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponse_MessageAttemptOut_" + "$ref": "#/components/schemas/CountOut" } } }, @@ -7891,7 +8013,7 @@ "HTTPBearer": [] } ], - "summary": "List Attempts By Endpoint", + "summary": "Count Attempts By Endpoint", "tags": [ "Message Attempt" ], @@ -7899,62 +8021,62 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\");" + "source": "const countOut = await svix.messageAttempt.countByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const listResponseMessageAttemptOut = await svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\");" + "source": "const countOut = await svix.messageAttempt.countByEndpoint(\"app_id\", \"endpoint_id\");" }, { "label": "Python", "lang": "Python", - "source": "list_response_message_attempt_out = svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\", options=...)" + "source": "count_out = svix.message_attempt.count_by_endpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Python (Async)", "lang": "Python", - "source": "list_response_message_attempt_out = await svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\", options=...)" + "source": "count_out = await svix.message_attempt.count_by_endpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Go", "lang": "Go", - "source": "listResponseMessageAttemptOut, err := svixClient.MessageAttempt.ListByEndpoint(ctx, \"app_id\", \"endpoint_id\", nil)" + "source": "countOut, err := svixClient.MessageAttempt.CountByEndpoint(ctx, \"app_id\", \"endpoint_id\")" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val listResponseMessageAttemptOut = svix.messageAttempt.listByEndpoint(\"app_id\", \"endpoint_id\")" + "source": "val countOut = svix.messageAttempt.countByEndpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Java", "lang": "Java", - "source": "ListResponseMessageAttemptOut listResponseMessageAttemptOut = svix.getMessageAttempt().listByEndpoint(\"app_id\", \"endpoint_id\")" + "source": "CountOut countOut = svix.getMessageAttempt().countByEndpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Ruby", "lang": "Ruby", - "source": "list_response_message_attempt_out = svix.message_attempt.list_by_endpoint(\"app_id\", \"endpoint_id\")" + "source": "count_out = svix.message_attempt.count_by_endpoint(\"app_id\", \"endpoint_id\")" }, { "label": "Rust", "lang": "Rust", - "source": "let list_response_message_attempt_out = svix.message_attempt().list_by_endpoint(\"app_id\", \"endpoint_id\", None).await?;" + "source": "let count_out = svix.message_attempt().count_by_endpoint(\"app_id\", \"endpoint_id\").await?;" }, { "label": "C#", "lang": "C#", - "source": "var listResponseMessageAttemptOut = await svix.MessageAttempt.ListByEndpointAsync(\"app_id\", \"endpoint_id\")" + "source": "var countOut = await svix.MessageAttempt.CountByEndpointAsync(\"app_id\", \"endpoint_id\")" }, { "label": "CLI", "lang": "Shell", - "source": "svix message-attempt list-by-endpoint \"app_id\" \"endpoint_id\"" + "source": "svix message-attempt count-by-endpoint \"app_id\" \"endpoint_id\"" }, { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/count' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } @@ -7991,6 +8113,7 @@ }, { "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, "in": "query", "name": "status", "schema": { @@ -7998,11 +8121,11 @@ "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", "nullable": true }, - "style": "form", - "explode": false + "style": "form" }, { "description": "Filter response based on the HTTP status code", + "explode": false, "in": "query", "name": "status_code_class", "schema": { @@ -10116,6 +10239,7 @@ }, { "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, "in": "query", "name": "status", "schema": { @@ -10123,8 +10247,7 @@ "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", "nullable": true }, - "style": "form", - "explode": false + "style": "form" }, { "description": "Only include items created before a certain date", @@ -16485,6 +16608,7 @@ }, { "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, "in": "query", "name": "status", "schema": { @@ -16492,8 +16616,7 @@ "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", "nullable": true }, - "style": "form", - "explode": false + "style": "form" }, { "description": "Only include items created before a certain date", @@ -16521,6 +16644,7 @@ }, { "description": "Filter response based on the HTTP status code", + "explode": false, "in": "query", "name": "status_code_class", "schema": { @@ -17798,6 +17922,7 @@ }, { "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", + "explode": false, "in": "query", "name": "status", "schema": { @@ -17805,8 +17930,7 @@ "description": "Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)", "nullable": true }, - "style": "form", - "explode": false + "style": "form" }, { "description": "Only include items created before a certain date", @@ -20633,108 +20757,6 @@ } }, "/api/v1/environment/export": { - "get": { - "description": "Download a JSON file containing all org-settings and event types", - "operationId": "v1.environment.export.get", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnvironmentOut" - } - } - }, - "description": "" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Bad request" - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Unauthorized" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Not Found" - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Conflict" - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - "description": "Validation Error" - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Too Many Requests" - } - }, - "security": [ - { - "HTTPBearer": [] - } - ], - "summary": "Export Environment Configuration", - "tags": [ - "Environment" - ], - "x-codeSamples": [ - { - "label": "cURL", - "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/environment/export' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" - } - ] - }, "post": { "description": "Download a JSON file containing all org-settings and event types", "operationId": "v1.environment.export", @@ -29382,6 +29404,10 @@ { "description": "Configure where operational webhooks are sent to.", "name": "Webhook Endpoint" + }, + { + "description": "Manage your environments like development, staging and production.", + "name": "Environment" } ], "x-tagGroups": [ @@ -29390,7 +29416,8 @@ "tags": [ "Application", "Event Type", - "Background Tasks" + "Background Tasks", + "Environment" ] }, {