From ccf0133bf3d0c118ab238fb81a03a16206d3de99 Mon Sep 17 00:00:00 2001 From: novalisdenahi Date: Fri, 14 Nov 2025 10:22:31 +0100 Subject: [PATCH 1/2] Regenerate client --- .openapi-generator/FILES | 34 + README.md | 28 +- api/openapi.yaml | 1011 ++++++++++- docs/AuditLogType.md | 2 +- docs/AuditLogsApi.md | 4 +- docs/ConnectionPreferences.md | 15 + docs/CreateOrUpdateConnectionPreferences.md | 15 + docs/CreateOrUpdateProxyProfileRequest.md | 16 + docs/CreateOrUpdateWebhookNotification.md | 14 + docs/FeatureFlagsSettingsApi.md | 6 +- docs/PredefinedVariationsModel.md | 14 + docs/ProxyProfileListModel.md | 13 + docs/ProxyProfileModel.md | 18 + docs/ProxyProfileSdkKeyItem.md | 17 + docs/ProxyProfileSdkKeyRequestItem.md | 14 + docs/ProxyProfileSdkKeysListModel.md | 13 + docs/ProxyProfileSdkKeysRequest.md | 13 + docs/ProxyProfileSecretModel.md | 13 + docs/ProxyProfileSelectionRule.md | 19 + docs/ProxyProfilesApi.md | 739 ++++++++ docs/SelectionRuleKind.md | 13 + docs/UpdateProxyProfileSelectionRule.md | 19 + docs/WebhookNotification.md | 16 + .../publicapi/java/client/ApiException.java | 2 +- .../publicapi/java/client/Configuration.java | 2 +- .../configcat/publicapi/java/client/JSON.java | 15 + .../configcat/publicapi/java/client/Pair.java | 2 +- .../java/client/ServerConfiguration.java | 2 +- .../publicapi/java/client/ServerVariable.java | 2 +- .../publicapi/java/client/StringUtil.java | 2 +- .../client/api/FeatureFlagsSettingsApi.java | 17 +- .../java/client/api/ProxyProfilesApi.java | 1495 +++++++++++++++++ .../java/client/auth/ApiKeyAuth.java | 2 +- .../java/client/auth/HttpBearerAuth.java | 2 +- .../client/model/AbstractOpenApiSchema.java | 2 +- .../AddOrUpdateIntegrationLinkModel.java | 2 +- .../AddOrUpdateJiraIntegrationLinkModel.java | 2 +- .../java/client/model/AuditLogItemModel.java | 2 +- .../java/client/model/AuditLogType.java | 2 +- .../java/client/model/CodeReferenceModel.java | 2 +- .../client/model/CodeReferenceRequest.java | 2 +- .../model/ComparisonValueListModel.java | 2 +- .../client/model/ComparisonValueModel.java | 2 +- .../java/client/model/ConditionModel.java | 2 +- .../java/client/model/ConfigModel.java | 2 +- .../model/ConfigSettingFormulaModel.java | 2 +- .../model/ConfigSettingFormulasModel.java | 2 +- .../client/model/ConfigSettingValueModel.java | 2 +- .../model/ConfigSettingValuesModel.java | 2 +- .../java/client/model/ConnectRequest.java | 2 +- .../client/model/ConnectionPreferences.java | 322 ++++ .../client/model/CreateConfigRequest.java | 2 +- .../client/model/CreateEnvironmentModel.java | 2 +- .../client/model/CreateIntegrationModel.java | 2 +- .../CreateOrUpdateConnectionPreferences.java | 329 ++++ .../CreateOrUpdateEnvironmentAccessModel.java | 2 +- .../CreateOrUpdateProxyProfileRequest.java | 418 +++++ .../CreateOrUpdateWebhookNotification.java | 295 ++++ .../model/CreatePermissionGroupRequest.java | 2 +- .../model/CreatePredefinedVariationModel.java | 2 +- .../CreatePredefinedVariationValueModel.java | 2 +- .../client/model/CreateProductRequest.java | 2 +- .../java/client/model/CreateSegmentModel.java | 2 +- .../model/CreateSettingInitialValues.java | 2 +- .../java/client/model/CreateTagModel.java | 2 +- .../model/DeleteIntegrationLinkModel.java | 2 +- .../model/DeleteRepositoryReportsRequest.java | 2 +- .../client/model/DeletedSettingModel.java | 2 +- .../client/model/EnvironmentAccessModel.java | 2 +- .../java/client/model/EnvironmentModel.java | 2 +- .../client/model/FeatureFlagLimitations.java | 2 +- .../java/client/model/FlagReference.java | 2 +- .../java/client/model/InitialValue.java | 2 +- .../client/model/IntegrationLinkDetail.java | 2 +- .../model/IntegrationLinkDetailsModel.java | 2 +- .../client/model/IntegrationLinkModel.java | 2 +- .../java/client/model/IntegrationModel.java | 2 +- .../java/client/model/IntegrationsModel.java | 2 +- .../java/client/model/InvitationModel.java | 2 +- .../client/model/InviteMembersRequest.java | 2 +- .../java/client/model/JsonPatchOperation.java | 2 +- .../publicapi/java/client/model/MeModel.java | 2 +- .../java/client/model/MemberModel.java | 2 +- .../model/ModifyIntegrationRequest.java | 2 +- .../client/model/OrganizationAdminModel.java | 2 +- .../model/OrganizationInvitationModel.java | 2 +- .../client/model/OrganizationMemberModel.java | 2 +- .../model/OrganizationMembersModel.java | 2 +- .../java/client/model/OrganizationModel.java | 2 +- .../OrganizationPermissionGroupModel.java | 2 +- .../model/OrganizationPermissionModel.java | 2 +- .../model/OrganizationProductModel.java | 2 +- .../client/model/PercentageOptionModel.java | 2 +- .../client/model/PermissionGroupModel.java | 2 +- .../model/PredefinedVariationModel.java | 2 +- .../model/PredefinedVariationValueModel.java | 2 +- .../model/PredefinedVariationsModel.java | 340 ++++ .../java/client/model/PreferencesModel.java | 2 +- .../model/PrerequisiteFlagConditionModel.java | 2 +- .../java/client/model/ProductModel.java | 2 +- .../client/model/ProxyProfileListModel.java | 313 ++++ .../java/client/model/ProxyProfileModel.java | 462 +++++ .../client/model/ProxyProfileSdkKeyItem.java | 416 +++++ .../model/ProxyProfileSdkKeyRequestItem.java | 329 ++++ .../model/ProxyProfileSdkKeysListModel.java | 313 ++++ .../model/ProxyProfileSdkKeysRequest.java | 313 ++++ .../client/model/ProxyProfileSecretModel.java | 295 ++++ .../model/ProxyProfileSelectionRule.java | 476 ++++++ .../model/ReasonRequiredEnvironmentModel.java | 2 +- .../java/client/model/ReferenceLineModel.java | 2 +- .../client/model/ReferenceLineRequest.java | 2 +- .../client/model/ReferenceLinesModel.java | 2 +- .../client/model/ReferenceLinesRequest.java | 2 +- .../client/model/ReplaceSettingModel.java | 2 +- .../model/RolloutPercentageItemModel.java | 2 +- .../java/client/model/RolloutRuleModel.java | 2 +- .../java/client/model/SdkKeysModel.java | 2 +- .../client/model/SegmentConditionModel.java | 2 +- .../java/client/model/SegmentListModel.java | 2 +- .../java/client/model/SegmentModel.java | 2 +- .../java/client/model/SelectionRuleKind.java | 78 + .../java/client/model/SettingDataModel.java | 2 +- .../java/client/model/SettingDataV2Model.java | 2 +- .../client/model/SettingFormulaModel.java | 2 +- .../java/client/model/SettingModel.java | 2 +- .../java/client/model/SettingTagModel.java | 2 +- .../java/client/model/SettingValueModel.java | 2 +- .../java/client/model/SettingValueType.java | 2 +- .../client/model/StaleFlagConfigModel.java | 2 +- .../model/StaleFlagEnvironmentModel.java | 2 +- .../client/model/StaleFlagProductModel.java | 2 +- .../client/model/StaleFlagSettingModel.java | 2 +- .../model/StaleFlagSettingTagModel.java | 2 +- .../model/StaleFlagSettingValueModel.java | 2 +- .../publicapi/java/client/model/TagModel.java | 2 +- .../java/client/model/TargetingRuleModel.java | 2 +- .../model/UpdateComparisonValueListModel.java | 2 +- .../model/UpdateComparisonValueModel.java | 2 +- .../client/model/UpdateConditionModel.java | 2 +- .../client/model/UpdateConfigRequest.java | 2 +- .../client/model/UpdateEnvironmentModel.java | 2 +- .../model/UpdateEvaluationFormulaModel.java | 2 +- .../UpdateEvaluationFormulaWithIdModel.java | 2 +- .../model/UpdateEvaluationFormulasModel.java | 2 +- .../model/UpdateMemberPermissionsRequest.java | 2 +- .../model/UpdatePercentageOptionModel.java | 2 +- .../model/UpdatePermissionGroupRequest.java | 2 +- .../model/UpdatePredefinedVariationModel.java | 2 +- .../UpdatePredefinedVariationValueModel.java | 2 +- .../UpdatePredefinedVariationsRequest.java | 2 +- .../model/UpdatePreferencesRequest.java | 2 +- .../UpdatePrerequisiteFlagConditionModel.java | 2 +- .../client/model/UpdateProductRequest.java | 2 +- .../UpdateProxyProfileSelectionRule.java | 476 ++++++ .../UpdateReasonRequiredEnvironmentModel.java | 2 +- .../UpdateRolloutPercentageItemModel.java | 2 +- .../client/model/UpdateRolloutRuleModel.java | 2 +- .../model/UpdateSegmentConditionModel.java | 2 +- .../java/client/model/UpdateSegmentModel.java | 2 +- .../client/model/UpdateSettingValueModel.java | 2 +- .../UpdateSettingValueWithSettingIdModel.java | 2 +- .../model/UpdateSettingValuesWithIdModel.java | 2 +- .../java/client/model/UpdateTagModel.java | 2 +- .../model/UpdateTargetingRuleModel.java | 2 +- .../model/UpdateUserConditionModel.java | 2 +- .../java/client/model/UpdateValueModel.java | 2 +- .../java/client/model/UserConditionModel.java | 2 +- .../java/client/model/UserModel.java | 2 +- .../java/client/model/ValueModel.java | 2 +- .../client/model/WebHookRequestModel.java | 2 +- .../java/client/model/WebhookConfig.java | 2 +- .../java/client/model/WebhookEnvironment.java | 2 +- .../java/client/model/WebhookHeaderModel.java | 2 +- .../model/WebhookHeaderResponseModel.java | 2 +- .../client/model/WebhookNotification.java | 355 ++++ .../client/model/WebhookResponseModel.java | 2 +- .../client/model/WebhookSigningKeysModel.java | 2 +- 177 files changed, 9237 insertions(+), 156 deletions(-) create mode 100644 docs/ConnectionPreferences.md create mode 100644 docs/CreateOrUpdateConnectionPreferences.md create mode 100644 docs/CreateOrUpdateProxyProfileRequest.md create mode 100644 docs/CreateOrUpdateWebhookNotification.md create mode 100644 docs/PredefinedVariationsModel.md create mode 100644 docs/ProxyProfileListModel.md create mode 100644 docs/ProxyProfileModel.md create mode 100644 docs/ProxyProfileSdkKeyItem.md create mode 100644 docs/ProxyProfileSdkKeyRequestItem.md create mode 100644 docs/ProxyProfileSdkKeysListModel.md create mode 100644 docs/ProxyProfileSdkKeysRequest.md create mode 100644 docs/ProxyProfileSecretModel.md create mode 100644 docs/ProxyProfileSelectionRule.md create mode 100644 docs/ProxyProfilesApi.md create mode 100644 docs/SelectionRuleKind.md create mode 100644 docs/UpdateProxyProfileSelectionRule.md create mode 100644 docs/WebhookNotification.md create mode 100644 src/main/java/com/configcat/publicapi/java/client/api/ProxyProfilesApi.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/ConnectionPreferences.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateConnectionPreferences.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateProxyProfileRequest.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateWebhookNotification.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationsModel.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileListModel.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileModel.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeyItem.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeyRequestItem.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeysListModel.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeysRequest.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSecretModel.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSelectionRule.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/SelectionRuleKind.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/UpdateProxyProfileSelectionRule.java create mode 100644 src/main/java/com/configcat/publicapi/java/client/model/WebhookNotification.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 01c90d2..96c6cbb 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -20,10 +20,14 @@ docs/ConfigSettingValueModel.md docs/ConfigSettingValuesModel.md docs/ConfigsApi.md docs/ConnectRequest.md +docs/ConnectionPreferences.md docs/CreateConfigRequest.md docs/CreateEnvironmentModel.md docs/CreateIntegrationModel.md +docs/CreateOrUpdateConnectionPreferences.md docs/CreateOrUpdateEnvironmentAccessModel.md +docs/CreateOrUpdateProxyProfileRequest.md +docs/CreateOrUpdateWebhookNotification.md docs/CreatePermissionGroupRequest.md docs/CreatePredefinedVariationModel.md docs/CreatePredefinedVariationValueModel.md @@ -80,11 +84,21 @@ docs/PermissionGroupModel.md docs/PermissionGroupsApi.md docs/PredefinedVariationModel.md docs/PredefinedVariationValueModel.md +docs/PredefinedVariationsModel.md docs/PreferencesModel.md docs/PrerequisiteComparator.md docs/PrerequisiteFlagConditionModel.md docs/ProductModel.md docs/ProductsApi.md +docs/ProxyProfileListModel.md +docs/ProxyProfileModel.md +docs/ProxyProfileSdkKeyItem.md +docs/ProxyProfileSdkKeyRequestItem.md +docs/ProxyProfileSdkKeysListModel.md +docs/ProxyProfileSdkKeysRequest.md +docs/ProxyProfileSecretModel.md +docs/ProxyProfileSelectionRule.md +docs/ProxyProfilesApi.md docs/ReasonRequiredEnvironmentModel.md docs/ReferenceLineModel.md docs/ReferenceLineRequest.md @@ -101,6 +115,7 @@ docs/SegmentConditionModel.md docs/SegmentListModel.md docs/SegmentModel.md docs/SegmentsApi.md +docs/SelectionRuleKind.md docs/SettingDataModel.md docs/SettingDataV2Model.md docs/SettingFormulaModel.md @@ -137,6 +152,7 @@ docs/UpdatePredefinedVariationsRequest.md docs/UpdatePreferencesRequest.md docs/UpdatePrerequisiteFlagConditionModel.md docs/UpdateProductRequest.md +docs/UpdateProxyProfileSelectionRule.md docs/UpdateReasonRequiredEnvironmentModel.md docs/UpdateRolloutPercentageItemModel.md docs/UpdateRolloutRuleModel.md @@ -159,6 +175,7 @@ docs/WebhookConfig.md docs/WebhookEnvironment.md docs/WebhookHeaderModel.md docs/WebhookHeaderResponseModel.md +docs/WebhookNotification.md docs/WebhookResponseModel.md docs/WebhookSigningKeysModel.md docs/WebhooksApi.md @@ -200,6 +217,7 @@ src/main/java/com/configcat/publicapi/java/client/api/MembersApi.java src/main/java/com/configcat/publicapi/java/client/api/OrganizationsApi.java src/main/java/com/configcat/publicapi/java/client/api/PermissionGroupsApi.java src/main/java/com/configcat/publicapi/java/client/api/ProductsApi.java +src/main/java/com/configcat/publicapi/java/client/api/ProxyProfilesApi.java src/main/java/com/configcat/publicapi/java/client/api/SdkKeysApi.java src/main/java/com/configcat/publicapi/java/client/api/SegmentsApi.java src/main/java/com/configcat/publicapi/java/client/api/TagsApi.java @@ -226,10 +244,14 @@ src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingFormulasMod src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValueModel.java src/main/java/com/configcat/publicapi/java/client/model/ConfigSettingValuesModel.java src/main/java/com/configcat/publicapi/java/client/model/ConnectRequest.java +src/main/java/com/configcat/publicapi/java/client/model/ConnectionPreferences.java src/main/java/com/configcat/publicapi/java/client/model/CreateConfigRequest.java src/main/java/com/configcat/publicapi/java/client/model/CreateEnvironmentModel.java src/main/java/com/configcat/publicapi/java/client/model/CreateIntegrationModel.java +src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateConnectionPreferences.java src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateEnvironmentAccessModel.java +src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateProxyProfileRequest.java +src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateWebhookNotification.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 @@ -274,10 +296,19 @@ src/main/java/com/configcat/publicapi/java/client/model/PercentageOptionModel.ja 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/PredefinedVariationsModel.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 src/main/java/com/configcat/publicapi/java/client/model/ProductModel.java +src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileListModel.java +src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileModel.java +src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeyItem.java +src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeyRequestItem.java +src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeysListModel.java +src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeysRequest.java +src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSecretModel.java +src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSelectionRule.java src/main/java/com/configcat/publicapi/java/client/model/ReasonRequiredEnvironmentModel.java src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineModel.java src/main/java/com/configcat/publicapi/java/client/model/ReferenceLineRequest.java @@ -292,6 +323,7 @@ src/main/java/com/configcat/publicapi/java/client/model/SegmentComparator.java src/main/java/com/configcat/publicapi/java/client/model/SegmentConditionModel.java 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/SelectionRuleKind.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 @@ -327,6 +359,7 @@ src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariatio 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 +src/main/java/com/configcat/publicapi/java/client/model/UpdateProxyProfileSelectionRule.java src/main/java/com/configcat/publicapi/java/client/model/UpdateReasonRequiredEnvironmentModel.java src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutPercentageItemModel.java src/main/java/com/configcat/publicapi/java/client/model/UpdateRolloutRuleModel.java @@ -349,5 +382,6 @@ src/main/java/com/configcat/publicapi/java/client/model/WebhookConfig.java src/main/java/com/configcat/publicapi/java/client/model/WebhookEnvironment.java src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderModel.java src/main/java/com/configcat/publicapi/java/client/model/WebhookHeaderResponseModel.java +src/main/java/com/configcat/publicapi/java/client/model/WebhookNotification.java src/main/java/com/configcat/publicapi/java/client/model/WebhookResponseModel.java src/main/java/com/configcat/publicapi/java/client/model/WebhookSigningKeysModel.java diff --git a/README.md b/README.md index a3c8e77..4ba2dfc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ConfigCat Public Management API - API version: v1 - - Build date: 2025-11-07T15:32:06.171915713Z[Etc/UTC] + - Build date: 2025-11-14T09:20:16.892643418Z[Etc/UTC] - Generator version: 7.7.0 The purpose of this API is to access the ConfigCat platform programmatically. @@ -235,6 +235,16 @@ Class | Method | HTTP request | Description *ProductsApi* | [**getProducts**](docs/ProductsApi.md#getProducts) | **GET** /v1/products | List Products *ProductsApi* | [**updateProduct**](docs/ProductsApi.md#updateProduct) | **PUT** /v1/products/{productId} | Update Product *ProductsApi* | [**updateProductPreferences**](docs/ProductsApi.md#updateProductPreferences) | **POST** /v1/products/{productId}/preferences | Update Product Preferences +*ProxyProfilesApi* | [**createProxyProfile**](docs/ProxyProfilesApi.md#createProxyProfile) | **POST** /v1/organizations/{organizationId}/proxy-profiles | Create Proxy Profile +*ProxyProfilesApi* | [**deleteProxyProfile**](docs/ProxyProfilesApi.md#deleteProxyProfile) | **DELETE** /v1/proxy-profiles/{proxyProfileId} | Delete Proxy Profile +*ProxyProfilesApi* | [**deselectProxyProfileSdkKeys**](docs/ProxyProfilesApi.md#deselectProxyProfileSdkKeys) | **POST** /v1/proxy-profiles/{proxyProfileId}/sdk-keys/deselect | Deselect SDK keys +*ProxyProfilesApi* | [**generateProxyProfileSecret**](docs/ProxyProfilesApi.md#generateProxyProfileSecret) | **POST** /v1/proxy-profiles/{proxyProfileId}/secret | Generate Secret +*ProxyProfilesApi* | [**getProxyProfile**](docs/ProxyProfilesApi.md#getProxyProfile) | **GET** /v1/proxy-profiles/{proxyProfileId} | Get Proxy Profile +*ProxyProfilesApi* | [**getProxyProfileSdkKeys**](docs/ProxyProfilesApi.md#getProxyProfileSdkKeys) | **GET** /v1/proxy-profiles/{proxyProfileId}/sdk-keys | Get selected SDK keys +*ProxyProfilesApi* | [**getProxyProfiles**](docs/ProxyProfilesApi.md#getProxyProfiles) | **GET** /v1/organizations/{organizationId}/proxy-profiles | List Proxy Profiles +*ProxyProfilesApi* | [**replaceProxyProfile**](docs/ProxyProfilesApi.md#replaceProxyProfile) | **PUT** /v1/proxy-profiles/{proxyProfileId} | Replace Proxy Profile +*ProxyProfilesApi* | [**selectProxyProfileSdkKeys**](docs/ProxyProfilesApi.md#selectProxyProfileSdkKeys) | **POST** /v1/proxy-profiles/{proxyProfileId}/sdk-keys/select | Select SDK keys +*ProxyProfilesApi* | [**updateProxyProfile**](docs/ProxyProfilesApi.md#updateProxyProfile) | **PATCH** /v1/proxy-profiles/{proxyProfileId} | Update Proxy Profile *SdkKeysApi* | [**getSdkKeys**](docs/SdkKeysApi.md#getSdkKeys) | **GET** /v1/configs/{configId}/environments/{environmentId} | Get SDK Key *SegmentsApi* | [**createSegment**](docs/SegmentsApi.md#createSegment) | **POST** /v1/products/{productId}/segments | Create Segment *SegmentsApi* | [**deleteSegment**](docs/SegmentsApi.md#deleteSegment) | **DELETE** /v1/segments/{segmentId} | Delete Segment @@ -275,10 +285,14 @@ Class | Method | HTTP request | Description - [ConfigSettingValueModel](docs/ConfigSettingValueModel.md) - [ConfigSettingValuesModel](docs/ConfigSettingValuesModel.md) - [ConnectRequest](docs/ConnectRequest.md) + - [ConnectionPreferences](docs/ConnectionPreferences.md) - [CreateConfigRequest](docs/CreateConfigRequest.md) - [CreateEnvironmentModel](docs/CreateEnvironmentModel.md) - [CreateIntegrationModel](docs/CreateIntegrationModel.md) + - [CreateOrUpdateConnectionPreferences](docs/CreateOrUpdateConnectionPreferences.md) - [CreateOrUpdateEnvironmentAccessModel](docs/CreateOrUpdateEnvironmentAccessModel.md) + - [CreateOrUpdateProxyProfileRequest](docs/CreateOrUpdateProxyProfileRequest.md) + - [CreateOrUpdateWebhookNotification](docs/CreateOrUpdateWebhookNotification.md) - [CreatePermissionGroupRequest](docs/CreatePermissionGroupRequest.md) - [CreatePredefinedVariationModel](docs/CreatePredefinedVariationModel.md) - [CreatePredefinedVariationValueModel](docs/CreatePredefinedVariationValueModel.md) @@ -323,10 +337,19 @@ Class | Method | HTTP request | Description - [PermissionGroupModel](docs/PermissionGroupModel.md) - [PredefinedVariationModel](docs/PredefinedVariationModel.md) - [PredefinedVariationValueModel](docs/PredefinedVariationValueModel.md) + - [PredefinedVariationsModel](docs/PredefinedVariationsModel.md) - [PreferencesModel](docs/PreferencesModel.md) - [PrerequisiteComparator](docs/PrerequisiteComparator.md) - [PrerequisiteFlagConditionModel](docs/PrerequisiteFlagConditionModel.md) - [ProductModel](docs/ProductModel.md) + - [ProxyProfileListModel](docs/ProxyProfileListModel.md) + - [ProxyProfileModel](docs/ProxyProfileModel.md) + - [ProxyProfileSdkKeyItem](docs/ProxyProfileSdkKeyItem.md) + - [ProxyProfileSdkKeyRequestItem](docs/ProxyProfileSdkKeyRequestItem.md) + - [ProxyProfileSdkKeysListModel](docs/ProxyProfileSdkKeysListModel.md) + - [ProxyProfileSdkKeysRequest](docs/ProxyProfileSdkKeysRequest.md) + - [ProxyProfileSecretModel](docs/ProxyProfileSecretModel.md) + - [ProxyProfileSelectionRule](docs/ProxyProfileSelectionRule.md) - [ReasonRequiredEnvironmentModel](docs/ReasonRequiredEnvironmentModel.md) - [ReferenceLineModel](docs/ReferenceLineModel.md) - [ReferenceLineRequest](docs/ReferenceLineRequest.md) @@ -341,6 +364,7 @@ Class | Method | HTTP request | Description - [SegmentConditionModel](docs/SegmentConditionModel.md) - [SegmentListModel](docs/SegmentListModel.md) - [SegmentModel](docs/SegmentModel.md) + - [SelectionRuleKind](docs/SelectionRuleKind.md) - [SettingDataModel](docs/SettingDataModel.md) - [SettingDataV2Model](docs/SettingDataV2Model.md) - [SettingFormulaModel](docs/SettingFormulaModel.md) @@ -376,6 +400,7 @@ Class | Method | HTTP request | Description - [UpdatePreferencesRequest](docs/UpdatePreferencesRequest.md) - [UpdatePrerequisiteFlagConditionModel](docs/UpdatePrerequisiteFlagConditionModel.md) - [UpdateProductRequest](docs/UpdateProductRequest.md) + - [UpdateProxyProfileSelectionRule](docs/UpdateProxyProfileSelectionRule.md) - [UpdateReasonRequiredEnvironmentModel](docs/UpdateReasonRequiredEnvironmentModel.md) - [UpdateRolloutPercentageItemModel](docs/UpdateRolloutPercentageItemModel.md) - [UpdateRolloutRuleModel](docs/UpdateRolloutRuleModel.md) @@ -398,6 +423,7 @@ Class | Method | HTTP request | Description - [WebhookEnvironment](docs/WebhookEnvironment.md) - [WebhookHeaderModel](docs/WebhookHeaderModel.md) - [WebhookHeaderResponseModel](docs/WebhookHeaderResponseModel.md) + - [WebhookNotification](docs/WebhookNotification.md) - [WebhookResponseModel](docs/WebhookResponseModel.md) - [WebhookSigningKeysModel](docs/WebhookSigningKeysModel.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 525222d..9285ce0 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -166,7 +166,281 @@ tags: Here you can read more about the concept of Code References. name: Code References +- description: |- + With these endpoints you can manage your Organization's Proxy Profiles. + + Here you can read more about Proxy Profiles. + name: Proxy Profiles paths: + /v1/proxy-profiles/{proxyProfileId}: + delete: + description: This endpoint removes a Proxy Profile identified by the `proxyProfileId` + parameter. + operationId: delete-proxy-profile + parameters: + - description: The identifier of the Proxy Profile. + explode: false + in: path + name: proxyProfileId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: When the delete 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: Delete Proxy Profile + tags: + - Proxy Profiles + x-accepts: + - application/json + get: + description: "This endpoint returns a Proxy Profile \nidentified by the `proxyProfileId`." + operationId: get-proxy-profile + parameters: + - description: The identifier of the Proxy Profile. + explode: false + in: path + name: proxyProfileId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileModel' + description: "When everything is ok, the Proxy Profile is returned." + "400": + description: Bad request. + "404": + description: Not found. + "429": + description: Too many requests. In case of the request rate exceeds the + rate limits. + summary: Get Proxy Profile + tags: + - Proxy Profiles + x-accepts: + - application/json + patch: + description: "This endpoint updates a Proxy Profile identified by the `proxyProfileId`\ + \ parameter with a collection of [JSON Patch](https://jsonpatch.com) operations.\n\ + \nThe advantage of using JSON Patch is that you can describe individual update\ + \ operations on a resource without touching attributes that you don't want\ + \ to change.\n\nFor example: We have the following resource.\n```json\n{\n\ + \ \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\",\n \"name\"\ + : \"production\",\n \"description\": \"profile for production environments\"\ + ,\n \"lastAccessedAt\": \"2019-08-24T14:15:22Z\",\n \"connectionPreferences\"\ + : {\n \"sdkPollInterval\": 60,\n \"webhookNotification\": null\n },\n\ + \ \"sdkKeySelectionRules\": []\n}\n```\nIf we send an update request body\ + \ as below (it changes the `sdkPollInterval` field and adds a new Proxy Webhook\ + \ URL):\n```json\n[\n {\n \"op\": \"replace\", \n \"path\": \"/connectionPreferences/sdkPollInterval\"\ + , \n \"value\": 120\n }, \n {\n \"op\": \"add\",\n \"path\": \"\ + /connectionPreferences/webhookNotification\",\n \"value\": {\n \"\ + webhookProxyUrl\": \"https://my-proxy-url.com\"\n }\n }\n]\n```\nOnly\ + \ the `sdkPollInterval` and `webhookProxyUrl` are updated and all the other\ + \ attributes remain unchanged.\nSo we get a response like this:\n```json\n\ + {\n \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\",\n \"name\"\ + : \"production\",\n \"description\": \"profile for production environments\"\ + ,\n \"lastAccessedAt\": \"2019-08-24T14:15:22Z\",\n \"connectionPreferences\"\ + : {\n \"sdkPollInterval\": 120,\n \"webhookNotification\": {\n \ + \ \"webhookProxyUrl\": \"https://my-proxy-url.com\",\n \"signingKey1\"\ + : \"\",\n \"signingKey2\": null\n }\n },\n\ + \ \"sdkKeySelectionRules\": []\n}\n```" + operationId: update-proxy-profile + parameters: + - description: The identifier of the Proxy Profile. + explode: false + in: path + name: proxyProfileId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + examples: + add SDK key selection rule: + description: This example adds a selection rule to your proxy profile + that includes all current and future environments that has `Prod` + in its name. + value: + - op: add + path: /sdkKeySelectionRules/- + value: + environmentNameMatchFilter: '*Prod*' + change the SDK poll interval: + description: This example changes the SDK poll interval to 120 seconds. + value: + - op: replace + path: /connectionPreferences/sdkPollInterval + value: 120 + set webhook url: + description: This example sets the Proxy webhook URL. + value: + - op: add + path: /connectionPreferences/webhookNotification + value: + webhookProxyUrl: https://my-proxy-url.com + disconnect Proxy from receiving notifications: + description: This example disconnects a Proxy from receiving notifications. + value: + - op: remove + path: /connectionPreferences/webhookNotification + schema: + items: + $ref: '#/components/schemas/JsonPatchOperation' + type: array + text/json: + examples: + add SDK key selection rule: + description: This example adds a selection rule to your proxy profile + that includes all current and future environments that has `Prod` + in its name. + value: + - op: add + path: /sdkKeySelectionRules/- + value: + environmentNameMatchFilter: '*Prod*' + change the SDK poll interval: + description: This example changes the SDK poll interval to 120 seconds. + value: + - op: replace + path: /connectionPreferences/sdkPollInterval + value: 120 + set webhook url: + description: This example sets the Proxy webhook URL. + value: + - op: add + path: /connectionPreferences/webhookNotification + value: + webhookProxyUrl: https://my-proxy-url.com + disconnect Proxy from receiving notifications: + description: This example disconnects a Proxy from receiving notifications. + value: + - op: remove + path: /connectionPreferences/webhookNotification + schema: + items: + $ref: '#/components/schemas/JsonPatchOperation' + type: array + application/*+json: + examples: + add SDK key selection rule: + description: This example adds a selection rule to your proxy profile + that includes all current and future environments that has `Prod` + in its name. + value: + - op: add + path: /sdkKeySelectionRules/- + value: + environmentNameMatchFilter: '*Prod*' + change the SDK poll interval: + description: This example changes the SDK poll interval to 120 seconds. + value: + - op: replace + path: /connectionPreferences/sdkPollInterval + value: 120 + set webhook url: + description: This example sets the Proxy webhook URL. + value: + - op: add + path: /connectionPreferences/webhookNotification + value: + webhookProxyUrl: https://my-proxy-url.com + disconnect Proxy from receiving notifications: + description: This example disconnects a Proxy from receiving notifications. + value: + - op: remove + path: /connectionPreferences/webhookNotification + schema: + items: + $ref: '#/components/schemas/JsonPatchOperation' + type: array + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileModel' + 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 Proxy Profile + tags: + - Proxy Profiles + x-content-type: application/json + x-accepts: + - application/json + put: + description: |- + This endpoint replaces a Proxy Profile identified by the `proxyProfileId` parameter. + + **Important:** As this endpoint is doing a complete replace, it's important to set every other attribute that you don't + want to change in its original state. Not listing one means it will reset. + operationId: replace-proxy-profile + parameters: + - description: The identifier of the Proxy Profile. + explode: false + in: path + name: proxyProfileId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOrUpdateProxyProfileRequest' + text/json: + schema: + $ref: '#/components/schemas/CreateOrUpdateProxyProfileRequest' + application/*+json: + schema: + $ref: '#/components/schemas/CreateOrUpdateProxyProfileRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileModel' + description: When the replace 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: Replace Proxy Profile + tags: + - Proxy Profiles + x-content-type: application/json + x-accepts: + - application/json /v1/organizations: get: description: This endpoint returns the list of the Organizations that belongs @@ -211,6 +485,87 @@ paths: - Products x-accepts: - application/json + /v1/organizations/{organizationId}/proxy-profiles: + get: + description: This endpoint returns the list of Proxy profiles for the given + Organization identified by the `organizationId` parameter. + operationId: get-proxy-profiles + parameters: + - description: The identifier of the Organization. + explode: false + in: path + name: organizationId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileListModel' + description: "" + "400": + description: Bad request. + "404": + description: Not found. + "429": + description: Too many requests. In case of the request rate exceeds the + rate limits. + summary: List Proxy Profiles + tags: + - Proxy Profiles + x-accepts: + - application/json + post: + description: |- + This endpoint creates a new Proxy Profile in the given Organization + identified by the `organizationId` parameter, which can be obtained from the [List Organizations](#operation/get-organizations) endpoint. + operationId: create-proxy-profile + parameters: + - description: The identifier of the Organization. + explode: false + in: path + name: organizationId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOrUpdateProxyProfileRequest' + text/json: + schema: + $ref: '#/components/schemas/CreateOrUpdateProxyProfileRequest' + application/*+json: + schema: + $ref: '#/components/schemas/CreateOrUpdateProxyProfileRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileModel' + description: When the creation 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: Create Proxy Profile + tags: + - Proxy Profiles + x-content-type: application/json + x-accepts: + - application/json /v1/products/{productId}/tags: get: description: "This endpoint returns the list of the Tags in a \nspecified Product,\ @@ -5217,6 +5572,41 @@ paths: - Webhooks x-accepts: - application/json + /v1/proxy-profiles/{proxyProfileId}/sdk-keys: + get: + description: "This endpoint returns the list of SDK keys selected for a Proxy\ + \ Profile \nidentified by the `proxyProfileId`." + operationId: get-proxy-profile-sdk-keys + parameters: + - description: The identifier of the Proxy Profile. + explode: false + in: path + name: proxyProfileId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileSdkKeysListModel' + description: "When everything is ok, the SDK keys selected for the Proxy\ + \ Profile are returned." + "400": + description: Bad request. + "404": + description: Not found. + "429": + description: Too many requests. In case of the request rate exceeds the + rate limits. + summary: Get selected SDK keys + tags: + - Proxy Profiles + x-accepts: + - application/json /v1/environments/{environmentId}/settings/{settingId}/integrationLinks/{integrationLinkType}/{key}: delete: description: "" @@ -5551,7 +5941,92 @@ paths: required: true responses: "200": - description: OK + description: OK + "400": + description: Bad request. + "404": + description: Not found. + "429": + description: Too many requests. In case of the request rate exceeds the + rate limits. + summary: Delete Reference reports + tags: + - Code References + x-content-type: application/json + x-accepts: + - application/json + /v1/proxy-profiles/{proxyProfileId}/sdk-keys/deselect: + post: + description: |- + This endpoint removes the given list of Config / Environment pairs' SDK Keys from a Proxy Profile + identified by the `proxyProfileId`. + operationId: deselect-proxy-profile-sdk-keys + parameters: + - description: The identifier of the Proxy Profile. + explode: false + in: path + name: proxyProfileId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileSdkKeysRequest' + text/json: + schema: + $ref: '#/components/schemas/ProxyProfileSdkKeysRequest' + application/*+json: + schema: + $ref: '#/components/schemas/ProxyProfileSdkKeysRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileSdkKeysListModel' + description: When the deselection was successful. + "400": + description: Bad request. + "404": + description: Not found. + "403": + description: Forbidden. When selection rules are applied to the Proxy Profile. + "429": + description: Too many requests. In case of the request rate exceeds the + rate limits. + summary: Deselect SDK keys + tags: + - Proxy Profiles + x-content-type: application/json + x-accepts: + - application/json + /v1/proxy-profiles/{proxyProfileId}/secret: + post: + description: This endpoint (re)generates a secret token for a Proxy Profile + identified by the `proxyProfileId` parameter. + operationId: generate-proxy-profile-secret + parameters: + - description: The identifier of the Proxy Profile. + explode: false + in: path + name: proxyProfileId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileSecretModel' + description: When the generation was successful. "400": description: Bad request. "404": @@ -5559,10 +6034,9 @@ paths: "429": description: Too many requests. In case of the request rate exceeds the rate limits. - summary: Delete Reference reports + summary: Generate Secret tags: - - Code References - x-content-type: application/json + - Proxy Profiles x-accepts: - application/json /v1/products/{productId}/members/invite: @@ -5639,6 +6113,55 @@ paths: x-content-type: application/json x-accepts: - application/json + /v1/proxy-profiles/{proxyProfileId}/sdk-keys/select: + post: + description: "This endpoint adds the given list of Config / Environment pairs'\ + \ SDK Keys to a Proxy Profile \nidentified by the `proxyProfileId`." + operationId: select-proxy-profile-sdk-keys + parameters: + - description: The identifier of the Proxy Profile. + explode: false + in: path + name: proxyProfileId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileSdkKeysRequest' + text/json: + schema: + $ref: '#/components/schemas/ProxyProfileSdkKeysRequest' + application/*+json: + schema: + $ref: '#/components/schemas/ProxyProfileSdkKeysRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProxyProfileSdkKeysListModel' + description: When the selection was successful. + "400": + description: Bad request. + "404": + description: Not found. + "403": + description: Forbidden. When selection rules are applied to the Proxy Profile. + "429": + description: Too many requests. In case of the request rate exceeds the + rate limits. + summary: Select SDK keys + tags: + - Proxy Profiles + x-content-type: application/json + x-accepts: + - application/json /v1/organizations/{organizationId}/members/{userId}: delete: description: "This endpoint removes a Member identified by the `userId` from\ @@ -5765,7 +6288,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SettingModel' + $ref: '#/components/schemas/PredefinedVariationsModel' description: When the update was successful. "400": description: Bad request. @@ -5994,7 +6517,7 @@ components: - settingsReordered - predefinedVariationsChanged - settingConvertedToPredefinedVariations - - settingConvertedToCustomValues + - settingConvertedToFreeFormValues - settingValueChanged - webHookCreated - webHookChanged @@ -7136,6 +7659,26 @@ components: - clientKey - jiraJwtToken type: object + ConnectionPreferences: + description: "The connection preferences for the proxy profile, including SDK\ + \ poll interval and webhook proxy URL." + example: + webhookNotification: "" + sdkPollInterval: 0 + properties: + sdkPollInterval: + description: The SDK poll interval in seconds that determines how often + SDKs should fetch config JSON updates. + format: int32 + type: integer + webhookNotification: + allOf: + - $ref: '#/components/schemas/WebhookNotification' + nullable: true + required: + - sdkPollInterval + - webhookNotification + type: object CreateConfigRequest: example: name: name @@ -7246,6 +7789,23 @@ components: - name - parameters type: object + CreateOrUpdateConnectionPreferences: + description: "The preferences related to a connection, including polling intervals\ + \ and webhook proxy configurations." + properties: + sdkPollInterval: + description: "The SDK poll interval in seconds. If not specified, a default\ + \ value (60) will be used." + format: int32 + maximum: 2147483647 + minimum: 30 + nullable: true + type: integer + webhookNotification: + allOf: + - $ref: '#/components/schemas/CreateOrUpdateWebhookNotification' + nullable: true + type: object CreateOrUpdateEnvironmentAccessModel: example: environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -7258,6 +7818,64 @@ components: environmentAccessType: $ref: '#/components/schemas/EnvironmentAccessType' type: object + CreateOrUpdateProxyProfileRequest: + example: + name: name + connectionPreferences: "" + description: description + sdkKeySelectionRules: + - environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + - environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + properties: + name: + description: The name of the proxy profile. + maxLength: 255 + minLength: 0 + type: string + description: + description: The description of the proxy profile. + maxLength: 1000 + minLength: 0 + nullable: true + type: string + connectionPreferences: + allOf: + - $ref: '#/components/schemas/CreateOrUpdateConnectionPreferences' + nullable: true + sdkKeySelectionRules: + description: A collection of selection rules that determine the SDK keys + applicable for a proxy profile. + items: + $ref: '#/components/schemas/UpdateProxyProfileSelectionRule' + nullable: true + type: array + required: + - name + type: object + CreateOrUpdateWebhookNotification: + description: "The preferences related to a connection, including polling intervals\ + \ and webhook proxy configurations." + properties: + webhookProxyUrl: + description: The webhook proxy URL for receiving config JSON change notifications. + maxLength: 1000 + minLength: 7 + type: string + required: + - webhookProxyUrl + type: object CreatePermissionGroupRequest: example: canViewProductStatistics: true @@ -8982,6 +9600,41 @@ components: - intValue - stringValue type: object + PredefinedVariationsModel: + example: + maxPredefinedVariations: 0 + 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 + properties: + predefinedVariations: + description: The Feature Flag or Setting's Variations. + items: + $ref: '#/components/schemas/PredefinedVariationModel' + type: array + maxPredefinedVariations: + description: The maximum number of predefined variations allowed for the + Feature Flag or Setting. + format: int32 + type: integer + required: + - maxPredefinedVariations + - predefinedVariations + type: object PreferencesModel: example: keyGenerationMode: camelCase @@ -9088,6 +9741,273 @@ components: - productId - reasonRequired type: object + ProxyProfileListModel: + example: + profiles: + - proxyProfileId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + lastAccessedAt: 2000-01-23T04:56:07.000+00:00 + name: name + connectionPreferences: + webhookNotification: "" + sdkPollInterval: 0 + description: description + sdkKeySelectionRules: + - environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + - environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + - proxyProfileId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + lastAccessedAt: 2000-01-23T04:56:07.000+00:00 + name: name + connectionPreferences: + webhookNotification: "" + sdkPollInterval: 0 + description: description + sdkKeySelectionRules: + - environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + - environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + properties: + profiles: + description: The list of proxy profiles. + items: + $ref: '#/components/schemas/ProxyProfileModel' + type: array + required: + - profiles + type: object + ProxyProfileModel: + example: + proxyProfileId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + lastAccessedAt: 2000-01-23T04:56:07.000+00:00 + name: name + connectionPreferences: + webhookNotification: "" + sdkPollInterval: 0 + description: description + sdkKeySelectionRules: + - environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + - environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + properties: + proxyProfileId: + description: The unique identifier of the proxy profile. + format: uuid + type: string + name: + description: The name of the proxy profile. + type: string + description: + description: The description of the proxy profile. + nullable: true + type: string + lastAccessedAt: + description: The date and time when the proxy profile was last accessed. + format: date-time + nullable: true + type: string + connectionPreferences: + $ref: '#/components/schemas/ConnectionPreferences' + sdkKeySelectionRules: + items: + $ref: '#/components/schemas/ProxyProfileSelectionRule' + type: array + required: + - connectionPreferences + - description + - lastAccessedAt + - name + - proxyProfileId + - sdkKeySelectionRules + type: object + ProxyProfileSdkKeyItem: + example: + environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + sdkId: sdkId + configId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + secondarySdkKey: secondarySdkKey + primarySdkKey: primarySdkKey + properties: + primarySdkKey: + description: The primary SDK Key of the Config / Environment pair selected + for the Proxy Profile. + type: string + secondarySdkKey: + description: The secondary SDK Key of the Config / Environment pair selected + for the Proxy Profile. + nullable: true + type: string + sdkId: + description: The SDK ID identifying the Config / Environment pair selected + for the Proxy Profile. + type: string + configId: + description: The identifier of the Config associated with the SDK key. + format: uuid + type: string + environmentId: + description: The identifier of the Environment associated with the SDK key. + format: uuid + type: string + required: + - configId + - environmentId + - primarySdkKey + - sdkId + - secondarySdkKey + type: object + ProxyProfileSdkKeyRequestItem: + example: + environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + configId: + description: The identifier of the Config. + format: uuid + nullable: true + type: string + environmentId: + description: The identifier of the Environment. + format: uuid + nullable: true + type: string + type: object + ProxyProfileSdkKeysListModel: + example: + items: + - environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + sdkId: sdkId + configId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + secondarySdkKey: secondarySdkKey + primarySdkKey: primarySdkKey + - environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + sdkId: sdkId + configId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + secondarySdkKey: secondarySdkKey + primarySdkKey: primarySdkKey + properties: + items: + description: The list of SDK keys (with additional metadata) selected for + the Proxy Profile. + items: + $ref: '#/components/schemas/ProxyProfileSdkKeyItem' + type: array + required: + - items + type: object + ProxyProfileSdkKeysRequest: + example: + items: + - environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + items: + description: "The list of Config / Environment pairs. By only setting a\ + \ `configId` means all Environments of that Config will be included. Similarly,\ + \ by only setting an `environmentId` means all Configs with that Environment\ + \ will be included." + items: + $ref: '#/components/schemas/ProxyProfileSdkKeyRequestItem' + type: array + required: + - items + type: object + ProxyProfileSecretModel: + example: + secretToken: secretToken + properties: + secretToken: + description: The secret token associated with the proxy profile. + type: string + required: + - secretToken + type: object + ProxyProfileSelectionRule: + example: + environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + properties: + kind: + $ref: '#/components/schemas/SelectionRuleKind' + productIdFilter: + description: Defines the filter for matching Products by their unique identifier. + format: uuid + nullable: true + type: string + configIdFilter: + description: Defines the filter for matching Configs by their unique identifier. + format: uuid + nullable: true + type: string + environmentIdFilter: + description: Defines the filter for matching Environments by their unique + identifier. + format: uuid + nullable: true + type: string + productNameMatchFilter: + description: Specifies a filter to match Product names in the proxy profile + selection rule. It accepts wildcards (*). + nullable: true + type: string + configNameMatchFilter: + description: Specifies a filter to match Config names in the proxy profile + selection rule. It accepts wildcards (*). + nullable: true + type: string + environmentNameMatchFilter: + description: Specifies a filter to match Environment names in the proxy + profile selection rule. It accepts wildcards (*). + nullable: true + type: string + required: + - configIdFilter + - configNameMatchFilter + - environmentIdFilter + - environmentNameMatchFilter + - kind + - productIdFilter + - productNameMatchFilter + type: object ReasonRequiredEnvironmentModel: example: environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -9571,6 +10491,13 @@ components: - segmentId - updatedAt type: object + SelectionRuleKind: + description: Defines the types of SDK selection rules that can be applied to + proxy profiles. + enum: + - include + - exclude + type: string SettingDataModel: description: Metadata of a Feature Flag or Setting. example: @@ -11379,6 +12306,56 @@ components: nullable: true type: integer type: object + UpdateProxyProfileSelectionRule: + example: + environmentIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + configNameMatchFilter: configNameMatchFilter + kind: include + configIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + productIdFilter: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + environmentNameMatchFilter: environmentNameMatchFilter + productNameMatchFilter: productNameMatchFilter + properties: + kind: + $ref: '#/components/schemas/SelectionRuleKind' + productIdFilter: + description: Defines the filter for matching Products by their unique identifier. + format: uuid + nullable: true + type: string + configIdFilter: + description: Defines the filter for matching Configs by their unique identifier. + format: uuid + nullable: true + type: string + environmentIdFilter: + description: Defines the filter for matching Environments by their unique + identifier. + format: uuid + nullable: true + type: string + productNameMatchFilter: + description: Specifies a filter to match Product names in the proxy profile + selection rule. It accepts wildcards (*). + maxLength: 255 + minLength: 0 + nullable: true + type: string + configNameMatchFilter: + description: Specifies a filter to match Config names in the proxy profile + selection rule. It accepts wildcards (*). + maxLength: 255 + minLength: 0 + nullable: true + type: string + environmentNameMatchFilter: + description: Specifies a filter to match Environment names in the proxy + profile selection rule. It accepts wildcards (*). + maxLength: 255 + minLength: 0 + nullable: true + type: string + type: object UpdateReasonRequiredEnvironmentModel: example: environmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 @@ -11999,6 +12976,27 @@ components: - key - value type: object + WebhookNotification: + description: "The webhook notification settings, including the proxy URL and\ + \ signing keys." + properties: + webhookProxyUrl: + description: The webhook proxy URL for receiving config JSON change notifications. + type: string + signingKey1: + description: The primary signing key used for verifying the authenticity + of webhook requests. + type: string + signingKey2: + description: The secondary signing key used for verifying the authenticity + of webhook requests. + nullable: true + type: string + required: + - signingKey1 + - signingKey2 + - webhookProxyUrl + type: object WebhookResponseModel: example: webHookHeaders: @@ -12098,6 +13096,7 @@ x-tagGroups: - Webhooks - Integrations - Code References + - Proxy Profiles - name: Membership tags: - Organizations diff --git a/docs/AuditLogType.md b/docs/AuditLogType.md index c706255..f301b6c 100644 --- a/docs/AuditLogType.md +++ b/docs/AuditLogType.md @@ -61,7 +61,7 @@ * `SETTING_CONVERTED_TO_PREDEFINED_VARIATIONS` (value: `"settingConvertedToPredefinedVariations"`) -* `SETTING_CONVERTED_TO_CUSTOM_VALUES` (value: `"settingConvertedToCustomValues"`) +* `SETTING_CONVERTED_TO_FREE_FORM_VALUES` (value: `"settingConvertedToFreeFormValues"`) * `SETTING_VALUE_CHANGED` (value: `"settingValueChanged"`) diff --git a/docs/AuditLogsApi.md b/docs/AuditLogsApi.md index 39b3793..c01a15f 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, 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] | +| **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, settingConvertedToFreeFormValues, 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, 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] | +| **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, settingConvertedToFreeFormValues, 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/ConnectionPreferences.md b/docs/ConnectionPreferences.md new file mode 100644 index 0000000..68cb310 --- /dev/null +++ b/docs/ConnectionPreferences.md @@ -0,0 +1,15 @@ + + +# ConnectionPreferences + +The connection preferences for the proxy profile, including SDK poll interval and webhook proxy URL. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sdkPollInterval** | **Integer** | The SDK poll interval in seconds that determines how often SDKs should fetch config JSON updates. | | +|**webhookNotification** | [**WebhookNotification**](WebhookNotification.md) | | | + + + diff --git a/docs/CreateOrUpdateConnectionPreferences.md b/docs/CreateOrUpdateConnectionPreferences.md new file mode 100644 index 0000000..04b4bf8 --- /dev/null +++ b/docs/CreateOrUpdateConnectionPreferences.md @@ -0,0 +1,15 @@ + + +# CreateOrUpdateConnectionPreferences + +The preferences related to a connection, including polling intervals and webhook proxy configurations. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sdkPollInterval** | **Integer** | The SDK poll interval in seconds. If not specified, a default value (60) will be used. | [optional] | +|**webhookNotification** | [**CreateOrUpdateWebhookNotification**](CreateOrUpdateWebhookNotification.md) | | [optional] | + + + diff --git a/docs/CreateOrUpdateProxyProfileRequest.md b/docs/CreateOrUpdateProxyProfileRequest.md new file mode 100644 index 0000000..ea879bd --- /dev/null +++ b/docs/CreateOrUpdateProxyProfileRequest.md @@ -0,0 +1,16 @@ + + +# CreateOrUpdateProxyProfileRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the proxy profile. | | +|**description** | **String** | The description of the proxy profile. | [optional] | +|**connectionPreferences** | [**CreateOrUpdateConnectionPreferences**](CreateOrUpdateConnectionPreferences.md) | | [optional] | +|**sdkKeySelectionRules** | [**List<UpdateProxyProfileSelectionRule>**](UpdateProxyProfileSelectionRule.md) | A collection of selection rules that determine the SDK keys applicable for a proxy profile. | [optional] | + + + diff --git a/docs/CreateOrUpdateWebhookNotification.md b/docs/CreateOrUpdateWebhookNotification.md new file mode 100644 index 0000000..89f64f2 --- /dev/null +++ b/docs/CreateOrUpdateWebhookNotification.md @@ -0,0 +1,14 @@ + + +# CreateOrUpdateWebhookNotification + +The preferences related to a connection, including polling intervals and webhook proxy configurations. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**webhookProxyUrl** | **String** | The webhook proxy URL for receiving config JSON change notifications. | | + + + diff --git a/docs/FeatureFlagsSettingsApi.md b/docs/FeatureFlagsSettingsApi.md index 95f995e..fd86833 100644 --- a/docs/FeatureFlagsSettingsApi.md +++ b/docs/FeatureFlagsSettingsApi.md @@ -373,7 +373,7 @@ public class Example { # **updatePredefinedVariations** -> SettingModel updatePredefinedVariations(settingId, updatePredefinedVariationsRequest) +> PredefinedVariationsModel updatePredefinedVariations(settingId, updatePredefinedVariationsRequest) Update predefined variations (Beta) @@ -403,7 +403,7 @@ public class Example { Integer settingId = 56; // Integer | The identifier of the Setting. UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest = new UpdatePredefinedVariationsRequest(); // UpdatePredefinedVariationsRequest | try { - SettingModel result = apiInstance.updatePredefinedVariations(settingId, updatePredefinedVariationsRequest); + PredefinedVariationsModel result = apiInstance.updatePredefinedVariations(settingId, updatePredefinedVariationsRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FeatureFlagsSettingsApi#updatePredefinedVariations"); @@ -425,7 +425,7 @@ public class Example { ### Return type -[**SettingModel**](SettingModel.md) +[**PredefinedVariationsModel**](PredefinedVariationsModel.md) ### Authorization diff --git a/docs/PredefinedVariationsModel.md b/docs/PredefinedVariationsModel.md new file mode 100644 index 0000000..8c8cd90 --- /dev/null +++ b/docs/PredefinedVariationsModel.md @@ -0,0 +1,14 @@ + + +# PredefinedVariationsModel + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**predefinedVariations** | [**List<PredefinedVariationModel>**](PredefinedVariationModel.md) | The Feature Flag or Setting's Variations. | | +|**maxPredefinedVariations** | **Integer** | The maximum number of predefined variations allowed for the Feature Flag or Setting. | | + + + diff --git a/docs/ProxyProfileListModel.md b/docs/ProxyProfileListModel.md new file mode 100644 index 0000000..00e4a1f --- /dev/null +++ b/docs/ProxyProfileListModel.md @@ -0,0 +1,13 @@ + + +# ProxyProfileListModel + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**profiles** | [**List<ProxyProfileModel>**](ProxyProfileModel.md) | The list of proxy profiles. | | + + + diff --git a/docs/ProxyProfileModel.md b/docs/ProxyProfileModel.md new file mode 100644 index 0000000..60a0ce1 --- /dev/null +++ b/docs/ProxyProfileModel.md @@ -0,0 +1,18 @@ + + +# ProxyProfileModel + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**proxyProfileId** | **UUID** | The unique identifier of the proxy profile. | | +|**name** | **String** | The name of the proxy profile. | | +|**description** | **String** | The description of the proxy profile. | | +|**lastAccessedAt** | **OffsetDateTime** | The date and time when the proxy profile was last accessed. | | +|**connectionPreferences** | [**ConnectionPreferences**](ConnectionPreferences.md) | | | +|**sdkKeySelectionRules** | [**List<ProxyProfileSelectionRule>**](ProxyProfileSelectionRule.md) | | | + + + diff --git a/docs/ProxyProfileSdkKeyItem.md b/docs/ProxyProfileSdkKeyItem.md new file mode 100644 index 0000000..7ed032c --- /dev/null +++ b/docs/ProxyProfileSdkKeyItem.md @@ -0,0 +1,17 @@ + + +# ProxyProfileSdkKeyItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**primarySdkKey** | **String** | The primary SDK Key of the Config / Environment pair selected for the Proxy Profile. | | +|**secondarySdkKey** | **String** | The secondary SDK Key of the Config / Environment pair selected for the Proxy Profile. | | +|**sdkId** | **String** | The SDK ID identifying the Config / Environment pair selected for the Proxy Profile. | | +|**configId** | **UUID** | The identifier of the Config associated with the SDK key. | | +|**environmentId** | **UUID** | The identifier of the Environment associated with the SDK key. | | + + + diff --git a/docs/ProxyProfileSdkKeyRequestItem.md b/docs/ProxyProfileSdkKeyRequestItem.md new file mode 100644 index 0000000..57147eb --- /dev/null +++ b/docs/ProxyProfileSdkKeyRequestItem.md @@ -0,0 +1,14 @@ + + +# ProxyProfileSdkKeyRequestItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**configId** | **UUID** | The identifier of the Config. | [optional] | +|**environmentId** | **UUID** | The identifier of the Environment. | [optional] | + + + diff --git a/docs/ProxyProfileSdkKeysListModel.md b/docs/ProxyProfileSdkKeysListModel.md new file mode 100644 index 0000000..373e126 --- /dev/null +++ b/docs/ProxyProfileSdkKeysListModel.md @@ -0,0 +1,13 @@ + + +# ProxyProfileSdkKeysListModel + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**items** | [**List<ProxyProfileSdkKeyItem>**](ProxyProfileSdkKeyItem.md) | The list of SDK keys (with additional metadata) selected for the Proxy Profile. | | + + + diff --git a/docs/ProxyProfileSdkKeysRequest.md b/docs/ProxyProfileSdkKeysRequest.md new file mode 100644 index 0000000..becd645 --- /dev/null +++ b/docs/ProxyProfileSdkKeysRequest.md @@ -0,0 +1,13 @@ + + +# ProxyProfileSdkKeysRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**items** | [**List<ProxyProfileSdkKeyRequestItem>**](ProxyProfileSdkKeyRequestItem.md) | The list of Config / Environment pairs. By only setting a `configId` means all Environments of that Config will be included. Similarly, by only setting an `environmentId` means all Configs with that Environment will be included. | | + + + diff --git a/docs/ProxyProfileSecretModel.md b/docs/ProxyProfileSecretModel.md new file mode 100644 index 0000000..d1a719d --- /dev/null +++ b/docs/ProxyProfileSecretModel.md @@ -0,0 +1,13 @@ + + +# ProxyProfileSecretModel + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**secretToken** | **String** | The secret token associated with the proxy profile. | | + + + diff --git a/docs/ProxyProfileSelectionRule.md b/docs/ProxyProfileSelectionRule.md new file mode 100644 index 0000000..f66b85e --- /dev/null +++ b/docs/ProxyProfileSelectionRule.md @@ -0,0 +1,19 @@ + + +# ProxyProfileSelectionRule + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | **SelectionRuleKind** | | | +|**productIdFilter** | **UUID** | Defines the filter for matching Products by their unique identifier. | | +|**configIdFilter** | **UUID** | Defines the filter for matching Configs by their unique identifier. | | +|**environmentIdFilter** | **UUID** | Defines the filter for matching Environments by their unique identifier. | | +|**productNameMatchFilter** | **String** | Specifies a filter to match Product names in the proxy profile selection rule. It accepts wildcards (*). | | +|**configNameMatchFilter** | **String** | Specifies a filter to match Config names in the proxy profile selection rule. It accepts wildcards (*). | | +|**environmentNameMatchFilter** | **String** | Specifies a filter to match Environment names in the proxy profile selection rule. It accepts wildcards (*). | | + + + diff --git a/docs/ProxyProfilesApi.md b/docs/ProxyProfilesApi.md new file mode 100644 index 0000000..0a57c95 --- /dev/null +++ b/docs/ProxyProfilesApi.md @@ -0,0 +1,739 @@ +# ProxyProfilesApi + +All URIs are relative to *https://api.configcat.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createProxyProfile**](ProxyProfilesApi.md#createProxyProfile) | **POST** /v1/organizations/{organizationId}/proxy-profiles | Create Proxy Profile | +| [**deleteProxyProfile**](ProxyProfilesApi.md#deleteProxyProfile) | **DELETE** /v1/proxy-profiles/{proxyProfileId} | Delete Proxy Profile | +| [**deselectProxyProfileSdkKeys**](ProxyProfilesApi.md#deselectProxyProfileSdkKeys) | **POST** /v1/proxy-profiles/{proxyProfileId}/sdk-keys/deselect | Deselect SDK keys | +| [**generateProxyProfileSecret**](ProxyProfilesApi.md#generateProxyProfileSecret) | **POST** /v1/proxy-profiles/{proxyProfileId}/secret | Generate Secret | +| [**getProxyProfile**](ProxyProfilesApi.md#getProxyProfile) | **GET** /v1/proxy-profiles/{proxyProfileId} | Get Proxy Profile | +| [**getProxyProfileSdkKeys**](ProxyProfilesApi.md#getProxyProfileSdkKeys) | **GET** /v1/proxy-profiles/{proxyProfileId}/sdk-keys | Get selected SDK keys | +| [**getProxyProfiles**](ProxyProfilesApi.md#getProxyProfiles) | **GET** /v1/organizations/{organizationId}/proxy-profiles | List Proxy Profiles | +| [**replaceProxyProfile**](ProxyProfilesApi.md#replaceProxyProfile) | **PUT** /v1/proxy-profiles/{proxyProfileId} | Replace Proxy Profile | +| [**selectProxyProfileSdkKeys**](ProxyProfilesApi.md#selectProxyProfileSdkKeys) | **POST** /v1/proxy-profiles/{proxyProfileId}/sdk-keys/select | Select SDK keys | +| [**updateProxyProfile**](ProxyProfilesApi.md#updateProxyProfile) | **PATCH** /v1/proxy-profiles/{proxyProfileId} | Update Proxy Profile | + + + +# **createProxyProfile** +> ProxyProfileModel createProxyProfile(organizationId, createOrUpdateProxyProfileRequest) + +Create Proxy Profile + +This endpoint creates a new Proxy Profile in the given Organization identified by the `organizationId` parameter, which can be obtained from the [List Organizations](#operation/get-organizations) endpoint. + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID organizationId = UUID.randomUUID(); // UUID | The identifier of the Organization. + CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest = new CreateOrUpdateProxyProfileRequest(); // CreateOrUpdateProxyProfileRequest | + try { + ProxyProfileModel result = apiInstance.createProxyProfile(organizationId, createOrUpdateProxyProfileRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#createProxyProfile"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **organizationId** | **UUID**| The identifier of the Organization. | | +| **createOrUpdateProxyProfileRequest** | [**CreateOrUpdateProxyProfileRequest**](CreateOrUpdateProxyProfileRequest.md)| | | + +### Return type + +[**ProxyProfileModel**](ProxyProfileModel.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 | +|-------------|-------------|------------------| +| **201** | When the creation was successful. | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + + +# **deleteProxyProfile** +> deleteProxyProfile(proxyProfileId) + +Delete Proxy Profile + +This endpoint removes a Proxy Profile identified by the `proxyProfileId` parameter. + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID proxyProfileId = UUID.randomUUID(); // UUID | The identifier of the Proxy Profile. + try { + apiInstance.deleteProxyProfile(proxyProfileId); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#deleteProxyProfile"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **proxyProfileId** | **UUID**| The identifier of the Proxy Profile. | | + +### Return type + +null (empty response body) + +### Authorization + +[Basic](../README.md#Basic) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | When the delete was successful. | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + + +# **deselectProxyProfileSdkKeys** +> ProxyProfileSdkKeysListModel deselectProxyProfileSdkKeys(proxyProfileId, proxyProfileSdkKeysRequest) + +Deselect SDK keys + +This endpoint removes the given list of Config / Environment pairs' SDK Keys from a Proxy Profile identified by the `proxyProfileId`. + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID proxyProfileId = UUID.randomUUID(); // UUID | The identifier of the Proxy Profile. + ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest = new ProxyProfileSdkKeysRequest(); // ProxyProfileSdkKeysRequest | + try { + ProxyProfileSdkKeysListModel result = apiInstance.deselectProxyProfileSdkKeys(proxyProfileId, proxyProfileSdkKeysRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#deselectProxyProfileSdkKeys"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **proxyProfileId** | **UUID**| The identifier of the Proxy Profile. | | +| **proxyProfileSdkKeysRequest** | [**ProxyProfileSdkKeysRequest**](ProxyProfileSdkKeysRequest.md)| | | + +### Return type + +[**ProxyProfileSdkKeysListModel**](ProxyProfileSdkKeysListModel.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 deselection was successful. | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **403** | Forbidden. When selection rules are applied to the Proxy Profile. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + + +# **generateProxyProfileSecret** +> ProxyProfileSecretModel generateProxyProfileSecret(proxyProfileId) + +Generate Secret + +This endpoint (re)generates a secret token for a Proxy Profile identified by the `proxyProfileId` parameter. + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID proxyProfileId = UUID.randomUUID(); // UUID | The identifier of the Proxy Profile. + try { + ProxyProfileSecretModel result = apiInstance.generateProxyProfileSecret(proxyProfileId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#generateProxyProfileSecret"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **proxyProfileId** | **UUID**| The identifier of the Proxy Profile. | | + +### Return type + +[**ProxyProfileSecretModel**](ProxyProfileSecretModel.md) + +### Authorization + +[Basic](../README.md#Basic) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | When the generation was successful. | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + + +# **getProxyProfile** +> ProxyProfileModel getProxyProfile(proxyProfileId) + +Get Proxy Profile + +This endpoint returns a Proxy Profile identified by the `proxyProfileId`. + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID proxyProfileId = UUID.randomUUID(); // UUID | The identifier of the Proxy Profile. + try { + ProxyProfileModel result = apiInstance.getProxyProfile(proxyProfileId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#getProxyProfile"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **proxyProfileId** | **UUID**| The identifier of the Proxy Profile. | | + +### Return type + +[**ProxyProfileModel**](ProxyProfileModel.md) + +### Authorization + +[Basic](../README.md#Basic) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | When everything is ok, the Proxy Profile is returned. | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + + +# **getProxyProfileSdkKeys** +> ProxyProfileSdkKeysListModel getProxyProfileSdkKeys(proxyProfileId) + +Get selected SDK keys + +This endpoint returns the list of SDK keys selected for a Proxy Profile identified by the `proxyProfileId`. + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID proxyProfileId = UUID.randomUUID(); // UUID | The identifier of the Proxy Profile. + try { + ProxyProfileSdkKeysListModel result = apiInstance.getProxyProfileSdkKeys(proxyProfileId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#getProxyProfileSdkKeys"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **proxyProfileId** | **UUID**| The identifier of the Proxy Profile. | | + +### Return type + +[**ProxyProfileSdkKeysListModel**](ProxyProfileSdkKeysListModel.md) + +### Authorization + +[Basic](../README.md#Basic) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | When everything is ok, the SDK keys selected for the Proxy Profile are returned. | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + + +# **getProxyProfiles** +> ProxyProfileListModel getProxyProfiles(organizationId) + +List Proxy Profiles + +This endpoint returns the list of Proxy profiles for the given Organization identified by the `organizationId` parameter. + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID organizationId = UUID.randomUUID(); // UUID | The identifier of the Organization. + try { + ProxyProfileListModel result = apiInstance.getProxyProfiles(organizationId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#getProxyProfiles"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **organizationId** | **UUID**| The identifier of the Organization. | | + +### Return type + +[**ProxyProfileListModel**](ProxyProfileListModel.md) + +### Authorization + +[Basic](../README.md#Basic) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + + +# **replaceProxyProfile** +> ProxyProfileModel replaceProxyProfile(proxyProfileId, createOrUpdateProxyProfileRequest) + +Replace Proxy Profile + +This endpoint replaces a Proxy Profile identified by the `proxyProfileId` parameter. **Important:** As this endpoint is doing a complete replace, it's important to set every other attribute that you don't want to change in its original state. Not listing one means it will reset. + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID proxyProfileId = UUID.randomUUID(); // UUID | The identifier of the Proxy Profile. + CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest = new CreateOrUpdateProxyProfileRequest(); // CreateOrUpdateProxyProfileRequest | + try { + ProxyProfileModel result = apiInstance.replaceProxyProfile(proxyProfileId, createOrUpdateProxyProfileRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#replaceProxyProfile"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **proxyProfileId** | **UUID**| The identifier of the Proxy Profile. | | +| **createOrUpdateProxyProfileRequest** | [**CreateOrUpdateProxyProfileRequest**](CreateOrUpdateProxyProfileRequest.md)| | | + +### Return type + +[**ProxyProfileModel**](ProxyProfileModel.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 replace was successful. | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + + +# **selectProxyProfileSdkKeys** +> ProxyProfileSdkKeysListModel selectProxyProfileSdkKeys(proxyProfileId, proxyProfileSdkKeysRequest) + +Select SDK keys + +This endpoint adds the given list of Config / Environment pairs' SDK Keys to a Proxy Profile identified by the `proxyProfileId`. + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID proxyProfileId = UUID.randomUUID(); // UUID | The identifier of the Proxy Profile. + ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest = new ProxyProfileSdkKeysRequest(); // ProxyProfileSdkKeysRequest | + try { + ProxyProfileSdkKeysListModel result = apiInstance.selectProxyProfileSdkKeys(proxyProfileId, proxyProfileSdkKeysRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#selectProxyProfileSdkKeys"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **proxyProfileId** | **UUID**| The identifier of the Proxy Profile. | | +| **proxyProfileSdkKeysRequest** | [**ProxyProfileSdkKeysRequest**](ProxyProfileSdkKeysRequest.md)| | | + +### Return type + +[**ProxyProfileSdkKeysListModel**](ProxyProfileSdkKeysListModel.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 selection was successful. | - | +| **400** | Bad request. | - | +| **404** | Not found. | - | +| **403** | Forbidden. When selection rules are applied to the Proxy Profile. | - | +| **429** | Too many requests. In case of the request rate exceeds the rate limits. | - | + + +# **updateProxyProfile** +> ProxyProfileModel updateProxyProfile(proxyProfileId, jsonPatchOperation) + +Update Proxy Profile + +This endpoint updates a Proxy Profile identified by the `proxyProfileId` parameter with a collection of [JSON Patch](https://jsonpatch.com) operations. The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don't want to change. For example: We have the following resource. ```json { \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\", \"name\": \"production\", \"description\": \"profile for production environments\", \"lastAccessedAt\": \"2019-08-24T14:15:22Z\", \"connectionPreferences\": { \"sdkPollInterval\": 60, \"webhookNotification\": null }, \"sdkKeySelectionRules\": [] } ``` If we send an update request body as below (it changes the `sdkPollInterval` field and adds a new Proxy Webhook URL): ```json [ { \"op\": \"replace\", \"path\": \"/connectionPreferences/sdkPollInterval\", \"value\": 120 }, { \"op\": \"add\", \"path\": \"/connectionPreferences/webhookNotification\", \"value\": { \"webhookProxyUrl\": \"https://my-proxy-url.com\" } } ] ``` Only the `sdkPollInterval` and `webhookProxyUrl` are updated and all the other attributes remain unchanged. So we get a response like this: ```json { \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\", \"name\": \"production\", \"description\": \"profile for production environments\", \"lastAccessedAt\": \"2019-08-24T14:15:22Z\", \"connectionPreferences\": { \"sdkPollInterval\": 120, \"webhookNotification\": { \"webhookProxyUrl\": \"https://my-proxy-url.com\", \"signingKey1\": \"<generated-signing-key>\", \"signingKey2\": null } }, \"sdkKeySelectionRules\": [] } ``` + +### 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.ProxyProfilesApi; + +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"); + + ProxyProfilesApi apiInstance = new ProxyProfilesApi(defaultClient); + UUID proxyProfileId = UUID.randomUUID(); // UUID | The identifier of the Proxy Profile. + List jsonPatchOperation = Arrays.asList(); // List | + try { + ProxyProfileModel result = apiInstance.updateProxyProfile(proxyProfileId, jsonPatchOperation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProxyProfilesApi#updateProxyProfile"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **proxyProfileId** | **UUID**| The identifier of the Proxy Profile. | | +| **jsonPatchOperation** | [**List<JsonPatchOperation>**](JsonPatchOperation.md)| | | + +### Return type + +[**ProxyProfileModel**](ProxyProfileModel.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. | - | + diff --git a/docs/SelectionRuleKind.md b/docs/SelectionRuleKind.md new file mode 100644 index 0000000..f79501b --- /dev/null +++ b/docs/SelectionRuleKind.md @@ -0,0 +1,13 @@ + + +# SelectionRuleKind + +## Enum + + +* `INCLUDE` (value: `"include"`) + +* `EXCLUDE` (value: `"exclude"`) + + + diff --git a/docs/UpdateProxyProfileSelectionRule.md b/docs/UpdateProxyProfileSelectionRule.md new file mode 100644 index 0000000..621c479 --- /dev/null +++ b/docs/UpdateProxyProfileSelectionRule.md @@ -0,0 +1,19 @@ + + +# UpdateProxyProfileSelectionRule + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kind** | **SelectionRuleKind** | | [optional] | +|**productIdFilter** | **UUID** | Defines the filter for matching Products by their unique identifier. | [optional] | +|**configIdFilter** | **UUID** | Defines the filter for matching Configs by their unique identifier. | [optional] | +|**environmentIdFilter** | **UUID** | Defines the filter for matching Environments by their unique identifier. | [optional] | +|**productNameMatchFilter** | **String** | Specifies a filter to match Product names in the proxy profile selection rule. It accepts wildcards (*). | [optional] | +|**configNameMatchFilter** | **String** | Specifies a filter to match Config names in the proxy profile selection rule. It accepts wildcards (*). | [optional] | +|**environmentNameMatchFilter** | **String** | Specifies a filter to match Environment names in the proxy profile selection rule. It accepts wildcards (*). | [optional] | + + + diff --git a/docs/WebhookNotification.md b/docs/WebhookNotification.md new file mode 100644 index 0000000..6548ac9 --- /dev/null +++ b/docs/WebhookNotification.md @@ -0,0 +1,16 @@ + + +# WebhookNotification + +The webhook notification settings, including the proxy URL and signing keys. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**webhookProxyUrl** | **String** | The webhook proxy URL for receiving config JSON change notifications. | | +|**signingKey1** | **String** | The primary signing key used for verifying the authenticity of webhook requests. | | +|**signingKey2** | **String** | The secondary signing key used for verifying the authenticity of webhook requests. | | + + + 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 cc85634..63bd365 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 3958ff4..8f43ce7 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 24fe782..0bdc74c 100644 --- a/src/main/java/com/configcat/publicapi/java/client/JSON.java +++ b/src/main/java/com/configcat/publicapi/java/client/JSON.java @@ -107,10 +107,14 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConfigSettingValueModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConfigSettingValuesModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConnectRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ConnectionPreferences.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateConfigRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateEnvironmentModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateIntegrationModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateOrUpdateConnectionPreferences.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateOrUpdateEnvironmentAccessModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateOrUpdateProxyProfileRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.CreateOrUpdateWebhookNotification.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()); @@ -149,9 +153,18 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri 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.PredefinedVariationsModel.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()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProxyProfileListModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProxyProfileModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProxyProfileSdkKeyItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProxyProfileSdkKeyRequestItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProxyProfileSdkKeysListModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProxyProfileSdkKeysRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProxyProfileSecretModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ProxyProfileSelectionRule.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ReasonRequiredEnvironmentModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ReferenceLineModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.ReferenceLineRequest.CustomTypeAdapterFactory()); @@ -196,6 +209,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri 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()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateProxyProfileSelectionRule.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateReasonRequiredEnvironmentModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateRolloutPercentageItemModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.UpdateRolloutRuleModel.CustomTypeAdapterFactory()); @@ -216,6 +230,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookEnvironment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookHeaderModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookHeaderResponseModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookNotification.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookResponseModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.configcat.publicapi.java.client.model.WebhookSigningKeysModel.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); 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 ef2fd3f..5f40a90 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 1aee581..e577390 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 073e6b1..b340ac2 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 1bd066a..90ae431 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 66e5384..752188c 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 @@ -29,6 +29,7 @@ import com.configcat.publicapi.java.client.model.CreateSettingInitialValues; import com.configcat.publicapi.java.client.model.JsonPatchOperation; +import com.configcat.publicapi.java.client.model.PredefinedVariationsModel; import com.configcat.publicapi.java.client.model.ReplaceSettingModel; import com.configcat.publicapi.java.client.model.SettingModel; import java.util.UUID; @@ -856,7 +857,7 @@ private okhttp3.Call updatePredefinedVariationsValidateBeforeCall(Integer settin * 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 + * @return PredefinedVariationsModel * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -867,8 +868,8 @@ private okhttp3.Call updatePredefinedVariationsValidateBeforeCall(Integer settin
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); + public PredefinedVariationsModel updatePredefinedVariations(Integer settingId, UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest) throws ApiException { + ApiResponse localVarResp = updatePredefinedVariationsWithHttpInfo(settingId, updatePredefinedVariationsRequest); return localVarResp.getData(); } @@ -877,7 +878,7 @@ public SettingModel updatePredefinedVariations(Integer settingId, UpdatePredefin * 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> + * @return ApiResponse<PredefinedVariationsModel> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -888,9 +889,9 @@ public SettingModel updatePredefinedVariations(Integer settingId, UpdatePredefin
429 Too many requests. In case of the request rate exceeds the rate limits. -
*/ - public ApiResponse updatePredefinedVariationsWithHttpInfo(Integer settingId, UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest) throws ApiException { + public ApiResponse updatePredefinedVariationsWithHttpInfo(Integer settingId, UpdatePredefinedVariationsRequest updatePredefinedVariationsRequest) throws ApiException { okhttp3.Call localVarCall = updatePredefinedVariationsValidateBeforeCall(settingId, updatePredefinedVariationsRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -911,10 +912,10 @@ public ApiResponse updatePredefinedVariationsWithHttpInfo(Integer 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 { + 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(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/com/configcat/publicapi/java/client/api/ProxyProfilesApi.java b/src/main/java/com/configcat/publicapi/java/client/api/ProxyProfilesApi.java new file mode 100644 index 0000000..7e26d84 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/api/ProxyProfilesApi.java @@ -0,0 +1,1495 @@ +/* + * 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.api; + +import com.configcat.publicapi.java.client.ApiCallback; +import com.configcat.publicapi.java.client.ApiClient; +import com.configcat.publicapi.java.client.ApiException; +import com.configcat.publicapi.java.client.ApiResponse; +import com.configcat.publicapi.java.client.Configuration; +import com.configcat.publicapi.java.client.Pair; +import com.configcat.publicapi.java.client.ProgressRequestBody; +import com.configcat.publicapi.java.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.configcat.publicapi.java.client.model.CreateOrUpdateProxyProfileRequest; +import com.configcat.publicapi.java.client.model.JsonPatchOperation; +import com.configcat.publicapi.java.client.model.ProxyProfileListModel; +import com.configcat.publicapi.java.client.model.ProxyProfileModel; +import com.configcat.publicapi.java.client.model.ProxyProfileSdkKeysListModel; +import com.configcat.publicapi.java.client.model.ProxyProfileSdkKeysRequest; +import com.configcat.publicapi.java.client.model.ProxyProfileSecretModel; +import java.util.UUID; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ProxyProfilesApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ProxyProfilesApi() { + this(Configuration.getDefaultApiClient()); + } + + public ProxyProfilesApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createProxyProfile + * @param organizationId The identifier of the Organization. (required) + * @param createOrUpdateProxyProfileRequest (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
201 When the creation 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 createProxyProfileCall(UUID organizationId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest, 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 = createOrUpdateProxyProfileRequest; + + // create path and map variables + String localVarPath = "/v1/organizations/{organizationId}/proxy-profiles" + .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createProxyProfileValidateBeforeCall(UUID organizationId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException("Missing the required parameter 'organizationId' when calling createProxyProfile(Async)"); + } + + // verify the required parameter 'createOrUpdateProxyProfileRequest' is set + if (createOrUpdateProxyProfileRequest == null) { + throw new ApiException("Missing the required parameter 'createOrUpdateProxyProfileRequest' when calling createProxyProfile(Async)"); + } + + return createProxyProfileCall(organizationId, createOrUpdateProxyProfileRequest, _callback); + + } + + /** + * Create Proxy Profile + * This endpoint creates a new Proxy Profile in the given Organization identified by the `organizationId` parameter, which can be obtained from the [List Organizations](#operation/get-organizations) endpoint. + * @param organizationId The identifier of the Organization. (required) + * @param createOrUpdateProxyProfileRequest (required) + * @return ProxyProfileModel + * @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
201 When the creation was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ProxyProfileModel createProxyProfile(UUID organizationId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest) throws ApiException { + ApiResponse localVarResp = createProxyProfileWithHttpInfo(organizationId, createOrUpdateProxyProfileRequest); + return localVarResp.getData(); + } + + /** + * Create Proxy Profile + * This endpoint creates a new Proxy Profile in the given Organization identified by the `organizationId` parameter, which can be obtained from the [List Organizations](#operation/get-organizations) endpoint. + * @param organizationId The identifier of the Organization. (required) + * @param createOrUpdateProxyProfileRequest (required) + * @return ApiResponse<ProxyProfileModel> + * @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
201 When the creation was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse createProxyProfileWithHttpInfo(UUID organizationId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest) throws ApiException { + okhttp3.Call localVarCall = createProxyProfileValidateBeforeCall(organizationId, createOrUpdateProxyProfileRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Proxy Profile (asynchronously) + * This endpoint creates a new Proxy Profile in the given Organization identified by the `organizationId` parameter, which can be obtained from the [List Organizations](#operation/get-organizations) endpoint. + * @param organizationId The identifier of the Organization. (required) + * @param createOrUpdateProxyProfileRequest (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
201 When the creation 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 createProxyProfileAsync(UUID organizationId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createProxyProfileValidateBeforeCall(organizationId, createOrUpdateProxyProfileRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteProxyProfile + * @param proxyProfileId The identifier of the Proxy Profile. (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
204 When the delete 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 deleteProxyProfileCall(UUID proxyProfileId, 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 = null; + + // create path and map variables + String localVarPath = "/v1/proxy-profiles/{proxyProfileId}" + .replace("{" + "proxyProfileId" + "}", localVarApiClient.escapeString(proxyProfileId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Basic" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteProxyProfileValidateBeforeCall(UUID proxyProfileId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'proxyProfileId' is set + if (proxyProfileId == null) { + throw new ApiException("Missing the required parameter 'proxyProfileId' when calling deleteProxyProfile(Async)"); + } + + return deleteProxyProfileCall(proxyProfileId, _callback); + + } + + /** + * Delete Proxy Profile + * This endpoint removes a Proxy Profile identified by the `proxyProfileId` parameter. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @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
204 When the delete was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public void deleteProxyProfile(UUID proxyProfileId) throws ApiException { + deleteProxyProfileWithHttpInfo(proxyProfileId); + } + + /** + * Delete Proxy Profile + * This endpoint removes a Proxy Profile identified by the `proxyProfileId` parameter. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @return ApiResponse<Void> + * @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
204 When the delete was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse deleteProxyProfileWithHttpInfo(UUID proxyProfileId) throws ApiException { + okhttp3.Call localVarCall = deleteProxyProfileValidateBeforeCall(proxyProfileId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete Proxy Profile (asynchronously) + * This endpoint removes a Proxy Profile identified by the `proxyProfileId` parameter. + * @param proxyProfileId The identifier of the Proxy Profile. (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
204 When the delete 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 deleteProxyProfileAsync(UUID proxyProfileId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteProxyProfileValidateBeforeCall(proxyProfileId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deselectProxyProfileSdkKeys + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param proxyProfileSdkKeysRequest (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 deselection was successful. -
400 Bad request. -
404 Not found. -
403 Forbidden. When selection rules are applied to the Proxy Profile. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call deselectProxyProfileSdkKeysCall(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest, 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 = proxyProfileSdkKeysRequest; + + // create path and map variables + String localVarPath = "/v1/proxy-profiles/{proxyProfileId}/sdk-keys/deselect" + .replace("{" + "proxyProfileId" + "}", localVarApiClient.escapeString(proxyProfileId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deselectProxyProfileSdkKeysValidateBeforeCall(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'proxyProfileId' is set + if (proxyProfileId == null) { + throw new ApiException("Missing the required parameter 'proxyProfileId' when calling deselectProxyProfileSdkKeys(Async)"); + } + + // verify the required parameter 'proxyProfileSdkKeysRequest' is set + if (proxyProfileSdkKeysRequest == null) { + throw new ApiException("Missing the required parameter 'proxyProfileSdkKeysRequest' when calling deselectProxyProfileSdkKeys(Async)"); + } + + return deselectProxyProfileSdkKeysCall(proxyProfileId, proxyProfileSdkKeysRequest, _callback); + + } + + /** + * Deselect SDK keys + * This endpoint removes the given list of Config / Environment pairs' SDK Keys from a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param proxyProfileSdkKeysRequest (required) + * @return ProxyProfileSdkKeysListModel + * @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 deselection was successful. -
400 Bad request. -
404 Not found. -
403 Forbidden. When selection rules are applied to the Proxy Profile. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ProxyProfileSdkKeysListModel deselectProxyProfileSdkKeys(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest) throws ApiException { + ApiResponse localVarResp = deselectProxyProfileSdkKeysWithHttpInfo(proxyProfileId, proxyProfileSdkKeysRequest); + return localVarResp.getData(); + } + + /** + * Deselect SDK keys + * This endpoint removes the given list of Config / Environment pairs' SDK Keys from a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param proxyProfileSdkKeysRequest (required) + * @return ApiResponse<ProxyProfileSdkKeysListModel> + * @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 deselection was successful. -
400 Bad request. -
404 Not found. -
403 Forbidden. When selection rules are applied to the Proxy Profile. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse deselectProxyProfileSdkKeysWithHttpInfo(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest) throws ApiException { + okhttp3.Call localVarCall = deselectProxyProfileSdkKeysValidateBeforeCall(proxyProfileId, proxyProfileSdkKeysRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Deselect SDK keys (asynchronously) + * This endpoint removes the given list of Config / Environment pairs' SDK Keys from a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param proxyProfileSdkKeysRequest (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 deselection was successful. -
400 Bad request. -
404 Not found. -
403 Forbidden. When selection rules are applied to the Proxy Profile. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call deselectProxyProfileSdkKeysAsync(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deselectProxyProfileSdkKeysValidateBeforeCall(proxyProfileId, proxyProfileSdkKeysRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for generateProxyProfileSecret + * @param proxyProfileId The identifier of the Proxy Profile. (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 generation 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 generateProxyProfileSecretCall(UUID proxyProfileId, 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 = null; + + // create path and map variables + String localVarPath = "/v1/proxy-profiles/{proxyProfileId}/secret" + .replace("{" + "proxyProfileId" + "}", localVarApiClient.escapeString(proxyProfileId.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 = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Basic" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call generateProxyProfileSecretValidateBeforeCall(UUID proxyProfileId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'proxyProfileId' is set + if (proxyProfileId == null) { + throw new ApiException("Missing the required parameter 'proxyProfileId' when calling generateProxyProfileSecret(Async)"); + } + + return generateProxyProfileSecretCall(proxyProfileId, _callback); + + } + + /** + * Generate Secret + * This endpoint (re)generates a secret token for a Proxy Profile identified by the `proxyProfileId` parameter. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @return ProxyProfileSecretModel + * @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 generation was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ProxyProfileSecretModel generateProxyProfileSecret(UUID proxyProfileId) throws ApiException { + ApiResponse localVarResp = generateProxyProfileSecretWithHttpInfo(proxyProfileId); + return localVarResp.getData(); + } + + /** + * Generate Secret + * This endpoint (re)generates a secret token for a Proxy Profile identified by the `proxyProfileId` parameter. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @return ApiResponse<ProxyProfileSecretModel> + * @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 generation was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse generateProxyProfileSecretWithHttpInfo(UUID proxyProfileId) throws ApiException { + okhttp3.Call localVarCall = generateProxyProfileSecretValidateBeforeCall(proxyProfileId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Generate Secret (asynchronously) + * This endpoint (re)generates a secret token for a Proxy Profile identified by the `proxyProfileId` parameter. + * @param proxyProfileId The identifier of the Proxy Profile. (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 generation 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 generateProxyProfileSecretAsync(UUID proxyProfileId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = generateProxyProfileSecretValidateBeforeCall(proxyProfileId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProxyProfile + * @param proxyProfileId The identifier of the Proxy Profile. (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 everything is ok, the Proxy Profile is returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call getProxyProfileCall(UUID proxyProfileId, 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 = null; + + // create path and map variables + String localVarPath = "/v1/proxy-profiles/{proxyProfileId}" + .replace("{" + "proxyProfileId" + "}", localVarApiClient.escapeString(proxyProfileId.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 = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Basic" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getProxyProfileValidateBeforeCall(UUID proxyProfileId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'proxyProfileId' is set + if (proxyProfileId == null) { + throw new ApiException("Missing the required parameter 'proxyProfileId' when calling getProxyProfile(Async)"); + } + + return getProxyProfileCall(proxyProfileId, _callback); + + } + + /** + * Get Proxy Profile + * This endpoint returns a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @return ProxyProfileModel + * @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 everything is ok, the Proxy Profile is returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ProxyProfileModel getProxyProfile(UUID proxyProfileId) throws ApiException { + ApiResponse localVarResp = getProxyProfileWithHttpInfo(proxyProfileId); + return localVarResp.getData(); + } + + /** + * Get Proxy Profile + * This endpoint returns a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @return ApiResponse<ProxyProfileModel> + * @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 everything is ok, the Proxy Profile is returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse getProxyProfileWithHttpInfo(UUID proxyProfileId) throws ApiException { + okhttp3.Call localVarCall = getProxyProfileValidateBeforeCall(proxyProfileId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Proxy Profile (asynchronously) + * This endpoint returns a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (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 everything is ok, the Proxy Profile is returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call getProxyProfileAsync(UUID proxyProfileId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getProxyProfileValidateBeforeCall(proxyProfileId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProxyProfileSdkKeys + * @param proxyProfileId The identifier of the Proxy Profile. (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 everything is ok, the SDK keys selected for the Proxy Profile are returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call getProxyProfileSdkKeysCall(UUID proxyProfileId, 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 = null; + + // create path and map variables + String localVarPath = "/v1/proxy-profiles/{proxyProfileId}/sdk-keys" + .replace("{" + "proxyProfileId" + "}", localVarApiClient.escapeString(proxyProfileId.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 = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Basic" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getProxyProfileSdkKeysValidateBeforeCall(UUID proxyProfileId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'proxyProfileId' is set + if (proxyProfileId == null) { + throw new ApiException("Missing the required parameter 'proxyProfileId' when calling getProxyProfileSdkKeys(Async)"); + } + + return getProxyProfileSdkKeysCall(proxyProfileId, _callback); + + } + + /** + * Get selected SDK keys + * This endpoint returns the list of SDK keys selected for a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @return ProxyProfileSdkKeysListModel + * @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 everything is ok, the SDK keys selected for the Proxy Profile are returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ProxyProfileSdkKeysListModel getProxyProfileSdkKeys(UUID proxyProfileId) throws ApiException { + ApiResponse localVarResp = getProxyProfileSdkKeysWithHttpInfo(proxyProfileId); + return localVarResp.getData(); + } + + /** + * Get selected SDK keys + * This endpoint returns the list of SDK keys selected for a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @return ApiResponse<ProxyProfileSdkKeysListModel> + * @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 everything is ok, the SDK keys selected for the Proxy Profile are returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse getProxyProfileSdkKeysWithHttpInfo(UUID proxyProfileId) throws ApiException { + okhttp3.Call localVarCall = getProxyProfileSdkKeysValidateBeforeCall(proxyProfileId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get selected SDK keys (asynchronously) + * This endpoint returns the list of SDK keys selected for a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (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 everything is ok, the SDK keys selected for the Proxy Profile are returned. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call getProxyProfileSdkKeysAsync(UUID proxyProfileId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getProxyProfileSdkKeysValidateBeforeCall(proxyProfileId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProxyProfiles + * @param organizationId The identifier of the Organization. (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 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call getProxyProfilesCall(UUID organizationId, 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 = null; + + // create path and map variables + String localVarPath = "/v1/organizations/{organizationId}/proxy-profiles" + .replace("{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.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 = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "Basic" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getProxyProfilesValidateBeforeCall(UUID organizationId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException("Missing the required parameter 'organizationId' when calling getProxyProfiles(Async)"); + } + + return getProxyProfilesCall(organizationId, _callback); + + } + + /** + * List Proxy Profiles + * This endpoint returns the list of Proxy profiles for the given Organization identified by the `organizationId` parameter. + * @param organizationId The identifier of the Organization. (required) + * @return ProxyProfileListModel + * @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 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ProxyProfileListModel getProxyProfiles(UUID organizationId) throws ApiException { + ApiResponse localVarResp = getProxyProfilesWithHttpInfo(organizationId); + return localVarResp.getData(); + } + + /** + * List Proxy Profiles + * This endpoint returns the list of Proxy profiles for the given Organization identified by the `organizationId` parameter. + * @param organizationId The identifier of the Organization. (required) + * @return ApiResponse<ProxyProfileListModel> + * @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 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse getProxyProfilesWithHttpInfo(UUID organizationId) throws ApiException { + okhttp3.Call localVarCall = getProxyProfilesValidateBeforeCall(organizationId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Proxy Profiles (asynchronously) + * This endpoint returns the list of Proxy profiles for the given Organization identified by the `organizationId` parameter. + * @param organizationId The identifier of the Organization. (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 -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call getProxyProfilesAsync(UUID organizationId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getProxyProfilesValidateBeforeCall(organizationId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for replaceProxyProfile + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param createOrUpdateProxyProfileRequest (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 replace 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 replaceProxyProfileCall(UUID proxyProfileId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest, 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 = createOrUpdateProxyProfileRequest; + + // create path and map variables + String localVarPath = "/v1/proxy-profiles/{proxyProfileId}" + .replace("{" + "proxyProfileId" + "}", localVarApiClient.escapeString(proxyProfileId.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 replaceProxyProfileValidateBeforeCall(UUID proxyProfileId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'proxyProfileId' is set + if (proxyProfileId == null) { + throw new ApiException("Missing the required parameter 'proxyProfileId' when calling replaceProxyProfile(Async)"); + } + + // verify the required parameter 'createOrUpdateProxyProfileRequest' is set + if (createOrUpdateProxyProfileRequest == null) { + throw new ApiException("Missing the required parameter 'createOrUpdateProxyProfileRequest' when calling replaceProxyProfile(Async)"); + } + + return replaceProxyProfileCall(proxyProfileId, createOrUpdateProxyProfileRequest, _callback); + + } + + /** + * Replace Proxy Profile + * This endpoint replaces a Proxy Profile identified by the `proxyProfileId` parameter. **Important:** As this endpoint is doing a complete replace, it's important to set every other attribute that you don't want to change in its original state. Not listing one means it will reset. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param createOrUpdateProxyProfileRequest (required) + * @return ProxyProfileModel + * @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 replace was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ProxyProfileModel replaceProxyProfile(UUID proxyProfileId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest) throws ApiException { + ApiResponse localVarResp = replaceProxyProfileWithHttpInfo(proxyProfileId, createOrUpdateProxyProfileRequest); + return localVarResp.getData(); + } + + /** + * Replace Proxy Profile + * This endpoint replaces a Proxy Profile identified by the `proxyProfileId` parameter. **Important:** As this endpoint is doing a complete replace, it's important to set every other attribute that you don't want to change in its original state. Not listing one means it will reset. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param createOrUpdateProxyProfileRequest (required) + * @return ApiResponse<ProxyProfileModel> + * @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 replace was successful. -
400 Bad request. -
404 Not found. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse replaceProxyProfileWithHttpInfo(UUID proxyProfileId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest) throws ApiException { + okhttp3.Call localVarCall = replaceProxyProfileValidateBeforeCall(proxyProfileId, createOrUpdateProxyProfileRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Replace Proxy Profile (asynchronously) + * This endpoint replaces a Proxy Profile identified by the `proxyProfileId` parameter. **Important:** As this endpoint is doing a complete replace, it's important to set every other attribute that you don't want to change in its original state. Not listing one means it will reset. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param createOrUpdateProxyProfileRequest (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 replace 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 replaceProxyProfileAsync(UUID proxyProfileId, CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = replaceProxyProfileValidateBeforeCall(proxyProfileId, createOrUpdateProxyProfileRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for selectProxyProfileSdkKeys + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param proxyProfileSdkKeysRequest (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 selection was successful. -
400 Bad request. -
404 Not found. -
403 Forbidden. When selection rules are applied to the Proxy Profile. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call selectProxyProfileSdkKeysCall(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest, 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 = proxyProfileSdkKeysRequest; + + // create path and map variables + String localVarPath = "/v1/proxy-profiles/{proxyProfileId}/sdk-keys/select" + .replace("{" + "proxyProfileId" + "}", localVarApiClient.escapeString(proxyProfileId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call selectProxyProfileSdkKeysValidateBeforeCall(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'proxyProfileId' is set + if (proxyProfileId == null) { + throw new ApiException("Missing the required parameter 'proxyProfileId' when calling selectProxyProfileSdkKeys(Async)"); + } + + // verify the required parameter 'proxyProfileSdkKeysRequest' is set + if (proxyProfileSdkKeysRequest == null) { + throw new ApiException("Missing the required parameter 'proxyProfileSdkKeysRequest' when calling selectProxyProfileSdkKeys(Async)"); + } + + return selectProxyProfileSdkKeysCall(proxyProfileId, proxyProfileSdkKeysRequest, _callback); + + } + + /** + * Select SDK keys + * This endpoint adds the given list of Config / Environment pairs' SDK Keys to a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param proxyProfileSdkKeysRequest (required) + * @return ProxyProfileSdkKeysListModel + * @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 selection was successful. -
400 Bad request. -
404 Not found. -
403 Forbidden. When selection rules are applied to the Proxy Profile. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ProxyProfileSdkKeysListModel selectProxyProfileSdkKeys(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest) throws ApiException { + ApiResponse localVarResp = selectProxyProfileSdkKeysWithHttpInfo(proxyProfileId, proxyProfileSdkKeysRequest); + return localVarResp.getData(); + } + + /** + * Select SDK keys + * This endpoint adds the given list of Config / Environment pairs' SDK Keys to a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param proxyProfileSdkKeysRequest (required) + * @return ApiResponse<ProxyProfileSdkKeysListModel> + * @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 selection was successful. -
400 Bad request. -
404 Not found. -
403 Forbidden. When selection rules are applied to the Proxy Profile. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public ApiResponse selectProxyProfileSdkKeysWithHttpInfo(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest) throws ApiException { + okhttp3.Call localVarCall = selectProxyProfileSdkKeysValidateBeforeCall(proxyProfileId, proxyProfileSdkKeysRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Select SDK keys (asynchronously) + * This endpoint adds the given list of Config / Environment pairs' SDK Keys to a Proxy Profile identified by the `proxyProfileId`. + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param proxyProfileSdkKeysRequest (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 selection was successful. -
400 Bad request. -
404 Not found. -
403 Forbidden. When selection rules are applied to the Proxy Profile. -
429 Too many requests. In case of the request rate exceeds the rate limits. -
+ */ + public okhttp3.Call selectProxyProfileSdkKeysAsync(UUID proxyProfileId, ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = selectProxyProfileSdkKeysValidateBeforeCall(proxyProfileId, proxyProfileSdkKeysRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateProxyProfile + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param jsonPatchOperation (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 updateProxyProfileCall(UUID proxyProfileId, List jsonPatchOperation, 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 = jsonPatchOperation; + + // create path and map variables + String localVarPath = "/v1/proxy-profiles/{proxyProfileId}" + .replace("{" + "proxyProfileId" + "}", localVarApiClient.escapeString(proxyProfileId.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, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateProxyProfileValidateBeforeCall(UUID proxyProfileId, List jsonPatchOperation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'proxyProfileId' is set + if (proxyProfileId == null) { + throw new ApiException("Missing the required parameter 'proxyProfileId' when calling updateProxyProfile(Async)"); + } + + // verify the required parameter 'jsonPatchOperation' is set + if (jsonPatchOperation == null) { + throw new ApiException("Missing the required parameter 'jsonPatchOperation' when calling updateProxyProfile(Async)"); + } + + return updateProxyProfileCall(proxyProfileId, jsonPatchOperation, _callback); + + } + + /** + * Update Proxy Profile + * This endpoint updates a Proxy Profile identified by the `proxyProfileId` parameter with a collection of [JSON Patch](https://jsonpatch.com) operations. The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don't want to change. For example: We have the following resource. ```json { \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\", \"name\": \"production\", \"description\": \"profile for production environments\", \"lastAccessedAt\": \"2019-08-24T14:15:22Z\", \"connectionPreferences\": { \"sdkPollInterval\": 60, \"webhookNotification\": null }, \"sdkKeySelectionRules\": [] } ``` If we send an update request body as below (it changes the `sdkPollInterval` field and adds a new Proxy Webhook URL): ```json [ { \"op\": \"replace\", \"path\": \"/connectionPreferences/sdkPollInterval\", \"value\": 120 }, { \"op\": \"add\", \"path\": \"/connectionPreferences/webhookNotification\", \"value\": { \"webhookProxyUrl\": \"https://my-proxy-url.com\" } } ] ``` Only the `sdkPollInterval` and `webhookProxyUrl` are updated and all the other attributes remain unchanged. So we get a response like this: ```json { \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\", \"name\": \"production\", \"description\": \"profile for production environments\", \"lastAccessedAt\": \"2019-08-24T14:15:22Z\", \"connectionPreferences\": { \"sdkPollInterval\": 120, \"webhookNotification\": { \"webhookProxyUrl\": \"https://my-proxy-url.com\", \"signingKey1\": \"<generated-signing-key>\", \"signingKey2\": null } }, \"sdkKeySelectionRules\": [] } ``` + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param jsonPatchOperation (required) + * @return ProxyProfileModel + * @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 ProxyProfileModel updateProxyProfile(UUID proxyProfileId, List jsonPatchOperation) throws ApiException { + ApiResponse localVarResp = updateProxyProfileWithHttpInfo(proxyProfileId, jsonPatchOperation); + return localVarResp.getData(); + } + + /** + * Update Proxy Profile + * This endpoint updates a Proxy Profile identified by the `proxyProfileId` parameter with a collection of [JSON Patch](https://jsonpatch.com) operations. The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don't want to change. For example: We have the following resource. ```json { \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\", \"name\": \"production\", \"description\": \"profile for production environments\", \"lastAccessedAt\": \"2019-08-24T14:15:22Z\", \"connectionPreferences\": { \"sdkPollInterval\": 60, \"webhookNotification\": null }, \"sdkKeySelectionRules\": [] } ``` If we send an update request body as below (it changes the `sdkPollInterval` field and adds a new Proxy Webhook URL): ```json [ { \"op\": \"replace\", \"path\": \"/connectionPreferences/sdkPollInterval\", \"value\": 120 }, { \"op\": \"add\", \"path\": \"/connectionPreferences/webhookNotification\", \"value\": { \"webhookProxyUrl\": \"https://my-proxy-url.com\" } } ] ``` Only the `sdkPollInterval` and `webhookProxyUrl` are updated and all the other attributes remain unchanged. So we get a response like this: ```json { \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\", \"name\": \"production\", \"description\": \"profile for production environments\", \"lastAccessedAt\": \"2019-08-24T14:15:22Z\", \"connectionPreferences\": { \"sdkPollInterval\": 120, \"webhookNotification\": { \"webhookProxyUrl\": \"https://my-proxy-url.com\", \"signingKey1\": \"<generated-signing-key>\", \"signingKey2\": null } }, \"sdkKeySelectionRules\": [] } ``` + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param jsonPatchOperation (required) + * @return ApiResponse<ProxyProfileModel> + * @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 updateProxyProfileWithHttpInfo(UUID proxyProfileId, List jsonPatchOperation) throws ApiException { + okhttp3.Call localVarCall = updateProxyProfileValidateBeforeCall(proxyProfileId, jsonPatchOperation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update Proxy Profile (asynchronously) + * This endpoint updates a Proxy Profile identified by the `proxyProfileId` parameter with a collection of [JSON Patch](https://jsonpatch.com) operations. The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don't want to change. For example: We have the following resource. ```json { \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\", \"name\": \"production\", \"description\": \"profile for production environments\", \"lastAccessedAt\": \"2019-08-24T14:15:22Z\", \"connectionPreferences\": { \"sdkPollInterval\": 60, \"webhookNotification\": null }, \"sdkKeySelectionRules\": [] } ``` If we send an update request body as below (it changes the `sdkPollInterval` field and adds a new Proxy Webhook URL): ```json [ { \"op\": \"replace\", \"path\": \"/connectionPreferences/sdkPollInterval\", \"value\": 120 }, { \"op\": \"add\", \"path\": \"/connectionPreferences/webhookNotification\", \"value\": { \"webhookProxyUrl\": \"https://my-proxy-url.com\" } } ] ``` Only the `sdkPollInterval` and `webhookProxyUrl` are updated and all the other attributes remain unchanged. So we get a response like this: ```json { \"proxyProfileId\": \"4ebe288d-6415-44a8-85c8-7b9f78316a86\", \"name\": \"production\", \"description\": \"profile for production environments\", \"lastAccessedAt\": \"2019-08-24T14:15:22Z\", \"connectionPreferences\": { \"sdkPollInterval\": 120, \"webhookNotification\": { \"webhookProxyUrl\": \"https://my-proxy-url.com\", \"signingKey1\": \"<generated-signing-key>\", \"signingKey2\": null } }, \"sdkKeySelectionRules\": [] } ``` + * @param proxyProfileId The identifier of the Proxy Profile. (required) + * @param jsonPatchOperation (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 updateProxyProfileAsync(UUID proxyProfileId, List jsonPatchOperation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateProxyProfileValidateBeforeCall(proxyProfileId, jsonPatchOperation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} 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 855a992..8d8442d 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d4d9265..021a366 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 1c013f1..7e08816 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 13d1cc8..617c668 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 31b56f2..5dbee3a 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 e25b619..22fffae 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 595688b..2d23fe1 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 @@ -85,7 +85,7 @@ public enum AuditLogType { SETTING_CONVERTED_TO_PREDEFINED_VARIATIONS("settingConvertedToPredefinedVariations"), - SETTING_CONVERTED_TO_CUSTOM_VALUES("settingConvertedToCustomValues"), + SETTING_CONVERTED_TO_FREE_FORM_VALUES("settingConvertedToFreeFormValues"), SETTING_VALUE_CHANGED("settingValueChanged"), 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 a0e1e83..5d17658 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d12362a..6cd4851 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 34f3cc1..f00b552 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 @@ -49,7 +49,7 @@ /** * ComparisonValueListModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ComparisonValueListModel { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) 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 8727ad8..bc63d9c 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 @@ -52,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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 2694f4b..51f46e2 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 7c1f24a..71aba30 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 541310f..c40cfb2 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 @@ -58,7 +58,7 @@ /** * ConfigSettingFormulaModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 a268bdb..5b0e127 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 7c797c4..5113561 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 fb9d043..581864b 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 efe895b..c9692aa 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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/ConnectionPreferences.java b/src/main/java/com/configcat/publicapi/java/client/model/ConnectionPreferences.java new file mode 100644 index 0000000..00cd141 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/ConnectionPreferences.java @@ -0,0 +1,322 @@ +/* + * 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.WebhookNotification; +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; + +/** + * The connection preferences for the proxy profile, including SDK poll interval and webhook proxy URL. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class ConnectionPreferences { + public static final String SERIALIZED_NAME_SDK_POLL_INTERVAL = "sdkPollInterval"; + @SerializedName(SERIALIZED_NAME_SDK_POLL_INTERVAL) + private Integer sdkPollInterval; + + public static final String SERIALIZED_NAME_WEBHOOK_NOTIFICATION = "webhookNotification"; + @SerializedName(SERIALIZED_NAME_WEBHOOK_NOTIFICATION) + private WebhookNotification webhookNotification; + + public ConnectionPreferences() { + } + + public ConnectionPreferences sdkPollInterval(Integer sdkPollInterval) { + this.sdkPollInterval = sdkPollInterval; + return this; + } + + /** + * The SDK poll interval in seconds that determines how often SDKs should fetch config JSON updates. + * @return sdkPollInterval + */ + @javax.annotation.Nonnull + public Integer getSdkPollInterval() { + return sdkPollInterval; + } + + public void setSdkPollInterval(Integer sdkPollInterval) { + this.sdkPollInterval = sdkPollInterval; + } + + + public ConnectionPreferences webhookNotification(WebhookNotification webhookNotification) { + this.webhookNotification = webhookNotification; + return this; + } + + /** + * Get webhookNotification + * @return webhookNotification + */ + @javax.annotation.Nullable + public WebhookNotification getWebhookNotification() { + return webhookNotification; + } + + public void setWebhookNotification(WebhookNotification webhookNotification) { + this.webhookNotification = webhookNotification; + } + + /** + * 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 ConnectionPreferences instance itself + */ + public ConnectionPreferences 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; + } + ConnectionPreferences connectionPreferences = (ConnectionPreferences) o; + return Objects.equals(this.sdkPollInterval, connectionPreferences.sdkPollInterval) && + Objects.equals(this.webhookNotification, connectionPreferences.webhookNotification)&& + Objects.equals(this.additionalProperties, connectionPreferences.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(sdkPollInterval, webhookNotification, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectionPreferences {\n"); + sb.append(" sdkPollInterval: ").append(toIndentedString(sdkPollInterval)).append("\n"); + sb.append(" webhookNotification: ").append(toIndentedString(webhookNotification)).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("sdkPollInterval"); + openapiFields.add("webhookNotification"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("sdkPollInterval"); + openapiRequiredFields.add("webhookNotification"); + } + + /** + * 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 ConnectionPreferences + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConnectionPreferences.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ConnectionPreferences is not found in the empty JSON string", ConnectionPreferences.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ConnectionPreferences.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 `webhookNotification` + WebhookNotification.validateJsonElement(jsonObj.get("webhookNotification")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConnectionPreferences.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConnectionPreferences' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ConnectionPreferences.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ConnectionPreferences 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 ConnectionPreferences read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConnectionPreferences 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 ConnectionPreferences given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConnectionPreferences + * @throws IOException if the JSON string is invalid with respect to ConnectionPreferences + */ + public static ConnectionPreferences fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConnectionPreferences.class); + } + + /** + * Convert an instance of ConnectionPreferences 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/CreateConfigRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateConfigRequest.java index 419a6a1..f4b130b 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 91fafda..bcc934d 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 fc91851..0de4b09 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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/CreateOrUpdateConnectionPreferences.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateConnectionPreferences.java new file mode 100644 index 0000000..6a779d5 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateConnectionPreferences.java @@ -0,0 +1,329 @@ +/* + * 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.CreateOrUpdateWebhookNotification; +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; + +/** + * The preferences related to a connection, including polling intervals and webhook proxy configurations. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class CreateOrUpdateConnectionPreferences { + public static final String SERIALIZED_NAME_SDK_POLL_INTERVAL = "sdkPollInterval"; + @SerializedName(SERIALIZED_NAME_SDK_POLL_INTERVAL) + private Integer sdkPollInterval; + + public static final String SERIALIZED_NAME_WEBHOOK_NOTIFICATION = "webhookNotification"; + @SerializedName(SERIALIZED_NAME_WEBHOOK_NOTIFICATION) + private CreateOrUpdateWebhookNotification webhookNotification; + + public CreateOrUpdateConnectionPreferences() { + } + + public CreateOrUpdateConnectionPreferences sdkPollInterval(Integer sdkPollInterval) { + this.sdkPollInterval = sdkPollInterval; + return this; + } + + /** + * The SDK poll interval in seconds. If not specified, a default value (60) will be used. + * minimum: 30 + * maximum: 2147483647 + * @return sdkPollInterval + */ + @javax.annotation.Nullable + public Integer getSdkPollInterval() { + return sdkPollInterval; + } + + public void setSdkPollInterval(Integer sdkPollInterval) { + this.sdkPollInterval = sdkPollInterval; + } + + + public CreateOrUpdateConnectionPreferences webhookNotification(CreateOrUpdateWebhookNotification webhookNotification) { + this.webhookNotification = webhookNotification; + return this; + } + + /** + * Get webhookNotification + * @return webhookNotification + */ + @javax.annotation.Nullable + public CreateOrUpdateWebhookNotification getWebhookNotification() { + return webhookNotification; + } + + public void setWebhookNotification(CreateOrUpdateWebhookNotification webhookNotification) { + this.webhookNotification = webhookNotification; + } + + /** + * 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 CreateOrUpdateConnectionPreferences instance itself + */ + public CreateOrUpdateConnectionPreferences 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; + } + CreateOrUpdateConnectionPreferences createOrUpdateConnectionPreferences = (CreateOrUpdateConnectionPreferences) o; + return Objects.equals(this.sdkPollInterval, createOrUpdateConnectionPreferences.sdkPollInterval) && + Objects.equals(this.webhookNotification, createOrUpdateConnectionPreferences.webhookNotification)&& + Objects.equals(this.additionalProperties, createOrUpdateConnectionPreferences.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(sdkPollInterval, webhookNotification, 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 CreateOrUpdateConnectionPreferences {\n"); + sb.append(" sdkPollInterval: ").append(toIndentedString(sdkPollInterval)).append("\n"); + sb.append(" webhookNotification: ").append(toIndentedString(webhookNotification)).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("sdkPollInterval"); + openapiFields.add("webhookNotification"); + + // 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 CreateOrUpdateConnectionPreferences + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateOrUpdateConnectionPreferences.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateOrUpdateConnectionPreferences is not found in the empty JSON string", CreateOrUpdateConnectionPreferences.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `webhookNotification` + if (jsonObj.get("webhookNotification") != null && !jsonObj.get("webhookNotification").isJsonNull()) { + CreateOrUpdateWebhookNotification.validateJsonElement(jsonObj.get("webhookNotification")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateOrUpdateConnectionPreferences.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateOrUpdateConnectionPreferences' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateOrUpdateConnectionPreferences.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateOrUpdateConnectionPreferences 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 CreateOrUpdateConnectionPreferences read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateOrUpdateConnectionPreferences 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 CreateOrUpdateConnectionPreferences given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateOrUpdateConnectionPreferences + * @throws IOException if the JSON string is invalid with respect to CreateOrUpdateConnectionPreferences + */ + public static CreateOrUpdateConnectionPreferences fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateOrUpdateConnectionPreferences.class); + } + + /** + * Convert an instance of CreateOrUpdateConnectionPreferences 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/CreateOrUpdateEnvironmentAccessModel.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateEnvironmentAccessModel.java index 0a4c61e..644450c 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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/CreateOrUpdateProxyProfileRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateProxyProfileRequest.java new file mode 100644 index 0000000..e6a3c51 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateProxyProfileRequest.java @@ -0,0 +1,418 @@ +/* + * 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.CreateOrUpdateConnectionPreferences; +import com.configcat.publicapi.java.client.model.UpdateProxyProfileSelectionRule; +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 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; + +/** + * CreateOrUpdateProxyProfileRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class CreateOrUpdateProxyProfileRequest { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_CONNECTION_PREFERENCES = "connectionPreferences"; + @SerializedName(SERIALIZED_NAME_CONNECTION_PREFERENCES) + private CreateOrUpdateConnectionPreferences connectionPreferences; + + public static final String SERIALIZED_NAME_SDK_KEY_SELECTION_RULES = "sdkKeySelectionRules"; + @SerializedName(SERIALIZED_NAME_SDK_KEY_SELECTION_RULES) + private List sdkKeySelectionRules; + + public CreateOrUpdateProxyProfileRequest() { + } + + public CreateOrUpdateProxyProfileRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the proxy profile. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public CreateOrUpdateProxyProfileRequest description(String description) { + this.description = description; + return this; + } + + /** + * The description of the proxy profile. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public CreateOrUpdateProxyProfileRequest connectionPreferences(CreateOrUpdateConnectionPreferences connectionPreferences) { + this.connectionPreferences = connectionPreferences; + return this; + } + + /** + * Get connectionPreferences + * @return connectionPreferences + */ + @javax.annotation.Nullable + public CreateOrUpdateConnectionPreferences getConnectionPreferences() { + return connectionPreferences; + } + + public void setConnectionPreferences(CreateOrUpdateConnectionPreferences connectionPreferences) { + this.connectionPreferences = connectionPreferences; + } + + + public CreateOrUpdateProxyProfileRequest sdkKeySelectionRules(List sdkKeySelectionRules) { + this.sdkKeySelectionRules = sdkKeySelectionRules; + return this; + } + + public CreateOrUpdateProxyProfileRequest addSdkKeySelectionRulesItem(UpdateProxyProfileSelectionRule sdkKeySelectionRulesItem) { + if (this.sdkKeySelectionRules == null) { + this.sdkKeySelectionRules = new ArrayList<>(); + } + this.sdkKeySelectionRules.add(sdkKeySelectionRulesItem); + return this; + } + + /** + * A collection of selection rules that determine the SDK keys applicable for a proxy profile. + * @return sdkKeySelectionRules + */ + @javax.annotation.Nullable + public List getSdkKeySelectionRules() { + return sdkKeySelectionRules; + } + + public void setSdkKeySelectionRules(List sdkKeySelectionRules) { + this.sdkKeySelectionRules = sdkKeySelectionRules; + } + + /** + * 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 CreateOrUpdateProxyProfileRequest instance itself + */ + public CreateOrUpdateProxyProfileRequest 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; + } + CreateOrUpdateProxyProfileRequest createOrUpdateProxyProfileRequest = (CreateOrUpdateProxyProfileRequest) o; + return Objects.equals(this.name, createOrUpdateProxyProfileRequest.name) && + Objects.equals(this.description, createOrUpdateProxyProfileRequest.description) && + Objects.equals(this.connectionPreferences, createOrUpdateProxyProfileRequest.connectionPreferences) && + Objects.equals(this.sdkKeySelectionRules, createOrUpdateProxyProfileRequest.sdkKeySelectionRules)&& + Objects.equals(this.additionalProperties, createOrUpdateProxyProfileRequest.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(name, description, connectionPreferences, sdkKeySelectionRules, 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 CreateOrUpdateProxyProfileRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" connectionPreferences: ").append(toIndentedString(connectionPreferences)).append("\n"); + sb.append(" sdkKeySelectionRules: ").append(toIndentedString(sdkKeySelectionRules)).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("name"); + openapiFields.add("description"); + openapiFields.add("connectionPreferences"); + openapiFields.add("sdkKeySelectionRules"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * 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 CreateOrUpdateProxyProfileRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateOrUpdateProxyProfileRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateOrUpdateProxyProfileRequest is not found in the empty JSON string", CreateOrUpdateProxyProfileRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateOrUpdateProxyProfileRequest.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("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `connectionPreferences` + if (jsonObj.get("connectionPreferences") != null && !jsonObj.get("connectionPreferences").isJsonNull()) { + CreateOrUpdateConnectionPreferences.validateJsonElement(jsonObj.get("connectionPreferences")); + } + if (jsonObj.get("sdkKeySelectionRules") != null && !jsonObj.get("sdkKeySelectionRules").isJsonNull()) { + JsonArray jsonArraysdkKeySelectionRules = jsonObj.getAsJsonArray("sdkKeySelectionRules"); + if (jsonArraysdkKeySelectionRules != null) { + // ensure the json data is an array + if (!jsonObj.get("sdkKeySelectionRules").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sdkKeySelectionRules` to be an array in the JSON string but got `%s`", jsonObj.get("sdkKeySelectionRules").toString())); + } + + // validate the optional field `sdkKeySelectionRules` (array) + for (int i = 0; i < jsonArraysdkKeySelectionRules.size(); i++) { + UpdateProxyProfileSelectionRule.validateJsonElement(jsonArraysdkKeySelectionRules.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateOrUpdateProxyProfileRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateOrUpdateProxyProfileRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateOrUpdateProxyProfileRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateOrUpdateProxyProfileRequest 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 CreateOrUpdateProxyProfileRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateOrUpdateProxyProfileRequest 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 CreateOrUpdateProxyProfileRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateOrUpdateProxyProfileRequest + * @throws IOException if the JSON string is invalid with respect to CreateOrUpdateProxyProfileRequest + */ + public static CreateOrUpdateProxyProfileRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateOrUpdateProxyProfileRequest.class); + } + + /** + * Convert an instance of CreateOrUpdateProxyProfileRequest 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/CreateOrUpdateWebhookNotification.java b/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateWebhookNotification.java new file mode 100644 index 0000000..01a5c0f --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreateOrUpdateWebhookNotification.java @@ -0,0 +1,295 @@ +/* + * 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; + +/** + * The preferences related to a connection, including polling intervals and webhook proxy configurations. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class CreateOrUpdateWebhookNotification { + public static final String SERIALIZED_NAME_WEBHOOK_PROXY_URL = "webhookProxyUrl"; + @SerializedName(SERIALIZED_NAME_WEBHOOK_PROXY_URL) + private String webhookProxyUrl; + + public CreateOrUpdateWebhookNotification() { + } + + public CreateOrUpdateWebhookNotification webhookProxyUrl(String webhookProxyUrl) { + this.webhookProxyUrl = webhookProxyUrl; + return this; + } + + /** + * The webhook proxy URL for receiving config JSON change notifications. + * @return webhookProxyUrl + */ + @javax.annotation.Nonnull + public String getWebhookProxyUrl() { + return webhookProxyUrl; + } + + public void setWebhookProxyUrl(String webhookProxyUrl) { + this.webhookProxyUrl = webhookProxyUrl; + } + + /** + * 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 CreateOrUpdateWebhookNotification instance itself + */ + public CreateOrUpdateWebhookNotification 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; + } + CreateOrUpdateWebhookNotification createOrUpdateWebhookNotification = (CreateOrUpdateWebhookNotification) o; + return Objects.equals(this.webhookProxyUrl, createOrUpdateWebhookNotification.webhookProxyUrl)&& + Objects.equals(this.additionalProperties, createOrUpdateWebhookNotification.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(webhookProxyUrl, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOrUpdateWebhookNotification {\n"); + sb.append(" webhookProxyUrl: ").append(toIndentedString(webhookProxyUrl)).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("webhookProxyUrl"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("webhookProxyUrl"); + } + + /** + * 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 CreateOrUpdateWebhookNotification + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateOrUpdateWebhookNotification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateOrUpdateWebhookNotification is not found in the empty JSON string", CreateOrUpdateWebhookNotification.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateOrUpdateWebhookNotification.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("webhookProxyUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `webhookProxyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webhookProxyUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateOrUpdateWebhookNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateOrUpdateWebhookNotification' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateOrUpdateWebhookNotification.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateOrUpdateWebhookNotification 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 CreateOrUpdateWebhookNotification read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateOrUpdateWebhookNotification 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 CreateOrUpdateWebhookNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateOrUpdateWebhookNotification + * @throws IOException if the JSON string is invalid with respect to CreateOrUpdateWebhookNotification + */ + public static CreateOrUpdateWebhookNotification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateOrUpdateWebhookNotification.class); + } + + /** + * Convert an instance of CreateOrUpdateWebhookNotification 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/CreatePermissionGroupRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/CreatePermissionGroupRequest.java index efbe022..ea73127 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 index ff1c9eb..ef4588a 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationModel.java @@ -51,7 +51,7 @@ /** * 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreatePredefinedVariationModel { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) 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 index 63c837f..5ec3d52 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/CreatePredefinedVariationValueModel.java @@ -50,7 +50,7 @@ /** * 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 da500b4..1354cb7 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 87576cc..bfb3b90 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 2684e67..a83b143 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 @@ -55,7 +55,7 @@ /** * CreateSettingInitialValues */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class CreateSettingInitialValues { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 fded2fc..ccbfd2e 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 8be4ccd..cac0ba3 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 ad55fdb..9a0e9e9 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d968253..f98493a 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 85a7672..b08e51a 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 2234376..15898ae 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 62325f6..05c8783 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 a75d496..3f1dc19 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 a3f67f3..fcb9159 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 9600f0b..1e784fd 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d3ba673..91f7284 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 78365c4..7d87389 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d5ab9d0..bcdddea 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 643d61c..2a65097 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 a856fa4..5076db1 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 363c11a..cdc4e77 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 35becbd..1bbcb7c 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 a6820a3..a4b310a 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 cb66db0..ace82e3 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 9dbaecf..728dc79 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d4a2e68..a01ee34 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 f32b280..e39bb2d 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 86ed76b..eabc575 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 bca76fe..43a9a1a 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 36e49c2..e151146 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 0662680..e4d3d14 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 c30a693..da7420f 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 f17ca2f..f3fa7ed 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 248c6e2..34ec62b 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 610e9e3..e43809a 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 index 459ddc7..8b07ee6 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationModel.java @@ -51,7 +51,7 @@ /** * 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class PredefinedVariationModel { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) 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 index 4783497..6b20a74 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationValueModel.java @@ -49,7 +49,7 @@ /** * 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) diff --git a/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationsModel.java b/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationsModel.java new file mode 100644 index 0000000..97e1995 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/PredefinedVariationsModel.java @@ -0,0 +1,340 @@ +/* + * 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.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; + +/** + * PredefinedVariationsModel + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class PredefinedVariationsModel { + 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_MAX_PREDEFINED_VARIATIONS = "maxPredefinedVariations"; + @SerializedName(SERIALIZED_NAME_MAX_PREDEFINED_VARIATIONS) + private Integer maxPredefinedVariations; + + public PredefinedVariationsModel() { + } + + public PredefinedVariationsModel predefinedVariations(List predefinedVariations) { + this.predefinedVariations = predefinedVariations; + return this; + } + + public PredefinedVariationsModel 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; + } + + + public PredefinedVariationsModel maxPredefinedVariations(Integer maxPredefinedVariations) { + this.maxPredefinedVariations = maxPredefinedVariations; + return this; + } + + /** + * The maximum number of predefined variations allowed for the Feature Flag or Setting. + * @return maxPredefinedVariations + */ + @javax.annotation.Nonnull + public Integer getMaxPredefinedVariations() { + return maxPredefinedVariations; + } + + public void setMaxPredefinedVariations(Integer maxPredefinedVariations) { + this.maxPredefinedVariations = maxPredefinedVariations; + } + + /** + * 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 PredefinedVariationsModel instance itself + */ + public PredefinedVariationsModel 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; + } + PredefinedVariationsModel predefinedVariationsModel = (PredefinedVariationsModel) o; + return Objects.equals(this.predefinedVariations, predefinedVariationsModel.predefinedVariations) && + Objects.equals(this.maxPredefinedVariations, predefinedVariationsModel.maxPredefinedVariations)&& + Objects.equals(this.additionalProperties, predefinedVariationsModel.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(predefinedVariations, maxPredefinedVariations, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PredefinedVariationsModel {\n"); + sb.append(" predefinedVariations: ").append(toIndentedString(predefinedVariations)).append("\n"); + sb.append(" maxPredefinedVariations: ").append(toIndentedString(maxPredefinedVariations)).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"); + openapiFields.add("maxPredefinedVariations"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("predefinedVariations"); + openapiRequiredFields.add("maxPredefinedVariations"); + } + + /** + * 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 PredefinedVariationsModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PredefinedVariationsModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PredefinedVariationsModel is not found in the empty JSON string", PredefinedVariationsModel.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PredefinedVariationsModel.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++) { + PredefinedVariationModel.validateJsonElement(jsonArraypredefinedVariations.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PredefinedVariationsModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PredefinedVariationsModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PredefinedVariationsModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PredefinedVariationsModel 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 PredefinedVariationsModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PredefinedVariationsModel 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 PredefinedVariationsModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of PredefinedVariationsModel + * @throws IOException if the JSON string is invalid with respect to PredefinedVariationsModel + */ + public static PredefinedVariationsModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PredefinedVariationsModel.class); + } + + /** + * Convert an instance of PredefinedVariationsModel 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 b5be820..45f2efd 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 590ad3d..8459998 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 9b1499d..ba17697 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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/ProxyProfileListModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileListModel.java new file mode 100644 index 0000000..9dedf49 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileListModel.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.ProxyProfileModel; +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; + +/** + * ProxyProfileListModel + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class ProxyProfileListModel { + public static final String SERIALIZED_NAME_PROFILES = "profiles"; + @SerializedName(SERIALIZED_NAME_PROFILES) + private List profiles = new ArrayList<>(); + + public ProxyProfileListModel() { + } + + public ProxyProfileListModel profiles(List profiles) { + this.profiles = profiles; + return this; + } + + public ProxyProfileListModel addProfilesItem(ProxyProfileModel profilesItem) { + if (this.profiles == null) { + this.profiles = new ArrayList<>(); + } + this.profiles.add(profilesItem); + return this; + } + + /** + * The list of proxy profiles. + * @return profiles + */ + @javax.annotation.Nonnull + public List getProfiles() { + return profiles; + } + + public void setProfiles(List profiles) { + this.profiles = profiles; + } + + /** + * 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 ProxyProfileListModel instance itself + */ + public ProxyProfileListModel 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; + } + ProxyProfileListModel proxyProfileListModel = (ProxyProfileListModel) o; + return Objects.equals(this.profiles, proxyProfileListModel.profiles)&& + Objects.equals(this.additionalProperties, proxyProfileListModel.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(profiles, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProxyProfileListModel {\n"); + sb.append(" profiles: ").append(toIndentedString(profiles)).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("profiles"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("profiles"); + } + + /** + * 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 ProxyProfileListModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProxyProfileListModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProxyProfileListModel is not found in the empty JSON string", ProxyProfileListModel.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ProxyProfileListModel.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("profiles").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `profiles` to be an array in the JSON string but got `%s`", jsonObj.get("profiles").toString())); + } + + JsonArray jsonArrayprofiles = jsonObj.getAsJsonArray("profiles"); + // validate the required field `profiles` (array) + for (int i = 0; i < jsonArrayprofiles.size(); i++) { + ProxyProfileModel.validateJsonElement(jsonArrayprofiles.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProxyProfileListModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProxyProfileListModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProxyProfileListModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProxyProfileListModel 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 ProxyProfileListModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ProxyProfileListModel 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 ProxyProfileListModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProxyProfileListModel + * @throws IOException if the JSON string is invalid with respect to ProxyProfileListModel + */ + public static ProxyProfileListModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProxyProfileListModel.class); + } + + /** + * Convert an instance of ProxyProfileListModel 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/ProxyProfileModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileModel.java new file mode 100644 index 0000000..7dfcd7f --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileModel.java @@ -0,0 +1,462 @@ +/* + * 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.ConnectionPreferences; +import com.configcat.publicapi.java.client.model.ProxyProfileSelectionRule; +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 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; + +/** + * ProxyProfileModel + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class ProxyProfileModel { + public static final String SERIALIZED_NAME_PROXY_PROFILE_ID = "proxyProfileId"; + @SerializedName(SERIALIZED_NAME_PROXY_PROFILE_ID) + private UUID proxyProfileId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_LAST_ACCESSED_AT = "lastAccessedAt"; + @SerializedName(SERIALIZED_NAME_LAST_ACCESSED_AT) + private OffsetDateTime lastAccessedAt; + + public static final String SERIALIZED_NAME_CONNECTION_PREFERENCES = "connectionPreferences"; + @SerializedName(SERIALIZED_NAME_CONNECTION_PREFERENCES) + private ConnectionPreferences connectionPreferences; + + public static final String SERIALIZED_NAME_SDK_KEY_SELECTION_RULES = "sdkKeySelectionRules"; + @SerializedName(SERIALIZED_NAME_SDK_KEY_SELECTION_RULES) + private List sdkKeySelectionRules = new ArrayList<>(); + + public ProxyProfileModel() { + } + + public ProxyProfileModel proxyProfileId(UUID proxyProfileId) { + this.proxyProfileId = proxyProfileId; + return this; + } + + /** + * The unique identifier of the proxy profile. + * @return proxyProfileId + */ + @javax.annotation.Nonnull + public UUID getProxyProfileId() { + return proxyProfileId; + } + + public void setProxyProfileId(UUID proxyProfileId) { + this.proxyProfileId = proxyProfileId; + } + + + public ProxyProfileModel name(String name) { + this.name = name; + return this; + } + + /** + * The name of the proxy profile. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public ProxyProfileModel description(String description) { + this.description = description; + return this; + } + + /** + * The description of the proxy profile. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + public ProxyProfileModel lastAccessedAt(OffsetDateTime lastAccessedAt) { + this.lastAccessedAt = lastAccessedAt; + return this; + } + + /** + * The date and time when the proxy profile was last accessed. + * @return lastAccessedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getLastAccessedAt() { + return lastAccessedAt; + } + + public void setLastAccessedAt(OffsetDateTime lastAccessedAt) { + this.lastAccessedAt = lastAccessedAt; + } + + + public ProxyProfileModel connectionPreferences(ConnectionPreferences connectionPreferences) { + this.connectionPreferences = connectionPreferences; + return this; + } + + /** + * Get connectionPreferences + * @return connectionPreferences + */ + @javax.annotation.Nonnull + public ConnectionPreferences getConnectionPreferences() { + return connectionPreferences; + } + + public void setConnectionPreferences(ConnectionPreferences connectionPreferences) { + this.connectionPreferences = connectionPreferences; + } + + + public ProxyProfileModel sdkKeySelectionRules(List sdkKeySelectionRules) { + this.sdkKeySelectionRules = sdkKeySelectionRules; + return this; + } + + public ProxyProfileModel addSdkKeySelectionRulesItem(ProxyProfileSelectionRule sdkKeySelectionRulesItem) { + if (this.sdkKeySelectionRules == null) { + this.sdkKeySelectionRules = new ArrayList<>(); + } + this.sdkKeySelectionRules.add(sdkKeySelectionRulesItem); + return this; + } + + /** + * Get sdkKeySelectionRules + * @return sdkKeySelectionRules + */ + @javax.annotation.Nonnull + public List getSdkKeySelectionRules() { + return sdkKeySelectionRules; + } + + public void setSdkKeySelectionRules(List sdkKeySelectionRules) { + this.sdkKeySelectionRules = sdkKeySelectionRules; + } + + /** + * 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 ProxyProfileModel instance itself + */ + public ProxyProfileModel 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; + } + ProxyProfileModel proxyProfileModel = (ProxyProfileModel) o; + return Objects.equals(this.proxyProfileId, proxyProfileModel.proxyProfileId) && + Objects.equals(this.name, proxyProfileModel.name) && + Objects.equals(this.description, proxyProfileModel.description) && + Objects.equals(this.lastAccessedAt, proxyProfileModel.lastAccessedAt) && + Objects.equals(this.connectionPreferences, proxyProfileModel.connectionPreferences) && + Objects.equals(this.sdkKeySelectionRules, proxyProfileModel.sdkKeySelectionRules)&& + Objects.equals(this.additionalProperties, proxyProfileModel.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(proxyProfileId, name, description, lastAccessedAt, connectionPreferences, sdkKeySelectionRules, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProxyProfileModel {\n"); + sb.append(" proxyProfileId: ").append(toIndentedString(proxyProfileId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" lastAccessedAt: ").append(toIndentedString(lastAccessedAt)).append("\n"); + sb.append(" connectionPreferences: ").append(toIndentedString(connectionPreferences)).append("\n"); + sb.append(" sdkKeySelectionRules: ").append(toIndentedString(sdkKeySelectionRules)).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("proxyProfileId"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("lastAccessedAt"); + openapiFields.add("connectionPreferences"); + openapiFields.add("sdkKeySelectionRules"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("proxyProfileId"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("lastAccessedAt"); + openapiRequiredFields.add("connectionPreferences"); + openapiRequiredFields.add("sdkKeySelectionRules"); + } + + /** + * 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 ProxyProfileModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProxyProfileModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProxyProfileModel is not found in the empty JSON string", ProxyProfileModel.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ProxyProfileModel.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("proxyProfileId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `proxyProfileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("proxyProfileId").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("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the required field `connectionPreferences` + ConnectionPreferences.validateJsonElement(jsonObj.get("connectionPreferences")); + // ensure the json data is an array + if (!jsonObj.get("sdkKeySelectionRules").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sdkKeySelectionRules` to be an array in the JSON string but got `%s`", jsonObj.get("sdkKeySelectionRules").toString())); + } + + JsonArray jsonArraysdkKeySelectionRules = jsonObj.getAsJsonArray("sdkKeySelectionRules"); + // validate the required field `sdkKeySelectionRules` (array) + for (int i = 0; i < jsonArraysdkKeySelectionRules.size(); i++) { + ProxyProfileSelectionRule.validateJsonElement(jsonArraysdkKeySelectionRules.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProxyProfileModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProxyProfileModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProxyProfileModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProxyProfileModel 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 ProxyProfileModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ProxyProfileModel 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 ProxyProfileModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProxyProfileModel + * @throws IOException if the JSON string is invalid with respect to ProxyProfileModel + */ + public static ProxyProfileModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProxyProfileModel.class); + } + + /** + * Convert an instance of ProxyProfileModel 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/ProxyProfileSdkKeyItem.java b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeyItem.java new file mode 100644 index 0000000..7fd195b --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeyItem.java @@ -0,0 +1,416 @@ +/* + * 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 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; + +/** + * ProxyProfileSdkKeyItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class ProxyProfileSdkKeyItem { + public static final String SERIALIZED_NAME_PRIMARY_SDK_KEY = "primarySdkKey"; + @SerializedName(SERIALIZED_NAME_PRIMARY_SDK_KEY) + private String primarySdkKey; + + public static final String SERIALIZED_NAME_SECONDARY_SDK_KEY = "secondarySdkKey"; + @SerializedName(SERIALIZED_NAME_SECONDARY_SDK_KEY) + private String secondarySdkKey; + + public static final String SERIALIZED_NAME_SDK_ID = "sdkId"; + @SerializedName(SERIALIZED_NAME_SDK_ID) + private String sdkId; + + public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID) + private UUID configId; + + public static final String SERIALIZED_NAME_ENVIRONMENT_ID = "environmentId"; + @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID) + private UUID environmentId; + + public ProxyProfileSdkKeyItem() { + } + + public ProxyProfileSdkKeyItem primarySdkKey(String primarySdkKey) { + this.primarySdkKey = primarySdkKey; + return this; + } + + /** + * The primary SDK Key of the Config / Environment pair selected for the Proxy Profile. + * @return primarySdkKey + */ + @javax.annotation.Nonnull + public String getPrimarySdkKey() { + return primarySdkKey; + } + + public void setPrimarySdkKey(String primarySdkKey) { + this.primarySdkKey = primarySdkKey; + } + + + public ProxyProfileSdkKeyItem secondarySdkKey(String secondarySdkKey) { + this.secondarySdkKey = secondarySdkKey; + return this; + } + + /** + * The secondary SDK Key of the Config / Environment pair selected for the Proxy Profile. + * @return secondarySdkKey + */ + @javax.annotation.Nullable + public String getSecondarySdkKey() { + return secondarySdkKey; + } + + public void setSecondarySdkKey(String secondarySdkKey) { + this.secondarySdkKey = secondarySdkKey; + } + + + public ProxyProfileSdkKeyItem sdkId(String sdkId) { + this.sdkId = sdkId; + return this; + } + + /** + * The SDK ID identifying the Config / Environment pair selected for the Proxy Profile. + * @return sdkId + */ + @javax.annotation.Nonnull + public String getSdkId() { + return sdkId; + } + + public void setSdkId(String sdkId) { + this.sdkId = sdkId; + } + + + public ProxyProfileSdkKeyItem configId(UUID configId) { + this.configId = configId; + return this; + } + + /** + * The identifier of the Config associated with the SDK key. + * @return configId + */ + @javax.annotation.Nonnull + public UUID getConfigId() { + return configId; + } + + public void setConfigId(UUID configId) { + this.configId = configId; + } + + + public ProxyProfileSdkKeyItem environmentId(UUID environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * The identifier of the Environment associated with the SDK key. + * @return environmentId + */ + @javax.annotation.Nonnull + public UUID getEnvironmentId() { + return environmentId; + } + + public void setEnvironmentId(UUID environmentId) { + this.environmentId = environmentId; + } + + /** + * 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 ProxyProfileSdkKeyItem instance itself + */ + public ProxyProfileSdkKeyItem 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; + } + ProxyProfileSdkKeyItem proxyProfileSdkKeyItem = (ProxyProfileSdkKeyItem) o; + return Objects.equals(this.primarySdkKey, proxyProfileSdkKeyItem.primarySdkKey) && + Objects.equals(this.secondarySdkKey, proxyProfileSdkKeyItem.secondarySdkKey) && + Objects.equals(this.sdkId, proxyProfileSdkKeyItem.sdkId) && + Objects.equals(this.configId, proxyProfileSdkKeyItem.configId) && + Objects.equals(this.environmentId, proxyProfileSdkKeyItem.environmentId)&& + Objects.equals(this.additionalProperties, proxyProfileSdkKeyItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(primarySdkKey, secondarySdkKey, sdkId, configId, environmentId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProxyProfileSdkKeyItem {\n"); + sb.append(" primarySdkKey: ").append(toIndentedString(primarySdkKey)).append("\n"); + sb.append(" secondarySdkKey: ").append(toIndentedString(secondarySdkKey)).append("\n"); + sb.append(" sdkId: ").append(toIndentedString(sdkId)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" environmentId: ").append(toIndentedString(environmentId)).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("primarySdkKey"); + openapiFields.add("secondarySdkKey"); + openapiFields.add("sdkId"); + openapiFields.add("configId"); + openapiFields.add("environmentId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("primarySdkKey"); + openapiRequiredFields.add("secondarySdkKey"); + openapiRequiredFields.add("sdkId"); + openapiRequiredFields.add("configId"); + openapiRequiredFields.add("environmentId"); + } + + /** + * 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 ProxyProfileSdkKeyItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProxyProfileSdkKeyItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProxyProfileSdkKeyItem is not found in the empty JSON string", ProxyProfileSdkKeyItem.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ProxyProfileSdkKeyItem.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("primarySdkKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primarySdkKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primarySdkKey").toString())); + } + if ((jsonObj.get("secondarySdkKey") != null && !jsonObj.get("secondarySdkKey").isJsonNull()) && !jsonObj.get("secondarySdkKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secondarySdkKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondarySdkKey").toString())); + } + if (!jsonObj.get("sdkId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sdkId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdkId").toString())); + } + if (!jsonObj.get("configId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configId").toString())); + } + if (!jsonObj.get("environmentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `environmentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("environmentId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProxyProfileSdkKeyItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProxyProfileSdkKeyItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProxyProfileSdkKeyItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProxyProfileSdkKeyItem 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 ProxyProfileSdkKeyItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ProxyProfileSdkKeyItem 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 ProxyProfileSdkKeyItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProxyProfileSdkKeyItem + * @throws IOException if the JSON string is invalid with respect to ProxyProfileSdkKeyItem + */ + public static ProxyProfileSdkKeyItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProxyProfileSdkKeyItem.class); + } + + /** + * Convert an instance of ProxyProfileSdkKeyItem 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/ProxyProfileSdkKeyRequestItem.java b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeyRequestItem.java new file mode 100644 index 0000000..788c77e --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeyRequestItem.java @@ -0,0 +1,329 @@ +/* + * 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 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; + +/** + * ProxyProfileSdkKeyRequestItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class ProxyProfileSdkKeyRequestItem { + public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID) + private UUID configId; + + public static final String SERIALIZED_NAME_ENVIRONMENT_ID = "environmentId"; + @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID) + private UUID environmentId; + + public ProxyProfileSdkKeyRequestItem() { + } + + public ProxyProfileSdkKeyRequestItem configId(UUID configId) { + this.configId = configId; + return this; + } + + /** + * The identifier of the Config. + * @return configId + */ + @javax.annotation.Nullable + public UUID getConfigId() { + return configId; + } + + public void setConfigId(UUID configId) { + this.configId = configId; + } + + + public ProxyProfileSdkKeyRequestItem environmentId(UUID environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * The identifier of the Environment. + * @return environmentId + */ + @javax.annotation.Nullable + public UUID getEnvironmentId() { + return environmentId; + } + + public void setEnvironmentId(UUID environmentId) { + this.environmentId = environmentId; + } + + /** + * 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 ProxyProfileSdkKeyRequestItem instance itself + */ + public ProxyProfileSdkKeyRequestItem 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; + } + ProxyProfileSdkKeyRequestItem proxyProfileSdkKeyRequestItem = (ProxyProfileSdkKeyRequestItem) o; + return Objects.equals(this.configId, proxyProfileSdkKeyRequestItem.configId) && + Objects.equals(this.environmentId, proxyProfileSdkKeyRequestItem.environmentId)&& + Objects.equals(this.additionalProperties, proxyProfileSdkKeyRequestItem.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(configId, environmentId, 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 ProxyProfileSdkKeyRequestItem {\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" environmentId: ").append(toIndentedString(environmentId)).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("configId"); + openapiFields.add("environmentId"); + + // 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 ProxyProfileSdkKeyRequestItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProxyProfileSdkKeyRequestItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProxyProfileSdkKeyRequestItem is not found in the empty JSON string", ProxyProfileSdkKeyRequestItem.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("configId") != null && !jsonObj.get("configId").isJsonNull()) && !jsonObj.get("configId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configId").toString())); + } + if ((jsonObj.get("environmentId") != null && !jsonObj.get("environmentId").isJsonNull()) && !jsonObj.get("environmentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `environmentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("environmentId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProxyProfileSdkKeyRequestItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProxyProfileSdkKeyRequestItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProxyProfileSdkKeyRequestItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProxyProfileSdkKeyRequestItem 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 ProxyProfileSdkKeyRequestItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ProxyProfileSdkKeyRequestItem 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 ProxyProfileSdkKeyRequestItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProxyProfileSdkKeyRequestItem + * @throws IOException if the JSON string is invalid with respect to ProxyProfileSdkKeyRequestItem + */ + public static ProxyProfileSdkKeyRequestItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProxyProfileSdkKeyRequestItem.class); + } + + /** + * Convert an instance of ProxyProfileSdkKeyRequestItem 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/ProxyProfileSdkKeysListModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeysListModel.java new file mode 100644 index 0000000..df35ca0 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeysListModel.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.ProxyProfileSdkKeyItem; +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; + +/** + * ProxyProfileSdkKeysListModel + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class ProxyProfileSdkKeysListModel { + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = new ArrayList<>(); + + public ProxyProfileSdkKeysListModel() { + } + + public ProxyProfileSdkKeysListModel items(List items) { + this.items = items; + return this; + } + + public ProxyProfileSdkKeysListModel addItemsItem(ProxyProfileSdkKeyItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * The list of SDK keys (with additional metadata) selected for the Proxy Profile. + * @return items + */ + @javax.annotation.Nonnull + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + /** + * 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 ProxyProfileSdkKeysListModel instance itself + */ + public ProxyProfileSdkKeysListModel 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; + } + ProxyProfileSdkKeysListModel proxyProfileSdkKeysListModel = (ProxyProfileSdkKeysListModel) o; + return Objects.equals(this.items, proxyProfileSdkKeysListModel.items)&& + Objects.equals(this.additionalProperties, proxyProfileSdkKeysListModel.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(items, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProxyProfileSdkKeysListModel {\n"); + sb.append(" items: ").append(toIndentedString(items)).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("items"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("items"); + } + + /** + * 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 ProxyProfileSdkKeysListModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProxyProfileSdkKeysListModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProxyProfileSdkKeysListModel is not found in the empty JSON string", ProxyProfileSdkKeysListModel.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ProxyProfileSdkKeysListModel.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("items").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); + } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + ProxyProfileSdkKeyItem.validateJsonElement(jsonArrayitems.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProxyProfileSdkKeysListModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProxyProfileSdkKeysListModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProxyProfileSdkKeysListModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProxyProfileSdkKeysListModel 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 ProxyProfileSdkKeysListModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ProxyProfileSdkKeysListModel 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 ProxyProfileSdkKeysListModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProxyProfileSdkKeysListModel + * @throws IOException if the JSON string is invalid with respect to ProxyProfileSdkKeysListModel + */ + public static ProxyProfileSdkKeysListModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProxyProfileSdkKeysListModel.class); + } + + /** + * Convert an instance of ProxyProfileSdkKeysListModel 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/ProxyProfileSdkKeysRequest.java b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeysRequest.java new file mode 100644 index 0000000..2ddbb6b --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSdkKeysRequest.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.ProxyProfileSdkKeyRequestItem; +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; + +/** + * ProxyProfileSdkKeysRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class ProxyProfileSdkKeysRequest { + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = new ArrayList<>(); + + public ProxyProfileSdkKeysRequest() { + } + + public ProxyProfileSdkKeysRequest items(List items) { + this.items = items; + return this; + } + + public ProxyProfileSdkKeysRequest addItemsItem(ProxyProfileSdkKeyRequestItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * The list of Config / Environment pairs. By only setting a `configId` means all Environments of that Config will be included. Similarly, by only setting an `environmentId` means all Configs with that Environment will be included. + * @return items + */ + @javax.annotation.Nonnull + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + /** + * 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 ProxyProfileSdkKeysRequest instance itself + */ + public ProxyProfileSdkKeysRequest 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; + } + ProxyProfileSdkKeysRequest proxyProfileSdkKeysRequest = (ProxyProfileSdkKeysRequest) o; + return Objects.equals(this.items, proxyProfileSdkKeysRequest.items)&& + Objects.equals(this.additionalProperties, proxyProfileSdkKeysRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(items, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProxyProfileSdkKeysRequest {\n"); + sb.append(" items: ").append(toIndentedString(items)).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("items"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("items"); + } + + /** + * 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 ProxyProfileSdkKeysRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProxyProfileSdkKeysRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProxyProfileSdkKeysRequest is not found in the empty JSON string", ProxyProfileSdkKeysRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ProxyProfileSdkKeysRequest.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("items").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); + } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + ProxyProfileSdkKeyRequestItem.validateJsonElement(jsonArrayitems.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProxyProfileSdkKeysRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProxyProfileSdkKeysRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProxyProfileSdkKeysRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProxyProfileSdkKeysRequest 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 ProxyProfileSdkKeysRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ProxyProfileSdkKeysRequest 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 ProxyProfileSdkKeysRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProxyProfileSdkKeysRequest + * @throws IOException if the JSON string is invalid with respect to ProxyProfileSdkKeysRequest + */ + public static ProxyProfileSdkKeysRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProxyProfileSdkKeysRequest.class); + } + + /** + * Convert an instance of ProxyProfileSdkKeysRequest 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/ProxyProfileSecretModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSecretModel.java new file mode 100644 index 0000000..86b2a50 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSecretModel.java @@ -0,0 +1,295 @@ +/* + * 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; + +/** + * ProxyProfileSecretModel + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class ProxyProfileSecretModel { + public static final String SERIALIZED_NAME_SECRET_TOKEN = "secretToken"; + @SerializedName(SERIALIZED_NAME_SECRET_TOKEN) + private String secretToken; + + public ProxyProfileSecretModel() { + } + + public ProxyProfileSecretModel secretToken(String secretToken) { + this.secretToken = secretToken; + return this; + } + + /** + * The secret token associated with the proxy profile. + * @return secretToken + */ + @javax.annotation.Nonnull + public String getSecretToken() { + return secretToken; + } + + public void setSecretToken(String secretToken) { + this.secretToken = secretToken; + } + + /** + * 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 ProxyProfileSecretModel instance itself + */ + public ProxyProfileSecretModel 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; + } + ProxyProfileSecretModel proxyProfileSecretModel = (ProxyProfileSecretModel) o; + return Objects.equals(this.secretToken, proxyProfileSecretModel.secretToken)&& + Objects.equals(this.additionalProperties, proxyProfileSecretModel.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(secretToken, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProxyProfileSecretModel {\n"); + sb.append(" secretToken: ").append(toIndentedString(secretToken)).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("secretToken"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("secretToken"); + } + + /** + * 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 ProxyProfileSecretModel + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProxyProfileSecretModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProxyProfileSecretModel is not found in the empty JSON string", ProxyProfileSecretModel.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ProxyProfileSecretModel.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("secretToken").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secretToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secretToken").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProxyProfileSecretModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProxyProfileSecretModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProxyProfileSecretModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProxyProfileSecretModel 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 ProxyProfileSecretModel read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ProxyProfileSecretModel 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 ProxyProfileSecretModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProxyProfileSecretModel + * @throws IOException if the JSON string is invalid with respect to ProxyProfileSecretModel + */ + public static ProxyProfileSecretModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProxyProfileSecretModel.class); + } + + /** + * Convert an instance of ProxyProfileSecretModel 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/ProxyProfileSelectionRule.java b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSelectionRule.java new file mode 100644 index 0000000..265e662 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/ProxyProfileSelectionRule.java @@ -0,0 +1,476 @@ +/* + * 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.SelectionRuleKind; +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; + +/** + * ProxyProfileSelectionRule + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class ProxyProfileSelectionRule { + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private SelectionRuleKind kind; + + public static final String SERIALIZED_NAME_PRODUCT_ID_FILTER = "productIdFilter"; + @SerializedName(SERIALIZED_NAME_PRODUCT_ID_FILTER) + private UUID productIdFilter; + + public static final String SERIALIZED_NAME_CONFIG_ID_FILTER = "configIdFilter"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID_FILTER) + private UUID configIdFilter; + + public static final String SERIALIZED_NAME_ENVIRONMENT_ID_FILTER = "environmentIdFilter"; + @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID_FILTER) + private UUID environmentIdFilter; + + public static final String SERIALIZED_NAME_PRODUCT_NAME_MATCH_FILTER = "productNameMatchFilter"; + @SerializedName(SERIALIZED_NAME_PRODUCT_NAME_MATCH_FILTER) + private String productNameMatchFilter; + + public static final String SERIALIZED_NAME_CONFIG_NAME_MATCH_FILTER = "configNameMatchFilter"; + @SerializedName(SERIALIZED_NAME_CONFIG_NAME_MATCH_FILTER) + private String configNameMatchFilter; + + public static final String SERIALIZED_NAME_ENVIRONMENT_NAME_MATCH_FILTER = "environmentNameMatchFilter"; + @SerializedName(SERIALIZED_NAME_ENVIRONMENT_NAME_MATCH_FILTER) + private String environmentNameMatchFilter; + + public ProxyProfileSelectionRule() { + } + + public ProxyProfileSelectionRule kind(SelectionRuleKind kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @javax.annotation.Nonnull + public SelectionRuleKind getKind() { + return kind; + } + + public void setKind(SelectionRuleKind kind) { + this.kind = kind; + } + + + public ProxyProfileSelectionRule productIdFilter(UUID productIdFilter) { + this.productIdFilter = productIdFilter; + return this; + } + + /** + * Defines the filter for matching Products by their unique identifier. + * @return productIdFilter + */ + @javax.annotation.Nullable + public UUID getProductIdFilter() { + return productIdFilter; + } + + public void setProductIdFilter(UUID productIdFilter) { + this.productIdFilter = productIdFilter; + } + + + public ProxyProfileSelectionRule configIdFilter(UUID configIdFilter) { + this.configIdFilter = configIdFilter; + return this; + } + + /** + * Defines the filter for matching Configs by their unique identifier. + * @return configIdFilter + */ + @javax.annotation.Nullable + public UUID getConfigIdFilter() { + return configIdFilter; + } + + public void setConfigIdFilter(UUID configIdFilter) { + this.configIdFilter = configIdFilter; + } + + + public ProxyProfileSelectionRule environmentIdFilter(UUID environmentIdFilter) { + this.environmentIdFilter = environmentIdFilter; + return this; + } + + /** + * Defines the filter for matching Environments by their unique identifier. + * @return environmentIdFilter + */ + @javax.annotation.Nullable + public UUID getEnvironmentIdFilter() { + return environmentIdFilter; + } + + public void setEnvironmentIdFilter(UUID environmentIdFilter) { + this.environmentIdFilter = environmentIdFilter; + } + + + public ProxyProfileSelectionRule productNameMatchFilter(String productNameMatchFilter) { + this.productNameMatchFilter = productNameMatchFilter; + return this; + } + + /** + * Specifies a filter to match Product names in the proxy profile selection rule. It accepts wildcards (*). + * @return productNameMatchFilter + */ + @javax.annotation.Nullable + public String getProductNameMatchFilter() { + return productNameMatchFilter; + } + + public void setProductNameMatchFilter(String productNameMatchFilter) { + this.productNameMatchFilter = productNameMatchFilter; + } + + + public ProxyProfileSelectionRule configNameMatchFilter(String configNameMatchFilter) { + this.configNameMatchFilter = configNameMatchFilter; + return this; + } + + /** + * Specifies a filter to match Config names in the proxy profile selection rule. It accepts wildcards (*). + * @return configNameMatchFilter + */ + @javax.annotation.Nullable + public String getConfigNameMatchFilter() { + return configNameMatchFilter; + } + + public void setConfigNameMatchFilter(String configNameMatchFilter) { + this.configNameMatchFilter = configNameMatchFilter; + } + + + public ProxyProfileSelectionRule environmentNameMatchFilter(String environmentNameMatchFilter) { + this.environmentNameMatchFilter = environmentNameMatchFilter; + return this; + } + + /** + * Specifies a filter to match Environment names in the proxy profile selection rule. It accepts wildcards (*). + * @return environmentNameMatchFilter + */ + @javax.annotation.Nullable + public String getEnvironmentNameMatchFilter() { + return environmentNameMatchFilter; + } + + public void setEnvironmentNameMatchFilter(String environmentNameMatchFilter) { + this.environmentNameMatchFilter = environmentNameMatchFilter; + } + + /** + * 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 ProxyProfileSelectionRule instance itself + */ + public ProxyProfileSelectionRule 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; + } + ProxyProfileSelectionRule proxyProfileSelectionRule = (ProxyProfileSelectionRule) o; + return Objects.equals(this.kind, proxyProfileSelectionRule.kind) && + Objects.equals(this.productIdFilter, proxyProfileSelectionRule.productIdFilter) && + Objects.equals(this.configIdFilter, proxyProfileSelectionRule.configIdFilter) && + Objects.equals(this.environmentIdFilter, proxyProfileSelectionRule.environmentIdFilter) && + Objects.equals(this.productNameMatchFilter, proxyProfileSelectionRule.productNameMatchFilter) && + Objects.equals(this.configNameMatchFilter, proxyProfileSelectionRule.configNameMatchFilter) && + Objects.equals(this.environmentNameMatchFilter, proxyProfileSelectionRule.environmentNameMatchFilter)&& + Objects.equals(this.additionalProperties, proxyProfileSelectionRule.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(kind, productIdFilter, configIdFilter, environmentIdFilter, productNameMatchFilter, configNameMatchFilter, environmentNameMatchFilter, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProxyProfileSelectionRule {\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" productIdFilter: ").append(toIndentedString(productIdFilter)).append("\n"); + sb.append(" configIdFilter: ").append(toIndentedString(configIdFilter)).append("\n"); + sb.append(" environmentIdFilter: ").append(toIndentedString(environmentIdFilter)).append("\n"); + sb.append(" productNameMatchFilter: ").append(toIndentedString(productNameMatchFilter)).append("\n"); + sb.append(" configNameMatchFilter: ").append(toIndentedString(configNameMatchFilter)).append("\n"); + sb.append(" environmentNameMatchFilter: ").append(toIndentedString(environmentNameMatchFilter)).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("kind"); + openapiFields.add("productIdFilter"); + openapiFields.add("configIdFilter"); + openapiFields.add("environmentIdFilter"); + openapiFields.add("productNameMatchFilter"); + openapiFields.add("configNameMatchFilter"); + openapiFields.add("environmentNameMatchFilter"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("kind"); + openapiRequiredFields.add("productIdFilter"); + openapiRequiredFields.add("configIdFilter"); + openapiRequiredFields.add("environmentIdFilter"); + openapiRequiredFields.add("productNameMatchFilter"); + openapiRequiredFields.add("configNameMatchFilter"); + openapiRequiredFields.add("environmentNameMatchFilter"); + } + + /** + * 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 ProxyProfileSelectionRule + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProxyProfileSelectionRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProxyProfileSelectionRule is not found in the empty JSON string", ProxyProfileSelectionRule.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ProxyProfileSelectionRule.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 `kind` + SelectionRuleKind.validateJsonElement(jsonObj.get("kind")); + if ((jsonObj.get("productIdFilter") != null && !jsonObj.get("productIdFilter").isJsonNull()) && !jsonObj.get("productIdFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productIdFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productIdFilter").toString())); + } + if ((jsonObj.get("configIdFilter") != null && !jsonObj.get("configIdFilter").isJsonNull()) && !jsonObj.get("configIdFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configIdFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configIdFilter").toString())); + } + if ((jsonObj.get("environmentIdFilter") != null && !jsonObj.get("environmentIdFilter").isJsonNull()) && !jsonObj.get("environmentIdFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `environmentIdFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("environmentIdFilter").toString())); + } + if ((jsonObj.get("productNameMatchFilter") != null && !jsonObj.get("productNameMatchFilter").isJsonNull()) && !jsonObj.get("productNameMatchFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productNameMatchFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productNameMatchFilter").toString())); + } + if ((jsonObj.get("configNameMatchFilter") != null && !jsonObj.get("configNameMatchFilter").isJsonNull()) && !jsonObj.get("configNameMatchFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configNameMatchFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configNameMatchFilter").toString())); + } + if ((jsonObj.get("environmentNameMatchFilter") != null && !jsonObj.get("environmentNameMatchFilter").isJsonNull()) && !jsonObj.get("environmentNameMatchFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `environmentNameMatchFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("environmentNameMatchFilter").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProxyProfileSelectionRule.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProxyProfileSelectionRule' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProxyProfileSelectionRule.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProxyProfileSelectionRule 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 ProxyProfileSelectionRule read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ProxyProfileSelectionRule 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 ProxyProfileSelectionRule given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProxyProfileSelectionRule + * @throws IOException if the JSON string is invalid with respect to ProxyProfileSelectionRule + */ + public static ProxyProfileSelectionRule fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProxyProfileSelectionRule.class); + } + + /** + * Convert an instance of ProxyProfileSelectionRule 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/ReasonRequiredEnvironmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/ReasonRequiredEnvironmentModel.java index 48d90d7..126baaf 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 86be83c..c593d7c 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 f8a6c48..165a8d6 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 431d998..3fb6396 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 72f7f3a..42e4d98 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 ea62ed5..99a0bfd 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,7 +52,7 @@ /** * ReplaceSettingModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class ReplaceSettingModel { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 751bb5d..91046e3 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 b4584cc..b384403 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 236a9f6..59b1178 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 b2cc0fc..56b301d 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 a3323f6..710b75f 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 48bba06..41f0089 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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/SelectionRuleKind.java b/src/main/java/com/configcat/publicapi/java/client/model/SelectionRuleKind.java new file mode 100644 index 0000000..4e49acb --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/SelectionRuleKind.java @@ -0,0 +1,78 @@ +/* + * 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.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Defines the types of SDK selection rules that can be applied to proxy profiles. + */ +@JsonAdapter(SelectionRuleKind.Adapter.class) +public enum SelectionRuleKind { + + INCLUDE("include"), + + EXCLUDE("exclude"); + + private String value; + + SelectionRuleKind(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SelectionRuleKind fromValue(String value) { + for (SelectionRuleKind b : SelectionRuleKind.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SelectionRuleKind enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SelectionRuleKind read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SelectionRuleKind.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SelectionRuleKind.fromValue(value); + } +} + 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 10e901d..69c4d3f 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 index fca0481..d04b339 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/SettingDataV2Model.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/SettingDataV2Model.java @@ -54,7 +54,7 @@ /** * 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 d08bf8b..b7fb9a1 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 @@ -61,7 +61,7 @@ /** * SettingFormulaModel */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 b7acc09..61d0417 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 @@ -56,7 +56,7 @@ /** * 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 cc5f2c2..52a1fc2 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 6e45f16..4a409eb 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 2a033bd..c96d2e9 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 66c5d40..6062fc7 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d990468..01b6c7b 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 fbf887a..2bf78e2 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 7e4a975..7b0974e 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 98b320b..05fbe62 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 53e4792..621b3fc 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 49c362d..463a783 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d8de6ff..03ef7f4 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 ad46f4b..c75bc75 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 7113b4e..5cbe811 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 7e1e6b5..f38d937 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 ecb431b..112dd5f 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 aedc8d0..cd3f56d 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 6e9c852..3e1bfe5 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 7da9280..9c6068a 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 699fb45..77161d6 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 4a776ff..838a824 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 f020068..7dadc26 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 f6fafb8..dcb14db 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 index 86c4960..419f0b8 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationModel.java @@ -52,7 +52,7 @@ /** * 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class UpdatePredefinedVariationModel { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) 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 index 87eb39c..6f04ad8 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationValueModel.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationValueModel.java @@ -50,7 +50,7 @@ /** * 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 index 23c8326..2b1a133 100644 --- a/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationsRequest.java +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdatePredefinedVariationsRequest.java @@ -52,7 +52,7 @@ /** * 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 4bc2a44..58783b3 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 c377a16..f9f3d91 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 e56439a..e7edd19 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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/UpdateProxyProfileSelectionRule.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateProxyProfileSelectionRule.java new file mode 100644 index 0000000..3b541cf --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/UpdateProxyProfileSelectionRule.java @@ -0,0 +1,476 @@ +/* + * 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.SelectionRuleKind; +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; + +/** + * UpdateProxyProfileSelectionRule + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class UpdateProxyProfileSelectionRule { + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private SelectionRuleKind kind; + + public static final String SERIALIZED_NAME_PRODUCT_ID_FILTER = "productIdFilter"; + @SerializedName(SERIALIZED_NAME_PRODUCT_ID_FILTER) + private UUID productIdFilter; + + public static final String SERIALIZED_NAME_CONFIG_ID_FILTER = "configIdFilter"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID_FILTER) + private UUID configIdFilter; + + public static final String SERIALIZED_NAME_ENVIRONMENT_ID_FILTER = "environmentIdFilter"; + @SerializedName(SERIALIZED_NAME_ENVIRONMENT_ID_FILTER) + private UUID environmentIdFilter; + + public static final String SERIALIZED_NAME_PRODUCT_NAME_MATCH_FILTER = "productNameMatchFilter"; + @SerializedName(SERIALIZED_NAME_PRODUCT_NAME_MATCH_FILTER) + private String productNameMatchFilter; + + public static final String SERIALIZED_NAME_CONFIG_NAME_MATCH_FILTER = "configNameMatchFilter"; + @SerializedName(SERIALIZED_NAME_CONFIG_NAME_MATCH_FILTER) + private String configNameMatchFilter; + + public static final String SERIALIZED_NAME_ENVIRONMENT_NAME_MATCH_FILTER = "environmentNameMatchFilter"; + @SerializedName(SERIALIZED_NAME_ENVIRONMENT_NAME_MATCH_FILTER) + private String environmentNameMatchFilter; + + public UpdateProxyProfileSelectionRule() { + } + + public UpdateProxyProfileSelectionRule kind(SelectionRuleKind kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + @javax.annotation.Nullable + public SelectionRuleKind getKind() { + return kind; + } + + public void setKind(SelectionRuleKind kind) { + this.kind = kind; + } + + + public UpdateProxyProfileSelectionRule productIdFilter(UUID productIdFilter) { + this.productIdFilter = productIdFilter; + return this; + } + + /** + * Defines the filter for matching Products by their unique identifier. + * @return productIdFilter + */ + @javax.annotation.Nullable + public UUID getProductIdFilter() { + return productIdFilter; + } + + public void setProductIdFilter(UUID productIdFilter) { + this.productIdFilter = productIdFilter; + } + + + public UpdateProxyProfileSelectionRule configIdFilter(UUID configIdFilter) { + this.configIdFilter = configIdFilter; + return this; + } + + /** + * Defines the filter for matching Configs by their unique identifier. + * @return configIdFilter + */ + @javax.annotation.Nullable + public UUID getConfigIdFilter() { + return configIdFilter; + } + + public void setConfigIdFilter(UUID configIdFilter) { + this.configIdFilter = configIdFilter; + } + + + public UpdateProxyProfileSelectionRule environmentIdFilter(UUID environmentIdFilter) { + this.environmentIdFilter = environmentIdFilter; + return this; + } + + /** + * Defines the filter for matching Environments by their unique identifier. + * @return environmentIdFilter + */ + @javax.annotation.Nullable + public UUID getEnvironmentIdFilter() { + return environmentIdFilter; + } + + public void setEnvironmentIdFilter(UUID environmentIdFilter) { + this.environmentIdFilter = environmentIdFilter; + } + + + public UpdateProxyProfileSelectionRule productNameMatchFilter(String productNameMatchFilter) { + this.productNameMatchFilter = productNameMatchFilter; + return this; + } + + /** + * Specifies a filter to match Product names in the proxy profile selection rule. It accepts wildcards (*). + * @return productNameMatchFilter + */ + @javax.annotation.Nullable + public String getProductNameMatchFilter() { + return productNameMatchFilter; + } + + public void setProductNameMatchFilter(String productNameMatchFilter) { + this.productNameMatchFilter = productNameMatchFilter; + } + + + public UpdateProxyProfileSelectionRule configNameMatchFilter(String configNameMatchFilter) { + this.configNameMatchFilter = configNameMatchFilter; + return this; + } + + /** + * Specifies a filter to match Config names in the proxy profile selection rule. It accepts wildcards (*). + * @return configNameMatchFilter + */ + @javax.annotation.Nullable + public String getConfigNameMatchFilter() { + return configNameMatchFilter; + } + + public void setConfigNameMatchFilter(String configNameMatchFilter) { + this.configNameMatchFilter = configNameMatchFilter; + } + + + public UpdateProxyProfileSelectionRule environmentNameMatchFilter(String environmentNameMatchFilter) { + this.environmentNameMatchFilter = environmentNameMatchFilter; + return this; + } + + /** + * Specifies a filter to match Environment names in the proxy profile selection rule. It accepts wildcards (*). + * @return environmentNameMatchFilter + */ + @javax.annotation.Nullable + public String getEnvironmentNameMatchFilter() { + return environmentNameMatchFilter; + } + + public void setEnvironmentNameMatchFilter(String environmentNameMatchFilter) { + this.environmentNameMatchFilter = environmentNameMatchFilter; + } + + /** + * 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 UpdateProxyProfileSelectionRule instance itself + */ + public UpdateProxyProfileSelectionRule 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; + } + UpdateProxyProfileSelectionRule updateProxyProfileSelectionRule = (UpdateProxyProfileSelectionRule) o; + return Objects.equals(this.kind, updateProxyProfileSelectionRule.kind) && + Objects.equals(this.productIdFilter, updateProxyProfileSelectionRule.productIdFilter) && + Objects.equals(this.configIdFilter, updateProxyProfileSelectionRule.configIdFilter) && + Objects.equals(this.environmentIdFilter, updateProxyProfileSelectionRule.environmentIdFilter) && + Objects.equals(this.productNameMatchFilter, updateProxyProfileSelectionRule.productNameMatchFilter) && + Objects.equals(this.configNameMatchFilter, updateProxyProfileSelectionRule.configNameMatchFilter) && + Objects.equals(this.environmentNameMatchFilter, updateProxyProfileSelectionRule.environmentNameMatchFilter)&& + Objects.equals(this.additionalProperties, updateProxyProfileSelectionRule.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(kind, productIdFilter, configIdFilter, environmentIdFilter, productNameMatchFilter, configNameMatchFilter, environmentNameMatchFilter, 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 UpdateProxyProfileSelectionRule {\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" productIdFilter: ").append(toIndentedString(productIdFilter)).append("\n"); + sb.append(" configIdFilter: ").append(toIndentedString(configIdFilter)).append("\n"); + sb.append(" environmentIdFilter: ").append(toIndentedString(environmentIdFilter)).append("\n"); + sb.append(" productNameMatchFilter: ").append(toIndentedString(productNameMatchFilter)).append("\n"); + sb.append(" configNameMatchFilter: ").append(toIndentedString(configNameMatchFilter)).append("\n"); + sb.append(" environmentNameMatchFilter: ").append(toIndentedString(environmentNameMatchFilter)).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("kind"); + openapiFields.add("productIdFilter"); + openapiFields.add("configIdFilter"); + openapiFields.add("environmentIdFilter"); + openapiFields.add("productNameMatchFilter"); + openapiFields.add("configNameMatchFilter"); + openapiFields.add("environmentNameMatchFilter"); + + // 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 UpdateProxyProfileSelectionRule + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateProxyProfileSelectionRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateProxyProfileSelectionRule is not found in the empty JSON string", UpdateProxyProfileSelectionRule.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `kind` + if (jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) { + SelectionRuleKind.validateJsonElement(jsonObj.get("kind")); + } + if ((jsonObj.get("productIdFilter") != null && !jsonObj.get("productIdFilter").isJsonNull()) && !jsonObj.get("productIdFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productIdFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productIdFilter").toString())); + } + if ((jsonObj.get("configIdFilter") != null && !jsonObj.get("configIdFilter").isJsonNull()) && !jsonObj.get("configIdFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configIdFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configIdFilter").toString())); + } + if ((jsonObj.get("environmentIdFilter") != null && !jsonObj.get("environmentIdFilter").isJsonNull()) && !jsonObj.get("environmentIdFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `environmentIdFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("environmentIdFilter").toString())); + } + if ((jsonObj.get("productNameMatchFilter") != null && !jsonObj.get("productNameMatchFilter").isJsonNull()) && !jsonObj.get("productNameMatchFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productNameMatchFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productNameMatchFilter").toString())); + } + if ((jsonObj.get("configNameMatchFilter") != null && !jsonObj.get("configNameMatchFilter").isJsonNull()) && !jsonObj.get("configNameMatchFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `configNameMatchFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configNameMatchFilter").toString())); + } + if ((jsonObj.get("environmentNameMatchFilter") != null && !jsonObj.get("environmentNameMatchFilter").isJsonNull()) && !jsonObj.get("environmentNameMatchFilter").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `environmentNameMatchFilter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("environmentNameMatchFilter").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateProxyProfileSelectionRule.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateProxyProfileSelectionRule' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateProxyProfileSelectionRule.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateProxyProfileSelectionRule 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 UpdateProxyProfileSelectionRule read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateProxyProfileSelectionRule 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 UpdateProxyProfileSelectionRule given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateProxyProfileSelectionRule + * @throws IOException if the JSON string is invalid with respect to UpdateProxyProfileSelectionRule + */ + public static UpdateProxyProfileSelectionRule fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateProxyProfileSelectionRule.class); + } + + /** + * Convert an instance of UpdateProxyProfileSelectionRule 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/UpdateReasonRequiredEnvironmentModel.java b/src/main/java/com/configcat/publicapi/java/client/model/UpdateReasonRequiredEnvironmentModel.java index b35ae70..babba36 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d1e72c8..c9afbce 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 e14ec6a..39fdd0e 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 659f934..802898f 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 410a703..7ff9c49 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 fef31ee..1427634 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 cd8a51d..601c469 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 f08b680..8ce2db9 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 c6b04dc..4f4ce20 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 d4c0b55..94b728e 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 b3acf5d..0abfc4f 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 f3474f2..bf1d3a1 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 @@ -51,7 +51,7 @@ /** * Represents the value 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 fe72322..8ff7c6f 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 073f359..bfc06c3 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 9ff3ef4..0d2fe81 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 @@ -50,7 +50,7 @@ /** * Represents the value 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") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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) 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 7904438..9599957 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 cdb13b2..90f4c60 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 bd91e7e..84e738a 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 b69ae59..595160a 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 ed19b40..1912c7e 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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/WebhookNotification.java b/src/main/java/com/configcat/publicapi/java/client/model/WebhookNotification.java new file mode 100644 index 0000000..36404c9 --- /dev/null +++ b/src/main/java/com/configcat/publicapi/java/client/model/WebhookNotification.java @@ -0,0 +1,355 @@ +/* + * 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; + +/** + * The webhook notification settings, including the proxy URL and signing keys. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") +public class WebhookNotification { + public static final String SERIALIZED_NAME_WEBHOOK_PROXY_URL = "webhookProxyUrl"; + @SerializedName(SERIALIZED_NAME_WEBHOOK_PROXY_URL) + private String webhookProxyUrl; + + public static final String SERIALIZED_NAME_SIGNING_KEY1 = "signingKey1"; + @SerializedName(SERIALIZED_NAME_SIGNING_KEY1) + private String signingKey1; + + public static final String SERIALIZED_NAME_SIGNING_KEY2 = "signingKey2"; + @SerializedName(SERIALIZED_NAME_SIGNING_KEY2) + private String signingKey2; + + public WebhookNotification() { + } + + public WebhookNotification webhookProxyUrl(String webhookProxyUrl) { + this.webhookProxyUrl = webhookProxyUrl; + return this; + } + + /** + * The webhook proxy URL for receiving config JSON change notifications. + * @return webhookProxyUrl + */ + @javax.annotation.Nonnull + public String getWebhookProxyUrl() { + return webhookProxyUrl; + } + + public void setWebhookProxyUrl(String webhookProxyUrl) { + this.webhookProxyUrl = webhookProxyUrl; + } + + + public WebhookNotification signingKey1(String signingKey1) { + this.signingKey1 = signingKey1; + return this; + } + + /** + * The primary signing key used for verifying the authenticity of webhook requests. + * @return signingKey1 + */ + @javax.annotation.Nonnull + public String getSigningKey1() { + return signingKey1; + } + + public void setSigningKey1(String signingKey1) { + this.signingKey1 = signingKey1; + } + + + public WebhookNotification signingKey2(String signingKey2) { + this.signingKey2 = signingKey2; + return this; + } + + /** + * The secondary signing key used for verifying the authenticity of webhook requests. + * @return signingKey2 + */ + @javax.annotation.Nullable + public String getSigningKey2() { + return signingKey2; + } + + public void setSigningKey2(String signingKey2) { + this.signingKey2 = signingKey2; + } + + /** + * 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 WebhookNotification instance itself + */ + public WebhookNotification 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; + } + WebhookNotification webhookNotification = (WebhookNotification) o; + return Objects.equals(this.webhookProxyUrl, webhookNotification.webhookProxyUrl) && + Objects.equals(this.signingKey1, webhookNotification.signingKey1) && + Objects.equals(this.signingKey2, webhookNotification.signingKey2)&& + Objects.equals(this.additionalProperties, webhookNotification.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(webhookProxyUrl, signingKey1, signingKey2, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookNotification {\n"); + sb.append(" webhookProxyUrl: ").append(toIndentedString(webhookProxyUrl)).append("\n"); + sb.append(" signingKey1: ").append(toIndentedString(signingKey1)).append("\n"); + sb.append(" signingKey2: ").append(toIndentedString(signingKey2)).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("webhookProxyUrl"); + openapiFields.add("signingKey1"); + openapiFields.add("signingKey2"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("webhookProxyUrl"); + openapiRequiredFields.add("signingKey1"); + openapiRequiredFields.add("signingKey2"); + } + + /** + * 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 WebhookNotification + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookNotification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookNotification is not found in the empty JSON string", WebhookNotification.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookNotification.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("webhookProxyUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `webhookProxyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webhookProxyUrl").toString())); + } + if (!jsonObj.get("signingKey1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signingKey1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signingKey1").toString())); + } + if ((jsonObj.get("signingKey2") != null && !jsonObj.get("signingKey2").isJsonNull()) && !jsonObj.get("signingKey2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signingKey2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signingKey2").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookNotification' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(WebhookNotification.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookNotification 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 WebhookNotification read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookNotification 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 WebhookNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookNotification + * @throws IOException if the JSON string is invalid with respect to WebhookNotification + */ + public static WebhookNotification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookNotification.class); + } + + /** + * Convert an instance of WebhookNotification 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/WebhookResponseModel.java b/src/main/java/com/configcat/publicapi/java/client/model/WebhookResponseModel.java index abf1b37..7a83c9c 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[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 cd78a4e..942f790 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-11-07T15:32:06.171915713Z[Etc/UTC]", comments = "Generator version: 7.7.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-11-14T09:20:16.892643418Z[Etc/UTC]", comments = "Generator version: 7.7.0") public class WebhookSigningKeysModel { public static final String SERIALIZED_NAME_KEY1 = "key1"; @SerializedName(SERIALIZED_NAME_KEY1) From 0a41f5f24e354707ab630e98571aed58d5a0d7ea Mon Sep 17 00:00:00 2001 From: novalisdenahi Date: Fri, 14 Nov 2025 10:23:01 +0100 Subject: [PATCH 2/2] Update version to 2.1.1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 731682e..9b0535a 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ plugins { } group = 'com.configcat' -version = '2.1.0' +version = '2.1.1' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8