diff --git a/api_feature_flag_setting_values.go b/api_feature_flag_setting_values.go index ec99418..930101f 100644 --- a/api_feature_flag_setting_values.go +++ b/api_feature_flag_setting_values.go @@ -624,12 +624,12 @@ type FeatureFlagSettingValuesApiUpdateSettingValueRequest struct { ApiService *FeatureFlagSettingValuesApiService environmentId string settingId int32 - jsonPatch *JsonPatch + patchOperations []PatchOperation reason *string } -func (r FeatureFlagSettingValuesApiUpdateSettingValueRequest) JsonPatch(jsonPatch JsonPatch) FeatureFlagSettingValuesApiUpdateSettingValueRequest { - r.jsonPatch = &jsonPatch +func (r FeatureFlagSettingValuesApiUpdateSettingValueRequest) PatchOperations(patchOperations []PatchOperation) FeatureFlagSettingValuesApiUpdateSettingValueRequest { + r.patchOperations = patchOperations return r } @@ -742,8 +742,8 @@ func (a *FeatureFlagSettingValuesApiService) UpdateSettingValueExecute(r Feature localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.jsonPatch == nil { - return localVarReturnValue, nil, reportError("jsonPatch is required and must be specified") + if r.patchOperations == nil { + return localVarReturnValue, nil, reportError("patchOperations is required and must be specified") } if r.reason != nil { @@ -767,7 +767,7 @@ func (a *FeatureFlagSettingValuesApiService) UpdateSettingValueExecute(r Feature localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.jsonPatch + localVarPostBody = r.patchOperations req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_feature_flag_setting_values_using_sdk_key.go b/api_feature_flag_setting_values_using_sdk_key.go index b537fb7..c2b93ba 100644 --- a/api_feature_flag_setting_values_using_sdk_key.go +++ b/api_feature_flag_setting_values_using_sdk_key.go @@ -324,13 +324,13 @@ type FeatureFlagSettingValuesUsingSDKKeyApiUpdateSettingValueBySdkkeyRequest str ctx context.Context ApiService *FeatureFlagSettingValuesUsingSDKKeyApiService settingKeyOrId string - jsonPatch *JsonPatch + patchOperations []PatchOperation reason *string xCONFIGCATSDKKEY *string } -func (r FeatureFlagSettingValuesUsingSDKKeyApiUpdateSettingValueBySdkkeyRequest) JsonPatch(jsonPatch JsonPatch) FeatureFlagSettingValuesUsingSDKKeyApiUpdateSettingValueBySdkkeyRequest { - r.jsonPatch = &jsonPatch +func (r FeatureFlagSettingValuesUsingSDKKeyApiUpdateSettingValueBySdkkeyRequest) PatchOperations(patchOperations []PatchOperation) FeatureFlagSettingValuesUsingSDKKeyApiUpdateSettingValueBySdkkeyRequest { + r.patchOperations = patchOperations return r } @@ -442,8 +442,8 @@ func (a *FeatureFlagSettingValuesUsingSDKKeyApiService) UpdateSettingValueBySdkk localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.jsonPatch == nil { - return localVarReturnValue, nil, reportError("jsonPatch is required and must be specified") + if r.patchOperations == nil { + return localVarReturnValue, nil, reportError("patchOperations is required and must be specified") } if r.reason != nil { @@ -470,7 +470,7 @@ func (a *FeatureFlagSettingValuesUsingSDKKeyApiService) UpdateSettingValueBySdkk parameterAddToHeaderOrQuery(localVarHeaderParams, "X-CONFIGCAT-SDKKEY", r.xCONFIGCATSDKKEY, "") } // body params - localVarPostBody = r.jsonPatch + localVarPostBody = r.patchOperations req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_feature_flags_settings.go b/api_feature_flags_settings.go index 3eb848d..a43958c 100644 --- a/api_feature_flags_settings.go +++ b/api_feature_flags_settings.go @@ -446,11 +446,11 @@ type FeatureFlagsSettingsApiUpdateSettingRequest struct { ctx context.Context ApiService *FeatureFlagsSettingsApiService settingId int32 - jsonPatch *JsonPatch + patchOperations []PatchOperation } -func (r FeatureFlagsSettingsApiUpdateSettingRequest) JsonPatch(jsonPatch JsonPatch) FeatureFlagsSettingsApiUpdateSettingRequest { - r.jsonPatch = &jsonPatch +func (r FeatureFlagsSettingsApiUpdateSettingRequest) PatchOperations(patchOperations []PatchOperation) FeatureFlagsSettingsApiUpdateSettingRequest { + r.patchOperations = patchOperations return r } @@ -559,8 +559,8 @@ func (a *FeatureFlagsSettingsApiService) UpdateSettingExecute(r FeatureFlagsSett localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.jsonPatch == nil { - return localVarReturnValue, nil, reportError("jsonPatch is required and must be specified") + if r.patchOperations == nil { + return localVarReturnValue, nil, reportError("patchOperations is required and must be specified") } // to determine the Content-Type header @@ -581,7 +581,7 @@ func (a *FeatureFlagsSettingsApiService) UpdateSettingExecute(r FeatureFlagsSett localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.jsonPatch + localVarPostBody = r.patchOperations req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/model_json_patch.go b/model_json_patch.go deleted file mode 100644 index 2191e25..0000000 --- a/model_json_patch.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -ConfigCat Public Management API - -**Base API URL**: https://api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://api.configcat.com/swagger). The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON and JSON+HAL format. Do not use this API for accessing and evaluating feature flag values. Use the [SDKs instead](https://configcat.com/docs/sdk-reference/overview). # OpenAPI Specification The complete specification is publicly available here: [swagger.json](v1/swagger.json). You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header. - -API version: v1 -Contact: support@configcat.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configcatpublicapi - -import ( - "encoding/json" -) - -// checks if the JsonPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JsonPatch{} - -// JsonPatch struct for JsonPatch -type JsonPatch struct { - Operations []PatchOperation `json:"operations,omitempty"` -} - -// NewJsonPatch instantiates a new JsonPatch 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 NewJsonPatch() *JsonPatch { - this := JsonPatch{} - return &this -} - -// NewJsonPatchWithDefaults instantiates a new JsonPatch 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 NewJsonPatchWithDefaults() *JsonPatch { - this := JsonPatch{} - return &this -} - -// GetOperations returns the Operations field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *JsonPatch) GetOperations() []PatchOperation { - if o == nil { - var ret []PatchOperation - return ret - } - return o.Operations -} - -// GetOperationsOk returns a tuple with the Operations 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 *JsonPatch) GetOperationsOk() ([]PatchOperation, bool) { - if o == nil || IsNil(o.Operations) { - return nil, false - } - return o.Operations, true -} - -// HasOperations returns a boolean if a field has been set. -func (o *JsonPatch) HasOperations() bool { - if o != nil && IsNil(o.Operations) { - return true - } - - return false -} - -// SetOperations gets a reference to the given []PatchOperation and assigns it to the Operations field. -func (o *JsonPatch) SetOperations(v []PatchOperation) { - o.Operations = v -} - -func (o JsonPatch) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JsonPatch) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Operations != nil { - toSerialize["operations"] = o.Operations - } - return toSerialize, nil -} - -type NullableJsonPatch struct { - value *JsonPatch - isSet bool -} - -func (v NullableJsonPatch) Get() *JsonPatch { - return v.value -} - -func (v *NullableJsonPatch) Set(val *JsonPatch) { - v.value = val - v.isSet = true -} - -func (v NullableJsonPatch) IsSet() bool { - return v.isSet -} - -func (v *NullableJsonPatch) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJsonPatch(val *JsonPatch) *NullableJsonPatch { - return &NullableJsonPatch{value: val, isSet: true} -} - -func (v NullableJsonPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJsonPatch) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -