diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d616b97..01c90d2 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -25,6 +25,8 @@ docs/CreateEnvironmentModel.md docs/CreateIntegrationModel.md docs/CreateOrUpdateEnvironmentAccessModel.md docs/CreatePermissionGroupRequest.md +docs/CreatePredefinedVariationModel.md +docs/CreatePredefinedVariationValueModel.md docs/CreateProductRequest.md docs/CreateSegmentModel.md docs/CreateSettingInitialValues.md @@ -76,6 +78,8 @@ docs/OrganizationsApi.md docs/PercentageOptionModel.md docs/PermissionGroupModel.md docs/PermissionGroupsApi.md +docs/PredefinedVariationModel.md +docs/PredefinedVariationValueModel.md docs/PreferencesModel.md docs/PrerequisiteComparator.md docs/PrerequisiteFlagConditionModel.md @@ -98,6 +102,7 @@ docs/SegmentListModel.md docs/SegmentModel.md docs/SegmentsApi.md docs/SettingDataModel.md +docs/SettingDataV2Model.md docs/SettingFormulaModel.md docs/SettingModel.md docs/SettingTagModel.md @@ -126,6 +131,9 @@ docs/UpdateEvaluationFormulasModel.md docs/UpdateMemberPermissionsRequest.md docs/UpdatePercentageOptionModel.md docs/UpdatePermissionGroupRequest.md +docs/UpdatePredefinedVariationModel.md +docs/UpdatePredefinedVariationValueModel.md +docs/UpdatePredefinedVariationsRequest.md docs/UpdatePreferencesRequest.md docs/UpdatePrerequisiteFlagConditionModel.md docs/UpdateProductRequest.md @@ -223,6 +231,8 @@ src/main/java/com/configcat/publicapi/java/client/model/CreateEnvironmentModel.j src/main/java/com/configcat/publicapi/java/client/model/CreateIntegrationModel.java src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateEnvironmentAccessModel.java src/main/java/com/configcat/publicapi/java/client/model/CreatePermissionGroupRequest.java +src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationModel.java +src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationValueModel.java src/main/java/com/configcat/publicapi/java/client/model/CreateProductRequest.java src/main/java/com/configcat/publicapi/java/client/model/CreateSegmentModel.java src/main/java/com/configcat/publicapi/java/client/model/CreateSettingInitialValues.java @@ -262,6 +272,8 @@ src/main/java/com/configcat/publicapi/java/client/model/OrganizationPermissionMo src/main/java/com/configcat/publicapi/java/client/model/OrganizationProductModel.java src/main/java/com/configcat/publicapi/java/client/model/PercentageOptionModel.java src/main/java/com/configcat/publicapi/java/client/model/PermissionGroupModel.java +src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationModel.java +src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationValueModel.java src/main/java/com/configcat/publicapi/java/client/model/PreferencesModel.java src/main/java/com/configcat/publicapi/java/client/model/PrerequisiteComparator.java src/main/java/com/configcat/publicapi/java/client/model/PrerequisiteFlagConditionModel.java @@ -281,6 +293,7 @@ src/main/java/com/configcat/publicapi/java/client/model/SegmentConditionModel.ja src/main/java/com/configcat/publicapi/java/client/model/SegmentListModel.java src/main/java/com/configcat/publicapi/java/client/model/SegmentModel.java src/main/java/com/configcat/publicapi/java/client/model/SettingDataModel.java +src/main/java/com/configcat/publicapi/java/client/model/SettingDataV2Model.java src/main/java/com/configcat/publicapi/java/client/model/SettingFormulaModel.java src/main/java/com/configcat/publicapi/java/client/model/SettingModel.java src/main/java/com/configcat/publicapi/java/client/model/SettingTagModel.java @@ -308,6 +321,9 @@ src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulas src/main/java/com/configcat/publicapi/java/client/model/UpdateMemberPermissionsRequest.java src/main/java/com/configcat/publicapi/java/client/model/UpdatePercentageOptionModel.java src/main/java/com/configcat/publicapi/java/client/model/UpdatePermissionGroupRequest.java +src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationModel.java +src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationValueModel.java +src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationsRequest.java src/main/java/com/configcat/publicapi/java/client/model/UpdatePreferencesRequest.java src/main/java/com/configcat/publicapi/java/client/model/UpdatePrerequisiteFlagConditionModel.java src/main/java/com/configcat/publicapi/java/client/model/UpdateProductRequest.java diff --git a/README.md b/README.md index c5aa46a..a3c8e77 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ConfigCat Public Management API - API version: v1 - - Build date: 2025-06-10T21:25:35.532049258Z[Etc/UTC] + - Build date: 2025-11-07T15:32:06.171915713Z[Etc/UTC] - Generator version: 7.7.0 The purpose of this API is to access the ConfigCat platform programmatically. @@ -199,6 +199,7 @@ Class | Method | HTTP request | Description *FeatureFlagsSettingsApi* | [**getSetting**](docs/FeatureFlagsSettingsApi.md#getSetting) | **GET** /v1/settings/{settingId} | Get Flag *FeatureFlagsSettingsApi* | [**getSettings**](docs/FeatureFlagsSettingsApi.md#getSettings) | **GET** /v1/configs/{configId}/settings | List Flags *FeatureFlagsSettingsApi* | [**replaceSetting**](docs/FeatureFlagsSettingsApi.md#replaceSetting) | **PUT** /v1/settings/{settingId} | Replace Flag +*FeatureFlagsSettingsApi* | [**updatePredefinedVariations**](docs/FeatureFlagsSettingsApi.md#updatePredefinedVariations) | **PUT** /v1/settings/{settingId}/predefined-variations | Update predefined variations (Beta) *FeatureFlagsSettingsApi* | [**updateSetting**](docs/FeatureFlagsSettingsApi.md#updateSetting) | **PATCH** /v1/settings/{settingId} | Update Flag *IntegrationLinksApi* | [**addOrUpdateIntegrationLink**](docs/IntegrationLinksApi.md#addOrUpdateIntegrationLink) | **POST** /v1/environments/{environmentId}/settings/{settingId}/integrationLinks/{integrationLinkType}/{key} | Add or update Integration link *IntegrationLinksApi* | [**deleteIntegrationLink**](docs/IntegrationLinksApi.md#deleteIntegrationLink) | **DELETE** /v1/environments/{environmentId}/settings/{settingId}/integrationLinks/{integrationLinkType}/{key} | Delete Integration link @@ -279,6 +280,8 @@ Class | Method | HTTP request | Description - [CreateIntegrationModel](docs/CreateIntegrationModel.md) - [CreateOrUpdateEnvironmentAccessModel](docs/CreateOrUpdateEnvironmentAccessModel.md) - [CreatePermissionGroupRequest](docs/CreatePermissionGroupRequest.md) + - [CreatePredefinedVariationModel](docs/CreatePredefinedVariationModel.md) + - [CreatePredefinedVariationValueModel](docs/CreatePredefinedVariationValueModel.md) - [CreateProductRequest](docs/CreateProductRequest.md) - [CreateSegmentModel](docs/CreateSegmentModel.md) - [CreateSettingInitialValues](docs/CreateSettingInitialValues.md) @@ -318,6 +321,8 @@ Class | Method | HTTP request | Description - [OrganizationProductModel](docs/OrganizationProductModel.md) - [PercentageOptionModel](docs/PercentageOptionModel.md) - [PermissionGroupModel](docs/PermissionGroupModel.md) + - [PredefinedVariationModel](docs/PredefinedVariationModel.md) + - [PredefinedVariationValueModel](docs/PredefinedVariationValueModel.md) - [PreferencesModel](docs/PreferencesModel.md) - [PrerequisiteComparator](docs/PrerequisiteComparator.md) - [PrerequisiteFlagConditionModel](docs/PrerequisiteFlagConditionModel.md) @@ -337,6 +342,7 @@ Class | Method | HTTP request | Description - [SegmentListModel](docs/SegmentListModel.md) - [SegmentModel](docs/SegmentModel.md) - [SettingDataModel](docs/SettingDataModel.md) + - [SettingDataV2Model](docs/SettingDataV2Model.md) - [SettingFormulaModel](docs/SettingFormulaModel.md) - [SettingModel](docs/SettingModel.md) - [SettingTagModel](docs/SettingTagModel.md) @@ -364,6 +370,9 @@ Class | Method | HTTP request | Description - [UpdateMemberPermissionsRequest](docs/UpdateMemberPermissionsRequest.md) - [UpdatePercentageOptionModel](docs/UpdatePercentageOptionModel.md) - [UpdatePermissionGroupRequest](docs/UpdatePermissionGroupRequest.md) + - [UpdatePredefinedVariationModel](docs/UpdatePredefinedVariationModel.md) + - [UpdatePredefinedVariationValueModel](docs/UpdatePredefinedVariationValueModel.md) + - [UpdatePredefinedVariationsRequest](docs/UpdatePredefinedVariationsRequest.md) - [UpdatePreferencesRequest](docs/UpdatePreferencesRequest.md) - [UpdatePrerequisiteFlagConditionModel](docs/UpdatePrerequisiteFlagConditionModel.md) - [UpdateProductRequest](docs/UpdateProductRequest.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 10044c9..525222d 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -5729,6 +5729,57 @@ paths: x-content-type: application/json x-accepts: - application/json + /v1/settings/{settingId}/predefined-variations: + put: + description: |- + This endpoint updates the predefined variations for a Feature Flag or Setting identified by the `settingId` parameter. + + **Important:** You can only update a predefined variation's value if it is not used anywhere in your feature flags. + + **Beta feature:** The feature is currently in closed beta state and cannot be used. + operationId: update-predefined-variations + parameters: + - description: The identifier of the Setting. + explode: false + in: path + name: settingId + required: true + schema: + format: int32 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePredefinedVariationsRequest' + text/json: + schema: + $ref: '#/components/schemas/UpdatePredefinedVariationsRequest' + application/*+json: + schema: + $ref: '#/components/schemas/UpdatePredefinedVariationsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SettingModel' + description: When the update was successful. + "400": + description: Bad request. + "404": + description: Not found. + "429": + description: Too many requests. In case of the request rate exceeds the + rate limits. + summary: Update predefined variations (Beta) + tags: + - Feature Flags & Settings + x-content-type: application/json + x-accepts: + - application/json /v1/invitations/{invitationId}: delete: description: This endpoint removes an Invitation identified by the `invitationId` @@ -5941,6 +5992,9 @@ components: - settingChanged - settingDeleted - settingsReordered + - predefinedVariationsChanged + - settingConvertedToPredefinedVariations + - settingConvertedToCustomValues - settingValueChanged - webHookCreated - webHookChanged @@ -6007,6 +6061,14 @@ components: - userEnabled - syncUserDeleted - syncGroupDeleted + - proxyConfigurationCreated + - proxyConfigurationChanged + - proxyConfigurationDeleted + - proxyConfigurationSecretRegenerated + - proxyNotificationSettingsUpdated + - proxyNotificationSettingsDeleted + - proxyNotificationSigningKeyAdded + - proxyNotificationSigningKeyDeleted type: string CodeReferenceModel: example: @@ -6234,6 +6296,7 @@ components: nullable: true type: string required: + - hint - value type: object ComparisonValueModel: @@ -6254,6 +6317,10 @@ components: $ref: '#/components/schemas/ComparisonValueListModel' nullable: true type: array + required: + - doubleValue + - listValue + - stringValue type: object ConditionModel: example: @@ -6337,12 +6404,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -6358,12 +6427,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -6378,6 +6449,7 @@ components: percentageEvaluationAttribute: percentageEvaluationAttribute defaultValue: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -6412,8 +6484,25 @@ components: isWatching: true settingType: boolean key: key - settingId: 0 - order: 6 + predefinedVariations: + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + settingId: 5 + order: 5 updatedAt: 2000-01-23T04:56:07.000+00:00 lastUpdaterUserFullName: lastUpdaterUserFullName properties: @@ -6428,7 +6517,7 @@ components: $ref: '#/components/schemas/TargetingRuleModel' type: array setting: - $ref: '#/components/schemas/SettingDataModel' + $ref: '#/components/schemas/SettingDataV2Model' updatedAt: description: The last updated date and time when the Feature Flag or Setting. format: date-time @@ -6511,12 +6600,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -6532,12 +6623,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -6552,6 +6645,7 @@ components: percentageEvaluationAttribute: percentageEvaluationAttribute defaultValue: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -6586,8 +6680,25 @@ components: isWatching: true settingType: boolean key: key - settingId: 0 - order: 6 + predefinedVariations: + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + settingId: 5 + order: 5 updatedAt: 2000-01-23T04:56:07.000+00:00 lastUpdaterUserFullName: lastUpdaterUserFullName - lastVersionId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -6596,12 +6707,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -6617,12 +6730,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -6637,6 +6752,7 @@ components: percentageEvaluationAttribute: percentageEvaluationAttribute defaultValue: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -6671,8 +6787,25 @@ components: isWatching: true settingType: boolean key: key - settingId: 0 - order: 6 + predefinedVariations: + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + settingId: 5 + order: 5 updatedAt: 2000-01-23T04:56:07.000+00:00 lastUpdaterUserFullName: lastUpdaterUserFullName readOnly: true @@ -7239,6 +7372,63 @@ components: required: - name type: object + CreatePredefinedVariationModel: + description: A Feature Flag or Predefined Variation. + example: + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + properties: + value: + $ref: '#/components/schemas/CreatePredefinedVariationValueModel' + name: + description: "The name of the Feature Flag or Predefined Variation, shown\ + \ on the Dashboard UI. If not set, the Value will be shown." + maxLength: 255 + minLength: 0 + nullable: true + type: string + hint: + description: "The name of the Feature Flag or Predefined Variation, shown\ + \ on the Dashboard UI. If not set, the Value will be shown." + maxLength: 1000 + minLength: 0 + nullable: true + type: string + required: + - value + type: object + CreatePredefinedVariationValueModel: + description: Represents the value of a Feature Flag or Predefined Variation. + example: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + properties: + boolValue: + description: The served value in case of a boolean Feature Flag. + nullable: true + type: boolean + stringValue: + description: The served value in case of a text Setting. + nullable: true + type: string + intValue: + description: The served value in case of a whole number Setting. + format: int32 + nullable: true + type: integer + doubleValue: + description: The served value in case of a decimal number Setting. + format: double + nullable: true + type: number + type: object CreateProductRequest: example: name: name @@ -7310,16 +7500,36 @@ components: value: "" - environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 value: "" - settingIdToInitFrom: 1 + settingIdToInitFrom: 5 hint: hint name: name settingType: boolean key: key + predefinedVariations: + - hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + - hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 tags: - 0 - 0 order: 6 properties: + name: + description: The name of the Feature Flag or Setting. + maxLength: 255 + minLength: 1 + type: string hint: description: "A short description for the setting, shown on the Dashboard\ \ UI." @@ -7346,13 +7556,14 @@ components: maxLength: 255 minLength: 1 type: string - name: - description: The name of the Feature Flag or Setting. - maxLength: 255 - minLength: 1 - type: string settingType: $ref: '#/components/schemas/SettingType' + predefinedVariations: + description: The Feature Flag or Setting's Variations. + items: + $ref: '#/components/schemas/CreatePredefinedVariationModel' + nullable: true + type: array initialValues: description: "Optional, initial value of the Feature Flag or Setting in\ \ the given Environments. Only one of the SettingIdToInitFrom or the InitialValues\ @@ -7690,9 +7901,11 @@ components: value: allOf: - $ref: '#/components/schemas/SettingValueType' - description: The initial value in the given Environment. It must respect - the setting type. In some generated clients for strictly typed languages - you may use double/float properties to handle integer values. + description: "The initial value in the given Environment. It must respect\ + \ the setting type. In some generated clients for strictly typed languages,\ + \ you may use double/float properties to handle integer values. In case\ + \ of a Feature Flag with predefined variations, the value must match one\ + \ of the predefined variations' value." required: - value type: object @@ -8520,6 +8733,7 @@ components: percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -8698,6 +8912,76 @@ components: - permissionGroupId - product type: object + PredefinedVariationModel: + description: A Feature Flag or Predefined Variation. + example: + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + properties: + value: + $ref: '#/components/schemas/PredefinedVariationValueModel' + name: + description: "The name of the Feature Flag or Predefined Variation, shown\ + \ on the Dashboard UI. If not set, the Value will be shown." + maxLength: 255 + minLength: 0 + nullable: true + type: string + hint: + description: "The name of the Feature Flag or Predefined Variation, shown\ + \ on the Dashboard UI. If not set, the Value will be shown." + maxLength: 1000 + minLength: 0 + nullable: true + type: string + predefinedVariationId: + description: The Feature Flag or Predefined Variation's identifier. + format: uuid + type: string + required: + - hint + - name + - predefinedVariationId + - value + type: object + PredefinedVariationValueModel: + description: Represents the value of a Feature Flag or Predefined Variation. + example: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + properties: + boolValue: + description: The served value in case of a boolean Feature Flag. + nullable: true + type: boolean + stringValue: + description: The served value in case of a text Setting. + nullable: true + type: string + intValue: + description: The served value in case of a whole number Setting. + format: int32 + nullable: true + type: integer + doubleValue: + description: The served value in case of a decimal number Setting. + format: double + nullable: true + type: number + required: + - boolValue + - doubleValue + - intValue + - stringValue + type: object PreferencesModel: example: keyGenerationMode: camelCase @@ -8972,6 +9256,11 @@ components: - 0 order: 6 properties: + name: + description: The name of the Feature Flag or Setting. + maxLength: 255 + minLength: 1 + type: string hint: description: "A short description for the setting, shown on the Dashboard\ \ UI." @@ -8993,12 +9282,8 @@ components: format: int32 nullable: true type: integer - name: - description: The name of the Feature Flag or Setting. - maxLength: 255 - minLength: 1 - nullable: true - type: string + required: + - name type: object RolloutPercentageItemModel: example: @@ -9348,6 +9633,91 @@ components: - settingId - settingType type: object + SettingDataV2Model: + description: Metadata of a Feature Flag or Setting. + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + creatorEmail: creatorEmail + hint: hint + name: name + creatorFullName: creatorFullName + isWatching: true + settingType: boolean + key: key + predefinedVariations: + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + settingId: 5 + order: 5 + properties: + settingId: + description: Identifier of the Feature Flag or Setting. + format: int32 + type: integer + key: + description: Key of the Feature Flag or Setting. + type: string + name: + description: Name of the Feature Flag or Setting. + type: string + hint: + description: Description of the Feature Flag or Setting. + nullable: true + type: string + settingType: + $ref: '#/components/schemas/SettingType' + order: + description: The order of the Feature Flag or Setting represented on the + ConfigCat Dashboard. + format: int32 + type: integer + createdAt: + description: The creation time of the Feature Flag or Setting. + format: date-time + nullable: true + type: string + creatorEmail: + description: The user's email address who created the Feature Flag or Setting. + nullable: true + type: string + creatorFullName: + description: The user's name who created the Feature Flag or Setting. + nullable: true + type: string + predefinedVariations: + description: A collection of Variations for a Feature Flag or Setting. + items: + $ref: '#/components/schemas/PredefinedVariationModel' + type: array + isWatching: + type: boolean + required: + - createdAt + - creatorEmail + - creatorFullName + - hint + - isWatching + - key + - name + - order + - predefinedVariations + - settingId + - settingType + type: object SettingFormulaModel: example: targetingRules: @@ -9355,12 +9725,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -9376,12 +9748,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -9396,6 +9770,7 @@ components: percentageEvaluationAttribute: percentageEvaluationAttribute defaultValue: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -9410,8 +9785,25 @@ components: isWatching: true settingType: boolean key: key - settingId: 0 - order: 6 + predefinedVariations: + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + settingId: 5 + order: 5 lastVersionId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 environment: product: @@ -9438,8 +9830,8 @@ components: maxStringFlagValueLength: 3 maxTargetingRuleCount: 5 settingIdsWherePrerequisite: - - 5 - - 5 + - 2 + - 2 integrationLinks: - integrationLinkType: trello description: description @@ -9488,7 +9880,7 @@ components: $ref: '#/components/schemas/TargetingRuleModel' type: array setting: - $ref: '#/components/schemas/SettingDataModel' + $ref: '#/components/schemas/SettingDataV2Model' updatedAt: description: The last updated date and time when the Feature Flag or Setting. format: date-time @@ -9560,6 +9952,23 @@ components: name: name settingType: boolean key: key + predefinedVariations: + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 1 + boolValue: true + doubleValue: 5.962133916683182 settingId: 0 order: 6 tags: @@ -9626,6 +10035,11 @@ components: items: $ref: '#/components/schemas/TagModel' type: array + predefinedVariations: + description: The Feature Flag or Setting's Variations. + items: + $ref: '#/components/schemas/PredefinedVariationModel' + type: array required: - configId - configName @@ -9634,6 +10048,7 @@ components: - key - name - order + - predefinedVariations - settingId - settingType - tags @@ -10174,12 +10589,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10335,12 +10752,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10356,12 +10775,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10376,6 +10797,7 @@ components: percentageEvaluationAttribute: percentageEvaluationAttribute defaultValue: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10404,12 +10826,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10425,12 +10849,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10445,6 +10871,7 @@ components: percentageEvaluationAttribute: percentageEvaluationAttribute defaultValue: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10479,12 +10906,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10500,12 +10929,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10520,6 +10951,7 @@ components: percentageEvaluationAttribute: percentageEvaluationAttribute defaultValue: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10529,12 +10961,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10550,12 +10984,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10570,6 +11006,7 @@ components: percentageEvaluationAttribute: percentageEvaluationAttribute defaultValue: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10616,6 +11053,7 @@ components: percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -10769,6 +11207,98 @@ components: nullable: true type: array type: object + UpdatePredefinedVariationModel: + description: A Feature Flag or Predefined Variation. + example: + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 0 + boolValue: true + doubleValue: 6.027456183070403 + properties: + value: + $ref: '#/components/schemas/UpdatePredefinedVariationValueModel' + name: + description: "The name of the Feature Flag or Predefined Variation, shown\ + \ on the Dashboard UI. If not set, the Value will be shown." + maxLength: 255 + minLength: 0 + nullable: true + type: string + hint: + description: "The name of the Feature Flag or Predefined Variation, shown\ + \ on the Dashboard UI. If not set, the Value will be shown." + maxLength: 1000 + minLength: 0 + nullable: true + type: string + predefinedVariationId: + description: The Feature Flag or Predefined Variation's identifier to update. + Omit the value if you want to add a new predefined variation. + format: uuid + nullable: true + type: string + required: + - value + type: object + UpdatePredefinedVariationValueModel: + description: Represents the value of a Feature Flag or Predefined Variation. + example: + stringValue: stringValue + intValue: 0 + boolValue: true + doubleValue: 6.027456183070403 + properties: + boolValue: + description: The served value in case of a boolean Feature Flag. + nullable: true + type: boolean + stringValue: + description: The served value in case of a text Setting. + nullable: true + type: string + intValue: + description: The served value in case of a whole number Setting. + format: int32 + nullable: true + type: integer + doubleValue: + description: The served value in case of a decimal number Setting. + format: double + nullable: true + type: number + type: object + UpdatePredefinedVariationsRequest: + example: + predefinedVariations: + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 0 + boolValue: true + doubleValue: 6.027456183070403 + - predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + hint: hint + name: name + value: + stringValue: stringValue + intValue: 0 + boolValue: true + doubleValue: 6.027456183070403 + properties: + predefinedVariations: + description: A collection of Feature Flag or Predefined Variations. + items: + $ref: '#/components/schemas/UpdatePredefinedVariationModel' + type: array + required: + - predefinedVariations + type: object UpdatePreferencesRequest: example: keyGenerationMode: "" @@ -11130,12 +11660,14 @@ components: - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 - percentage: 1 value: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -11193,6 +11725,7 @@ components: description: Represents the value of a Feature Flag or Setting. example: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -11215,6 +11748,11 @@ components: format: double nullable: true type: number + predefinedVariationId: + description: The served Variation's identifier. + format: uuid + nullable: true + type: string type: object UserComparator: description: The comparison operator which defines the relation between the @@ -11307,6 +11845,7 @@ components: description: Represents the value of a Feature Flag or Setting. example: stringValue: stringValue + predefinedVariationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 intValue: 0 boolValue: true doubleValue: 6.027456183070403 @@ -11329,10 +11868,16 @@ components: format: double nullable: true type: number + predefinedVariationId: + description: The served Variation's identifier. + format: uuid + nullable: true + type: string required: - boolValue - doubleValue - intValue + - predefinedVariationId - stringValue type: object WebHookHttpMethod: diff --git a/build.gradle b/build.gradle index f295326..731682e 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ plugins { } group = 'com.configcat' -version = '2.0.2' +version = '2.1.0' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/docs/AuditLogType.md b/docs/AuditLogType.md index 58996dd..c706255 100644 --- a/docs/AuditLogType.md +++ b/docs/AuditLogType.md @@ -57,6 +57,12 @@ * `SETTINGS_REORDERED` (value: `"settingsReordered"`) +* `PREDEFINED_VARIATIONS_CHANGED` (value: `"predefinedVariationsChanged"`) + +* `SETTING_CONVERTED_TO_PREDEFINED_VARIATIONS` (value: `"settingConvertedToPredefinedVariations"`) + +* `SETTING_CONVERTED_TO_CUSTOM_VALUES` (value: `"settingConvertedToCustomValues"`) + * `SETTING_VALUE_CHANGED` (value: `"settingValueChanged"`) * `WEB_HOOK_CREATED` (value: `"webHookCreated"`) @@ -189,5 +195,21 @@ * `SYNC_GROUP_DELETED` (value: `"syncGroupDeleted"`) +* `PROXY_CONFIGURATION_CREATED` (value: `"proxyConfigurationCreated"`) + +* `PROXY_CONFIGURATION_CHANGED` (value: `"proxyConfigurationChanged"`) + +* `PROXY_CONFIGURATION_DELETED` (value: `"proxyConfigurationDeleted"`) + +* `PROXY_CONFIGURATION_SECRET_REGENERATED` (value: `"proxyConfigurationSecretRegenerated"`) + +* `PROXY_NOTIFICATION_SETTINGS_UPDATED` (value: `"proxyNotificationSettingsUpdated"`) + +* `PROXY_NOTIFICATION_SETTINGS_DELETED` (value: `"proxyNotificationSettingsDeleted"`) + +* `PROXY_NOTIFICATION_SIGNING_KEY_ADDED` (value: `"proxyNotificationSigningKeyAdded"`) + +* `PROXY_NOTIFICATION_SIGNING_KEY_DELETED` (value: `"proxyNotificationSigningKeyDeleted"`) + diff --git a/docs/AuditLogsApi.md b/docs/AuditLogsApi.md index 5446e57..39b3793 100644 --- a/docs/AuditLogsApi.md +++ b/docs/AuditLogsApi.md @@ -65,7 +65,7 @@ public class Example { | **productId** | **UUID**| The identifier of the Product. | | | **configId** | **UUID**| The identifier of the Config. | [optional] | | **environmentId** | **UUID**| The identifier of the Environment. | [optional] | -| **auditLogType** | [**AuditLogType**](.md)| Filter Audit logs by Audit log type. | [optional] [enum: productCreated, productChanged, productOwnershipTransferred, productDeleted, productsReordered, teamMemberInvited, teamMemberInvitationRevoked, teamMemberJoined, teamMemberPermissionGroupChanged, teamMemberRemoved, teamMemberLeft, teamMemberInvitationChanged, teamMemberInvitationResent, teamMemberInvitationRejected, configCreated, configChanged, configDeleted, configsReordered, environmentCreated, environmentChanged, environmentDeleted, environmentsReordered, settingCreated, settingChanged, settingDeleted, settingsReordered, settingValueChanged, webHookCreated, webHookChanged, webHookDeleted, permissionGroupCreated, permissionGroupChanged, permissionGroupDeleted, permissionGroupDefault, apiKeyAdded, apiKeyRemoved, integrationAdded, integrationChanged, integrationRemoved, apiKeyConnected, integrationLinkAdded, integrationLinkRemoved, organizationAdded, organizationRemoved, organizationChanged, organizationSubscriptionTypeChanged, organizationAdminChanged, organizationAdminLeft, twoFactorDisabledForMember, tagAdded, tagChanged, tagRemoved, settingTagAdded, settingTagRemoved, publicApiAccessTokenAdded, publicApiAccessTokenRemoved, domainAdded, domainVerified, domainRemoved, domainSamlConfigured, domainSamlDeleted, autoProvisioningConfigurationChanged, samlIdpConfigurationAdded, samlIdpConfigurationRemoved, samlIdpConfigurationUpdated, autoProvisioningEnabledChanged, organizationMemberJoined, organizationMemberProductJoinRequested, organizationMemberProductJoinRequestRejected, organizationMemberProductJoinRequestApproved, organizationMemberRemoved, codeReferencesUploaded, codeReferenceDeleted, codeReferenceStaleBranchDeleted, segmentCreated, segmentChanged, segmentDeleted, webhookSigningKeyDeleted, webhookSigningKeyCreated, userProvisioningConfigurationChanged, syncGroupProvisioningRuleChanged, syncGroupsReordered, syncUserProvisioningEnabled, syncUserProvisioningDisabled, userEmailChanged, userFullNameChanged, userDisabled, awsConnected, awsDisconnected, userEnabled, syncUserDeleted, syncGroupDeleted] | +| **auditLogType** | [**AuditLogType**](.md)| Filter Audit logs by Audit log type. | [optional] [enum: productCreated, productChanged, productOwnershipTransferred, productDeleted, productsReordered, teamMemberInvited, teamMemberInvitationRevoked, teamMemberJoined, teamMemberPermissionGroupChanged, teamMemberRemoved, teamMemberLeft, teamMemberInvitationChanged, teamMemberInvitationResent, teamMemberInvitationRejected, configCreated, configChanged, configDeleted, configsReordered, environmentCreated, environmentChanged, environmentDeleted, environmentsReordered, settingCreated, settingChanged, settingDeleted, settingsReordered, predefinedVariationsChanged, settingConvertedToPredefinedVariations, settingConvertedToCustomValues, settingValueChanged, webHookCreated, webHookChanged, webHookDeleted, permissionGroupCreated, permissionGroupChanged, permissionGroupDeleted, permissionGroupDefault, apiKeyAdded, apiKeyRemoved, integrationAdded, integrationChanged, integrationRemoved, apiKeyConnected, integrationLinkAdded, integrationLinkRemoved, organizationAdded, organizationRemoved, organizationChanged, organizationSubscriptionTypeChanged, organizationAdminChanged, organizationAdminLeft, twoFactorDisabledForMember, tagAdded, tagChanged, tagRemoved, settingTagAdded, settingTagRemoved, publicApiAccessTokenAdded, publicApiAccessTokenRemoved, domainAdded, domainVerified, domainRemoved, domainSamlConfigured, domainSamlDeleted, autoProvisioningConfigurationChanged, samlIdpConfigurationAdded, samlIdpConfigurationRemoved, samlIdpConfigurationUpdated, autoProvisioningEnabledChanged, organizationMemberJoined, organizationMemberProductJoinRequested, organizationMemberProductJoinRequestRejected, organizationMemberProductJoinRequestApproved, organizationMemberRemoved, codeReferencesUploaded, codeReferenceDeleted, codeReferenceStaleBranchDeleted, segmentCreated, segmentChanged, segmentDeleted, webhookSigningKeyDeleted, webhookSigningKeyCreated, userProvisioningConfigurationChanged, syncGroupProvisioningRuleChanged, syncGroupsReordered, syncUserProvisioningEnabled, syncUserProvisioningDisabled, userEmailChanged, userFullNameChanged, userDisabled, awsConnected, awsDisconnected, userEnabled, syncUserDeleted, syncGroupDeleted, proxyConfigurationCreated, proxyConfigurationChanged, proxyConfigurationDeleted, proxyConfigurationSecretRegenerated, proxyNotificationSettingsUpdated, proxyNotificationSettingsDeleted, proxyNotificationSigningKeyAdded, proxyNotificationSigningKeyDeleted] | | **fromUtcDateTime** | **OffsetDateTime**| Filter Audit logs by starting UTC date. | [optional] | | **toUtcDateTime** | **OffsetDateTime**| Filter Audit logs by ending UTC date. | [optional] | @@ -219,7 +219,7 @@ public class Example { | **productId** | **UUID**| The identifier of the Product. | [optional] | | **configId** | **UUID**| The identifier of the Config. | [optional] | | **environmentId** | **UUID**| The identifier of the Environment. | [optional] | -| **auditLogType** | [**AuditLogType**](.md)| Filter Audit logs by Audit log type. | [optional] [enum: productCreated, productChanged, productOwnershipTransferred, productDeleted, productsReordered, teamMemberInvited, teamMemberInvitationRevoked, teamMemberJoined, teamMemberPermissionGroupChanged, teamMemberRemoved, teamMemberLeft, teamMemberInvitationChanged, teamMemberInvitationResent, teamMemberInvitationRejected, configCreated, configChanged, configDeleted, configsReordered, environmentCreated, environmentChanged, environmentDeleted, environmentsReordered, settingCreated, settingChanged, settingDeleted, settingsReordered, settingValueChanged, webHookCreated, webHookChanged, webHookDeleted, permissionGroupCreated, permissionGroupChanged, permissionGroupDeleted, permissionGroupDefault, apiKeyAdded, apiKeyRemoved, integrationAdded, integrationChanged, integrationRemoved, apiKeyConnected, integrationLinkAdded, integrationLinkRemoved, organizationAdded, organizationRemoved, organizationChanged, organizationSubscriptionTypeChanged, organizationAdminChanged, organizationAdminLeft, twoFactorDisabledForMember, tagAdded, tagChanged, tagRemoved, settingTagAdded, settingTagRemoved, publicApiAccessTokenAdded, publicApiAccessTokenRemoved, domainAdded, domainVerified, domainRemoved, domainSamlConfigured, domainSamlDeleted, autoProvisioningConfigurationChanged, samlIdpConfigurationAdded, samlIdpConfigurationRemoved, samlIdpConfigurationUpdated, autoProvisioningEnabledChanged, organizationMemberJoined, organizationMemberProductJoinRequested, organizationMemberProductJoinRequestRejected, organizationMemberProductJoinRequestApproved, organizationMemberRemoved, codeReferencesUploaded, codeReferenceDeleted, codeReferenceStaleBranchDeleted, segmentCreated, segmentChanged, segmentDeleted, webhookSigningKeyDeleted, webhookSigningKeyCreated, userProvisioningConfigurationChanged, syncGroupProvisioningRuleChanged, syncGroupsReordered, syncUserProvisioningEnabled, syncUserProvisioningDisabled, userEmailChanged, userFullNameChanged, userDisabled, awsConnected, awsDisconnected, userEnabled, syncUserDeleted, syncGroupDeleted] | +| **auditLogType** | [**AuditLogType**](.md)| Filter Audit logs by Audit log type. | [optional] [enum: productCreated, productChanged, productOwnershipTransferred, productDeleted, productsReordered, teamMemberInvited, teamMemberInvitationRevoked, teamMemberJoined, teamMemberPermissionGroupChanged, teamMemberRemoved, teamMemberLeft, teamMemberInvitationChanged, teamMemberInvitationResent, teamMemberInvitationRejected, configCreated, configChanged, configDeleted, configsReordered, environmentCreated, environmentChanged, environmentDeleted, environmentsReordered, settingCreated, settingChanged, settingDeleted, settingsReordered, predefinedVariationsChanged, settingConvertedToPredefinedVariations, settingConvertedToCustomValues, settingValueChanged, webHookCreated, webHookChanged, webHookDeleted, permissionGroupCreated, permissionGroupChanged, permissionGroupDeleted, permissionGroupDefault, apiKeyAdded, apiKeyRemoved, integrationAdded, integrationChanged, integrationRemoved, apiKeyConnected, integrationLinkAdded, integrationLinkRemoved, organizationAdded, organizationRemoved, organizationChanged, organizationSubscriptionTypeChanged, organizationAdminChanged, organizationAdminLeft, twoFactorDisabledForMember, tagAdded, tagChanged, tagRemoved, settingTagAdded, settingTagRemoved, publicApiAccessTokenAdded, publicApiAccessTokenRemoved, domainAdded, domainVerified, domainRemoved, domainSamlConfigured, domainSamlDeleted, autoProvisioningConfigurationChanged, samlIdpConfigurationAdded, samlIdpConfigurationRemoved, samlIdpConfigurationUpdated, autoProvisioningEnabledChanged, organizationMemberJoined, organizationMemberProductJoinRequested, organizationMemberProductJoinRequestRejected, organizationMemberProductJoinRequestApproved, organizationMemberRemoved, codeReferencesUploaded, codeReferenceDeleted, codeReferenceStaleBranchDeleted, segmentCreated, segmentChanged, segmentDeleted, webhookSigningKeyDeleted, webhookSigningKeyCreated, userProvisioningConfigurationChanged, syncGroupProvisioningRuleChanged, syncGroupsReordered, syncUserProvisioningEnabled, syncUserProvisioningDisabled, userEmailChanged, userFullNameChanged, userDisabled, awsConnected, awsDisconnected, userEnabled, syncUserDeleted, syncGroupDeleted, proxyConfigurationCreated, proxyConfigurationChanged, proxyConfigurationDeleted, proxyConfigurationSecretRegenerated, proxyNotificationSettingsUpdated, proxyNotificationSettingsDeleted, proxyNotificationSigningKeyAdded, proxyNotificationSigningKeyDeleted] | | **fromUtcDateTime** | **OffsetDateTime**| Filter Audit logs by starting UTC date. | [optional] | | **toUtcDateTime** | **OffsetDateTime**| Filter Audit logs by ending UTC date. | [optional] | diff --git a/docs/ComparisonValueListModel.md b/docs/ComparisonValueListModel.md index f66975b..5d30b69 100644 --- a/docs/ComparisonValueListModel.md +++ b/docs/ComparisonValueListModel.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**value** | **String** | The actual comparison value. | | -|**hint** | **String** | An optional hint for the comparison value. | [optional] | +|**hint** | **String** | An optional hint for the comparison value. | | diff --git a/docs/ComparisonValueModel.md b/docs/ComparisonValueModel.md index af7a8ad..dae07be 100644 --- a/docs/ComparisonValueModel.md +++ b/docs/ComparisonValueModel.md @@ -8,9 +8,9 @@ The value that the user object's attribute is compared to. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**stringValue** | **String** | The string representation of the comparison value. | [optional] | -|**doubleValue** | **Double** | The number representation of the comparison value. | [optional] | -|**listValue** | [**List<ComparisonValueListModel>**](ComparisonValueListModel.md) | The list representation of the comparison value. | [optional] | +|**stringValue** | **String** | The string representation of the comparison value. | | +|**doubleValue** | **Double** | The number representation of the comparison value. | | +|**listValue** | [**List<ComparisonValueListModel>**](ComparisonValueListModel.md) | The list representation of the comparison value. | | diff --git a/docs/ConfigSettingFormulaModel.md b/docs/ConfigSettingFormulaModel.md index 7a31b7a..122e4d5 100644 --- a/docs/ConfigSettingFormulaModel.md +++ b/docs/ConfigSettingFormulaModel.md @@ -10,7 +10,7 @@ |**lastVersionId** | **UUID** | | | |**defaultValue** | [**ValueModel**](ValueModel.md) | | | |**targetingRules** | [**List<TargetingRuleModel>**](TargetingRuleModel.md) | The targeting rules of the Feature Flag or Setting. | | -|**setting** | [**SettingDataModel**](SettingDataModel.md) | | | +|**setting** | [**SettingDataV2Model**](SettingDataV2Model.md) | | | |**updatedAt** | **OffsetDateTime** | The last updated date and time when the Feature Flag or Setting. | | |**percentageEvaluationAttribute** | **String** | The user attribute used for percentage evaluation. If not set, it defaults to the `Identifier` user object attribute. | | |**lastUpdaterUserEmail** | **String** | The email of the user who last updated the Feature Flag or Setting. | | diff --git a/docs/CreatePredefinedVariationModel.md b/docs/CreatePredefinedVariationModel.md new file mode 100644 index 0000000..e0604a0 --- /dev/null +++ b/docs/CreatePredefinedVariationModel.md @@ -0,0 +1,16 @@ + + +# CreatePredefinedVariationModel + +A Feature Flag or Predefined Variation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | [**CreatePredefinedVariationValueModel**](CreatePredefinedVariationValueModel.md) | | | +|**name** | **String** | The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. | [optional] | +|**hint** | **String** | The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. | [optional] | + + + diff --git a/docs/CreatePredefinedVariationValueModel.md b/docs/CreatePredefinedVariationValueModel.md new file mode 100644 index 0000000..3fadbef --- /dev/null +++ b/docs/CreatePredefinedVariationValueModel.md @@ -0,0 +1,17 @@ + + +# CreatePredefinedVariationValueModel + +Represents the value of a Feature Flag or Predefined Variation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**boolValue** | **Boolean** | The served value in case of a boolean Feature Flag. | [optional] | +|**stringValue** | **String** | The served value in case of a text Setting. | [optional] | +|**intValue** | **Integer** | The served value in case of a whole number Setting. | [optional] | +|**doubleValue** | **Double** | The served value in case of a decimal number Setting. | [optional] | + + + diff --git a/docs/CreateSettingInitialValues.md b/docs/CreateSettingInitialValues.md index b0be01b..5034964 100644 --- a/docs/CreateSettingInitialValues.md +++ b/docs/CreateSettingInitialValues.md @@ -7,12 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the Feature Flag or Setting. | | |**hint** | **String** | A short description for the setting, shown on the Dashboard UI. | [optional] | |**tags** | **List<Long>** | The IDs of the tags which are attached to the setting. | [optional] | |**order** | **Integer** | The order of the Setting represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers. | [optional] | |**key** | **String** | The key of the Feature Flag or Setting. | | -|**name** | **String** | The name of the Feature Flag or Setting. | | |**settingType** | **SettingType** | | | +|**predefinedVariations** | [**List<CreatePredefinedVariationModel>**](CreatePredefinedVariationModel.md) | The Feature Flag or Setting's Variations. | [optional] | |**initialValues** | [**List<InitialValue>**](InitialValue.md) | Optional, initial value of the Feature Flag or Setting in the given Environments. Only one of the SettingIdToInitFrom or the InitialValues properties can be set. | [optional] | |**settingIdToInitFrom** | **Integer** | Optional, the SettingId to initialize the values and tags of the Feature Flag or Setting from. Only can be set if you have at least ReadOnly access in all the Environments. Only one of the SettingIdToInitFrom or the InitialValues properties can be set. | [optional] | diff --git a/docs/FeatureFlagsSettingsApi.md b/docs/FeatureFlagsSettingsApi.md index ae72c05..95f995e 100644 --- a/docs/FeatureFlagsSettingsApi.md +++ b/docs/FeatureFlagsSettingsApi.md @@ -9,6 +9,7 @@ All URIs are relative to *https://api.configcat.com* | [**getSetting**](FeatureFlagsSettingsApi.md#getSetting) | **GET** /v1/settings/{settingId} | Get Flag | | [**getSettings**](FeatureFlagsSettingsApi.md#getSettings) | **GET** /v1/configs/{configId}/settings | List Flags | | [**replaceSetting**](FeatureFlagsSettingsApi.md#replaceSetting) | **PUT** /v1/settings/{settingId} | Replace Flag | +| [**updatePredefinedVariations**](FeatureFlagsSettingsApi.md#updatePredefinedVariations) | **PUT** /v1/settings/{settingId}/predefined-variations | Update predefined variations (Beta) | | [**updateSetting**](FeatureFlagsSettingsApi.md#updateSetting) | **PATCH** /v1/settings/{settingId} | Update Flag | @@ -370,6 +371,79 @@ public class Example { | **404** | Not found. | - | | **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + +# **updatePredefinedVariations** +> SettingModel updatePredefinedVariations(settingId, updatePredefinedVariationsRequest) + +Update predefined variations (Beta) + +This endpoint updates the predefined variations for a Feature Flag or Setting identified by the `settingId` parameter. **Important:** You can only update a predefined variation's value if it is not used anywhere in your feature flags. **Beta feature:** The feature is currently in closed beta state and cannot be used. + +### Example +```java +// Import classes: +import com.configcat.publicapi.java.client.ApiClient; +import com.configcat.publicapi.java.client.ApiException; +import com.configcat.publicapi.java.client.Configuration; +import com.configcat.publicapi.java.client.auth.*; +import com.configcat.publicapi.java.client.models.*; +import com.configcat.publicapi.java.client.api.FeatureFlagsSettingsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.configcat.com"); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + FeatureFlagsSettingsApi apiInstance = new FeatureFlagsSettingsApi(defaultClient); + Integer settingId = 56; // Integer | The identifier of the Setting. + UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest = new UpdatePredefinedVariationsRequest(); // UpdatePredefinedVariationsRequest | + try { + SettingModel result = apiInstance.updatePredefinedVariations(settingId, updatePredefinedVariationsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FeatureFlagsSettingsApi#updatePredefinedVariations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **settingId** | **Integer**| The identifier of the Setting. | | +| **updatePredefinedVariationsRequest** | [**UpdatePredefinedVariationsRequest**](UpdatePredefinedVariationsRequest.md)| | | + +### Return type + +[**SettingModel**](SettingModel.md) + +### Authorization + +[Basic](../README.md#Basic) + +### HTTP request headers + + - **Content-Type**: application/json, text/json, application/*+json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | When the update was successful. | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + # **updateSetting** > SettingModel updateSetting(settingId, jsonPatchOperation) diff --git a/docs/InitialValue.md b/docs/InitialValue.md index 40218bd..a7a48f2 100644 --- a/docs/InitialValue.md +++ b/docs/InitialValue.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**environmentId** | **UUID** | The ID of the Environment where the initial value must be set. | [optional] | -|**value** | [**SettingValueType**](SettingValueType.md) | The initial value in the given Environment. It must respect the setting type. In some generated clients for strictly typed languages you may use double/float properties to handle integer values. | | +|**value** | [**SettingValueType**](SettingValueType.md) | The initial value in the given Environment. It must respect the setting type. In some generated clients for strictly typed languages, you may use double/float properties to handle integer values. In case of a Feature Flag with predefined variations, the value must match one of the predefined variations' value. | | diff --git a/docs/PredefinedVariationModel.md b/docs/PredefinedVariationModel.md new file mode 100644 index 0000000..31505f2 --- /dev/null +++ b/docs/PredefinedVariationModel.md @@ -0,0 +1,17 @@ + + +# PredefinedVariationModel + +A Feature Flag or Predefined Variation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | [**PredefinedVariationValueModel**](PredefinedVariationValueModel.md) | | | +|**name** | **String** | The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. | | +|**hint** | **String** | The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. | | +|**predefinedVariationId** | **UUID** | The Feature Flag or Predefined Variation's identifier. | | + + + diff --git a/docs/PredefinedVariationValueModel.md b/docs/PredefinedVariationValueModel.md new file mode 100644 index 0000000..4dbee29 --- /dev/null +++ b/docs/PredefinedVariationValueModel.md @@ -0,0 +1,17 @@ + + +# PredefinedVariationValueModel + +Represents the value of a Feature Flag or Predefined Variation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**boolValue** | **Boolean** | The served value in case of a boolean Feature Flag. | | +|**stringValue** | **String** | The served value in case of a text Setting. | | +|**intValue** | **Integer** | The served value in case of a whole number Setting. | | +|**doubleValue** | **Double** | The served value in case of a decimal number Setting. | | + + + diff --git a/docs/ReplaceSettingModel.md b/docs/ReplaceSettingModel.md index 62425a8..25156ed 100644 --- a/docs/ReplaceSettingModel.md +++ b/docs/ReplaceSettingModel.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the Feature Flag or Setting. | | |**hint** | **String** | A short description for the setting, shown on the Dashboard UI. | [optional] | |**tags** | **List<Long>** | The IDs of the tags which are attached to the setting. | [optional] | |**order** | **Integer** | The order of the Setting represented on the ConfigCat Dashboard. Determined from an ascending sequence of integers. | [optional] | -|**name** | **String** | The name of the Feature Flag or Setting. | [optional] | diff --git a/docs/SettingDataV2Model.md b/docs/SettingDataV2Model.md new file mode 100644 index 0000000..29dd8ba --- /dev/null +++ b/docs/SettingDataV2Model.md @@ -0,0 +1,24 @@ + + +# SettingDataV2Model + +Metadata of a Feature Flag or Setting. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**settingId** | **Integer** | Identifier of the Feature Flag or Setting. | | +|**key** | **String** | Key of the Feature Flag or Setting. | | +|**name** | **String** | Name of the Feature Flag or Setting. | | +|**hint** | **String** | Description of the Feature Flag or Setting. | | +|**settingType** | **SettingType** | | | +|**order** | **Integer** | The order of the Feature Flag or Setting represented on the ConfigCat Dashboard. | | +|**createdAt** | **OffsetDateTime** | The creation time of the Feature Flag or Setting. | | +|**creatorEmail** | **String** | The user's email address who created the Feature Flag or Setting. | | +|**creatorFullName** | **String** | The user's name who created the Feature Flag or Setting. | | +|**predefinedVariations** | [**List<PredefinedVariationModel>**](PredefinedVariationModel.md) | A collection of Variations for a Feature Flag or Setting. | | +|**isWatching** | **Boolean** | | | + + + diff --git a/docs/SettingFormulaModel.md b/docs/SettingFormulaModel.md index bd26365..9af7aa3 100644 --- a/docs/SettingFormulaModel.md +++ b/docs/SettingFormulaModel.md @@ -10,7 +10,7 @@ |**lastVersionId** | **UUID** | | | |**defaultValue** | [**ValueModel**](ValueModel.md) | | | |**targetingRules** | [**List<TargetingRuleModel>**](TargetingRuleModel.md) | The targeting rules of the Feature Flag or Setting. | | -|**setting** | [**SettingDataModel**](SettingDataModel.md) | | | +|**setting** | [**SettingDataV2Model**](SettingDataV2Model.md) | | | |**updatedAt** | **OffsetDateTime** | The last updated date and time when the Feature Flag or Setting. | | |**percentageEvaluationAttribute** | **String** | The user attribute used for percentage evaluation. If not set, it defaults to the `Identifier` user object attribute. | | |**lastUpdaterUserEmail** | **String** | The email of the user who last updated the Feature Flag or Setting. | | diff --git a/docs/SettingModel.md b/docs/SettingModel.md index 5548de1..594d343 100644 --- a/docs/SettingModel.md +++ b/docs/SettingModel.md @@ -18,6 +18,7 @@ Metadata of a Feature Flag or Setting. |**configName** | **String** | Name of the Feature Flag's Config. | | |**createdAt** | **OffsetDateTime** | The creation time of the Feature Flag or Setting. | | |**tags** | [**List<TagModel>**](TagModel.md) | The tags attached to the Feature Flag or Setting. | | +|**predefinedVariations** | [**List<PredefinedVariationModel>**](PredefinedVariationModel.md) | The Feature Flag or Setting's Variations. | | diff --git a/docs/UpdatePredefinedVariationModel.md b/docs/UpdatePredefinedVariationModel.md new file mode 100644 index 0000000..f0d9980 --- /dev/null +++ b/docs/UpdatePredefinedVariationModel.md @@ -0,0 +1,17 @@ + + +# UpdatePredefinedVariationModel + +A Feature Flag or Predefined Variation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | [**UpdatePredefinedVariationValueModel**](UpdatePredefinedVariationValueModel.md) | | | +|**name** | **String** | The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. | [optional] | +|**hint** | **String** | The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. | [optional] | +|**predefinedVariationId** | **UUID** | The Feature Flag or Predefined Variation's identifier to update. Omit the value if you want to add a new predefined variation. | [optional] | + + + diff --git a/docs/UpdatePredefinedVariationValueModel.md b/docs/UpdatePredefinedVariationValueModel.md new file mode 100644 index 0000000..0585799 --- /dev/null +++ b/docs/UpdatePredefinedVariationValueModel.md @@ -0,0 +1,17 @@ + + +# UpdatePredefinedVariationValueModel + +Represents the value of a Feature Flag or Predefined Variation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**boolValue** | **Boolean** | The served value in case of a boolean Feature Flag. | [optional] | +|**stringValue** | **String** | The served value in case of a text Setting. | [optional] | +|**intValue** | **Integer** | The served value in case of a whole number Setting. | [optional] | +|**doubleValue** | **Double** | The served value in case of a decimal number Setting. | [optional] | + + + diff --git a/docs/UpdatePredefinedVariationsRequest.md b/docs/UpdatePredefinedVariationsRequest.md new file mode 100644 index 0000000..e3f3f79 --- /dev/null +++ b/docs/UpdatePredefinedVariationsRequest.md @@ -0,0 +1,13 @@ + + +# UpdatePredefinedVariationsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**predefinedVariations** | [**List<UpdatePredefinedVariationModel>**](UpdatePredefinedVariationModel.md) | A collection of Feature Flag or Predefined Variations. | | + + + diff --git a/docs/UpdateValueModel.md b/docs/UpdateValueModel.md index 074026c..7916b6a 100644 --- a/docs/UpdateValueModel.md +++ b/docs/UpdateValueModel.md @@ -12,6 +12,7 @@ Represents the value of a Feature Flag or Setting. |**stringValue** | **String** | The served value in case of a text Setting. | [optional] | |**intValue** | **Integer** | The served value in case of a whole number Setting. | [optional] | |**doubleValue** | **Double** | The served value in case of a decimal number Setting. | [optional] | +|**predefinedVariationId** | **UUID** | The served Variation's identifier. | [optional] | diff --git a/docs/ValueModel.md b/docs/ValueModel.md index 61730f8..259cce5 100644 --- a/docs/ValueModel.md +++ b/docs/ValueModel.md @@ -12,6 +12,7 @@ Represents the value of a Feature Flag or Setting. |**stringValue** | **String** | The served value in case of a text Setting. | | |**intValue** | **Integer** | The served value in case of a whole number Setting. | | |**doubleValue** | **Double** | The served value in case of a decimal number Setting. | | +|**predefinedVariationId** | **UUID** | The served Variation's identifier. | | diff --git a/src/main/java/com/configcat/publicapi/java/client/ApiException.java b/src/main/java/com/configcat/publicapi/java/client/ApiException.java index 36ddb79..cc85634 100644 --- a/src/main/java/com/configcat/publicapi/java/client/ApiException.java +++ b/src/main/java/com/configcat/publicapi/java/client/ApiException.java @@ -21,7 +21,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ApiException extends RuntimeException { private static final long serialVersionUID = 1L; diff --git a/src/main/java/com/configcat/publicapi/java/client/Configuration.java b/src/main/java/com/configcat/publicapi/java/client/Configuration.java index 7c60a8c..3958ff4 100644 --- a/src/main/java/com/configcat/publicapi/java/client/Configuration.java +++ b/src/main/java/com/configcat/publicapi/java/client/Configuration.java @@ -13,7 +13,7 @@ package com.configcat.publicapi.java.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class Configuration { public static final String VERSION = "v1"; diff --git a/src/main/java/com/configcat/publicapi/java/client/JSON.java b/src/main/java/com/configcat/publicapi/java/client/JSON.java index 305ac6f..24fe782 100644 --- a/src/main/java/com/configcat/publicapi/java/client/JSON.java +++ b/src/main/java/com/configcat/publicapi/java/client/JSON.java @@ -112,6 +112,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateIntegrationModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateOrUpdateEnvironmentAccessModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreatePermissionGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreatePredefinedVariationModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreatePredefinedVariationValueModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateProductRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateSegmentModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateSettingInitialValues.CustomTypeAdapterFactory()); @@ -145,6 +147,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.OrganizationProductModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PercentageOptionModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PermissionGroupModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PredefinedVariationModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PredefinedVariationValueModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PreferencesModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.PrerequisiteFlagConditionModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProductModel.CustomTypeAdapterFactory()); @@ -161,6 +165,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SegmentListModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SegmentModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingDataModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingDataV2Model.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingFormulaModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.SettingTagModel.CustomTypeAdapterFactory()); @@ -185,6 +190,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateMemberPermissionsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdatePercentageOptionModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdatePermissionGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdatePredefinedVariationModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdatePredefinedVariationValueModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdatePredefinedVariationsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdatePreferencesRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdatePrerequisiteFlagConditionModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateProductRequest.CustomTypeAdapterFactory()); diff --git a/src/main/java/com/configcat/publicapi/java/client/Pair.java b/src/main/java/com/configcat/publicapi/java/client/Pair.java index e46360b..ef2fd3f 100644 --- a/src/main/java/com/configcat/publicapi/java/client/Pair.java +++ b/src/main/java/com/configcat/publicapi/java/client/Pair.java @@ -13,7 +13,7 @@ package com.configcat.publicapi.java.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java b/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java index 75073ca..1aee581 100644 --- a/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java +++ b/src/main/java/com/configcat/publicapi/java/client/ServerConfiguration.java @@ -5,7 +5,7 @@ /** * Representing a Server configuration. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ServerConfiguration { public String URL; public String description; diff --git a/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java b/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java index ea17331..073e6b1 100644 --- a/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java +++ b/src/main/java/com/configcat/publicapi/java/client/ServerVariable.java @@ -5,7 +5,7 @@ /** * Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/src/main/java/com/configcat/publicapi/java/client/StringUtil.java b/src/main/java/com/configcat/publicapi/java/client/StringUtil.java index bee1164..1bd066a 100644 --- a/src/main/java/com/configcat/publicapi/java/client/StringUtil.java +++ b/src/main/java/com/configcat/publicapi/java/client/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/configcat/publicapi/java/client/api/FeatureFlagsSettingsApi.java b/src/main/java/com/configcat/publicapi/java/client/api/FeatureFlagsSettingsApi.java index 1618212..66e5384 100644 --- a/src/main/java/com/configcat/publicapi/java/client/api/FeatureFlagsSettingsApi.java +++ b/src/main/java/com/configcat/publicapi/java/client/api/FeatureFlagsSettingsApi.java @@ -32,6 +32,7 @@ import com.configcat.publicapi.java.client.model.ReplaceSettingModel; import com.configcat.publicapi.java.client.model.SettingModel; import java.util.UUID; +import com.configcat.publicapi.java.client.model.UpdatePredefinedVariationsRequest; import java.lang.reflect.Type; import java.util.ArrayList; @@ -770,6 +771,153 @@ public okhttp3.Call replaceSettingAsync(Integer settingId, ReplaceSettingModel r localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for updatePredefinedVariations + * @param settingId The identifier of the Setting. (required) + * @param updatePredefinedVariationsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 When the update was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call updatePredefinedVariationsCall(Integer settingId, UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updatePredefinedVariationsRequest; + + // create path and map variables + String localVarPath = "/v1/settings/{settingId}/predefined-variations" + .replace("{" + "settingId" + "}", localVarApiClient.escapeString(settingId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Basic" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updatePredefinedVariationsValidateBeforeCall(Integer settingId, UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'settingId' is set + if (settingId == null) { + throw new ApiException("Missing the required parameter 'settingId' when calling updatePredefinedVariations(Async)"); + } + + // verify the required parameter 'updatePredefinedVariationsRequest' is set + if (updatePredefinedVariationsRequest == null) { + throw new ApiException("Missing the required parameter 'updatePredefinedVariationsRequest' when calling updatePredefinedVariations(Async)"); + } + + return updatePredefinedVariationsCall(settingId, updatePredefinedVariationsRequest, _callback); + + } + + /** + * Update predefined variations (Beta) + * This endpoint updates the predefined variations for a Feature Flag or Setting identified by the `settingId` parameter. **Important:** You can only update a predefined variation's value if it is not used anywhere in your feature flags. **Beta feature:** The feature is currently in closed beta state and cannot be used. + * @param settingId The identifier of the Setting. (required) + * @param updatePredefinedVariationsRequest (required) + * @return SettingModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 When the update was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public SettingModel updatePredefinedVariations(Integer settingId, UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest) throws ApiException { + ApiResponse localVarResp = updatePredefinedVariationsWithHttpInfo(settingId, updatePredefinedVariationsRequest); + return localVarResp.getData(); + } + + /** + * Update predefined variations (Beta) + * This endpoint updates the predefined variations for a Feature Flag or Setting identified by the `settingId` parameter. **Important:** You can only update a predefined variation's value if it is not used anywhere in your feature flags. **Beta feature:** The feature is currently in closed beta state and cannot be used. + * @param settingId The identifier of the Setting. (required) + * @param updatePredefinedVariationsRequest (required) + * @return ApiResponse<SettingModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 When the update was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse updatePredefinedVariationsWithHttpInfo(Integer settingId, UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest) throws ApiException { + okhttp3.Call localVarCall = updatePredefinedVariationsValidateBeforeCall(settingId, updatePredefinedVariationsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update predefined variations (Beta) (asynchronously) + * This endpoint updates the predefined variations for a Feature Flag or Setting identified by the `settingId` parameter. **Important:** You can only update a predefined variation's value if it is not used anywhere in your feature flags. **Beta feature:** The feature is currently in closed beta state and cannot be used. + * @param settingId The identifier of the Setting. (required) + * @param updatePredefinedVariationsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 When the update was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call updatePredefinedVariationsAsync(Integer settingId, UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updatePredefinedVariationsValidateBeforeCall(settingId, updatePredefinedVariationsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for updateSetting * @param settingId The identifier of the Setting. (required) diff --git a/src/main/java/com/configcat/publicapi/java/client/auth/ApiKeyAuth.java b/src/main/java/com/configcat/publicapi/java/client/auth/ApiKeyAuth.java index cc2e81e..855a992 100644 --- a/src/main/java/com/configcat/publicapi/java/client/auth/ApiKeyAuth.java +++ b/src/main/java/com/configcat/publicapi/java/client/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/configcat/publicapi/java/client/auth/HttpBearerAuth.java b/src/main/java/com/configcat/publicapi/java/client/auth/HttpBearerAuth.java index d53dd00..d4d9265 100644 --- a/src/main/java/com/configcat/publicapi/java/client/auth/HttpBearerAuth.java +++ b/src/main/java/com/configcat/publicapi/java/client/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/com/configcat/publicapi/java/client/model/AbstractOpenApiSchema.java b/src/main/java/com/configcat/publicapi/java/client/model/AbstractOpenApiSchema.java index a023d85..1c013f1 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/AbstractOpenApiSchema.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/com/configcat/publicapi/java/client/model/AddOrUpdateIntegrationLinkModel.java b/src/main/java/com/configcat/publicapi/java/client/model/AddOrUpdateIntegrationLinkModel.java index 1bca446..13d1cc8 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/AddOrUpdateIntegrationLinkModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/AddOrUpdateIntegrationLinkModel.java @@ -50,7 +50,7 @@ /** * AddOrUpdateIntegrationLinkModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class AddOrUpdateIntegrationLinkModel { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/AddOrUpdateJiraIntegrationLinkModel.java b/src/main/java/com/configcat/publicapi/java/client/model/AddOrUpdateJiraIntegrationLinkModel.java index ba19e07..31b56f2 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/AddOrUpdateJiraIntegrationLinkModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/AddOrUpdateJiraIntegrationLinkModel.java @@ -50,7 +50,7 @@ /** * AddOrUpdateJiraIntegrationLinkModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class AddOrUpdateJiraIntegrationLinkModel { public static final String SERIALIZED_NAME_JIRA_JWT_TOKEN = "jiraJwtToken"; @SerializedName(SERIALIZED_NAME_JIRA_JWT_TOKEN) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/AuditLogItemModel.java b/src/main/java/com/configcat/publicapi/java/client/model/AuditLogItemModel.java index 1afebb5..e25b619 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/AuditLogItemModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/AuditLogItemModel.java @@ -52,7 +52,7 @@ /** * AuditLogItemModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class AuditLogItemModel { public static final String SERIALIZED_NAME_AUDIT_LOG_ID = "auditLogId"; @SerializedName(SERIALIZED_NAME_AUDIT_LOG_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/AuditLogType.java b/src/main/java/com/configcat/publicapi/java/client/model/AuditLogType.java index 0ca1030..595688b 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/AuditLogType.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/AuditLogType.java @@ -81,6 +81,12 @@ public enum AuditLogType { SETTINGS_REORDERED("settingsReordered"), + PREDEFINED_VARIATIONS_CHANGED("predefinedVariationsChanged"), + + SETTING_CONVERTED_TO_PREDEFINED_VARIATIONS("settingConvertedToPredefinedVariations"), + + SETTING_CONVERTED_TO_CUSTOM_VALUES("settingConvertedToCustomValues"), + SETTING_VALUE_CHANGED("settingValueChanged"), WEB_HOOK_CREATED("webHookCreated"), @@ -211,7 +217,23 @@ public enum AuditLogType { SYNC_USER_DELETED("syncUserDeleted"), - SYNC_GROUP_DELETED("syncGroupDeleted"); + SYNC_GROUP_DELETED("syncGroupDeleted"), + + PROXY_CONFIGURATION_CREATED("proxyConfigurationCreated"), + + PROXY_CONFIGURATION_CHANGED("proxyConfigurationChanged"), + + PROXY_CONFIGURATION_DELETED("proxyConfigurationDeleted"), + + PROXY_CONFIGURATION_SECRET_REGENERATED("proxyConfigurationSecretRegenerated"), + + PROXY_NOTIFICATION_SETTINGS_UPDATED("proxyNotificationSettingsUpdated"), + + PROXY_NOTIFICATION_SETTINGS_DELETED("proxyNotificationSettingsDeleted"), + + PROXY_NOTIFICATION_SIGNING_KEY_ADDED("proxyNotificationSigningKeyAdded"), + + PROXY_NOTIFICATION_SIGNING_KEY_DELETED("proxyNotificationSigningKeyDeleted"); private String value; diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CodeReferenceModel.java b/src/main/java/com/configcat/publicapi/java/client/model/CodeReferenceModel.java index 2ac1b13..a0e1e83 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CodeReferenceModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CodeReferenceModel.java @@ -54,7 +54,7 @@ /** * CodeReferenceModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CodeReferenceModel { public static final String SERIALIZED_NAME_BRANCH = "branch"; @SerializedName(SERIALIZED_NAME_BRANCH) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CodeReferenceRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/CodeReferenceRequest.java index ebe8a6b..d12362a 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CodeReferenceRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CodeReferenceRequest.java @@ -54,7 +54,7 @@ /** * CodeReferenceRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CodeReferenceRequest { public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; @SerializedName(SERIALIZED_NAME_CONFIG_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ComparisonValueListModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ComparisonValueListModel.java index 8bc98cf..34f3cc1 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ComparisonValueListModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ComparisonValueListModel.java @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -50,7 +49,7 @@ /** * ComparisonValueListModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ComparisonValueListModel { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) @@ -160,22 +159,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, comparisonValueListModel.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(value, hint, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -211,6 +199,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("value"); + openapiRequiredFields.add("hint"); } /** diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ComparisonValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ComparisonValueModel.java index 7482201..8727ad8 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ComparisonValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ComparisonValueModel.java @@ -24,7 +24,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,7 +52,7 @@ /** * The value that the user object's attribute is compared to. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ComparisonValueModel { public static final String SERIALIZED_NAME_STRING_VALUE = "stringValue"; @SerializedName(SERIALIZED_NAME_STRING_VALUE) @@ -195,22 +194,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, comparisonValueModel.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(stringValue, doubleValue, listValue, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -247,6 +235,9 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("stringValue"); + openapiRequiredFields.add("doubleValue"); + openapiRequiredFields.add("listValue"); } /** @@ -261,24 +252,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ComparisonValueModel is not found in the empty JSON string", ComparisonValueModel.openapiRequiredFields.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ComparisonValueModel.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("stringValue") != null && !jsonObj.get("stringValue").isJsonNull()) && !jsonObj.get("stringValue").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `stringValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stringValue").toString())); } - if (jsonObj.get("listValue") != null && !jsonObj.get("listValue").isJsonNull()) { - JsonArray jsonArraylistValue = jsonObj.getAsJsonArray("listValue"); - if (jsonArraylistValue != null) { - // ensure the json data is an array - if (!jsonObj.get("listValue").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `listValue` to be an array in the JSON string but got `%s`", jsonObj.get("listValue").toString())); - } - - // validate the optional field `listValue` (array) - for (int i = 0; i < jsonArraylistValue.size(); i++) { - ComparisonValueListModel.validateJsonElement(jsonArraylistValue.get(i)); - }; - } + // ensure the json data is an array + if (!jsonObj.get("listValue").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `listValue` to be an array in the JSON string but got `%s`", jsonObj.get("listValue").toString())); } + + JsonArray jsonArraylistValue = jsonObj.getAsJsonArray("listValue"); + // validate the required field `listValue` (array) + for (int i = 0; i < jsonArraylistValue.size(); i++) { + ComparisonValueListModel.validateJsonElement(jsonArraylistValue.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ConditionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ConditionModel.java index 00c11d4..2694f4b 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ConditionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ConditionModel.java @@ -52,7 +52,7 @@ /** * ConditionModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ConditionModel { public static final String SERIALIZED_NAME_USER_CONDITION = "userCondition"; @SerializedName(SERIALIZED_NAME_USER_CONDITION) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ConfigModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ConfigModel.java index 8669153..7c1f24a 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ConfigModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ConfigModel.java @@ -52,7 +52,7 @@ /** * Details of the Config. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ConfigModel { public static final String SERIALIZED_NAME_PRODUCT = "product"; @SerializedName(SERIALIZED_NAME_PRODUCT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingFormulaModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingFormulaModel.java index c916ec6..541310f 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingFormulaModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingFormulaModel.java @@ -15,7 +15,7 @@ import java.util.Objects; import com.configcat.publicapi.java.client.model.IntegrationLinkModel; -import com.configcat.publicapi.java.client.model.SettingDataModel; +import com.configcat.publicapi.java.client.model.SettingDataV2Model; import com.configcat.publicapi.java.client.model.SettingTagModel; import com.configcat.publicapi.java.client.model.TargetingRuleModel; import com.configcat.publicapi.java.client.model.ValueModel; @@ -58,7 +58,7 @@ /** * ConfigSettingFormulaModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ConfigSettingFormulaModel { public static final String SERIALIZED_NAME_LAST_VERSION_ID = "lastVersionId"; @SerializedName(SERIALIZED_NAME_LAST_VERSION_ID) @@ -74,7 +74,7 @@ public class ConfigSettingFormulaModel { public static final String SERIALIZED_NAME_SETTING = "setting"; @SerializedName(SERIALIZED_NAME_SETTING) - private SettingDataModel setting; + private SettingDataV2Model setting; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) @@ -172,7 +172,7 @@ public void setTargetingRules(List targetingRules) { } - public ConfigSettingFormulaModel setting(SettingDataModel setting) { + public ConfigSettingFormulaModel setting(SettingDataV2Model setting) { this.setting = setting; return this; } @@ -182,11 +182,11 @@ public ConfigSettingFormulaModel setting(SettingDataModel setting) { * @return setting */ @javax.annotation.Nonnull - public SettingDataModel getSetting() { + public SettingDataV2Model getSetting() { return setting; } - public void setSetting(SettingDataModel setting) { + public void setSetting(SettingDataV2Model setting) { this.setting = setting; } @@ -522,7 +522,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti TargetingRuleModel.validateJsonElement(jsonArraytargetingRules.get(i)); }; // validate the required field `setting` - SettingDataModel.validateJsonElement(jsonObj.get("setting")); + SettingDataV2Model.validateJsonElement(jsonObj.get("setting")); if ((jsonObj.get("percentageEvaluationAttribute") != null && !jsonObj.get("percentageEvaluationAttribute").isJsonNull()) && !jsonObj.get("percentageEvaluationAttribute").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `percentageEvaluationAttribute` to be a primitive type in the JSON string but got `%s`", jsonObj.get("percentageEvaluationAttribute").toString())); } diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingFormulasModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingFormulasModel.java index 149991c..a268bdb 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingFormulasModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingFormulasModel.java @@ -55,7 +55,7 @@ /** * ConfigSettingFormulasModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ConfigSettingFormulasModel { public static final String SERIALIZED_NAME_CONFIG = "config"; @SerializedName(SERIALIZED_NAME_CONFIG) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValueModel.java index 9dc292a..7c797c4 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValueModel.java @@ -58,7 +58,7 @@ /** * ConfigSettingValueModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ConfigSettingValueModel { public static final String SERIALIZED_NAME_SETTING = "setting"; @SerializedName(SERIALIZED_NAME_SETTING) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValuesModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValuesModel.java index ee9ab73..fb9d043 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValuesModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValuesModel.java @@ -55,7 +55,7 @@ /** * ConfigSettingValuesModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ConfigSettingValuesModel { public static final String SERIALIZED_NAME_CONFIG = "config"; @SerializedName(SERIALIZED_NAME_CONFIG) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ConnectRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/ConnectRequest.java index f7369cd..efe895b 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ConnectRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ConnectRequest.java @@ -49,7 +49,7 @@ /** * ConnectRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ConnectRequest { public static final String SERIALIZED_NAME_CLIENT_KEY = "clientKey"; @SerializedName(SERIALIZED_NAME_CLIENT_KEY) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreateConfigRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateConfigRequest.java index cb2799d..419a6a1 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreateConfigRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateConfigRequest.java @@ -51,7 +51,7 @@ /** * CreateConfigRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateConfigRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreateEnvironmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateEnvironmentModel.java index 7489de8..91fafda 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreateEnvironmentModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateEnvironmentModel.java @@ -50,7 +50,7 @@ /** * CreateEnvironmentModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateEnvironmentModel { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreateIntegrationModel.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateIntegrationModel.java index 52dc209..fc91851 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreateIntegrationModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateIntegrationModel.java @@ -55,7 +55,7 @@ /** * CreateIntegrationModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateIntegrationModel { public static final String SERIALIZED_NAME_INTEGRATION_TYPE = "integrationType"; @SerializedName(SERIALIZED_NAME_INTEGRATION_TYPE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateEnvironmentAccessModel.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateEnvironmentAccessModel.java index a21c779..0a4c61e 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateEnvironmentAccessModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateEnvironmentAccessModel.java @@ -51,7 +51,7 @@ /** * CreateOrUpdateEnvironmentAccessModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateOrUpdateEnvironmentAccessModel { public static final String SERIALIZED_NAME_ENVIRONMENT_ID = "environmentId"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreatePermissionGroupRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/CreatePermissionGroupRequest.java index 723e7dc..efbe022 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreatePermissionGroupRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreatePermissionGroupRequest.java @@ -55,7 +55,7 @@ /** * CreatePermissionGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreatePermissionGroupRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationModel.java b/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationModel.java new file mode 100644 index 0000000..ff1c9eb --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationModel.java @@ -0,0 +1,365 @@ +/* + * ConfigCat Public Management API + * 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. **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 API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.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. + * + * The version of the OpenAPI document: v1 + * Contact: support@configcat.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.configcat.publicapi.java.client.model; + +import java.util.Objects; +import com.configcat.publicapi.java.client.model.CreatePredefinedVariationValueModel; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.configcat.publicapi.java.client.JSON; + +/** + * A Feature Flag or Predefined Variation. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class CreatePredefinedVariationModel { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private CreatePredefinedVariationValueModel value; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_HINT = "hint"; + @SerializedName(SERIALIZED_NAME_HINT) + private String hint; + + public CreatePredefinedVariationModel() { + } + + public CreatePredefinedVariationModel value(CreatePredefinedVariationValueModel value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + public CreatePredefinedVariationValueModel getValue() { + return value; + } + + public void setValue(CreatePredefinedVariationValueModel value) { + this.value = value; + } + + + public CreatePredefinedVariationModel name(String name) { + this.name = name; + return this; + } + + /** + * The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public CreatePredefinedVariationModel hint(String hint) { + this.hint = hint; + return this; + } + + /** + * The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. + * @return hint + */ + @javax.annotation.Nullable + public String getHint() { + return hint; + } + + public void setHint(String hint) { + this.hint = hint; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreatePredefinedVariationModel instance itself + */ + public CreatePredefinedVariationModel putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePredefinedVariationModel createPredefinedVariationModel = (CreatePredefinedVariationModel) o; + return Objects.equals(this.value, createPredefinedVariationModel.value) && + Objects.equals(this.name, createPredefinedVariationModel.name) && + Objects.equals(this.hint, createPredefinedVariationModel.hint)&& + Objects.equals(this.additionalProperties, createPredefinedVariationModel.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(value, name, hint, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePredefinedVariationModel {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" hint: ").append(toIndentedString(hint)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + openapiFields.add("name"); + openapiFields.add("hint"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreatePredefinedVariationModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreatePredefinedVariationModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePredefinedVariationModel is not found in the empty JSON string", CreatePredefinedVariationModel.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreatePredefinedVariationModel.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `value` + CreatePredefinedVariationValueModel.validateJsonElement(jsonObj.get("value")); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("hint") != null && !jsonObj.get("hint").isJsonNull()) && !jsonObj.get("hint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hint").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreatePredefinedVariationModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreatePredefinedVariationModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreatePredefinedVariationModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreatePredefinedVariationModel value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreatePredefinedVariationModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreatePredefinedVariationModel instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreatePredefinedVariationModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreatePredefinedVariationModel + * @throws IOException if the JSON string is invalid with respect to CreatePredefinedVariationModel + */ + public static CreatePredefinedVariationModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreatePredefinedVariationModel.class); + } + + /** + * Convert an instance of CreatePredefinedVariationModel to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationValueModel.java new file mode 100644 index 0000000..63c837f --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationValueModel.java @@ -0,0 +1,377 @@ +/* + * ConfigCat Public Management API + * 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. **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 API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.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. + * + * The version of the OpenAPI document: v1 + * Contact: support@configcat.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.configcat.publicapi.java.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.configcat.publicapi.java.client.JSON; + +/** + * Represents the value of a Feature Flag or Predefined Variation. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class CreatePredefinedVariationValueModel { + public static final String SERIALIZED_NAME_BOOL_VALUE = "boolValue"; + @SerializedName(SERIALIZED_NAME_BOOL_VALUE) + private Boolean boolValue; + + public static final String SERIALIZED_NAME_STRING_VALUE = "stringValue"; + @SerializedName(SERIALIZED_NAME_STRING_VALUE) + private String stringValue; + + public static final String SERIALIZED_NAME_INT_VALUE = "intValue"; + @SerializedName(SERIALIZED_NAME_INT_VALUE) + private Integer intValue; + + public static final String SERIALIZED_NAME_DOUBLE_VALUE = "doubleValue"; + @SerializedName(SERIALIZED_NAME_DOUBLE_VALUE) + private Double doubleValue; + + public CreatePredefinedVariationValueModel() { + } + + public CreatePredefinedVariationValueModel boolValue(Boolean boolValue) { + this.boolValue = boolValue; + return this; + } + + /** + * The served value in case of a boolean Feature Flag. + * @return boolValue + */ + @javax.annotation.Nullable + public Boolean getBoolValue() { + return boolValue; + } + + public void setBoolValue(Boolean boolValue) { + this.boolValue = boolValue; + } + + + public CreatePredefinedVariationValueModel stringValue(String stringValue) { + this.stringValue = stringValue; + return this; + } + + /** + * The served value in case of a text Setting. + * @return stringValue + */ + @javax.annotation.Nullable + public String getStringValue() { + return stringValue; + } + + public void setStringValue(String stringValue) { + this.stringValue = stringValue; + } + + + public CreatePredefinedVariationValueModel intValue(Integer intValue) { + this.intValue = intValue; + return this; + } + + /** + * The served value in case of a whole number Setting. + * @return intValue + */ + @javax.annotation.Nullable + public Integer getIntValue() { + return intValue; + } + + public void setIntValue(Integer intValue) { + this.intValue = intValue; + } + + + public CreatePredefinedVariationValueModel doubleValue(Double doubleValue) { + this.doubleValue = doubleValue; + return this; + } + + /** + * The served value in case of a decimal number Setting. + * @return doubleValue + */ + @javax.annotation.Nullable + public Double getDoubleValue() { + return doubleValue; + } + + public void setDoubleValue(Double doubleValue) { + this.doubleValue = doubleValue; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreatePredefinedVariationValueModel instance itself + */ + public CreatePredefinedVariationValueModel putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePredefinedVariationValueModel createPredefinedVariationValueModel = (CreatePredefinedVariationValueModel) o; + return Objects.equals(this.boolValue, createPredefinedVariationValueModel.boolValue) && + Objects.equals(this.stringValue, createPredefinedVariationValueModel.stringValue) && + Objects.equals(this.intValue, createPredefinedVariationValueModel.intValue) && + Objects.equals(this.doubleValue, createPredefinedVariationValueModel.doubleValue)&& + Objects.equals(this.additionalProperties, createPredefinedVariationValueModel.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(boolValue, stringValue, intValue, doubleValue, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePredefinedVariationValueModel {\n"); + sb.append(" boolValue: ").append(toIndentedString(boolValue)).append("\n"); + sb.append(" stringValue: ").append(toIndentedString(stringValue)).append("\n"); + sb.append(" intValue: ").append(toIndentedString(intValue)).append("\n"); + sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("boolValue"); + openapiFields.add("stringValue"); + openapiFields.add("intValue"); + openapiFields.add("doubleValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreatePredefinedVariationValueModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreatePredefinedVariationValueModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePredefinedVariationValueModel is not found in the empty JSON string", CreatePredefinedVariationValueModel.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("stringValue") != null && !jsonObj.get("stringValue").isJsonNull()) && !jsonObj.get("stringValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `stringValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stringValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreatePredefinedVariationValueModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreatePredefinedVariationValueModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreatePredefinedVariationValueModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreatePredefinedVariationValueModel value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreatePredefinedVariationValueModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreatePredefinedVariationValueModel instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreatePredefinedVariationValueModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreatePredefinedVariationValueModel + * @throws IOException if the JSON string is invalid with respect to CreatePredefinedVariationValueModel + */ + public static CreatePredefinedVariationValueModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreatePredefinedVariationValueModel.class); + } + + /** + * Convert an instance of CreatePredefinedVariationValueModel to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreateProductRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateProductRequest.java index cc1a2d6..da500b4 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreateProductRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateProductRequest.java @@ -50,7 +50,7 @@ /** * CreateProductRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateProductRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreateSegmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateSegmentModel.java index 6cba1a2..87576cc 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreateSegmentModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateSegmentModel.java @@ -51,7 +51,7 @@ /** * CreateSegmentModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateSegmentModel { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreateSettingInitialValues.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateSettingInitialValues.java index aef5085..2684e67 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreateSettingInitialValues.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateSettingInitialValues.java @@ -14,6 +14,7 @@ package com.configcat.publicapi.java.client.model; import java.util.Objects; +import com.configcat.publicapi.java.client.model.CreatePredefinedVariationModel; import com.configcat.publicapi.java.client.model.InitialValue; import com.configcat.publicapi.java.client.model.SettingType; import com.google.gson.TypeAdapter; @@ -54,8 +55,12 @@ /** * CreateSettingInitialValues */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateSettingInitialValues { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + public static final String SERIALIZED_NAME_HINT = "hint"; @SerializedName(SERIALIZED_NAME_HINT) private String hint; @@ -72,14 +77,14 @@ public class CreateSettingInitialValues { @SerializedName(SERIALIZED_NAME_KEY) private String key; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - public static final String SERIALIZED_NAME_SETTING_TYPE = "settingType"; @SerializedName(SERIALIZED_NAME_SETTING_TYPE) private SettingType settingType; + public static final String SERIALIZED_NAME_PREDEFINED_VARIATIONS = "predefinedVariations"; + @SerializedName(SERIALIZED_NAME_PREDEFINED_VARIATIONS) + private List predefinedVariations; + public static final String SERIALIZED_NAME_INITIAL_VALUES = "initialValues"; @SerializedName(SERIALIZED_NAME_INITIAL_VALUES) private List initialValues; @@ -91,6 +96,25 @@ public class CreateSettingInitialValues { public CreateSettingInitialValues() { } + public CreateSettingInitialValues name(String name) { + this.name = name; + return this; + } + + /** + * The name of the Feature Flag or Setting. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateSettingInitialValues hint(String hint) { this.hint = hint; return this; @@ -175,41 +199,49 @@ public void setKey(String key) { } - public CreateSettingInitialValues name(String name) { - this.name = name; + public CreateSettingInitialValues settingType(SettingType settingType) { + this.settingType = settingType; return this; } /** - * The name of the Feature Flag or Setting. - * @return name + * Get settingType + * @return settingType */ @javax.annotation.Nonnull - public String getName() { - return name; + public SettingType getSettingType() { + return settingType; } - public void setName(String name) { - this.name = name; + public void setSettingType(SettingType settingType) { + this.settingType = settingType; } - public CreateSettingInitialValues settingType(SettingType settingType) { - this.settingType = settingType; + public CreateSettingInitialValues predefinedVariations(List predefinedVariations) { + this.predefinedVariations = predefinedVariations; + return this; + } + + public CreateSettingInitialValues addPredefinedVariationsItem(CreatePredefinedVariationModel predefinedVariationsItem) { + if (this.predefinedVariations == null) { + this.predefinedVariations = new ArrayList<>(); + } + this.predefinedVariations.add(predefinedVariationsItem); return this; } /** - * Get settingType - * @return settingType + * The Feature Flag or Setting's Variations. + * @return predefinedVariations */ - @javax.annotation.Nonnull - public SettingType getSettingType() { - return settingType; + @javax.annotation.Nullable + public List getPredefinedVariations() { + return predefinedVariations; } - public void setSettingType(SettingType settingType) { - this.settingType = settingType; + public void setPredefinedVariations(List predefinedVariations) { + this.predefinedVariations = predefinedVariations; } @@ -313,12 +345,13 @@ public boolean equals(Object o) { return false; } CreateSettingInitialValues createSettingInitialValues = (CreateSettingInitialValues) o; - return Objects.equals(this.hint, createSettingInitialValues.hint) && + return Objects.equals(this.name, createSettingInitialValues.name) && + Objects.equals(this.hint, createSettingInitialValues.hint) && Objects.equals(this.tags, createSettingInitialValues.tags) && Objects.equals(this.order, createSettingInitialValues.order) && Objects.equals(this.key, createSettingInitialValues.key) && - Objects.equals(this.name, createSettingInitialValues.name) && Objects.equals(this.settingType, createSettingInitialValues.settingType) && + Objects.equals(this.predefinedVariations, createSettingInitialValues.predefinedVariations) && Objects.equals(this.initialValues, createSettingInitialValues.initialValues) && Objects.equals(this.settingIdToInitFrom, createSettingInitialValues.settingIdToInitFrom)&& Objects.equals(this.additionalProperties, createSettingInitialValues.additionalProperties); @@ -330,7 +363,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(hint, tags, order, key, name, settingType, initialValues, settingIdToInitFrom, additionalProperties); + return Objects.hash(name, hint, tags, order, key, settingType, predefinedVariations, initialValues, settingIdToInitFrom, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -344,12 +377,13 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateSettingInitialValues {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" hint: ").append(toIndentedString(hint)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" order: ").append(toIndentedString(order)).append("\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" settingType: ").append(toIndentedString(settingType)).append("\n"); + sb.append(" predefinedVariations: ").append(toIndentedString(predefinedVariations)).append("\n"); sb.append(" initialValues: ").append(toIndentedString(initialValues)).append("\n"); sb.append(" settingIdToInitFrom: ").append(toIndentedString(settingIdToInitFrom)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -375,19 +409,20 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("name"); openapiFields.add("hint"); openapiFields.add("tags"); openapiFields.add("order"); openapiFields.add("key"); - openapiFields.add("name"); openapiFields.add("settingType"); + openapiFields.add("predefinedVariations"); openapiFields.add("initialValues"); openapiFields.add("settingIdToInitFrom"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("key"); openapiRequiredFields.add("name"); + openapiRequiredFields.add("key"); openapiRequiredFields.add("settingType"); } @@ -411,6 +446,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } if ((jsonObj.get("hint") != null && !jsonObj.get("hint").isJsonNull()) && !jsonObj.get("hint").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hint").toString())); } @@ -421,11 +459,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } // validate the required field `settingType` SettingType.validateJsonElement(jsonObj.get("settingType")); + if (jsonObj.get("predefinedVariations") != null && !jsonObj.get("predefinedVariations").isJsonNull()) { + JsonArray jsonArraypredefinedVariations = jsonObj.getAsJsonArray("predefinedVariations"); + if (jsonArraypredefinedVariations != null) { + // ensure the json data is an array + if (!jsonObj.get("predefinedVariations").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `predefinedVariations` to be an array in the JSON string but got `%s`", jsonObj.get("predefinedVariations").toString())); + } + + // validate the optional field `predefinedVariations` (array) + for (int i = 0; i < jsonArraypredefinedVariations.size(); i++) { + CreatePredefinedVariationModel.validateJsonElement(jsonArraypredefinedVariations.get(i)); + }; + } + } if (jsonObj.get("initialValues") != null && !jsonObj.get("initialValues").isJsonNull()) { JsonArray jsonArrayinitialValues = jsonObj.getAsJsonArray("initialValues"); if (jsonArrayinitialValues != null) { diff --git a/src/main/java/com/configcat/publicapi/java/client/model/CreateTagModel.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateTagModel.java index 62040b7..fded2fc 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreateTagModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateTagModel.java @@ -50,7 +50,7 @@ /** * CreateTagModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateTagModel { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/DeleteIntegrationLinkModel.java b/src/main/java/com/configcat/publicapi/java/client/model/DeleteIntegrationLinkModel.java index 3f07e51..8be4ccd 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/DeleteIntegrationLinkModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/DeleteIntegrationLinkModel.java @@ -49,7 +49,7 @@ /** * DeleteIntegrationLinkModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class DeleteIntegrationLinkModel { public static final String SERIALIZED_NAME_HAS_REMAINING_INTEGRATION_LINK = "hasRemainingIntegrationLink"; @SerializedName(SERIALIZED_NAME_HAS_REMAINING_INTEGRATION_LINK) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/DeleteRepositoryReportsRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/DeleteRepositoryReportsRequest.java index f937624..ad55fdb 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/DeleteRepositoryReportsRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/DeleteRepositoryReportsRequest.java @@ -51,7 +51,7 @@ /** * DeleteRepositoryReportsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class DeleteRepositoryReportsRequest { public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; @SerializedName(SERIALIZED_NAME_CONFIG_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/DeletedSettingModel.java b/src/main/java/com/configcat/publicapi/java/client/model/DeletedSettingModel.java index bccf6df..d968253 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/DeletedSettingModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/DeletedSettingModel.java @@ -50,7 +50,7 @@ /** * DeletedSettingModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class DeletedSettingModel { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/EnvironmentAccessModel.java b/src/main/java/com/configcat/publicapi/java/client/model/EnvironmentAccessModel.java index a1b8751..85a7672 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/EnvironmentAccessModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/EnvironmentAccessModel.java @@ -51,7 +51,7 @@ /** * EnvironmentAccessModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class EnvironmentAccessModel { public static final String SERIALIZED_NAME_ENVIRONMENT_ID = "environmentId"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/EnvironmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/EnvironmentModel.java index cca082c..2234376 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/EnvironmentModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/EnvironmentModel.java @@ -51,7 +51,7 @@ /** * Details of the Environment. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class EnvironmentModel { public static final String SERIALIZED_NAME_PRODUCT = "product"; @SerializedName(SERIALIZED_NAME_PRODUCT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/FeatureFlagLimitations.java b/src/main/java/com/configcat/publicapi/java/client/model/FeatureFlagLimitations.java index 25e18a5..62325f6 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/FeatureFlagLimitations.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/FeatureFlagLimitations.java @@ -49,7 +49,7 @@ /** * Subscription limitations regarding Feature flag or Setting values and targeting. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class FeatureFlagLimitations { public static final String SERIALIZED_NAME_MAX_PERCENTAGE_OPTION_COUNT = "maxPercentageOptionCount"; @SerializedName(SERIALIZED_NAME_MAX_PERCENTAGE_OPTION_COUNT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/FlagReference.java b/src/main/java/com/configcat/publicapi/java/client/model/FlagReference.java index 804e9a4..a75d496 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/FlagReference.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/FlagReference.java @@ -52,7 +52,7 @@ /** * FlagReference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class FlagReference { public static final String SERIALIZED_NAME_SETTING_ID = "settingId"; @SerializedName(SERIALIZED_NAME_SETTING_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/InitialValue.java b/src/main/java/com/configcat/publicapi/java/client/model/InitialValue.java index 0255f5a..a3f67f3 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/InitialValue.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/InitialValue.java @@ -51,7 +51,7 @@ /** * InitialValue */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class InitialValue { public static final String SERIALIZED_NAME_ENVIRONMENT_ID = "environmentId"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID) @@ -89,7 +89,7 @@ public InitialValue value(SettingValueType value) { } /** - * The initial value in the given Environment. It must respect the setting type. In some generated clients for strictly typed languages you may use double/float properties to handle integer values. + * The initial value in the given Environment. It must respect the setting type. In some generated clients for strictly typed languages, you may use double/float properties to handle integer values. In case of a Feature Flag with predefined variations, the value must match one of the predefined variations' value. * @return value */ @javax.annotation.Nonnull diff --git a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkDetail.java b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkDetail.java index ed5c5e6..9600f0b 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkDetail.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkDetail.java @@ -53,7 +53,7 @@ /** * IntegrationLinkDetail */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class IntegrationLinkDetail { public static final String SERIALIZED_NAME_PRODUCT = "product"; @SerializedName(SERIALIZED_NAME_PRODUCT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkDetailsModel.java b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkDetailsModel.java index 3c8bdb4..d3ba673 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkDetailsModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkDetailsModel.java @@ -52,7 +52,7 @@ /** * IntegrationLinkDetailsModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class IntegrationLinkDetailsModel { public static final String SERIALIZED_NAME_DETAILS = "details"; @SerializedName(SERIALIZED_NAME_DETAILS) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkModel.java b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkModel.java index e2e7612..78365c4 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationLinkModel.java @@ -50,7 +50,7 @@ /** * IntegrationLinkModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class IntegrationLinkModel { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationModel.java b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationModel.java index 8f5d055..d5ab9d0 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationModel.java @@ -56,7 +56,7 @@ /** * Details of the Integration. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class IntegrationModel { public static final String SERIALIZED_NAME_PRODUCT = "product"; @SerializedName(SERIALIZED_NAME_PRODUCT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationsModel.java b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationsModel.java index 6a05026..643d61c 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/IntegrationsModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/IntegrationsModel.java @@ -52,7 +52,7 @@ /** * IntegrationsModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class IntegrationsModel { public static final String SERIALIZED_NAME_INTEGRATIONS = "integrations"; @SerializedName(SERIALIZED_NAME_INTEGRATIONS) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/InvitationModel.java b/src/main/java/com/configcat/publicapi/java/client/model/InvitationModel.java index c2716f4..a856fa4 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/InvitationModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/InvitationModel.java @@ -51,7 +51,7 @@ /** * InvitationModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class InvitationModel { public static final String SERIALIZED_NAME_INVITATION_ID = "invitationId"; @SerializedName(SERIALIZED_NAME_INVITATION_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/InviteMembersRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/InviteMembersRequest.java index 93fc5f5..363c11a 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/InviteMembersRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/InviteMembersRequest.java @@ -51,7 +51,7 @@ /** * InviteMembersRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class InviteMembersRequest { public static final String SERIALIZED_NAME_EMAILS = "emails"; @SerializedName(SERIALIZED_NAME_EMAILS) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/JsonPatchOperation.java b/src/main/java/com/configcat/publicapi/java/client/model/JsonPatchOperation.java index 274c358..35becbd 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/JsonPatchOperation.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/JsonPatchOperation.java @@ -51,7 +51,7 @@ /** * JsonPatchOperation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class JsonPatchOperation { public static final String SERIALIZED_NAME_OP = "op"; @SerializedName(SERIALIZED_NAME_OP) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/MeModel.java b/src/main/java/com/configcat/publicapi/java/client/model/MeModel.java index b275449..a6820a3 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/MeModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/MeModel.java @@ -49,7 +49,7 @@ /** * MeModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class MeModel { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/MemberModel.java b/src/main/java/com/configcat/publicapi/java/client/model/MemberModel.java index f0145b5..cb66db0 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/MemberModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/MemberModel.java @@ -50,7 +50,7 @@ /** * MemberModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class MemberModel { public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ModifyIntegrationRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/ModifyIntegrationRequest.java index f49817c..9dbaecf 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ModifyIntegrationRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ModifyIntegrationRequest.java @@ -54,7 +54,7 @@ /** * ModifyIntegrationRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ModifyIntegrationRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationAdminModel.java b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationAdminModel.java index dab893d..d4a2e68 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationAdminModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationAdminModel.java @@ -49,7 +49,7 @@ /** * Describes an Organization Admin. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OrganizationAdminModel { public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationInvitationModel.java b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationInvitationModel.java index 2c92c70..f32b280 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationInvitationModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationInvitationModel.java @@ -51,7 +51,7 @@ /** * OrganizationInvitationModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OrganizationInvitationModel { public static final String SERIALIZED_NAME_INVITATION_ID = "invitationId"; @SerializedName(SERIALIZED_NAME_INVITATION_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationMemberModel.java b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationMemberModel.java index d458563..86ed76b 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationMemberModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationMemberModel.java @@ -52,7 +52,7 @@ /** * Describes an Organization Member. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OrganizationMemberModel { public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationMembersModel.java b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationMembersModel.java index 1f70504..bca76fe 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationMembersModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationMembersModel.java @@ -53,7 +53,7 @@ /** * OrganizationMembersModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OrganizationMembersModel { public static final String SERIALIZED_NAME_ADMINS = "admins"; @SerializedName(SERIALIZED_NAME_ADMINS) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationModel.java b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationModel.java index 341048c..36e49c2 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationModel.java @@ -50,7 +50,7 @@ /** * Details of the Organization. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OrganizationModel { public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organizationId"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationPermissionGroupModel.java b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationPermissionGroupModel.java index aed6e30..0662680 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationPermissionGroupModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationPermissionGroupModel.java @@ -49,7 +49,7 @@ /** * Describes the Member's Permission Group within a Product. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OrganizationPermissionGroupModel { public static final String SERIALIZED_NAME_PERMISSION_GROUP_ID = "permissionGroupId"; @SerializedName(SERIALIZED_NAME_PERMISSION_GROUP_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationPermissionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationPermissionModel.java index e23f065..c30a693 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationPermissionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationPermissionModel.java @@ -51,7 +51,7 @@ /** * Describes the Member's permission. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OrganizationPermissionModel { public static final String SERIALIZED_NAME_PRODUCT = "product"; @SerializedName(SERIALIZED_NAME_PRODUCT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationProductModel.java b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationProductModel.java index 7d12435..f17ca2f 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/OrganizationProductModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/OrganizationProductModel.java @@ -50,7 +50,7 @@ /** * Describes the Member's Product. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class OrganizationProductModel { public static final String SERIALIZED_NAME_PRODUCT_ID = "productId"; @SerializedName(SERIALIZED_NAME_PRODUCT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/PercentageOptionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/PercentageOptionModel.java index a17fe7d..248c6e2 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/PercentageOptionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/PercentageOptionModel.java @@ -50,7 +50,7 @@ /** * PercentageOptionModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class PercentageOptionModel { public static final String SERIALIZED_NAME_PERCENTAGE = "percentage"; @SerializedName(SERIALIZED_NAME_PERCENTAGE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/PermissionGroupModel.java b/src/main/java/com/configcat/publicapi/java/client/model/PermissionGroupModel.java index fb2d11e..610e9e3 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/PermissionGroupModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/PermissionGroupModel.java @@ -55,7 +55,7 @@ /** * PermissionGroupModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class PermissionGroupModel { public static final String SERIALIZED_NAME_PERMISSION_GROUP_ID = "permissionGroupId"; @SerializedName(SERIALIZED_NAME_PERMISSION_GROUP_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationModel.java b/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationModel.java new file mode 100644 index 0000000..459ddc7 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationModel.java @@ -0,0 +1,386 @@ +/* + * ConfigCat Public Management API + * 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. **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 API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.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. + * + * The version of the OpenAPI document: v1 + * Contact: support@configcat.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.configcat.publicapi.java.client.model; + +import java.util.Objects; +import com.configcat.publicapi.java.client.model.PredefinedVariationValueModel; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.configcat.publicapi.java.client.JSON; + +/** + * A Feature Flag or Predefined Variation. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class PredefinedVariationModel { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private PredefinedVariationValueModel value; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_HINT = "hint"; + @SerializedName(SERIALIZED_NAME_HINT) + private String hint; + + public static final String SERIALIZED_NAME_PREDEFINED_VARIATION_ID = "predefinedVariationId"; + @SerializedName(SERIALIZED_NAME_PREDEFINED_VARIATION_ID) + private UUID predefinedVariationId; + + public PredefinedVariationModel() { + } + + public PredefinedVariationModel value(PredefinedVariationValueModel value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + public PredefinedVariationValueModel getValue() { + return value; + } + + public void setValue(PredefinedVariationValueModel value) { + this.value = value; + } + + + public PredefinedVariationModel name(String name) { + this.name = name; + return this; + } + + /** + * The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public PredefinedVariationModel hint(String hint) { + this.hint = hint; + return this; + } + + /** + * The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. + * @return hint + */ + @javax.annotation.Nullable + public String getHint() { + return hint; + } + + public void setHint(String hint) { + this.hint = hint; + } + + + public PredefinedVariationModel predefinedVariationId(UUID predefinedVariationId) { + this.predefinedVariationId = predefinedVariationId; + return this; + } + + /** + * The Feature Flag or Predefined Variation's identifier. + * @return predefinedVariationId + */ + @javax.annotation.Nonnull + public UUID getPredefinedVariationId() { + return predefinedVariationId; + } + + public void setPredefinedVariationId(UUID predefinedVariationId) { + this.predefinedVariationId = predefinedVariationId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PredefinedVariationModel instance itself + */ + public PredefinedVariationModel putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PredefinedVariationModel predefinedVariationModel = (PredefinedVariationModel) o; + return Objects.equals(this.value, predefinedVariationModel.value) && + Objects.equals(this.name, predefinedVariationModel.name) && + Objects.equals(this.hint, predefinedVariationModel.hint) && + Objects.equals(this.predefinedVariationId, predefinedVariationModel.predefinedVariationId)&& + Objects.equals(this.additionalProperties, predefinedVariationModel.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(value, name, hint, predefinedVariationId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PredefinedVariationModel {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" hint: ").append(toIndentedString(hint)).append("\n"); + sb.append(" predefinedVariationId: ").append(toIndentedString(predefinedVariationId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + openapiFields.add("name"); + openapiFields.add("hint"); + openapiFields.add("predefinedVariationId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("value"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("hint"); + openapiRequiredFields.add("predefinedVariationId"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PredefinedVariationModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PredefinedVariationModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PredefinedVariationModel is not found in the empty JSON string", PredefinedVariationModel.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PredefinedVariationModel.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `value` + PredefinedVariationValueModel.validateJsonElement(jsonObj.get("value")); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("hint") != null && !jsonObj.get("hint").isJsonNull()) && !jsonObj.get("hint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hint").toString())); + } + if (!jsonObj.get("predefinedVariationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `predefinedVariationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("predefinedVariationId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PredefinedVariationModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PredefinedVariationModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PredefinedVariationModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PredefinedVariationModel value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PredefinedVariationModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PredefinedVariationModel instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PredefinedVariationModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of PredefinedVariationModel + * @throws IOException if the JSON string is invalid with respect to PredefinedVariationModel + */ + public static PredefinedVariationModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PredefinedVariationModel.class); + } + + /** + * Convert an instance of PredefinedVariationModel to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationValueModel.java new file mode 100644 index 0000000..4783497 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationValueModel.java @@ -0,0 +1,376 @@ +/* + * ConfigCat Public Management API + * 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. **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 API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.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. + * + * The version of the OpenAPI document: v1 + * Contact: support@configcat.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.configcat.publicapi.java.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.configcat.publicapi.java.client.JSON; + +/** + * Represents the value of a Feature Flag or Predefined Variation. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class PredefinedVariationValueModel { + public static final String SERIALIZED_NAME_BOOL_VALUE = "boolValue"; + @SerializedName(SERIALIZED_NAME_BOOL_VALUE) + private Boolean boolValue; + + public static final String SERIALIZED_NAME_STRING_VALUE = "stringValue"; + @SerializedName(SERIALIZED_NAME_STRING_VALUE) + private String stringValue; + + public static final String SERIALIZED_NAME_INT_VALUE = "intValue"; + @SerializedName(SERIALIZED_NAME_INT_VALUE) + private Integer intValue; + + public static final String SERIALIZED_NAME_DOUBLE_VALUE = "doubleValue"; + @SerializedName(SERIALIZED_NAME_DOUBLE_VALUE) + private Double doubleValue; + + public PredefinedVariationValueModel() { + } + + public PredefinedVariationValueModel boolValue(Boolean boolValue) { + this.boolValue = boolValue; + return this; + } + + /** + * The served value in case of a boolean Feature Flag. + * @return boolValue + */ + @javax.annotation.Nullable + public Boolean getBoolValue() { + return boolValue; + } + + public void setBoolValue(Boolean boolValue) { + this.boolValue = boolValue; + } + + + public PredefinedVariationValueModel stringValue(String stringValue) { + this.stringValue = stringValue; + return this; + } + + /** + * The served value in case of a text Setting. + * @return stringValue + */ + @javax.annotation.Nullable + public String getStringValue() { + return stringValue; + } + + public void setStringValue(String stringValue) { + this.stringValue = stringValue; + } + + + public PredefinedVariationValueModel intValue(Integer intValue) { + this.intValue = intValue; + return this; + } + + /** + * The served value in case of a whole number Setting. + * @return intValue + */ + @javax.annotation.Nullable + public Integer getIntValue() { + return intValue; + } + + public void setIntValue(Integer intValue) { + this.intValue = intValue; + } + + + public PredefinedVariationValueModel doubleValue(Double doubleValue) { + this.doubleValue = doubleValue; + return this; + } + + /** + * The served value in case of a decimal number Setting. + * @return doubleValue + */ + @javax.annotation.Nullable + public Double getDoubleValue() { + return doubleValue; + } + + public void setDoubleValue(Double doubleValue) { + this.doubleValue = doubleValue; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PredefinedVariationValueModel instance itself + */ + public PredefinedVariationValueModel putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PredefinedVariationValueModel predefinedVariationValueModel = (PredefinedVariationValueModel) o; + return Objects.equals(this.boolValue, predefinedVariationValueModel.boolValue) && + Objects.equals(this.stringValue, predefinedVariationValueModel.stringValue) && + Objects.equals(this.intValue, predefinedVariationValueModel.intValue) && + Objects.equals(this.doubleValue, predefinedVariationValueModel.doubleValue)&& + Objects.equals(this.additionalProperties, predefinedVariationValueModel.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(boolValue, stringValue, intValue, doubleValue, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PredefinedVariationValueModel {\n"); + sb.append(" boolValue: ").append(toIndentedString(boolValue)).append("\n"); + sb.append(" stringValue: ").append(toIndentedString(stringValue)).append("\n"); + sb.append(" intValue: ").append(toIndentedString(intValue)).append("\n"); + sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("boolValue"); + openapiFields.add("stringValue"); + openapiFields.add("intValue"); + openapiFields.add("doubleValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("boolValue"); + openapiRequiredFields.add("stringValue"); + openapiRequiredFields.add("intValue"); + openapiRequiredFields.add("doubleValue"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PredefinedVariationValueModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PredefinedVariationValueModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PredefinedVariationValueModel is not found in the empty JSON string", PredefinedVariationValueModel.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PredefinedVariationValueModel.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("stringValue") != null && !jsonObj.get("stringValue").isJsonNull()) && !jsonObj.get("stringValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `stringValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stringValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PredefinedVariationValueModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PredefinedVariationValueModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PredefinedVariationValueModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PredefinedVariationValueModel value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PredefinedVariationValueModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PredefinedVariationValueModel instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PredefinedVariationValueModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of PredefinedVariationValueModel + * @throws IOException if the JSON string is invalid with respect to PredefinedVariationValueModel + */ + public static PredefinedVariationValueModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PredefinedVariationValueModel.class); + } + + /** + * Convert an instance of PredefinedVariationValueModel to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/configcat/publicapi/java/client/model/PreferencesModel.java b/src/main/java/com/configcat/publicapi/java/client/model/PreferencesModel.java index d801481..b5be820 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/PreferencesModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/PreferencesModel.java @@ -53,7 +53,7 @@ /** * PreferencesModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class PreferencesModel { public static final String SERIALIZED_NAME_REASON_REQUIRED = "reasonRequired"; @SerializedName(SERIALIZED_NAME_REASON_REQUIRED) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/PrerequisiteFlagConditionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/PrerequisiteFlagConditionModel.java index 2bd81fe..590ad3d 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/PrerequisiteFlagConditionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/PrerequisiteFlagConditionModel.java @@ -51,7 +51,7 @@ /** * Describes a condition that is based on a prerequisite flag. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class PrerequisiteFlagConditionModel { public static final String SERIALIZED_NAME_PREREQUISITE_SETTING_ID = "prerequisiteSettingId"; @SerializedName(SERIALIZED_NAME_PREREQUISITE_SETTING_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ProductModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ProductModel.java index afeff83..9b1499d 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ProductModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ProductModel.java @@ -51,7 +51,7 @@ /** * Details of the Product. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ProductModel { public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; @SerializedName(SERIALIZED_NAME_ORGANIZATION) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ReasonRequiredEnvironmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ReasonRequiredEnvironmentModel.java index db817cc..48d90d7 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ReasonRequiredEnvironmentModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ReasonRequiredEnvironmentModel.java @@ -50,7 +50,7 @@ /** * ReasonRequiredEnvironmentModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ReasonRequiredEnvironmentModel { public static final String SERIALIZED_NAME_ENVIRONMENT_ID = "environmentId"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineModel.java index 2fbbd64..86be83c 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineModel.java @@ -49,7 +49,7 @@ /** * Determines a code reference line. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ReferenceLineModel { public static final String SERIALIZED_NAME_LINE_TEXT = "lineText"; @SerializedName(SERIALIZED_NAME_LINE_TEXT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineRequest.java index 243bec2..f8a6c48 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineRequest.java @@ -50,7 +50,7 @@ /** * Determines a code reference line. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ReferenceLineRequest { public static final String SERIALIZED_NAME_LINE_TEXT = "lineText"; @SerializedName(SERIALIZED_NAME_LINE_TEXT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLinesModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLinesModel.java index bc282b4..431d998 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLinesModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLinesModel.java @@ -52,7 +52,7 @@ /** * ReferenceLinesModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ReferenceLinesModel { public static final String SERIALIZED_NAME_FILE = "file"; @SerializedName(SERIALIZED_NAME_FILE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLinesRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLinesRequest.java index a92450e..72f7f3a 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLinesRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ReferenceLinesRequest.java @@ -53,7 +53,7 @@ /** * ReferenceLinesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ReferenceLinesRequest { public static final String SERIALIZED_NAME_FILE = "file"; @SerializedName(SERIALIZED_NAME_FILE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ReplaceSettingModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ReplaceSettingModel.java index 1ce949d..ea62ed5 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ReplaceSettingModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ReplaceSettingModel.java @@ -52,8 +52,12 @@ /** * ReplaceSettingModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ReplaceSettingModel { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + public static final String SERIALIZED_NAME_HINT = "hint"; @SerializedName(SERIALIZED_NAME_HINT) private String hint; @@ -66,13 +70,28 @@ public class ReplaceSettingModel { @SerializedName(SERIALIZED_NAME_ORDER) private Integer order; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - public ReplaceSettingModel() { } + public ReplaceSettingModel name(String name) { + this.name = name; + return this; + } + + /** + * The name of the Feature Flag or Setting. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ReplaceSettingModel hint(String hint) { this.hint = hint; return this; @@ -137,25 +156,6 @@ public void setOrder(Integer order) { this.order = order; } - - public ReplaceSettingModel name(String name) { - this.name = name; - return this; - } - - /** - * The name of the Feature Flag or Setting. - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -211,10 +211,10 @@ public boolean equals(Object o) { return false; } ReplaceSettingModel replaceSettingModel = (ReplaceSettingModel) o; - return Objects.equals(this.hint, replaceSettingModel.hint) && + return Objects.equals(this.name, replaceSettingModel.name) && + Objects.equals(this.hint, replaceSettingModel.hint) && Objects.equals(this.tags, replaceSettingModel.tags) && - Objects.equals(this.order, replaceSettingModel.order) && - Objects.equals(this.name, replaceSettingModel.name)&& + Objects.equals(this.order, replaceSettingModel.order)&& Objects.equals(this.additionalProperties, replaceSettingModel.additionalProperties); } @@ -224,7 +224,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(hint, tags, order, name, additionalProperties); + return Objects.hash(name, hint, tags, order, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -238,10 +238,10 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReplaceSettingModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" hint: ").append(toIndentedString(hint)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -265,13 +265,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("name"); openapiFields.add("hint"); openapiFields.add("tags"); openapiFields.add("order"); - openapiFields.add("name"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); } /** @@ -286,7 +287,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ReplaceSettingModel is not found in the empty JSON string", ReplaceSettingModel.openapiRequiredFields.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ReplaceSettingModel.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } if ((jsonObj.get("hint") != null && !jsonObj.get("hint").isJsonNull()) && !jsonObj.get("hint").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hint").toString())); } @@ -294,9 +305,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/configcat/publicapi/java/client/model/RolloutPercentageItemModel.java b/src/main/java/com/configcat/publicapi/java/client/model/RolloutPercentageItemModel.java index bce1308..751bb5d 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/RolloutPercentageItemModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/RolloutPercentageItemModel.java @@ -50,7 +50,7 @@ /** * RolloutPercentageItemModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class RolloutPercentageItemModel { public static final String SERIALIZED_NAME_PERCENTAGE = "percentage"; @SerializedName(SERIALIZED_NAME_PERCENTAGE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/RolloutRuleModel.java b/src/main/java/com/configcat/publicapi/java/client/model/RolloutRuleModel.java index fa42676..b4584cc 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/RolloutRuleModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/RolloutRuleModel.java @@ -53,7 +53,7 @@ /** * RolloutRuleModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class RolloutRuleModel { public static final String SERIALIZED_NAME_COMPARISON_ATTRIBUTE = "comparisonAttribute"; @SerializedName(SERIALIZED_NAME_COMPARISON_ATTRIBUTE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SdkKeysModel.java b/src/main/java/com/configcat/publicapi/java/client/model/SdkKeysModel.java index 4f367bc..236a9f6 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SdkKeysModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SdkKeysModel.java @@ -49,7 +49,7 @@ /** * SdkKeysModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SdkKeysModel { public static final String SERIALIZED_NAME_PRIMARY = "primary"; @SerializedName(SERIALIZED_NAME_PRIMARY) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SegmentConditionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/SegmentConditionModel.java index a83f868..b2cc0fc 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SegmentConditionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SegmentConditionModel.java @@ -51,7 +51,7 @@ /** * Describes a condition that is based on a segment. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SegmentConditionModel { public static final String SERIALIZED_NAME_SEGMENT_ID = "segmentId"; @SerializedName(SERIALIZED_NAME_SEGMENT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SegmentListModel.java b/src/main/java/com/configcat/publicapi/java/client/model/SegmentListModel.java index c46bbfb..a3323f6 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SegmentListModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SegmentListModel.java @@ -52,7 +52,7 @@ /** * SegmentListModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SegmentListModel { public static final String SERIALIZED_NAME_PRODUCT = "product"; @SerializedName(SERIALIZED_NAME_PRODUCT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SegmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/SegmentModel.java index 9a7c0f6..48bba06 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SegmentModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SegmentModel.java @@ -53,7 +53,7 @@ /** * SegmentModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SegmentModel { public static final String SERIALIZED_NAME_PRODUCT = "product"; @SerializedName(SERIALIZED_NAME_PRODUCT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SettingDataModel.java b/src/main/java/com/configcat/publicapi/java/client/model/SettingDataModel.java index fd19535..10e901d 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SettingDataModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SettingDataModel.java @@ -51,7 +51,7 @@ /** * Metadata of a Feature Flag or Setting. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SettingDataModel { public static final String SERIALIZED_NAME_SETTING_ID = "settingId"; @SerializedName(SERIALIZED_NAME_SETTING_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SettingDataV2Model.java b/src/main/java/com/configcat/publicapi/java/client/model/SettingDataV2Model.java new file mode 100644 index 0000000..fca0481 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/SettingDataV2Model.java @@ -0,0 +1,602 @@ +/* + * ConfigCat Public Management API + * 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. **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 API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.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. + * + * The version of the OpenAPI document: v1 + * Contact: support@configcat.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.configcat.publicapi.java.client.model; + +import java.util.Objects; +import com.configcat.publicapi.java.client.model.PredefinedVariationModel; +import com.configcat.publicapi.java.client.model.SettingType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.configcat.publicapi.java.client.JSON; + +/** + * Metadata of a Feature Flag or Setting. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class SettingDataV2Model { + public static final String SERIALIZED_NAME_SETTING_ID = "settingId"; + @SerializedName(SERIALIZED_NAME_SETTING_ID) + private Integer settingId; + + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_HINT = "hint"; + @SerializedName(SERIALIZED_NAME_HINT) + private String hint; + + public static final String SERIALIZED_NAME_SETTING_TYPE = "settingType"; + @SerializedName(SERIALIZED_NAME_SETTING_TYPE) + private SettingType settingType; + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + private Integer order; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_CREATOR_EMAIL = "creatorEmail"; + @SerializedName(SERIALIZED_NAME_CREATOR_EMAIL) + private String creatorEmail; + + public static final String SERIALIZED_NAME_CREATOR_FULL_NAME = "creatorFullName"; + @SerializedName(SERIALIZED_NAME_CREATOR_FULL_NAME) + private String creatorFullName; + + public static final String SERIALIZED_NAME_PREDEFINED_VARIATIONS = "predefinedVariations"; + @SerializedName(SERIALIZED_NAME_PREDEFINED_VARIATIONS) + private List predefinedVariations = new ArrayList<>(); + + public static final String SERIALIZED_NAME_IS_WATCHING = "isWatching"; + @SerializedName(SERIALIZED_NAME_IS_WATCHING) + private Boolean isWatching; + + public SettingDataV2Model() { + } + + public SettingDataV2Model settingId(Integer settingId) { + this.settingId = settingId; + return this; + } + + /** + * Identifier of the Feature Flag or Setting. + * @return settingId + */ + @javax.annotation.Nonnull + public Integer getSettingId() { + return settingId; + } + + public void setSettingId(Integer settingId) { + this.settingId = settingId; + } + + + public SettingDataV2Model key(String key) { + this.key = key; + return this; + } + + /** + * Key of the Feature Flag or Setting. + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + + public SettingDataV2Model name(String name) { + this.name = name; + return this; + } + + /** + * Name of the Feature Flag or Setting. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public SettingDataV2Model hint(String hint) { + this.hint = hint; + return this; + } + + /** + * Description of the Feature Flag or Setting. + * @return hint + */ + @javax.annotation.Nullable + public String getHint() { + return hint; + } + + public void setHint(String hint) { + this.hint = hint; + } + + + public SettingDataV2Model settingType(SettingType settingType) { + this.settingType = settingType; + return this; + } + + /** + * Get settingType + * @return settingType + */ + @javax.annotation.Nonnull + public SettingType getSettingType() { + return settingType; + } + + public void setSettingType(SettingType settingType) { + this.settingType = settingType; + } + + + public SettingDataV2Model order(Integer order) { + this.order = order; + return this; + } + + /** + * The order of the Feature Flag or Setting represented on the ConfigCat Dashboard. + * @return order + */ + @javax.annotation.Nonnull + public Integer getOrder() { + return order; + } + + public void setOrder(Integer order) { + this.order = order; + } + + + public SettingDataV2Model createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The creation time of the Feature Flag or Setting. + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public SettingDataV2Model creatorEmail(String creatorEmail) { + this.creatorEmail = creatorEmail; + return this; + } + + /** + * The user's email address who created the Feature Flag or Setting. + * @return creatorEmail + */ + @javax.annotation.Nullable + public String getCreatorEmail() { + return creatorEmail; + } + + public void setCreatorEmail(String creatorEmail) { + this.creatorEmail = creatorEmail; + } + + + public SettingDataV2Model creatorFullName(String creatorFullName) { + this.creatorFullName = creatorFullName; + return this; + } + + /** + * The user's name who created the Feature Flag or Setting. + * @return creatorFullName + */ + @javax.annotation.Nullable + public String getCreatorFullName() { + return creatorFullName; + } + + public void setCreatorFullName(String creatorFullName) { + this.creatorFullName = creatorFullName; + } + + + public SettingDataV2Model predefinedVariations(List predefinedVariations) { + this.predefinedVariations = predefinedVariations; + return this; + } + + public SettingDataV2Model addPredefinedVariationsItem(PredefinedVariationModel predefinedVariationsItem) { + if (this.predefinedVariations == null) { + this.predefinedVariations = new ArrayList<>(); + } + this.predefinedVariations.add(predefinedVariationsItem); + return this; + } + + /** + * A collection of Variations for a Feature Flag or Setting. + * @return predefinedVariations + */ + @javax.annotation.Nonnull + public List getPredefinedVariations() { + return predefinedVariations; + } + + public void setPredefinedVariations(List predefinedVariations) { + this.predefinedVariations = predefinedVariations; + } + + + public SettingDataV2Model isWatching(Boolean isWatching) { + this.isWatching = isWatching; + return this; + } + + /** + * Get isWatching + * @return isWatching + */ + @javax.annotation.Nonnull + public Boolean getIsWatching() { + return isWatching; + } + + public void setIsWatching(Boolean isWatching) { + this.isWatching = isWatching; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SettingDataV2Model instance itself + */ + public SettingDataV2Model putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SettingDataV2Model settingDataV2Model = (SettingDataV2Model) o; + return Objects.equals(this.settingId, settingDataV2Model.settingId) && + Objects.equals(this.key, settingDataV2Model.key) && + Objects.equals(this.name, settingDataV2Model.name) && + Objects.equals(this.hint, settingDataV2Model.hint) && + Objects.equals(this.settingType, settingDataV2Model.settingType) && + Objects.equals(this.order, settingDataV2Model.order) && + Objects.equals(this.createdAt, settingDataV2Model.createdAt) && + Objects.equals(this.creatorEmail, settingDataV2Model.creatorEmail) && + Objects.equals(this.creatorFullName, settingDataV2Model.creatorFullName) && + Objects.equals(this.predefinedVariations, settingDataV2Model.predefinedVariations) && + Objects.equals(this.isWatching, settingDataV2Model.isWatching)&& + Objects.equals(this.additionalProperties, settingDataV2Model.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(settingId, key, name, hint, settingType, order, createdAt, creatorEmail, creatorFullName, predefinedVariations, isWatching, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SettingDataV2Model {\n"); + sb.append(" settingId: ").append(toIndentedString(settingId)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" hint: ").append(toIndentedString(hint)).append("\n"); + sb.append(" settingType: ").append(toIndentedString(settingType)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" creatorEmail: ").append(toIndentedString(creatorEmail)).append("\n"); + sb.append(" creatorFullName: ").append(toIndentedString(creatorFullName)).append("\n"); + sb.append(" predefinedVariations: ").append(toIndentedString(predefinedVariations)).append("\n"); + sb.append(" isWatching: ").append(toIndentedString(isWatching)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("settingId"); + openapiFields.add("key"); + openapiFields.add("name"); + openapiFields.add("hint"); + openapiFields.add("settingType"); + openapiFields.add("order"); + openapiFields.add("createdAt"); + openapiFields.add("creatorEmail"); + openapiFields.add("creatorFullName"); + openapiFields.add("predefinedVariations"); + openapiFields.add("isWatching"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("settingId"); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("hint"); + openapiRequiredFields.add("settingType"); + openapiRequiredFields.add("order"); + openapiRequiredFields.add("createdAt"); + openapiRequiredFields.add("creatorEmail"); + openapiRequiredFields.add("creatorFullName"); + openapiRequiredFields.add("predefinedVariations"); + openapiRequiredFields.add("isWatching"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SettingDataV2Model + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SettingDataV2Model.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SettingDataV2Model is not found in the empty JSON string", SettingDataV2Model.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SettingDataV2Model.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("hint") != null && !jsonObj.get("hint").isJsonNull()) && !jsonObj.get("hint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hint").toString())); + } + // validate the required field `settingType` + SettingType.validateJsonElement(jsonObj.get("settingType")); + if ((jsonObj.get("creatorEmail") != null && !jsonObj.get("creatorEmail").isJsonNull()) && !jsonObj.get("creatorEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `creatorEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creatorEmail").toString())); + } + if ((jsonObj.get("creatorFullName") != null && !jsonObj.get("creatorFullName").isJsonNull()) && !jsonObj.get("creatorFullName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `creatorFullName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creatorFullName").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("predefinedVariations").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `predefinedVariations` to be an array in the JSON string but got `%s`", jsonObj.get("predefinedVariations").toString())); + } + + JsonArray jsonArraypredefinedVariations = jsonObj.getAsJsonArray("predefinedVariations"); + // validate the required field `predefinedVariations` (array) + for (int i = 0; i < jsonArraypredefinedVariations.size(); i++) { + PredefinedVariationModel.validateJsonElement(jsonArraypredefinedVariations.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SettingDataV2Model.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SettingDataV2Model' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SettingDataV2Model.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SettingDataV2Model value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SettingDataV2Model read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SettingDataV2Model instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SettingDataV2Model given an JSON string + * + * @param jsonString JSON string + * @return An instance of SettingDataV2Model + * @throws IOException if the JSON string is invalid with respect to SettingDataV2Model + */ + public static SettingDataV2Model fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SettingDataV2Model.class); + } + + /** + * Convert an instance of SettingDataV2Model to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SettingFormulaModel.java b/src/main/java/com/configcat/publicapi/java/client/model/SettingFormulaModel.java index 1d0f866..d08bf8b 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SettingFormulaModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SettingFormulaModel.java @@ -18,7 +18,7 @@ import com.configcat.publicapi.java.client.model.EnvironmentModel; import com.configcat.publicapi.java.client.model.FeatureFlagLimitations; import com.configcat.publicapi.java.client.model.IntegrationLinkModel; -import com.configcat.publicapi.java.client.model.SettingDataModel; +import com.configcat.publicapi.java.client.model.SettingDataV2Model; import com.configcat.publicapi.java.client.model.SettingTagModel; import com.configcat.publicapi.java.client.model.TargetingRuleModel; import com.configcat.publicapi.java.client.model.ValueModel; @@ -61,7 +61,7 @@ /** * SettingFormulaModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SettingFormulaModel { public static final String SERIALIZED_NAME_LAST_VERSION_ID = "lastVersionId"; @SerializedName(SERIALIZED_NAME_LAST_VERSION_ID) @@ -77,7 +77,7 @@ public class SettingFormulaModel { public static final String SERIALIZED_NAME_SETTING = "setting"; @SerializedName(SERIALIZED_NAME_SETTING) - private SettingDataModel setting; + private SettingDataV2Model setting; public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) @@ -191,7 +191,7 @@ public void setTargetingRules(List targetingRules) { } - public SettingFormulaModel setting(SettingDataModel setting) { + public SettingFormulaModel setting(SettingDataV2Model setting) { this.setting = setting; return this; } @@ -201,11 +201,11 @@ public SettingFormulaModel setting(SettingDataModel setting) { * @return setting */ @javax.annotation.Nonnull - public SettingDataModel getSetting() { + public SettingDataV2Model getSetting() { return setting; } - public void setSetting(SettingDataModel setting) { + public void setSetting(SettingDataV2Model setting) { this.setting = setting; } @@ -633,7 +633,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti TargetingRuleModel.validateJsonElement(jsonArraytargetingRules.get(i)); }; // validate the required field `setting` - SettingDataModel.validateJsonElement(jsonObj.get("setting")); + SettingDataV2Model.validateJsonElement(jsonObj.get("setting")); if ((jsonObj.get("percentageEvaluationAttribute") != null && !jsonObj.get("percentageEvaluationAttribute").isJsonNull()) && !jsonObj.get("percentageEvaluationAttribute").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `percentageEvaluationAttribute` to be a primitive type in the JSON string but got `%s`", jsonObj.get("percentageEvaluationAttribute").toString())); } diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SettingModel.java b/src/main/java/com/configcat/publicapi/java/client/model/SettingModel.java index d5398e4..b7acc09 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SettingModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SettingModel.java @@ -14,6 +14,7 @@ package com.configcat.publicapi.java.client.model; import java.util.Objects; +import com.configcat.publicapi.java.client.model.PredefinedVariationModel; import com.configcat.publicapi.java.client.model.SettingType; import com.configcat.publicapi.java.client.model.TagModel; import com.google.gson.TypeAdapter; @@ -55,7 +56,7 @@ /** * Metadata of a Feature Flag or Setting. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SettingModel { public static final String SERIALIZED_NAME_SETTING_ID = "settingId"; @SerializedName(SERIALIZED_NAME_SETTING_ID) @@ -97,6 +98,10 @@ public class SettingModel { @SerializedName(SERIALIZED_NAME_TAGS) private List tags = new ArrayList<>(); + public static final String SERIALIZED_NAME_PREDEFINED_VARIATIONS = "predefinedVariations"; + @SerializedName(SERIALIZED_NAME_PREDEFINED_VARIATIONS) + private List predefinedVariations = new ArrayList<>(); + public SettingModel() { } @@ -297,6 +302,33 @@ public void setTags(List tags) { this.tags = tags; } + + public SettingModel predefinedVariations(List predefinedVariations) { + this.predefinedVariations = predefinedVariations; + return this; + } + + public SettingModel addPredefinedVariationsItem(PredefinedVariationModel predefinedVariationsItem) { + if (this.predefinedVariations == null) { + this.predefinedVariations = new ArrayList<>(); + } + this.predefinedVariations.add(predefinedVariationsItem); + return this; + } + + /** + * The Feature Flag or Setting's Variations. + * @return predefinedVariations + */ + @javax.annotation.Nonnull + public List getPredefinedVariations() { + return predefinedVariations; + } + + public void setPredefinedVariations(List predefinedVariations) { + this.predefinedVariations = predefinedVariations; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -361,13 +393,14 @@ public boolean equals(Object o) { Objects.equals(this.configId, settingModel.configId) && Objects.equals(this.configName, settingModel.configName) && Objects.equals(this.createdAt, settingModel.createdAt) && - Objects.equals(this.tags, settingModel.tags)&& + Objects.equals(this.tags, settingModel.tags) && + Objects.equals(this.predefinedVariations, settingModel.predefinedVariations)&& Objects.equals(this.additionalProperties, settingModel.additionalProperties); } @Override public int hashCode() { - return Objects.hash(settingId, key, name, hint, order, settingType, configId, configName, createdAt, tags, additionalProperties); + return Objects.hash(settingId, key, name, hint, order, settingType, configId, configName, createdAt, tags, predefinedVariations, additionalProperties); } @Override @@ -384,6 +417,7 @@ public String toString() { sb.append(" configName: ").append(toIndentedString(configName)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" predefinedVariations: ").append(toIndentedString(predefinedVariations)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -417,6 +451,7 @@ private String toIndentedString(Object o) { openapiFields.add("configName"); openapiFields.add("createdAt"); openapiFields.add("tags"); + openapiFields.add("predefinedVariations"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -430,6 +465,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("configName"); openapiRequiredFields.add("createdAt"); openapiRequiredFields.add("tags"); + openapiRequiredFields.add("predefinedVariations"); } /** @@ -479,6 +515,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti for (int i = 0; i < jsonArraytags.size(); i++) { TagModel.validateJsonElement(jsonArraytags.get(i)); }; + // ensure the json data is an array + if (!jsonObj.get("predefinedVariations").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `predefinedVariations` to be an array in the JSON string but got `%s`", jsonObj.get("predefinedVariations").toString())); + } + + JsonArray jsonArraypredefinedVariations = jsonObj.getAsJsonArray("predefinedVariations"); + // validate the required field `predefinedVariations` (array) + for (int i = 0; i < jsonArraypredefinedVariations.size(); i++) { + PredefinedVariationModel.validateJsonElement(jsonArraypredefinedVariations.get(i)); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SettingTagModel.java b/src/main/java/com/configcat/publicapi/java/client/model/SettingTagModel.java index 4ea33d7..cc5f2c2 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SettingTagModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SettingTagModel.java @@ -49,7 +49,7 @@ /** * SettingTagModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SettingTagModel { public static final String SERIALIZED_NAME_SETTING_TAG_ID = "settingTagId"; @SerializedName(SERIALIZED_NAME_SETTING_TAG_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SettingValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/SettingValueModel.java index 74570ce..6e45f16 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SettingValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SettingValueModel.java @@ -61,7 +61,7 @@ /** * SettingValueModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SettingValueModel { public static final String SERIALIZED_NAME_SETTING = "setting"; @SerializedName(SERIALIZED_NAME_SETTING) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/SettingValueType.java b/src/main/java/com/configcat/publicapi/java/client/model/SettingValueType.java index 5f9844d..2a033bd 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SettingValueType.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SettingValueType.java @@ -50,7 +50,7 @@ import com.configcat.publicapi.java.client.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class SettingValueType extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(SettingValueType.class.getName()); diff --git a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagConfigModel.java b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagConfigModel.java index 3722f44..66c5d40 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagConfigModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagConfigModel.java @@ -54,7 +54,7 @@ /** * StaleFlagConfigModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class StaleFlagConfigModel { public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; @SerializedName(SERIALIZED_NAME_CONFIG_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagEnvironmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagEnvironmentModel.java index 0a357ac..d990468 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagEnvironmentModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagEnvironmentModel.java @@ -50,7 +50,7 @@ /** * StaleFlagEnvironmentModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class StaleFlagEnvironmentModel { public static final String SERIALIZED_NAME_ENVIRONMENT_ID = "environmentId"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagProductModel.java b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagProductModel.java index c35f7be..fbf887a 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagProductModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagProductModel.java @@ -54,7 +54,7 @@ /** * StaleFlagProductModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class StaleFlagProductModel { public static final String SERIALIZED_NAME_PRODUCT_ID = "productId"; @SerializedName(SERIALIZED_NAME_PRODUCT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingModel.java b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingModel.java index 93aceef..7e4a975 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingModel.java @@ -53,7 +53,7 @@ /** * StaleFlagSettingModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class StaleFlagSettingModel { public static final String SERIALIZED_NAME_SETTING_ID = "settingId"; @SerializedName(SERIALIZED_NAME_SETTING_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingTagModel.java b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingTagModel.java index 110f0c8..98b320b 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingTagModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingTagModel.java @@ -49,7 +49,7 @@ /** * StaleFlagSettingTagModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class StaleFlagSettingTagModel { public static final String SERIALIZED_NAME_TAG_ID = "tagId"; @SerializedName(SERIALIZED_NAME_TAG_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingValueModel.java index 72d3e1b..53e4792 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/StaleFlagSettingValueModel.java @@ -51,7 +51,7 @@ /** * StaleFlagSettingValueModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class StaleFlagSettingValueModel { public static final String SERIALIZED_NAME_ENVIRONMENT_ID = "environmentId"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/TagModel.java b/src/main/java/com/configcat/publicapi/java/client/model/TagModel.java index 190e480..49c362d 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/TagModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/TagModel.java @@ -50,7 +50,7 @@ /** * TagModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class TagModel { public static final String SERIALIZED_NAME_PRODUCT = "product"; @SerializedName(SERIALIZED_NAME_PRODUCT) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/TargetingRuleModel.java b/src/main/java/com/configcat/publicapi/java/client/model/TargetingRuleModel.java index 3d021c1..d8de6ff 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/TargetingRuleModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/TargetingRuleModel.java @@ -54,7 +54,7 @@ /** * TargetingRuleModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class TargetingRuleModel { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateComparisonValueListModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateComparisonValueListModel.java index a25ef52..ad46f4b 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateComparisonValueListModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateComparisonValueListModel.java @@ -50,7 +50,7 @@ /** * UpdateComparisonValueListModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateComparisonValueListModel { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateComparisonValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateComparisonValueModel.java index c36dab3..7113b4e 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateComparisonValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateComparisonValueModel.java @@ -53,7 +53,7 @@ /** * The value that the user object's attribute is compared to. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateComparisonValueModel { public static final String SERIALIZED_NAME_STRING_VALUE = "stringValue"; @SerializedName(SERIALIZED_NAME_STRING_VALUE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateConditionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateConditionModel.java index 016d3da..7e1e6b5 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateConditionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateConditionModel.java @@ -53,7 +53,7 @@ /** * UpdateConditionModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateConditionModel { public static final String SERIALIZED_NAME_USER_CONDITION = "userCondition"; @SerializedName(SERIALIZED_NAME_USER_CONDITION) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateConfigRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateConfigRequest.java index 0782f37..ecb431b 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateConfigRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateConfigRequest.java @@ -50,7 +50,7 @@ /** * UpdateConfigRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateConfigRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateEnvironmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateEnvironmentModel.java index 7d22a22..aedc8d0 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateEnvironmentModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateEnvironmentModel.java @@ -50,7 +50,7 @@ /** * UpdateEnvironmentModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateEnvironmentModel { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulaModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulaModel.java index a84dac2..6e9c852 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulaModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulaModel.java @@ -54,7 +54,7 @@ /** * UpdateEvaluationFormulaModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateEvaluationFormulaModel { public static final String SERIALIZED_NAME_DEFAULT_VALUE = "defaultValue"; @SerializedName(SERIALIZED_NAME_DEFAULT_VALUE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulaWithIdModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulaWithIdModel.java index aaba22e..7da9280 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulaWithIdModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulaWithIdModel.java @@ -54,7 +54,7 @@ /** * UpdateEvaluationFormulaWithIdModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateEvaluationFormulaWithIdModel { public static final String SERIALIZED_NAME_DEFAULT_VALUE = "defaultValue"; @SerializedName(SERIALIZED_NAME_DEFAULT_VALUE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulasModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulasModel.java index 854ede4..699fb45 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulasModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateEvaluationFormulasModel.java @@ -52,7 +52,7 @@ /** * UpdateEvaluationFormulasModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateEvaluationFormulasModel { public static final String SERIALIZED_NAME_UPDATE_FORMULAS = "updateFormulas"; @SerializedName(SERIALIZED_NAME_UPDATE_FORMULAS) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateMemberPermissionsRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateMemberPermissionsRequest.java index 17ddb98..4a776ff 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateMemberPermissionsRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateMemberPermissionsRequest.java @@ -52,7 +52,7 @@ /** * UpdateMemberPermissionsRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateMemberPermissionsRequest { public static final String SERIALIZED_NAME_PERMISSION_GROUP_IDS = "permissionGroupIds"; @SerializedName(SERIALIZED_NAME_PERMISSION_GROUP_IDS) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePercentageOptionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePercentageOptionModel.java index b010a1a..f020068 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePercentageOptionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePercentageOptionModel.java @@ -50,7 +50,7 @@ /** * UpdatePercentageOptionModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdatePercentageOptionModel { public static final String SERIALIZED_NAME_PERCENTAGE = "percentage"; @SerializedName(SERIALIZED_NAME_PERCENTAGE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePermissionGroupRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePermissionGroupRequest.java index 9ec7a05..f6fafb8 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePermissionGroupRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePermissionGroupRequest.java @@ -55,7 +55,7 @@ /** * UpdatePermissionGroupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdatePermissionGroupRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationModel.java new file mode 100644 index 0000000..86c4960 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationModel.java @@ -0,0 +1,395 @@ +/* + * ConfigCat Public Management API + * 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. **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 API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.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. + * + * The version of the OpenAPI document: v1 + * Contact: support@configcat.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.configcat.publicapi.java.client.model; + +import java.util.Objects; +import com.configcat.publicapi.java.client.model.UpdatePredefinedVariationValueModel; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.configcat.publicapi.java.client.JSON; + +/** + * A Feature Flag or Predefined Variation. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class UpdatePredefinedVariationModel { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private UpdatePredefinedVariationValueModel value; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_HINT = "hint"; + @SerializedName(SERIALIZED_NAME_HINT) + private String hint; + + public static final String SERIALIZED_NAME_PREDEFINED_VARIATION_ID = "predefinedVariationId"; + @SerializedName(SERIALIZED_NAME_PREDEFINED_VARIATION_ID) + private UUID predefinedVariationId; + + public UpdatePredefinedVariationModel() { + } + + public UpdatePredefinedVariationModel value(UpdatePredefinedVariationValueModel value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nonnull + public UpdatePredefinedVariationValueModel getValue() { + return value; + } + + public void setValue(UpdatePredefinedVariationValueModel value) { + this.value = value; + } + + + public UpdatePredefinedVariationModel name(String name) { + this.name = name; + return this; + } + + /** + * The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public UpdatePredefinedVariationModel hint(String hint) { + this.hint = hint; + return this; + } + + /** + * The name of the Feature Flag or Predefined Variation, shown on the Dashboard UI. If not set, the Value will be shown. + * @return hint + */ + @javax.annotation.Nullable + public String getHint() { + return hint; + } + + public void setHint(String hint) { + this.hint = hint; + } + + + public UpdatePredefinedVariationModel predefinedVariationId(UUID predefinedVariationId) { + this.predefinedVariationId = predefinedVariationId; + return this; + } + + /** + * The Feature Flag or Predefined Variation's identifier to update. Omit the value if you want to add a new predefined variation. + * @return predefinedVariationId + */ + @javax.annotation.Nullable + public UUID getPredefinedVariationId() { + return predefinedVariationId; + } + + public void setPredefinedVariationId(UUID predefinedVariationId) { + this.predefinedVariationId = predefinedVariationId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdatePredefinedVariationModel instance itself + */ + public UpdatePredefinedVariationModel putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePredefinedVariationModel updatePredefinedVariationModel = (UpdatePredefinedVariationModel) o; + return Objects.equals(this.value, updatePredefinedVariationModel.value) && + Objects.equals(this.name, updatePredefinedVariationModel.name) && + Objects.equals(this.hint, updatePredefinedVariationModel.hint) && + Objects.equals(this.predefinedVariationId, updatePredefinedVariationModel.predefinedVariationId)&& + Objects.equals(this.additionalProperties, updatePredefinedVariationModel.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(value, name, hint, predefinedVariationId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdatePredefinedVariationModel {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" hint: ").append(toIndentedString(hint)).append("\n"); + sb.append(" predefinedVariationId: ").append(toIndentedString(predefinedVariationId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + openapiFields.add("name"); + openapiFields.add("hint"); + openapiFields.add("predefinedVariationId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdatePredefinedVariationModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdatePredefinedVariationModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdatePredefinedVariationModel is not found in the empty JSON string", UpdatePredefinedVariationModel.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdatePredefinedVariationModel.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `value` + UpdatePredefinedVariationValueModel.validateJsonElement(jsonObj.get("value")); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("hint") != null && !jsonObj.get("hint").isJsonNull()) && !jsonObj.get("hint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `hint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hint").toString())); + } + if ((jsonObj.get("predefinedVariationId") != null && !jsonObj.get("predefinedVariationId").isJsonNull()) && !jsonObj.get("predefinedVariationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `predefinedVariationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("predefinedVariationId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdatePredefinedVariationModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdatePredefinedVariationModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdatePredefinedVariationModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdatePredefinedVariationModel value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdatePredefinedVariationModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdatePredefinedVariationModel instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdatePredefinedVariationModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdatePredefinedVariationModel + * @throws IOException if the JSON string is invalid with respect to UpdatePredefinedVariationModel + */ + public static UpdatePredefinedVariationModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdatePredefinedVariationModel.class); + } + + /** + * Convert an instance of UpdatePredefinedVariationModel to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationValueModel.java new file mode 100644 index 0000000..87eb39c --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationValueModel.java @@ -0,0 +1,377 @@ +/* + * ConfigCat Public Management API + * 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. **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 API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.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. + * + * The version of the OpenAPI document: v1 + * Contact: support@configcat.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.configcat.publicapi.java.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.configcat.publicapi.java.client.JSON; + +/** + * Represents the value of a Feature Flag or Predefined Variation. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class UpdatePredefinedVariationValueModel { + public static final String SERIALIZED_NAME_BOOL_VALUE = "boolValue"; + @SerializedName(SERIALIZED_NAME_BOOL_VALUE) + private Boolean boolValue; + + public static final String SERIALIZED_NAME_STRING_VALUE = "stringValue"; + @SerializedName(SERIALIZED_NAME_STRING_VALUE) + private String stringValue; + + public static final String SERIALIZED_NAME_INT_VALUE = "intValue"; + @SerializedName(SERIALIZED_NAME_INT_VALUE) + private Integer intValue; + + public static final String SERIALIZED_NAME_DOUBLE_VALUE = "doubleValue"; + @SerializedName(SERIALIZED_NAME_DOUBLE_VALUE) + private Double doubleValue; + + public UpdatePredefinedVariationValueModel() { + } + + public UpdatePredefinedVariationValueModel boolValue(Boolean boolValue) { + this.boolValue = boolValue; + return this; + } + + /** + * The served value in case of a boolean Feature Flag. + * @return boolValue + */ + @javax.annotation.Nullable + public Boolean getBoolValue() { + return boolValue; + } + + public void setBoolValue(Boolean boolValue) { + this.boolValue = boolValue; + } + + + public UpdatePredefinedVariationValueModel stringValue(String stringValue) { + this.stringValue = stringValue; + return this; + } + + /** + * The served value in case of a text Setting. + * @return stringValue + */ + @javax.annotation.Nullable + public String getStringValue() { + return stringValue; + } + + public void setStringValue(String stringValue) { + this.stringValue = stringValue; + } + + + public UpdatePredefinedVariationValueModel intValue(Integer intValue) { + this.intValue = intValue; + return this; + } + + /** + * The served value in case of a whole number Setting. + * @return intValue + */ + @javax.annotation.Nullable + public Integer getIntValue() { + return intValue; + } + + public void setIntValue(Integer intValue) { + this.intValue = intValue; + } + + + public UpdatePredefinedVariationValueModel doubleValue(Double doubleValue) { + this.doubleValue = doubleValue; + return this; + } + + /** + * The served value in case of a decimal number Setting. + * @return doubleValue + */ + @javax.annotation.Nullable + public Double getDoubleValue() { + return doubleValue; + } + + public void setDoubleValue(Double doubleValue) { + this.doubleValue = doubleValue; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdatePredefinedVariationValueModel instance itself + */ + public UpdatePredefinedVariationValueModel putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePredefinedVariationValueModel updatePredefinedVariationValueModel = (UpdatePredefinedVariationValueModel) o; + return Objects.equals(this.boolValue, updatePredefinedVariationValueModel.boolValue) && + Objects.equals(this.stringValue, updatePredefinedVariationValueModel.stringValue) && + Objects.equals(this.intValue, updatePredefinedVariationValueModel.intValue) && + Objects.equals(this.doubleValue, updatePredefinedVariationValueModel.doubleValue)&& + Objects.equals(this.additionalProperties, updatePredefinedVariationValueModel.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(boolValue, stringValue, intValue, doubleValue, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdatePredefinedVariationValueModel {\n"); + sb.append(" boolValue: ").append(toIndentedString(boolValue)).append("\n"); + sb.append(" stringValue: ").append(toIndentedString(stringValue)).append("\n"); + sb.append(" intValue: ").append(toIndentedString(intValue)).append("\n"); + sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("boolValue"); + openapiFields.add("stringValue"); + openapiFields.add("intValue"); + openapiFields.add("doubleValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdatePredefinedVariationValueModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdatePredefinedVariationValueModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdatePredefinedVariationValueModel is not found in the empty JSON string", UpdatePredefinedVariationValueModel.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("stringValue") != null && !jsonObj.get("stringValue").isJsonNull()) && !jsonObj.get("stringValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `stringValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stringValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdatePredefinedVariationValueModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdatePredefinedVariationValueModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdatePredefinedVariationValueModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdatePredefinedVariationValueModel value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdatePredefinedVariationValueModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdatePredefinedVariationValueModel instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdatePredefinedVariationValueModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdatePredefinedVariationValueModel + * @throws IOException if the JSON string is invalid with respect to UpdatePredefinedVariationValueModel + */ + public static UpdatePredefinedVariationValueModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdatePredefinedVariationValueModel.class); + } + + /** + * Convert an instance of UpdatePredefinedVariationValueModel to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationsRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationsRequest.java new file mode 100644 index 0000000..23c8326 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationsRequest.java @@ -0,0 +1,313 @@ +/* + * ConfigCat Public Management API + * 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. **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 API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://api.configcat.com/docs/v1/swagger.v2.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. + * + * The version of the OpenAPI document: v1 + * Contact: support@configcat.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.configcat.publicapi.java.client.model; + +import java.util.Objects; +import com.configcat.publicapi.java.client.model.UpdatePredefinedVariationModel; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.configcat.publicapi.java.client.JSON; + +/** + * UpdatePredefinedVariationsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class UpdatePredefinedVariationsRequest { + public static final String SERIALIZED_NAME_PREDEFINED_VARIATIONS = "predefinedVariations"; + @SerializedName(SERIALIZED_NAME_PREDEFINED_VARIATIONS) + private List predefinedVariations = new ArrayList<>(); + + public UpdatePredefinedVariationsRequest() { + } + + public UpdatePredefinedVariationsRequest predefinedVariations(List predefinedVariations) { + this.predefinedVariations = predefinedVariations; + return this; + } + + public UpdatePredefinedVariationsRequest addPredefinedVariationsItem(UpdatePredefinedVariationModel predefinedVariationsItem) { + if (this.predefinedVariations == null) { + this.predefinedVariations = new ArrayList<>(); + } + this.predefinedVariations.add(predefinedVariationsItem); + return this; + } + + /** + * A collection of Feature Flag or Predefined Variations. + * @return predefinedVariations + */ + @javax.annotation.Nonnull + public List getPredefinedVariations() { + return predefinedVariations; + } + + public void setPredefinedVariations(List predefinedVariations) { + this.predefinedVariations = predefinedVariations; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdatePredefinedVariationsRequest instance itself + */ + public UpdatePredefinedVariationsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest = (UpdatePredefinedVariationsRequest) o; + return Objects.equals(this.predefinedVariations, updatePredefinedVariationsRequest.predefinedVariations)&& + Objects.equals(this.additionalProperties, updatePredefinedVariationsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(predefinedVariations, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdatePredefinedVariationsRequest {\n"); + sb.append(" predefinedVariations: ").append(toIndentedString(predefinedVariations)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("predefinedVariations"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("predefinedVariations"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdatePredefinedVariationsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdatePredefinedVariationsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdatePredefinedVariationsRequest is not found in the empty JSON string", UpdatePredefinedVariationsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdatePredefinedVariationsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("predefinedVariations").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `predefinedVariations` to be an array in the JSON string but got `%s`", jsonObj.get("predefinedVariations").toString())); + } + + JsonArray jsonArraypredefinedVariations = jsonObj.getAsJsonArray("predefinedVariations"); + // validate the required field `predefinedVariations` (array) + for (int i = 0; i < jsonArraypredefinedVariations.size(); i++) { + UpdatePredefinedVariationModel.validateJsonElement(jsonArraypredefinedVariations.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdatePredefinedVariationsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdatePredefinedVariationsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdatePredefinedVariationsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdatePredefinedVariationsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdatePredefinedVariationsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdatePredefinedVariationsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdatePredefinedVariationsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdatePredefinedVariationsRequest + * @throws IOException if the JSON string is invalid with respect to UpdatePredefinedVariationsRequest + */ + public static UpdatePredefinedVariationsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdatePredefinedVariationsRequest.class); + } + + /** + * Convert an instance of UpdatePredefinedVariationsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePreferencesRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePreferencesRequest.java index bc7515c..4bc2a44 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePreferencesRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePreferencesRequest.java @@ -54,7 +54,7 @@ /** * UpdatePreferencesRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdatePreferencesRequest { public static final String SERIALIZED_NAME_REASON_REQUIRED = "reasonRequired"; @SerializedName(SERIALIZED_NAME_REASON_REQUIRED) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePrerequisiteFlagConditionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePrerequisiteFlagConditionModel.java index 6ed53f3..c377a16 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePrerequisiteFlagConditionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePrerequisiteFlagConditionModel.java @@ -51,7 +51,7 @@ /** * Describes a condition that is based on a prerequisite flag. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdatePrerequisiteFlagConditionModel { public static final String SERIALIZED_NAME_PREREQUISITE_SETTING_ID = "prerequisiteSettingId"; @SerializedName(SERIALIZED_NAME_PREREQUISITE_SETTING_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateProductRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateProductRequest.java index 665e48a..e56439a 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateProductRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateProductRequest.java @@ -50,7 +50,7 @@ /** * UpdateProductRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateProductRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateReasonRequiredEnvironmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateReasonRequiredEnvironmentModel.java index f7fec1c..b35ae70 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateReasonRequiredEnvironmentModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateReasonRequiredEnvironmentModel.java @@ -50,7 +50,7 @@ /** * UpdateReasonRequiredEnvironmentModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateReasonRequiredEnvironmentModel { public static final String SERIALIZED_NAME_ENVIRONMENT_ID = "environmentId"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutPercentageItemModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutPercentageItemModel.java index a3a5196..d1e72c8 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutPercentageItemModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutPercentageItemModel.java @@ -50,7 +50,7 @@ /** * UpdateRolloutPercentageItemModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateRolloutPercentageItemModel { public static final String SERIALIZED_NAME_PERCENTAGE = "percentage"; @SerializedName(SERIALIZED_NAME_PERCENTAGE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutRuleModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutRuleModel.java index 2ca2bac..e14ec6a 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutRuleModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutRuleModel.java @@ -54,7 +54,7 @@ /** * UpdateRolloutRuleModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateRolloutRuleModel { public static final String SERIALIZED_NAME_COMPARISON_ATTRIBUTE = "comparisonAttribute"; @SerializedName(SERIALIZED_NAME_COMPARISON_ATTRIBUTE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSegmentConditionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSegmentConditionModel.java index fde91c6..659f934 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSegmentConditionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSegmentConditionModel.java @@ -51,7 +51,7 @@ /** * Describes a condition that is based on a segment. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateSegmentConditionModel { public static final String SERIALIZED_NAME_SEGMENT_ID = "segmentId"; @SerializedName(SERIALIZED_NAME_SEGMENT_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSegmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSegmentModel.java index 468c9d7..410a703 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSegmentModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSegmentModel.java @@ -51,7 +51,7 @@ /** * UpdateSegmentModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateSegmentModel { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValueModel.java index 6ba0494..fef31ee 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValueModel.java @@ -54,7 +54,7 @@ /** * UpdateSettingValueModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateSettingValueModel { public static final String SERIALIZED_NAME_ROLLOUT_RULES = "rolloutRules"; @SerializedName(SERIALIZED_NAME_ROLLOUT_RULES) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValueWithSettingIdModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValueWithSettingIdModel.java index bb5bcdb..cd8a51d 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValueWithSettingIdModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValueWithSettingIdModel.java @@ -54,7 +54,7 @@ /** * UpdateSettingValueWithSettingIdModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateSettingValueWithSettingIdModel { public static final String SERIALIZED_NAME_ROLLOUT_RULES = "rolloutRules"; @SerializedName(SERIALIZED_NAME_ROLLOUT_RULES) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValuesWithIdModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValuesWithIdModel.java index d690880..f08b680 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValuesWithIdModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateSettingValuesWithIdModel.java @@ -52,7 +52,7 @@ /** * UpdateSettingValuesWithIdModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateSettingValuesWithIdModel { public static final String SERIALIZED_NAME_SETTING_VALUES = "settingValues"; @SerializedName(SERIALIZED_NAME_SETTING_VALUES) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateTagModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateTagModel.java index 7919e3c..c6b04dc 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateTagModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateTagModel.java @@ -50,7 +50,7 @@ /** * UpdateTagModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateTagModel { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateTargetingRuleModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateTargetingRuleModel.java index 7fe0089..d4c0b55 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateTargetingRuleModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateTargetingRuleModel.java @@ -55,7 +55,7 @@ /** * UpdateTargetingRuleModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateTargetingRuleModel { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateUserConditionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateUserConditionModel.java index 706438c..b3acf5d 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateUserConditionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateUserConditionModel.java @@ -51,7 +51,7 @@ /** * Describes a condition that is based on user attributes. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateUserConditionModel { public static final String SERIALIZED_NAME_COMPARISON_ATTRIBUTE = "comparisonAttribute"; @SerializedName(SERIALIZED_NAME_COMPARISON_ATTRIBUTE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UpdateValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateValueModel.java index 42110a7..f3474f2 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdateValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateValueModel.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -50,7 +51,7 @@ /** * Represents the value of a Feature Flag or Setting. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdateValueModel { public static final String SERIALIZED_NAME_BOOL_VALUE = "boolValue"; @SerializedName(SERIALIZED_NAME_BOOL_VALUE) @@ -68,6 +69,10 @@ public class UpdateValueModel { @SerializedName(SERIALIZED_NAME_DOUBLE_VALUE) private Double doubleValue; + public static final String SERIALIZED_NAME_PREDEFINED_VARIATION_ID = "predefinedVariationId"; + @SerializedName(SERIALIZED_NAME_PREDEFINED_VARIATION_ID) + private UUID predefinedVariationId; + public UpdateValueModel() { } @@ -146,6 +151,25 @@ public void setDoubleValue(Double doubleValue) { this.doubleValue = doubleValue; } + + public UpdateValueModel predefinedVariationId(UUID predefinedVariationId) { + this.predefinedVariationId = predefinedVariationId; + return this; + } + + /** + * The served Variation's identifier. + * @return predefinedVariationId + */ + @javax.annotation.Nullable + public UUID getPredefinedVariationId() { + return predefinedVariationId; + } + + public void setPredefinedVariationId(UUID predefinedVariationId) { + this.predefinedVariationId = predefinedVariationId; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -204,7 +228,8 @@ public boolean equals(Object o) { return Objects.equals(this.boolValue, updateValueModel.boolValue) && Objects.equals(this.stringValue, updateValueModel.stringValue) && Objects.equals(this.intValue, updateValueModel.intValue) && - Objects.equals(this.doubleValue, updateValueModel.doubleValue)&& + Objects.equals(this.doubleValue, updateValueModel.doubleValue) && + Objects.equals(this.predefinedVariationId, updateValueModel.predefinedVariationId)&& Objects.equals(this.additionalProperties, updateValueModel.additionalProperties); } @@ -214,7 +239,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(boolValue, stringValue, intValue, doubleValue, additionalProperties); + return Objects.hash(boolValue, stringValue, intValue, doubleValue, predefinedVariationId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -232,6 +257,7 @@ public String toString() { sb.append(" stringValue: ").append(toIndentedString(stringValue)).append("\n"); sb.append(" intValue: ").append(toIndentedString(intValue)).append("\n"); sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); + sb.append(" predefinedVariationId: ").append(toIndentedString(predefinedVariationId)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -259,6 +285,7 @@ private String toIndentedString(Object o) { openapiFields.add("stringValue"); openapiFields.add("intValue"); openapiFields.add("doubleValue"); + openapiFields.add("predefinedVariationId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -280,6 +307,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("stringValue") != null && !jsonObj.get("stringValue").isJsonNull()) && !jsonObj.get("stringValue").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `stringValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stringValue").toString())); } + if ((jsonObj.get("predefinedVariationId") != null && !jsonObj.get("predefinedVariationId").isJsonNull()) && !jsonObj.get("predefinedVariationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `predefinedVariationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("predefinedVariationId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UserConditionModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UserConditionModel.java index 6ac68d4..fe72322 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UserConditionModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UserConditionModel.java @@ -51,7 +51,7 @@ /** * Describes a condition that is based on user attributes. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UserConditionModel { public static final String SERIALIZED_NAME_COMPARISON_ATTRIBUTE = "comparisonAttribute"; @SerializedName(SERIALIZED_NAME_COMPARISON_ATTRIBUTE) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/UserModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UserModel.java index 52f76f4..073f359 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UserModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UserModel.java @@ -49,7 +49,7 @@ /** * UserModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UserModel { public static final String SERIALIZED_NAME_USER_ID = "userId"; @SerializedName(SERIALIZED_NAME_USER_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/ValueModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ValueModel.java index 3ed0264..9ff3ef4 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/ValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/ValueModel.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import java.util.UUID; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -49,7 +50,7 @@ /** * Represents the value of a Feature Flag or Setting. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ValueModel { public static final String SERIALIZED_NAME_BOOL_VALUE = "boolValue"; @SerializedName(SERIALIZED_NAME_BOOL_VALUE) @@ -67,6 +68,10 @@ public class ValueModel { @SerializedName(SERIALIZED_NAME_DOUBLE_VALUE) private Double doubleValue; + public static final String SERIALIZED_NAME_PREDEFINED_VARIATION_ID = "predefinedVariationId"; + @SerializedName(SERIALIZED_NAME_PREDEFINED_VARIATION_ID) + private UUID predefinedVariationId; + public ValueModel() { } @@ -145,6 +150,25 @@ public void setDoubleValue(Double doubleValue) { this.doubleValue = doubleValue; } + + public ValueModel predefinedVariationId(UUID predefinedVariationId) { + this.predefinedVariationId = predefinedVariationId; + return this; + } + + /** + * The served Variation's identifier. + * @return predefinedVariationId + */ + @javax.annotation.Nullable + public UUID getPredefinedVariationId() { + return predefinedVariationId; + } + + public void setPredefinedVariationId(UUID predefinedVariationId) { + this.predefinedVariationId = predefinedVariationId; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -203,13 +227,14 @@ public boolean equals(Object o) { return Objects.equals(this.boolValue, valueModel.boolValue) && Objects.equals(this.stringValue, valueModel.stringValue) && Objects.equals(this.intValue, valueModel.intValue) && - Objects.equals(this.doubleValue, valueModel.doubleValue)&& + Objects.equals(this.doubleValue, valueModel.doubleValue) && + Objects.equals(this.predefinedVariationId, valueModel.predefinedVariationId)&& Objects.equals(this.additionalProperties, valueModel.additionalProperties); } @Override public int hashCode() { - return Objects.hash(boolValue, stringValue, intValue, doubleValue, additionalProperties); + return Objects.hash(boolValue, stringValue, intValue, doubleValue, predefinedVariationId, additionalProperties); } @Override @@ -220,6 +245,7 @@ public String toString() { sb.append(" stringValue: ").append(toIndentedString(stringValue)).append("\n"); sb.append(" intValue: ").append(toIndentedString(intValue)).append("\n"); sb.append(" doubleValue: ").append(toIndentedString(doubleValue)).append("\n"); + sb.append(" predefinedVariationId: ").append(toIndentedString(predefinedVariationId)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -247,6 +273,7 @@ private String toIndentedString(Object o) { openapiFields.add("stringValue"); openapiFields.add("intValue"); openapiFields.add("doubleValue"); + openapiFields.add("predefinedVariationId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -254,6 +281,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("stringValue"); openapiRequiredFields.add("intValue"); openapiRequiredFields.add("doubleValue"); + openapiRequiredFields.add("predefinedVariationId"); } /** @@ -279,6 +307,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("stringValue") != null && !jsonObj.get("stringValue").isJsonNull()) && !jsonObj.get("stringValue").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `stringValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stringValue").toString())); } + if ((jsonObj.get("predefinedVariationId") != null && !jsonObj.get("predefinedVariationId").isJsonNull()) && !jsonObj.get("predefinedVariationId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `predefinedVariationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("predefinedVariationId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/configcat/publicapi/java/client/model/WebHookRequestModel.java b/src/main/java/com/configcat/publicapi/java/client/model/WebHookRequestModel.java index 8e356d9..7904438 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/WebHookRequestModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/WebHookRequestModel.java @@ -54,7 +54,7 @@ /** * WebHookRequestModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class WebHookRequestModel { public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/WebhookConfig.java b/src/main/java/com/configcat/publicapi/java/client/model/WebhookConfig.java index bde467d..cdb13b2 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/WebhookConfig.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/WebhookConfig.java @@ -50,7 +50,7 @@ /** * The Config where the applied changes will invoke the Webhook. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class WebhookConfig { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/WebhookEnvironment.java b/src/main/java/com/configcat/publicapi/java/client/model/WebhookEnvironment.java index 3db9671..bd91e7e 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/WebhookEnvironment.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/WebhookEnvironment.java @@ -50,7 +50,7 @@ /** * The Environment where the applied changes will invoke the Webhook. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class WebhookEnvironment { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderModel.java b/src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderModel.java index 630a3b0..b69ae59 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderModel.java @@ -49,7 +49,7 @@ /** * WebhookHeaderModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class WebhookHeaderModel { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderResponseModel.java b/src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderResponseModel.java index 4b2d0eb..ed19b40 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderResponseModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderResponseModel.java @@ -49,7 +49,7 @@ /** * WebhookHeaderResponseModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class WebhookHeaderResponseModel { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/WebhookResponseModel.java b/src/main/java/com/configcat/publicapi/java/client/model/WebhookResponseModel.java index 7da1d97..abf1b37 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/WebhookResponseModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/WebhookResponseModel.java @@ -55,7 +55,7 @@ /** * WebhookResponseModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class WebhookResponseModel { public static final String SERIALIZED_NAME_WEBHOOK_ID = "webhookId"; @SerializedName(SERIALIZED_NAME_WEBHOOK_ID) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/WebhookSigningKeysModel.java b/src/main/java/com/configcat/publicapi/java/client/model/WebhookSigningKeysModel.java index 411fbc1..cd78a4e 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/WebhookSigningKeysModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/WebhookSigningKeysModel.java @@ -49,7 +49,7 @@ /** * WebhookSigningKeysModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-10T21:25:35.532049258Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class WebhookSigningKeysModel { public static final String SERIALIZED_NAME_KEY1 = "key1"; @SerializedName(SERIALIZED_NAME_KEY1)