From c41d3d1e51aef83b40c95cfaa90541e90caf34a9 Mon Sep 17 00:00:00 2001 From: Mouaad Aallam Date: Tue, 1 Aug 2023 14:26:27 +0200 Subject: [PATCH] refactor(java): normalize client repo structure (#1854) --- .github/actions/restore-artifacts/action.yml | 2 +- clients/README.md | 2 +- .../.openapi-generator-ignore | 25 - .../java/com/algolia/api/AbtestingClient.java | 971 --- .../java/com/algolia/api/AnalyticsClient.java | 3951 ---------- .../java/com/algolia/api/InsightsClient.java | 627 -- .../com/algolia/api/MonitoringClient.java | 1131 --- .../algolia/api/PersonalizationClient.java | 851 -- .../java/com/algolia/api/PredictClient.java | 1721 ----- .../algolia/api/QuerySuggestionsClient.java | 1012 --- .../java/com/algolia/api/RecommendClient.java | 1101 --- .../java/com/algolia/api/SearchClient.java | 6868 ----------------- .../com/algolia/model/abtesting/ABTest.java | 216 - .../model/abtesting/ABTestResponse.java | 109 - .../model/abtesting/AbTestsVariant.java | 107 - .../abtesting/AbTestsVariantSearchParams.java | 127 - .../model/abtesting/AddABTestsRequest.java | 114 - .../model/abtesting/AddABTestsVariant.java | 125 - .../model/abtesting/CustomSearchParams.java | 69 - .../algolia/model/abtesting/ErrorBase.java | 81 - .../model/abtesting/ListABTestsResponse.java | 114 - .../com/algolia/model/abtesting/Variant.java | 353 - .../model/analytics/AverageClickEvent.java | 107 - .../model/analytics/ClickPosition.java | 93 - .../analytics/ClickThroughRateEvent.java | 130 - .../model/analytics/ConversionRateEvent.java | 130 - .../algolia/model/analytics/Direction.java | 41 - .../algolia/model/analytics/ErrorBase.java | 81 - .../GetAverageClickPositionResponse.java | 114 - .../analytics/GetClickPositionsResponse.java | 72 - .../GetClickThroughRateResponse.java | 137 - .../GetConversationRateResponse.java | 137 - .../analytics/GetNoClickRateResponse.java | 136 - .../analytics/GetNoResultsRateResponse.java | 136 - .../analytics/GetSearchesCountResponse.java | 91 - .../GetSearchesNoClicksResponse.java | 72 - .../GetSearchesNoResultsResponse.java | 72 - .../model/analytics/GetStatusResponse.java | 65 - .../analytics/GetTopCountriesResponse.java | 72 - .../analytics/GetTopFilterAttribute.java | 84 - .../GetTopFilterAttributesResponse.java | 72 - .../analytics/GetTopFilterForAttribute.java | 127 - .../GetTopFilterForAttributeResponse.java | 72 - .../GetTopFiltersNoResultsResponse.java | 72 - .../GetTopFiltersNoResultsValue.java | 107 - .../GetTopFiltersNoResultsValues.java | 93 - .../model/analytics/GetTopHitsResponse.java | 125 - .../analytics/GetTopSearchesResponse.java | 127 - .../analytics/GetUsersCountResponse.java | 91 - .../model/analytics/NoClickRateEvent.java | 129 - .../model/analytics/NoResultsRateEvent.java | 129 - .../com/algolia/model/analytics/OrderBy.java | 48 - .../algolia/model/analytics/SearchEvent.java | 84 - .../model/analytics/SearchNoClickEvent.java | 107 - .../model/analytics/SearchNoResultEvent.java | 107 - .../algolia/model/analytics/TopCountry.java | 84 - .../com/algolia/model/analytics/TopHit.java | 84 - .../model/analytics/TopHitWithAnalytics.java | 191 - .../model/analytics/TopHitsResponse.java | 72 - .../TopHitsResponseWithAnalytics.java | 72 - .../algolia/model/analytics/TopSearch.java | 107 - .../analytics/TopSearchWithAnalytics.java | 243 - .../model/analytics/TopSearchesResponse.java | 72 - .../TopSearchesResponseWithAnalytics.java | 72 - .../algolia/model/analytics/UserWithDate.java | 84 - .../algolia/model/insights/ClickEvent.java | 39 - .../model/insights/ClickedFilters.java | 179 - .../model/insights/ClickedObjectIDs.java | 183 - .../insights/ClickedObjectIDsAfterSearch.java | 230 - .../model/insights/ConversionEvent.java | 39 - .../model/insights/ConvertedFilters.java | 179 - .../model/insights/ConvertedObjectIDs.java | 184 - .../ConvertedObjectIDsAfterSearch.java | 206 - .../com/algolia/model/insights/ErrorBase.java | 81 - .../algolia/model/insights/EventsItems.java | 302 - .../model/insights/EventsResponse.java | 84 - .../model/insights/InsightsEvents.java | 75 - .../com/algolia/model/insights/ViewEvent.java | 39 - .../algolia/model/insights/ViewedFilters.java | 182 - .../model/insights/ViewedObjectIDs.java | 179 - .../algolia/model/monitoring/ErrorBase.java | 81 - .../monitoring/GetInventory403Response.java | 65 - .../algolia/model/monitoring/Incident.java | 84 - .../model/monitoring/IncidentsInner.java | 84 - .../model/monitoring/IncidentsResponse.java | 76 - .../monitoring/IndexingTimeResponse.java | 65 - .../IndexingTimeResponseMetrics.java | 76 - .../monitoring/InfrastructureResponse.java | 65 - .../InfrastructureResponseMetrics.java | 191 - .../model/monitoring/InventoryResponse.java | 75 - .../model/monitoring/LatencyResponse.java | 65 - .../monitoring/LatencyResponseMetrics.java | 76 - .../com/algolia/model/monitoring/Metric.java | 49 - .../com/algolia/model/monitoring/Period.java | 47 - .../model/monitoring/ProbesMetric.java | 84 - .../com/algolia/model/monitoring/Region.java | 67 - .../com/algolia/model/monitoring/Server.java | 190 - .../model/monitoring/ServerStatus.java | 39 - .../com/algolia/model/monitoring/Status.java | 45 - .../model/monitoring/StatusResponse.java | 75 - .../algolia/model/monitoring/TimeInner.java | 84 - .../com/algolia/model/monitoring/Type.java | 39 - .../DeleteUserProfileResponse.java | 88 - .../model/personalization/ErrorBase.java | 81 - .../model/personalization/EventScoring.java | 107 - .../model/personalization/FacetScoring.java | 84 - .../personalization/GetUserTokenResponse.java | 107 - .../PersonalizationStrategyParams.java | 120 - .../SetPersonalizationStrategyResponse.java | 65 - .../ActivateModelInstanceResponse.java | 87 - .../model/predict/ActivateModelParams.java | 185 - .../com/algolia/model/predict/Affinity.java | 107 - .../com/algolia/model/predict/AllParams.java | 104 - .../model/predict/AllUpdateSegmentParams.java | 84 - .../model/predict/CompatibleSources.java | 39 - .../model/predict/CreateSegmentParams.java | 84 - .../model/predict/CreateSegmentResponse.java | 86 - .../predict/DeleteModelInstanceResponse.java | 87 - .../model/predict/DeleteSegmentResponse.java | 87 - .../predict/DeleteUserProfileResponse.java | 86 - .../java/com/algolia/model/predict/Error.java | 65 - .../com/algolia/model/predict/ErrorBase.java | 81 - .../predict/FetchAllUserProfilesParams.java | 319 - .../predict/FetchAllUserProfilesResponse.java | 120 - .../algolia/model/predict/FunnelStage.java | 84 - .../GetAvailableModelTypesResponseInner.java | 134 - ...delTypesResponseInnerDataRequirements.java | 88 - .../predict/GetModelInstanceConfigStatus.java | 51 - .../predict/GetModelMetricsResponse.java | 91 - .../predict/GetSegmentUsersResponse.java | 140 - .../com/algolia/model/predict/LimitParam.java | 65 - .../model/predict/ModelAttributes.java | 94 - .../algolia/model/predict/ModelInstance.java | 297 - .../algolia/model/predict/ModelMetrics.java | 167 - .../algolia/model/predict/ModelStatus.java | 45 - .../model/predict/ModelsToRetrieve.java | 43 - .../model/predict/ModelsToRetrieveParam.java | 75 - .../model/predict/NextPageTokenParam.java | 68 - .../com/algolia/model/predict/Params.java | 204 - .../algolia/model/predict/Predictions.java | 107 - .../model/predict/PredictionsAffinities.java | 169 - .../predict/PredictionsAffinitiesSuccess.java | 94 - .../model/predict/PredictionsFunnelStage.java | 171 - .../PredictionsFunnelStageSuccess.java | 94 - .../model/predict/PredictionsOrderValue.java | 169 - .../predict/PredictionsOrderValueSuccess.java | 87 - .../model/predict/PreviousPageTokenParam.java | 68 - .../com/algolia/model/predict/Properties.java | 107 - .../com/algolia/model/predict/Segment.java | 167 - .../model/predict/SegmentConditionsParam.java | 65 - .../model/predict/SegmentNameParam.java | 65 - .../algolia/model/predict/SegmentStatus.java | 43 - .../algolia/model/predict/SegmentType.java | 41 - .../com/algolia/model/predict/Segments.java | 96 - .../model/predict/TypesToRetrieve.java | 41 - .../model/predict/TypesToRetrieveParam.java | 75 - .../predict/UpdateModelInstanceResponse.java | 87 - .../model/predict/UpdateModelParams.java | 145 - .../model/predict/UpdateSegmentParams.java | 219 - .../model/predict/UpdateSegmentResponse.java | 86 - .../algolia/model/predict/UserProfile.java | 127 - .../model/querysuggestions/BaseResponse.java | 84 - .../model/querysuggestions/ErrorBase.java | 81 - .../algolia/model/querysuggestions/Facet.java | 84 - .../GetConfigStatus200Response.java | 149 - .../GetLogFile200Response.java | 129 - .../model/querysuggestions/Languages.java | 126 - .../model/querysuggestions/LogLevel.java | 47 - .../QuerySuggestionsConfiguration.java | 162 - ...QuerySuggestionsConfigurationResponse.java | 273 - ...SuggestionsConfigurationResponseAllOf.java | 127 - ...uerySuggestionsConfigurationWithIndex.java | 182 - ...uggestionsConfigurationWithIndexAllOf.java | 66 - .../model/querysuggestions/SourceIndex.java | 251 - .../recommend/AdvancedSyntaxFeatures.java | 41 - .../model/recommend/AlternativesAsExact.java | 43 - .../algolia/model/recommend/Anchoring.java | 48 - .../algolia/model/recommend/AroundRadius.java | 126 - .../model/recommend/AroundRadiusAll.java | 39 - .../model/recommend/AutomaticFacetFilter.java | 107 - .../recommend/AutomaticFacetFilters.java | 129 - .../model/recommend/BaseRecommendRequest.java | 149 - .../recommend/BaseRecommendationRequest.java | 84 - .../model/recommend/BaseSearchParams.java | 854 -- .../BaseSearchParamsWithoutQuery.java | 833 -- .../model/recommend/BaseSearchResponse.java | 616 -- .../recommend/BaseSearchResponseRedirect.java | 78 - .../model/recommend/BaseTrendingRequest.java | 107 - .../algolia/model/recommend/Condition.java | 127 - .../algolia/model/recommend/Consequence.java | 171 - .../model/recommend/ConsequenceHide.java | 65 - .../model/recommend/ConsequenceParams.java | 2005 ----- .../model/recommend/ConsequenceQuery.java | 128 - .../recommend/ConsequenceQueryObject.java | 102 - .../model/recommend/DeletedAtResponse.java | 86 - .../com/algolia/model/recommend/Distinct.java | 125 - .../com/algolia/model/recommend/Edit.java | 103 - .../com/algolia/model/recommend/EditType.java | 41 - .../algolia/model/recommend/ErrorBase.java | 81 - .../recommend/ExactOnSingleWordQuery.java | 47 - .../algolia/model/recommend/FacetFilters.java | 128 - .../model/recommend/FacetOrdering.java | 94 - .../com/algolia/model/recommend/Facets.java | 75 - .../algolia/model/recommend/FacetsStats.java | 127 - .../recommend/GetRecommendTaskResponse.java | 65 - .../recommend/GetRecommendationsParams.java | 72 - .../recommend/GetRecommendationsResponse.java | 75 - .../model/recommend/HighlightResult.java | 126 - .../recommend/HighlightResultOption.java | 134 - .../model/recommend/IgnorePlurals.java | 134 - .../IndexSettingsAsSearchParams.java | 1159 --- ...xSettingsAsSearchParamsSemanticSearch.java | 78 - .../algolia/model/recommend/MatchLevel.java | 43 - .../model/recommend/MatchedGeoLocation.java | 107 - .../model/recommend/MixedSearchFilters.java | 124 - .../com/algolia/model/recommend/Mode.java | 41 - .../model/recommend/NumericFilters.java | 129 - .../model/recommend/OptionalFilters.java | 131 - .../com/algolia/model/recommend/Params.java | 127 - .../model/recommend/Personalization.java | 107 - .../com/algolia/model/recommend/Promote.java | 122 - .../model/recommend/PromoteObjectID.java | 86 - .../model/recommend/PromoteObjectIDs.java | 93 - .../algolia/model/recommend/QueryType.java | 46 - .../algolia/model/recommend/RankingInfo.java | 323 - .../model/recommend/ReRankingApplyFilter.java | 129 - .../algolia/model/recommend/RecommendHit.java | 201 - .../model/recommend/RecommendHits.java | 72 - .../model/recommend/RecommendModels.java | 45 - .../model/recommend/RecommendationModels.java | 41 - .../recommend/RecommendationRequest.java | 189 - .../recommend/RecommendationsRequest.java | 123 - .../recommend/RecommendationsResponse.java | 644 -- .../recommend/RedirectRuleIndexMetadata.java | 147 - .../RedirectRuleIndexMetadataData.java | 65 - .../model/recommend/RemoveStopWords.java | 133 - .../recommend/RemoveWordsIfNoResults.java | 49 - .../model/recommend/RenderingContent.java | 70 - .../algolia/model/recommend/RuleResponse.java | 178 - .../model/recommend/RuleResponseMetadata.java | 65 - .../model/recommend/SearchParamsObject.java | 1963 ----- .../model/recommend/SearchParamsQuery.java | 65 - .../recommend/SearchRecommendRulesParams.java | 178 - .../SearchRecommendRulesResponse.java | 134 - .../model/recommend/SnippetResult.java | 126 - .../model/recommend/SnippetResultOption.java | 87 - .../model/recommend/SortRemainingBy.java | 46 - .../algolia/model/recommend/TagFilters.java | 125 - .../algolia/model/recommend/TaskStatus.java | 41 - .../model/recommend/TrendingModels.java | 41 - .../model/recommend/TrendingRequest.java | 209 - .../model/recommend/TypoTolerance.java | 127 - .../model/recommend/TypoToleranceEnum.java | 41 - .../com/algolia/model/recommend/Value.java | 94 - .../java/com/algolia/model/search/Acl.java | 75 - .../java/com/algolia/model/search/Action.java | 51 - .../model/search/AddApiKeyResponse.java | 84 - .../model/search/AdvancedSyntaxFeatures.java | 41 - .../model/search/AlternativesAsExact.java | 43 - .../com/algolia/model/search/Anchoring.java | 48 - .../java/com/algolia/model/search/ApiKey.java | 253 - .../algolia/model/search/AroundRadius.java | 126 - .../algolia/model/search/AroundRadiusAll.java | 39 - .../model/search/AssignUserIdParams.java | 65 - .../model/search/AttributeToUpdate.java | 123 - .../model/search/AutomaticFacetFilter.java | 107 - .../model/search/AutomaticFacetFilters.java | 129 - .../model/search/BaseGetApiKeyResponse.java | 85 - .../model/search/BaseIndexSettings.java | 467 -- .../model/search/BaseSearchParams.java | 854 -- .../search/BaseSearchParamsWithoutQuery.java | 833 -- .../model/search/BaseSearchResponse.java | 616 -- .../search/BaseSearchResponseRedirect.java | 78 - .../search/BatchAssignUserIdsParams.java | 91 - .../search/BatchDictionaryEntriesParams.java | 95 - .../search/BatchDictionaryEntriesRequest.java | 86 - .../com/algolia/model/search/BatchParams.java | 72 - .../algolia/model/search/BatchRequest.java | 84 - .../algolia/model/search/BatchResponse.java | 93 - .../model/search/BatchWriteParams.java | 72 - .../algolia/model/search/BrowseParams.java | 122 - .../model/search/BrowseParamsObject.java | 1986 ----- .../algolia/model/search/BrowseResponse.java | 667 -- .../model/search/BuiltInOperation.java | 87 - .../model/search/BuiltInOperationType.java | 51 - .../com/algolia/model/search/Condition.java | 127 - .../com/algolia/model/search/Consequence.java | 171 - .../algolia/model/search/ConsequenceHide.java | 65 - .../model/search/ConsequenceParams.java | 2005 ----- .../model/search/ConsequenceQuery.java | 128 - .../model/search/ConsequenceQueryObject.java | 102 - .../model/search/CreatedAtResponse.java | 65 - .../java/com/algolia/model/search/Cursor.java | 67 - .../model/search/DeleteApiKeyResponse.java | 65 - .../algolia/model/search/DeleteByParams.java | 232 - .../model/search/DeleteSourceResponse.java | 65 - .../model/search/DeletedAtResponse.java | 86 - .../model/search/DictionaryAction.java | 41 - .../algolia/model/search/DictionaryEntry.java | 213 - .../model/search/DictionaryEntryState.java | 41 - .../model/search/DictionaryLanguage.java | 66 - .../search/DictionarySettingsParams.java | 65 - .../algolia/model/search/DictionaryType.java | 43 - .../com/algolia/model/search/Distinct.java | 125 - .../java/com/algolia/model/search/Edit.java | 103 - .../com/algolia/model/search/EditType.java | 41 - .../com/algolia/model/search/ErrorBase.java | 81 - .../model/search/ExactOnSingleWordQuery.java | 47 - .../algolia/model/search/FacetFilters.java | 128 - .../com/algolia/model/search/FacetHits.java | 109 - .../algolia/model/search/FacetOrdering.java | 94 - .../java/com/algolia/model/search/Facets.java | 75 - .../com/algolia/model/search/FacetsStats.java | 127 - .../algolia/model/search/FetchedIndex.java | 291 - .../model/search/GetApiKeyResponse.java | 305 - .../search/GetDictionarySettingsResponse.java | 65 - .../algolia/model/search/GetLogsResponse.java | 72 - .../model/search/GetObjectsParams.java | 72 - .../model/search/GetObjectsRequest.java | 117 - .../model/search/GetObjectsResponse.java | 72 - .../algolia/model/search/GetTaskResponse.java | 65 - .../model/search/GetTopUserIdsResponse.java | 74 - .../search/HasPendingMappingsResponse.java | 97 - .../algolia/model/search/HighlightResult.java | 126 - .../model/search/HighlightResultOption.java | 134 - .../java/com/algolia/model/search/Hit.java | 181 - .../algolia/model/search/IgnorePlurals.java | 134 - .../algolia/model/search/IndexSettings.java | 1576 ---- .../search/IndexSettingsAsSearchParams.java | 1159 --- ...xSettingsAsSearchParamsSemanticSearch.java | 78 - .../com/algolia/model/search/Languages.java | 107 - .../model/search/ListApiKeysResponse.java | 72 - .../model/search/ListClustersResponse.java | 73 - .../model/search/ListIndicesResponse.java | 91 - .../model/search/ListUserIdsResponse.java | 72 - .../java/com/algolia/model/search/Log.java | 373 - .../com/algolia/model/search/LogQuery.java | 107 - .../com/algolia/model/search/LogType.java | 45 - .../com/algolia/model/search/MatchLevel.java | 43 - .../model/search/MatchedGeoLocation.java | 107 - .../model/search/MixedSearchFilters.java | 124 - .../java/com/algolia/model/search/Mode.java | 41 - .../model/search/MultipleBatchRequest.java | 107 - .../model/search/MultipleBatchResponse.java | 98 - .../algolia/model/search/NumericFilters.java | 129 - .../model/search/OperationIndexParams.java | 119 - .../algolia/model/search/OperationType.java | 41 - .../algolia/model/search/OptionalFilters.java | 131 - .../java/com/algolia/model/search/Params.java | 127 - .../algolia/model/search/Personalization.java | 107 - .../com/algolia/model/search/Promote.java | 122 - .../algolia/model/search/PromoteObjectID.java | 86 - .../model/search/PromoteObjectIDs.java | 93 - .../com/algolia/model/search/QueryType.java | 46 - .../com/algolia/model/search/RankingInfo.java | 323 - .../model/search/ReRankingApplyFilter.java | 129 - .../search/RedirectRuleIndexMetadata.java | 147 - .../search/RedirectRuleIndexMetadataData.java | 65 - .../algolia/model/search/RemoveStopWords.java | 133 - .../model/search/RemoveUserIdResponse.java | 65 - .../model/search/RemoveWordsIfNoResults.java | 49 - .../model/search/RenderingContent.java | 70 - .../model/search/ReplaceSourceResponse.java | 65 - .../java/com/algolia/model/search/Rule.java | 187 - .../model/search/SaveObjectResponse.java | 109 - .../model/search/SaveSynonymResponse.java | 109 - .../com/algolia/model/search/ScopeType.java | 43 - .../search/SearchDictionaryEntriesParams.java | 128 - .../search/SearchForFacetValuesRequest.java | 109 - .../search/SearchForFacetValuesResponse.java | 72 - .../algolia/model/search/SearchForFacets.java | 2068 ----- .../model/search/SearchForFacetsOptions.java | 149 - .../algolia/model/search/SearchForHits.java | 2026 ----- .../model/search/SearchForHitsOptions.java | 84 - .../com/algolia/model/search/SearchHits.java | 72 - .../model/search/SearchMethodParams.java | 91 - .../algolia/model/search/SearchParams.java | 122 - .../model/search/SearchParamsObject.java | 1963 ----- .../model/search/SearchParamsQuery.java | 65 - .../model/search/SearchParamsString.java | 65 - .../com/algolia/model/search/SearchQuery.java | 122 - .../algolia/model/search/SearchResponse.java | 644 -- .../algolia/model/search/SearchResponses.java | 72 - .../algolia/model/search/SearchResult.java | 124 - .../model/search/SearchRulesParams.java | 198 - .../model/search/SearchRulesResponse.java | 134 - .../algolia/model/search/SearchStrategy.java | 44 - .../model/search/SearchSynonymsParams.java | 65 - .../model/search/SearchSynonymsResponse.java | 111 - .../model/search/SearchTypeDefault.java | 42 - .../algolia/model/search/SearchTypeFacet.java | 42 - .../model/search/SearchUserIdsParams.java | 129 - .../model/search/SearchUserIdsResponse.java | 154 - .../algolia/model/search/SnippetResult.java | 126 - .../model/search/SnippetResultOption.java | 87 - .../algolia/model/search/SortRemainingBy.java | 46 - .../java/com/algolia/model/search/Source.java | 84 - .../algolia/model/search/StandardEntries.java | 137 - .../com/algolia/model/search/SynonymHit.java | 238 - .../com/algolia/model/search/SynonymType.java | 47 - .../com/algolia/model/search/TagFilters.java | 125 - .../com/algolia/model/search/TaskStatus.java | 41 - .../com/algolia/model/search/TimeRange.java | 84 - .../algolia/model/search/TypoTolerance.java | 127 - .../model/search/TypoToleranceEnum.java | 41 - .../model/search/UpdateApiKeyResponse.java | 84 - .../model/search/UpdatedAtResponse.java | 86 - .../search/UpdatedAtWithObjectIdResponse.java | 109 - .../model/search/UpdatedRuleResponse.java | 109 - .../model/search/UserHighlightResult.java | 96 - .../com/algolia/model/search/UserHit.java | 167 - .../java/com/algolia/model/search/UserId.java | 127 - .../java/com/algolia/model/search/Value.java | 94 - .../gradle.properties | 5 - .../.github/workflows/release.yml | 0 .../.gitignore | 0 .../.java-version | 0 .../CHANGELOG.md | 116 +- .../algoliasearch}/build.gradle | 3 + .../algoliasearch}/gradle.properties | 0 .../src/main/java/com/algolia/ApiClient.java | 0 .../exceptions/AlgoliaApiException.java | 0 .../AlgoliaRetriesExceededException.java | 0 .../exceptions/AlgoliaRetryException.java | 0 .../exceptions/AlgoliaRuntimeException.java | 0 .../algolia/exceptions/LaunderThrowable.java | 0 .../java/com/algolia/utils/AlgoliaAgent.java | 0 .../algolia/utils/AlgoliaIterableHelper.java | 0 .../com/algolia/utils/ApiKeyOperation.java | 0 .../java/com/algolia/utils/ClientOptions.java | 0 .../java/com/algolia/utils/CompoundType.java | 0 .../main/java/com/algolia/utils/Holder.java | 0 .../java/com/algolia/utils/HttpRequester.java | 0 .../java/com/algolia/utils/JSONBuilder.java | 0 .../main/java/com/algolia/utils/LogLevel.java | 0 .../com/algolia/utils/RequestOptions.java | 0 .../java/com/algolia/utils/Requester.java | 0 .../java/com/algolia/utils/TaskUtils.java | 0 .../com/algolia/utils/UseReadTransporter.java | 0 .../main/java/com/algolia/utils/Utils.java | 0 .../com/algolia/utils/retry/CallType.java | 0 .../algolia/utils/retry/RetryStrategy.java | 0 .../com/algolia/utils/retry/StatefulHost.java | 0 .../api/build.gradle | 2 +- .../build.gradle | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradlew | 0 .../settings.gradle | 2 +- config/clients.config.json | 8 +- config/generation.config.mjs | 8 +- config/openapitools.json | 16 +- .../algolia/codegen/AlgoliaJavaGenerator.java | 19 +- playground/java/settings.gradle | 4 +- scripts/husky/__tests__/pre-commit.test.mjs | 18 +- tests/output/java/settings.gradle | 4 +- website/docs/clients/introduction.md | 2 +- website/docs/contributing/release-process.md | 10 +- 458 files changed, 102 insertions(+), 83271 deletions(-) delete mode 100644 clients/algoliasearch-client-java-2/.openapi-generator-ignore delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AbtestingClient.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AnalyticsClient.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/InsightsClient.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/MonitoringClient.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PersonalizationClient.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PredictClient.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/QuerySuggestionsClient.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/RecommendClient.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ABTest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ABTestResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AbTestsVariant.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AbTestsVariantSearchParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AddABTestsRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AddABTestsVariant.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/CustomSearchParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ErrorBase.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ListABTestsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/Variant.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/AverageClickEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ClickPosition.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ClickThroughRateEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ConversionRateEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/Direction.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ErrorBase.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetAverageClickPositionResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetClickThroughRateResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetConversationRateResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetNoClickRateResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetNoResultsRateResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesCountResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesNoClicksResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesNoResultsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetStatusResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopCountriesResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterAttribute.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterAttributesResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterForAttribute.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterForAttributeResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsValue.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsValues.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopHitsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopSearchesResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetUsersCountResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/NoClickRateEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/NoResultsRateEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/OrderBy.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchNoClickEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchNoResultEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopCountry.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHit.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitWithAnalytics.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitsResponseWithAnalytics.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearch.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchesResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchesResponseWithAnalytics.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/UserWithDate.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedObjectIDs.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedObjectIDsAfterSearch.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConversionEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedObjectIDs.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedObjectIDsAfterSearch.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ErrorBase.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/EventsItems.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/EventsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/InsightsEvents.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewEvent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewedFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewedObjectIDs.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ErrorBase.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/GetInventory403Response.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Incident.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IncidentsInner.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InventoryResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/LatencyResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Metric.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Period.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ProbesMetric.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Region.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Server.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ServerStatus.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Status.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/StatusResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/TimeInner.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Type.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/DeleteUserProfileResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/ErrorBase.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/EventScoring.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/FacetScoring.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/GetUserTokenResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/PersonalizationStrategyParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/SetPersonalizationStrategyResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ActivateModelInstanceResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ActivateModelParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Affinity.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/AllParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/AllUpdateSegmentParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CompatibleSources.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CreateSegmentParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CreateSegmentResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteModelInstanceResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteSegmentResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteUserProfileResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Error.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ErrorBase.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FetchAllUserProfilesParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FetchAllUserProfilesResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FunnelStage.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetAvailableModelTypesResponseInner.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetAvailableModelTypesResponseInnerDataRequirements.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetModelInstanceConfigStatus.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetModelMetricsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetSegmentUsersResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/LimitParam.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelAttributes.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelInstance.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelMetrics.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelStatus.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelsToRetrieve.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelsToRetrieveParam.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/NextPageTokenParam.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Params.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Predictions.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsAffinities.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsAffinitiesSuccess.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsFunnelStage.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsFunnelStageSuccess.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsOrderValue.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsOrderValueSuccess.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PreviousPageTokenParam.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Properties.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Segment.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentConditionsParam.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentNameParam.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentStatus.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Segments.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/TypesToRetrieve.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/TypesToRetrieveParam.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateModelInstanceResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateModelParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateSegmentParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateSegmentResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UserProfile.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/BaseResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/ErrorBase.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/Facet.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/Languages.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/LogLevel.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfiguration.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationResponseAllOf.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationWithIndex.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationWithIndexAllOf.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/SourceIndex.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AdvancedSyntaxFeatures.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AlternativesAsExact.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Anchoring.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AroundRadius.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AroundRadiusAll.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AutomaticFacetFilter.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AutomaticFacetFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseRecommendRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseRecommendationRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchParamsWithoutQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchResponseRedirect.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseTrendingRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Condition.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Consequence.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceHide.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceQueryObject.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/DeletedAtResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Distinct.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Edit.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/EditType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ErrorBase.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ExactOnSingleWordQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetOrdering.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Facets.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetsStats.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendTaskResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendationsParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendationsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/HighlightResult.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/HighlightResultOption.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IgnorePlurals.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParamsSemanticSearch.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MatchLevel.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MatchedGeoLocation.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MixedSearchFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Mode.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/NumericFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/OptionalFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Params.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Personalization.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Promote.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/PromoteObjectID.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/PromoteObjectIDs.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/QueryType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RankingInfo.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ReRankingApplyFilter.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendHit.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendHits.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendModels.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationModels.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationsRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RemoveStopWords.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RemoveWordsIfNoResults.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RenderingContent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RuleResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RuleResponseMetadata.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchParamsObject.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchParamsQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchRecommendRulesParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchRecommendRulesResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SnippetResult.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SnippetResultOption.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SortRemainingBy.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TagFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TaskStatus.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TrendingModels.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TrendingRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TypoTolerance.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TypoToleranceEnum.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Value.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Acl.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Action.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AddApiKeyResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AdvancedSyntaxFeatures.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AlternativesAsExact.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Anchoring.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ApiKey.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AroundRadius.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AroundRadiusAll.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AssignUserIdParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AttributeToUpdate.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AutomaticFacetFilter.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AutomaticFacetFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseGetApiKeyResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseIndexSettings.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchParamsWithoutQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchResponseRedirect.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchAssignUserIdsParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchDictionaryEntriesParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchDictionaryEntriesRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchWriteParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseParamsObject.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BuiltInOperation.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BuiltInOperationType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Condition.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Consequence.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceHide.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceQueryObject.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/CreatedAtResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Cursor.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteApiKeyResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteByParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteSourceResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeletedAtResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryAction.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryEntry.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryEntryState.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryLanguage.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionarySettingsParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Distinct.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Edit.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/EditType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ErrorBase.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ExactOnSingleWordQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetHits.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetOrdering.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Facets.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetsStats.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FetchedIndex.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetApiKeyResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetDictionarySettingsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetLogsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetTaskResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetTopUserIdsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HasPendingMappingsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HighlightResult.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HighlightResultOption.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Hit.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IgnorePlurals.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettings.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParamsSemanticSearch.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Languages.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListApiKeysResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListClustersResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListIndicesResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListUserIdsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Log.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/LogQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/LogType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MatchLevel.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MatchedGeoLocation.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MixedSearchFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Mode.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MultipleBatchRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MultipleBatchResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/NumericFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OperationIndexParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OperationType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OptionalFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Params.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Personalization.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Promote.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/PromoteObjectID.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/PromoteObjectIDs.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/QueryType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RankingInfo.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ReRankingApplyFilter.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveStopWords.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveUserIdResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveWordsIfNoResults.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RenderingContent.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ReplaceSourceResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Rule.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveObjectResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveSynonymResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ScopeType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchDictionaryEntriesParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetValuesRequest.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetValuesResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacets.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetsOptions.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForHits.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForHitsOptions.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchHits.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchMethodParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsObject.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsString.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchQuery.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResponses.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResult.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchRulesParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchRulesResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchStrategy.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchSynonymsParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchSynonymsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchTypeDefault.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchTypeFacet.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchUserIdsParams.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchUserIdsResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SnippetResult.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SnippetResultOption.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SortRemainingBy.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Source.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/StandardEntries.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SynonymHit.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SynonymType.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TagFilters.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TaskStatus.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TimeRange.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TypoTolerance.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TypoToleranceEnum.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdateApiKeyResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtWithObjectIdResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedRuleResponse.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserHighlightResult.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserHit.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserId.java delete mode 100644 clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Value.java delete mode 100644 clients/algoliasearch-client-java-2/gradle.properties rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/.github/workflows/release.yml (100%) rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/.gitignore (100%) rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/.java-version (100%) rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/CHANGELOG.md (94%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/build.gradle (92%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/gradle.properties (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/ApiClient.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/exceptions/AlgoliaApiException.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/exceptions/AlgoliaRetriesExceededException.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/exceptions/AlgoliaRuntimeException.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/exceptions/LaunderThrowable.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/AlgoliaAgent.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/AlgoliaIterableHelper.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/ApiKeyOperation.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/ClientOptions.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/CompoundType.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/Holder.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/HttpRequester.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/JSONBuilder.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/LogLevel.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/RequestOptions.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/Requester.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/TaskUtils.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/UseReadTransporter.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/Utils.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/retry/CallType.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/retry/RetryStrategy.java (100%) rename clients/{algoliasearch-client-java-2/algoliasearch-core => algoliasearch-client-java/algoliasearch}/src/main/java/com/algolia/utils/retry/StatefulHost.java (100%) rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/api/build.gradle (96%) rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/build.gradle (100%) rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/gradle/wrapper/gradle-wrapper.jar (100%) rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/gradle/wrapper/gradle-wrapper.properties (100%) rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/gradlew (100%) rename clients/{algoliasearch-client-java-2 => algoliasearch-client-java}/settings.gradle (78%) diff --git a/.github/actions/restore-artifacts/action.yml b/.github/actions/restore-artifacts/action.yml index 1c57f2dbfb..3d81508970 100644 --- a/.github/actions/restore-artifacts/action.yml +++ b/.github/actions/restore-artifacts/action.yml @@ -78,7 +78,7 @@ runs: if: ${{ inputs.java == 'true' && inputs.type == 'all' }} shell: bash run: | - rm -rf clients/algoliasearch-client-java-2 + rm -rf clients/algoliasearch-client-java unzip -q -o clients-java.zip && rm clients-java.zip # Go - name: Download clients-go artifact diff --git a/clients/README.md b/clients/README.md index d7c6bd826a..8cbbd88077 100644 --- a/clients/README.md +++ b/clients/README.md @@ -8,7 +8,7 @@ This folder hosts the generated clients. ### Java -- [algoliasearch-client-java-2](./algoliasearch-client-java-2/): The Algolia search client. +- [algoliasearch-client-java](./algoliasearch-client-java/): The Algolia search client. ### JavaScript diff --git a/clients/algoliasearch-client-java-2/.openapi-generator-ignore b/clients/algoliasearch-client-java-2/.openapi-generator-ignore deleted file mode 100644 index a7dc62ea7d..0000000000 --- a/clients/algoliasearch-client-java-2/.openapi-generator-ignore +++ /dev/null @@ -1,25 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -api/** -docs/** -src/** -gradle/** -README.md - -.travis.yml -build.sbt -git_push.sh -pom.xml -gradlew.bat - -# Selective source file -algoliasearch-core/src/main/java/com/algolia/auth/** -algoliasearch-core/src/main/java/com/algolia/ApiException.java -algoliasearch-core/src/main/java/com/algolia/Configuration.java -algoliasearch-core/src/main/java/com/algolia/Server*.java -algoliasearch-core/src/main/java/com/algolia/StringUtil.java -algoliasearch-core/src/main/java/com/algolia/GzipRequestInterceptor.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AbtestingClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AbtestingClient.java deleted file mode 100644 index c9ff378303..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AbtestingClient.java +++ /dev/null @@ -1,971 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.api; - -import com.algolia.ApiClient; -import com.algolia.exceptions.*; -import com.algolia.model.abtesting.*; -import com.algolia.utils.*; -import com.algolia.utils.retry.CallType; -import com.algolia.utils.retry.StatefulHost; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import okhttp3.Call; - -public class AbtestingClient extends ApiClient { - - private static final String[] allowedRegions = { "de", "us" }; - - public AbtestingClient(String appId, String apiKey) { - this(appId, apiKey, null, null); - } - - public AbtestingClient(String appId, String apiKey, ClientOptions options) { - this(appId, apiKey, null, options); - } - - public AbtestingClient(String appId, String apiKey, String region) { - this(appId, apiKey, region, null); - } - - public AbtestingClient(String appId, String apiKey, String region, ClientOptions options) { - super(appId, apiKey, "Abtesting", "4.0.0-SNAPSHOT", options); - if (options != null && options.getHosts() != null) { - this.setHosts(options.getHosts()); - } else { - this.setHosts(getDefaultHosts(region)); - } - this.setConnectTimeout(2000); - this.setReadTimeout(5000); - this.setWriteTimeout(30000); - } - - private static List getDefaultHosts(String region) throws AlgoliaRuntimeException { - List hosts = new ArrayList(); - - boolean found = region == null; - if (region != null) { - for (String allowed : allowedRegions) { - if (allowed.equals(region)) { - found = true; - break; - } - } - } - - if (!found) { - throw new AlgoliaRuntimeException("`region` must be one of the following: de, us"); - } - - String url = region == null ? "analytics.algolia.com" : "analytics.{region}.algolia.com".replace("{region}", region); - - hosts.add(new StatefulHost(url, "https", EnumSet.of(CallType.READ, CallType.WRITE))); - return hosts; - } - - /** - * Creates an A/B test. - * - * @param addABTestsRequest (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ABTestResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ABTestResponse addABTests(AddABTestsRequest addABTestsRequest, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(addABTestsAsync(addABTestsRequest, requestOptions)); - } - - /** - * Creates an A/B test. - * - * @param addABTestsRequest (required) - * @return ABTestResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ABTestResponse addABTests(AddABTestsRequest addABTestsRequest) throws AlgoliaRuntimeException { - return this.addABTests(addABTestsRequest, null); - } - - /** - * (asynchronously) Creates an A/B test. - * - * @param addABTestsRequest (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture addABTestsAsync(AddABTestsRequest addABTestsRequest, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (addABTestsRequest == null) { - throw new AlgoliaRuntimeException("Parameter `addABTestsRequest` is required when calling `addABTests`."); - } - - Object bodyObj = addABTestsRequest; - - // create path and map variables - String requestPath = "/2/abtests"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Creates an A/B test. - * - * @param addABTestsRequest (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture addABTestsAsync(AddABTestsRequest addABTestsRequest) throws AlgoliaRuntimeException { - return this.addABTestsAsync(addABTestsRequest, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(delAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters) throws AlgoliaRuntimeException { - return this.del(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.del(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path) throws AlgoliaRuntimeException { - return this.del(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `del`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.delAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.delAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path) throws AlgoliaRuntimeException { - return this.delAsync(path, null, null); - } - - /** - * Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` - * operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ABTestResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ABTestResponse deleteABTest(Integer id, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteABTestAsync(id, requestOptions)); - } - - /** - * Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` - * operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @return ABTestResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ABTestResponse deleteABTest(Integer id) throws AlgoliaRuntimeException { - return this.deleteABTest(id, null); - } - - /** - * (asynchronously) Delete an A/B test. To determine the `id` for an A/B test, use the - * [`listABTests` operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteABTestAsync(Integer id, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (id == null) { - throw new AlgoliaRuntimeException("Parameter `id` is required when calling `deleteABTest`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/abtests/{id}".replaceAll("\\{id\\}", this.escapeString(id.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete an A/B test. To determine the `id` for an A/B test, use the - * [`listABTests` operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteABTestAsync(Integer id) throws AlgoliaRuntimeException { - return this.deleteABTestAsync(id, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters) throws AlgoliaRuntimeException { - return this.get(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.get(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path) throws AlgoliaRuntimeException { - return this.get(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `get`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.getAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path) throws AlgoliaRuntimeException { - return this.getAsync(path, null, null); - } - - /** - * Get specific details for an A/B test. To determine the `id` for an A/B test, use the - * [`listABTests` operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ABTest - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ABTest getABTest(Integer id, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getABTestAsync(id, requestOptions)); - } - - /** - * Get specific details for an A/B test. To determine the `id` for an A/B test, use the - * [`listABTests` operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @return ABTest - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ABTest getABTest(Integer id) throws AlgoliaRuntimeException { - return this.getABTest(id, null); - } - - /** - * (asynchronously) Get specific details for an A/B test. To determine the `id` for an - * A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getABTestAsync(Integer id, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (id == null) { - throw new AlgoliaRuntimeException("Parameter `id` is required when calling `getABTest`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/abtests/{id}".replaceAll("\\{id\\}", this.escapeString(id.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get specific details for an A/B test. To determine the `id` for an - * A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getABTestAsync(Integer id) throws AlgoliaRuntimeException { - return this.getABTestAsync(id, null); - } - - /** - * List all A/B tests. - * - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param indexPrefix Only return A/B tests for indices starting with this prefix. (optional) - * @param indexSuffix Only return A/B tests for indices ending with this suffix. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ListABTestsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListABTestsResponse listABTests( - Integer offset, - Integer limit, - String indexPrefix, - String indexSuffix, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(listABTestsAsync(offset, limit, indexPrefix, indexSuffix, requestOptions)); - } - - /** - * List all A/B tests. - * - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param indexPrefix Only return A/B tests for indices starting with this prefix. (optional) - * @param indexSuffix Only return A/B tests for indices ending with this suffix. (optional) - * @return ListABTestsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListABTestsResponse listABTests(Integer offset, Integer limit, String indexPrefix, String indexSuffix) - throws AlgoliaRuntimeException { - return this.listABTests(offset, limit, indexPrefix, indexSuffix, null); - } - - /** - * List all A/B tests. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ListABTestsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListABTestsResponse listABTests(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.listABTests(null, null, null, null, requestOptions); - } - - /** - * List all A/B tests. - * - * @return ListABTestsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListABTestsResponse listABTests() throws AlgoliaRuntimeException { - return this.listABTests(null, null, null, null, null); - } - - /** - * (asynchronously) List all A/B tests. - * - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param indexPrefix Only return A/B tests for indices starting with this prefix. (optional) - * @param indexSuffix Only return A/B tests for indices ending with this suffix. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listABTestsAsync( - Integer offset, - Integer limit, - String indexPrefix, - String indexSuffix, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/abtests"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (limit != null) { - queryParameters.put("limit", parameterToString(limit)); - } - - if (indexPrefix != null) { - queryParameters.put("indexPrefix", parameterToString(indexPrefix)); - } - - if (indexSuffix != null) { - queryParameters.put("indexSuffix", parameterToString(indexSuffix)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List all A/B tests. - * - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param indexPrefix Only return A/B tests for indices starting with this prefix. (optional) - * @param indexSuffix Only return A/B tests for indices ending with this suffix. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listABTestsAsync(Integer offset, Integer limit, String indexPrefix, String indexSuffix) - throws AlgoliaRuntimeException { - return this.listABTestsAsync(offset, limit, indexPrefix, indexSuffix, null); - } - - /** - * (asynchronously) List all A/B tests. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listABTestsAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.listABTestsAsync(null, null, null, null, requestOptions); - } - - /** - * (asynchronously) List all A/B tests. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listABTestsAsync() throws AlgoliaRuntimeException { - return this.listABTestsAsync(null, null, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(postAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.post(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.post(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path) throws AlgoliaRuntimeException { - return this.post(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `post`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.postAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(putAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.put(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.put(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path) throws AlgoliaRuntimeException { - return this.put(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `put`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.putAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, null); - } - - /** - * If stopped, the test is over and can't be restarted. There is now only one index, receiving - * 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine - * the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ABTestResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ABTestResponse stopABTest(Integer id, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(stopABTestAsync(id, requestOptions)); - } - - /** - * If stopped, the test is over and can't be restarted. There is now only one index, receiving - * 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine - * the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @return ABTestResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ABTestResponse stopABTest(Integer id) throws AlgoliaRuntimeException { - return this.stopABTest(id, null); - } - - /** - * (asynchronously) If stopped, the test is over and can't be restarted. There is now only one - * index, receiving 100% of all search requests. The data gathered for stopped A/B tests is - * retained. To determine the `id` for an A/B test, use the [`listABTests` - * operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture stopABTestAsync(Integer id, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (id == null) { - throw new AlgoliaRuntimeException("Parameter `id` is required when calling `stopABTest`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/abtests/{id}/stop".replaceAll("\\{id\\}", this.escapeString(id.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) If stopped, the test is over and can't be restarted. There is now only one - * index, receiving 100% of all search requests. The data gathered for stopped A/B tests is - * retained. To determine the `id` for an A/B test, use the [`listABTests` - * operation](#tag/abtest/operation/listABTests). - * - * @param id Unique A/B test ID. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture stopABTestAsync(Integer id) throws AlgoliaRuntimeException { - return this.stopABTestAsync(id, null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AnalyticsClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AnalyticsClient.java deleted file mode 100644 index 970759ce34..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AnalyticsClient.java +++ /dev/null @@ -1,3951 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.api; - -import com.algolia.ApiClient; -import com.algolia.exceptions.*; -import com.algolia.model.analytics.*; -import com.algolia.utils.*; -import com.algolia.utils.retry.CallType; -import com.algolia.utils.retry.StatefulHost; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import okhttp3.Call; - -public class AnalyticsClient extends ApiClient { - - private static final String[] allowedRegions = { "de", "us" }; - - public AnalyticsClient(String appId, String apiKey) { - this(appId, apiKey, null, null); - } - - public AnalyticsClient(String appId, String apiKey, ClientOptions options) { - this(appId, apiKey, null, options); - } - - public AnalyticsClient(String appId, String apiKey, String region) { - this(appId, apiKey, region, null); - } - - public AnalyticsClient(String appId, String apiKey, String region, ClientOptions options) { - super(appId, apiKey, "Analytics", "4.0.0-SNAPSHOT", options); - if (options != null && options.getHosts() != null) { - this.setHosts(options.getHosts()); - } else { - this.setHosts(getDefaultHosts(region)); - } - this.setConnectTimeout(2000); - this.setReadTimeout(5000); - this.setWriteTimeout(30000); - } - - private static List getDefaultHosts(String region) throws AlgoliaRuntimeException { - List hosts = new ArrayList(); - - boolean found = region == null; - if (region != null) { - for (String allowed : allowedRegions) { - if (allowed.equals(region)) { - found = true; - break; - } - } - } - - if (!found) { - throw new AlgoliaRuntimeException("`region` must be one of the following: de, us"); - } - - String url = region == null ? "analytics.algolia.com" : "analytics.{region}.algolia.com".replace("{region}", region); - - hosts.add(new StatefulHost(url, "https", EnumSet.of(CallType.READ, CallType.WRITE))); - return hosts; - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(delAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters) throws AlgoliaRuntimeException { - return this.del(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.del(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path) throws AlgoliaRuntimeException { - return this.del(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `del`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.delAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.delAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path) throws AlgoliaRuntimeException { - return this.delAsync(path, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters) throws AlgoliaRuntimeException { - return this.get(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.get(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path) throws AlgoliaRuntimeException { - return this.get(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `get`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.getAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path) throws AlgoliaRuntimeException { - return this.getAsync(path, null, null); - } - - /** - * Return the average click position for the complete time range and for individual days. > - * **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't - * receive any click events for tracked searches. A _tracked_ search is a search request where the - * `clickAnalytics` parameter is `true`. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetAverageClickPositionResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetAverageClickPositionResponse getAverageClickPosition( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAverageClickPositionAsync(index, startDate, endDate, tags, requestOptions)); - } - - /** - * Return the average click position for the complete time range and for individual days. > - * **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't - * receive any click events for tracked searches. A _tracked_ search is a search request where the - * `clickAnalytics` parameter is `true`. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetAverageClickPositionResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetAverageClickPositionResponse getAverageClickPosition(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getAverageClickPosition(index, startDate, endDate, tags, null); - } - - /** - * Return the average click position for the complete time range and for individual days. > - * **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't - * receive any click events for tracked searches. A _tracked_ search is a search request where the - * `clickAnalytics` parameter is `true`. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetAverageClickPositionResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetAverageClickPositionResponse getAverageClickPosition(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getAverageClickPosition(index, null, null, null, requestOptions); - } - - /** - * Return the average click position for the complete time range and for individual days. > - * **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't - * receive any click events for tracked searches. A _tracked_ search is a search request where the - * `clickAnalytics` parameter is `true`. - * - * @param index Index name to target. (required) - * @return GetAverageClickPositionResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetAverageClickPositionResponse getAverageClickPosition(String index) throws AlgoliaRuntimeException { - return this.getAverageClickPosition(index, null, null, null, null); - } - - /** - * (asynchronously) Return the average click position for the complete time range and for - * individual days. > **Note**: If all `positions` have a `clickCount` of - * `0` or `null`, it means Algolia didn't receive any click events for - * tracked searches. A _tracked_ search is a search request where the `clickAnalytics` - * parameter is `true`. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAverageClickPositionAsync( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getAverageClickPosition`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/clicks/averageClickPosition"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Return the average click position for the complete time range and for - * individual days. > **Note**: If all `positions` have a `clickCount` of - * `0` or `null`, it means Algolia didn't receive any click events for - * tracked searches. A _tracked_ search is a search request where the `clickAnalytics` - * parameter is `true`. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAverageClickPositionAsync( - String index, - String startDate, - String endDate, - String tags - ) throws AlgoliaRuntimeException { - return this.getAverageClickPositionAsync(index, startDate, endDate, tags, null); - } - - /** - * (asynchronously) Return the average click position for the complete time range and for - * individual days. > **Note**: If all `positions` have a `clickCount` of - * `0` or `null`, it means Algolia didn't receive any click events for - * tracked searches. A _tracked_ search is a search request where the `clickAnalytics` - * parameter is `true`. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAverageClickPositionAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getAverageClickPositionAsync(index, null, null, null, requestOptions); - } - - /** - * (asynchronously) Return the average click position for the complete time range and for - * individual days. > **Note**: If all `positions` have a `clickCount` of - * `0` or `null`, it means Algolia didn't receive any click events for - * tracked searches. A _tracked_ search is a search request where the `clickAnalytics` - * parameter is `true`. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAverageClickPositionAsync(String index) throws AlgoliaRuntimeException { - return this.getAverageClickPositionAsync(index, null, null, null, null); - } - - /** - * Show the number of clicks events and their associated position in the search results. > - * **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't - * receive any click events for tracked searches. A _tracked_ search is a search request where the - * `clickAnalytics` parameter is `true`. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetClickPositionsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetClickPositionsResponse getClickPositions( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getClickPositionsAsync(index, startDate, endDate, tags, requestOptions)); - } - - /** - * Show the number of clicks events and their associated position in the search results. > - * **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't - * receive any click events for tracked searches. A _tracked_ search is a search request where the - * `clickAnalytics` parameter is `true`. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetClickPositionsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetClickPositionsResponse getClickPositions(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getClickPositions(index, startDate, endDate, tags, null); - } - - /** - * Show the number of clicks events and their associated position in the search results. > - * **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't - * receive any click events for tracked searches. A _tracked_ search is a search request where the - * `clickAnalytics` parameter is `true`. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetClickPositionsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetClickPositionsResponse getClickPositions(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getClickPositions(index, null, null, null, requestOptions); - } - - /** - * Show the number of clicks events and their associated position in the search results. > - * **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn't - * receive any click events for tracked searches. A _tracked_ search is a search request where the - * `clickAnalytics` parameter is `true`. - * - * @param index Index name to target. (required) - * @return GetClickPositionsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetClickPositionsResponse getClickPositions(String index) throws AlgoliaRuntimeException { - return this.getClickPositions(index, null, null, null, null); - } - - /** - * (asynchronously) Show the number of clicks events and their associated position in the search - * results. > **Note**: If all `positions` have a `clickCount` of - * `0` or `null`, it means Algolia didn't receive any click events for - * tracked searches. A _tracked_ search is a search request where the `clickAnalytics` - * parameter is `true`. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClickPositionsAsync( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getClickPositions`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/clicks/positions"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Show the number of clicks events and their associated position in the search - * results. > **Note**: If all `positions` have a `clickCount` of - * `0` or `null`, it means Algolia didn't receive any click events for - * tracked searches. A _tracked_ search is a search request where the `clickAnalytics` - * parameter is `true`. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClickPositionsAsync(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getClickPositionsAsync(index, startDate, endDate, tags, null); - } - - /** - * (asynchronously) Show the number of clicks events and their associated position in the search - * results. > **Note**: If all `positions` have a `clickCount` of - * `0` or `null`, it means Algolia didn't receive any click events for - * tracked searches. A _tracked_ search is a search request where the `clickAnalytics` - * parameter is `true`. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClickPositionsAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getClickPositionsAsync(index, null, null, null, requestOptions); - } - - /** - * (asynchronously) Show the number of clicks events and their associated position in the search - * results. > **Note**: If all `positions` have a `clickCount` of - * `0` or `null`, it means Algolia didn't receive any click events for - * tracked searches. A _tracked_ search is a search request where the `clickAnalytics` - * parameter is `true`. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClickPositionsAsync(String index) throws AlgoliaRuntimeException { - return this.getClickPositionsAsync(index, null, null, null, null); - } - - /** - * Returns a [click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetClickThroughRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetClickThroughRateResponse getClickThroughRate( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getClickThroughRateAsync(index, startDate, endDate, tags, requestOptions)); - } - - /** - * Returns a [click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetClickThroughRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetClickThroughRateResponse getClickThroughRate(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getClickThroughRate(index, startDate, endDate, tags, null); - } - - /** - * Returns a [click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetClickThroughRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetClickThroughRateResponse getClickThroughRate(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getClickThroughRate(index, null, null, null, requestOptions); - } - - /** - * Returns a [click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * - * @param index Index name to target. (required) - * @return GetClickThroughRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetClickThroughRateResponse getClickThroughRate(String index) throws AlgoliaRuntimeException { - return this.getClickThroughRate(index, null, null, null, null); - } - - /** - * (asynchronously) Returns a [click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClickThroughRateAsync( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getClickThroughRate`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/clicks/clickThroughRate"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns a [click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClickThroughRateAsync( - String index, - String startDate, - String endDate, - String tags - ) throws AlgoliaRuntimeException { - return this.getClickThroughRateAsync(index, startDate, endDate, tags, null); - } - - /** - * (asynchronously) Returns a [click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClickThroughRateAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getClickThroughRateAsync(index, null, null, null, requestOptions); - } - - /** - * (asynchronously) Returns a [click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClickThroughRateAsync(String index) throws AlgoliaRuntimeException { - return this.getClickThroughRateAsync(index, null, null, null, null); - } - - /** - * Return a [conversion - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetConversationRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetConversationRateResponse getConversationRate( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getConversationRateAsync(index, startDate, endDate, tags, requestOptions)); - } - - /** - * Return a [conversion - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetConversationRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetConversationRateResponse getConversationRate(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getConversationRate(index, startDate, endDate, tags, null); - } - - /** - * Return a [conversion - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetConversationRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetConversationRateResponse getConversationRate(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getConversationRate(index, null, null, null, requestOptions); - } - - /** - * Return a [conversion - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @param index Index name to target. (required) - * @return GetConversationRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetConversationRateResponse getConversationRate(String index) throws AlgoliaRuntimeException { - return this.getConversationRate(index, null, null, null, null); - } - - /** - * (asynchronously) Return a [conversion - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getConversationRateAsync( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getConversationRate`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/conversions/conversionRate"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Return a [conversion - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getConversationRateAsync( - String index, - String startDate, - String endDate, - String tags - ) throws AlgoliaRuntimeException { - return this.getConversationRateAsync(index, startDate, endDate, tags, null); - } - - /** - * (asynchronously) Return a [conversion - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getConversationRateAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getConversationRateAsync(index, null, null, null, requestOptions); - } - - /** - * (asynchronously) Return a [conversion - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getConversationRateAsync(String index) throws AlgoliaRuntimeException { - return this.getConversationRateAsync(index, null, null, null, null); - } - - /** - * Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for - * the complete given time range, as well as a value per day. It also returns the count of - * searches and searches without clicks. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetNoClickRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetNoClickRateResponse getNoClickRate(String index, String startDate, String endDate, String tags, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(getNoClickRateAsync(index, startDate, endDate, tags, requestOptions)); - } - - /** - * Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for - * the complete given time range, as well as a value per day. It also returns the count of - * searches and searches without clicks. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetNoClickRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetNoClickRateResponse getNoClickRate(String index, String startDate, String endDate, String tags) throws AlgoliaRuntimeException { - return this.getNoClickRate(index, startDate, endDate, tags, null); - } - - /** - * Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for - * the complete given time range, as well as a value per day. It also returns the count of - * searches and searches without clicks. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetNoClickRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetNoClickRateResponse getNoClickRate(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getNoClickRate(index, null, null, null, requestOptions); - } - - /** - * Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for - * the complete given time range, as well as a value per day. It also returns the count of - * searches and searches without clicks. - * - * @param index Index name to target. (required) - * @return GetNoClickRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetNoClickRateResponse getNoClickRate(String index) throws AlgoliaRuntimeException { - return this.getNoClickRate(index, null, null, null, null); - } - - /** - * (asynchronously) Returns the rate at which searches don't lead to any clicks. The endpoint - * returns a value for the complete given time range, as well as a value per day. It also returns - * the count of searches and searches without clicks. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getNoClickRateAsync( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getNoClickRate`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/searches/noClickRate"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns the rate at which searches don't lead to any clicks. The endpoint - * returns a value for the complete given time range, as well as a value per day. It also returns - * the count of searches and searches without clicks. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getNoClickRateAsync(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getNoClickRateAsync(index, startDate, endDate, tags, null); - } - - /** - * (asynchronously) Returns the rate at which searches don't lead to any clicks. The endpoint - * returns a value for the complete given time range, as well as a value per day. It also returns - * the count of searches and searches without clicks. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getNoClickRateAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getNoClickRateAsync(index, null, null, null, requestOptions); - } - - /** - * (asynchronously) Returns the rate at which searches don't lead to any clicks. The endpoint - * returns a value for the complete given time range, as well as a value per day. It also returns - * the count of searches and searches without clicks. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getNoClickRateAsync(String index) throws AlgoliaRuntimeException { - return this.getNoClickRateAsync(index, null, null, null, null); - } - - /** - * Returns the rate at which searches didn't return any results. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetNoResultsRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetNoResultsRateResponse getNoResultsRate( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getNoResultsRateAsync(index, startDate, endDate, tags, requestOptions)); - } - - /** - * Returns the rate at which searches didn't return any results. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetNoResultsRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetNoResultsRateResponse getNoResultsRate(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getNoResultsRate(index, startDate, endDate, tags, null); - } - - /** - * Returns the rate at which searches didn't return any results. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetNoResultsRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetNoResultsRateResponse getNoResultsRate(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getNoResultsRate(index, null, null, null, requestOptions); - } - - /** - * Returns the rate at which searches didn't return any results. - * - * @param index Index name to target. (required) - * @return GetNoResultsRateResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetNoResultsRateResponse getNoResultsRate(String index) throws AlgoliaRuntimeException { - return this.getNoResultsRate(index, null, null, null, null); - } - - /** - * (asynchronously) Returns the rate at which searches didn't return any results. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getNoResultsRateAsync( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getNoResultsRate`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/searches/noResultRate"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns the rate at which searches didn't return any results. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getNoResultsRateAsync(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getNoResultsRateAsync(index, startDate, endDate, tags, null); - } - - /** - * (asynchronously) Returns the rate at which searches didn't return any results. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getNoResultsRateAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getNoResultsRateAsync(index, null, null, null, requestOptions); - } - - /** - * (asynchronously) Returns the rate at which searches didn't return any results. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getNoResultsRateAsync(String index) throws AlgoliaRuntimeException { - return this.getNoResultsRateAsync(index, null, null, null, null); - } - - /** - * Returns the number of searches within a time range. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetSearchesCountResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesCountResponse getSearchesCount( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getSearchesCountAsync(index, startDate, endDate, tags, requestOptions)); - } - - /** - * Returns the number of searches within a time range. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetSearchesCountResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesCountResponse getSearchesCount(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getSearchesCount(index, startDate, endDate, tags, null); - } - - /** - * Returns the number of searches within a time range. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetSearchesCountResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesCountResponse getSearchesCount(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getSearchesCount(index, null, null, null, requestOptions); - } - - /** - * Returns the number of searches within a time range. - * - * @param index Index name to target. (required) - * @return GetSearchesCountResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesCountResponse getSearchesCount(String index) throws AlgoliaRuntimeException { - return this.getSearchesCount(index, null, null, null, null); - } - - /** - * (asynchronously) Returns the number of searches within a time range. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesCountAsync( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getSearchesCount`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/searches/count"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns the number of searches within a time range. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesCountAsync(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getSearchesCountAsync(index, startDate, endDate, tags, null); - } - - /** - * (asynchronously) Returns the number of searches within a time range. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesCountAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getSearchesCountAsync(index, null, null, null, requestOptions); - } - - /** - * (asynchronously) Returns the number of searches within a time range. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesCountAsync(String index) throws AlgoliaRuntimeException { - return this.getSearchesCountAsync(index, null, null, null, null); - } - - /** - * Return the most popular of the last 1,000 searches that didn't lead to any clicks. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetSearchesNoClicksResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesNoClicksResponse getSearchesNoClicks( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getSearchesNoClicksAsync(index, startDate, endDate, limit, offset, tags, requestOptions)); - } - - /** - * Return the most popular of the last 1,000 searches that didn't lead to any clicks. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetSearchesNoClicksResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesNoClicksResponse getSearchesNoClicks( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getSearchesNoClicks(index, startDate, endDate, limit, offset, tags, null); - } - - /** - * Return the most popular of the last 1,000 searches that didn't lead to any clicks. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetSearchesNoClicksResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesNoClicksResponse getSearchesNoClicks(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getSearchesNoClicks(index, null, null, null, null, null, requestOptions); - } - - /** - * Return the most popular of the last 1,000 searches that didn't lead to any clicks. - * - * @param index Index name to target. (required) - * @return GetSearchesNoClicksResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesNoClicksResponse getSearchesNoClicks(String index) throws AlgoliaRuntimeException { - return this.getSearchesNoClicks(index, null, null, null, null, null, null); - } - - /** - * (asynchronously) Return the most popular of the last 1,000 searches that didn't lead to any - * clicks. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesNoClicksAsync( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getSearchesNoClicks`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/searches/noClicks"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (limit != null) { - queryParameters.put("limit", parameterToString(limit)); - } - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Return the most popular of the last 1,000 searches that didn't lead to any - * clicks. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesNoClicksAsync( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getSearchesNoClicksAsync(index, startDate, endDate, limit, offset, tags, null); - } - - /** - * (asynchronously) Return the most popular of the last 1,000 searches that didn't lead to any - * clicks. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesNoClicksAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getSearchesNoClicksAsync(index, null, null, null, null, null, requestOptions); - } - - /** - * (asynchronously) Return the most popular of the last 1,000 searches that didn't lead to any - * clicks. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesNoClicksAsync(String index) throws AlgoliaRuntimeException { - return this.getSearchesNoClicksAsync(index, null, null, null, null, null, null); - } - - /** - * Returns the most popular of the latest 1,000 searches that didn't return any results. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetSearchesNoResultsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesNoResultsResponse getSearchesNoResults( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getSearchesNoResultsAsync(index, startDate, endDate, limit, offset, tags, requestOptions)); - } - - /** - * Returns the most popular of the latest 1,000 searches that didn't return any results. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetSearchesNoResultsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesNoResultsResponse getSearchesNoResults( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getSearchesNoResults(index, startDate, endDate, limit, offset, tags, null); - } - - /** - * Returns the most popular of the latest 1,000 searches that didn't return any results. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetSearchesNoResultsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesNoResultsResponse getSearchesNoResults(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getSearchesNoResults(index, null, null, null, null, null, requestOptions); - } - - /** - * Returns the most popular of the latest 1,000 searches that didn't return any results. - * - * @param index Index name to target. (required) - * @return GetSearchesNoResultsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSearchesNoResultsResponse getSearchesNoResults(String index) throws AlgoliaRuntimeException { - return this.getSearchesNoResults(index, null, null, null, null, null, null); - } - - /** - * (asynchronously) Returns the most popular of the latest 1,000 searches that didn't return - * any results. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesNoResultsAsync( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getSearchesNoResults`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/searches/noResults"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (limit != null) { - queryParameters.put("limit", parameterToString(limit)); - } - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns the most popular of the latest 1,000 searches that didn't return - * any results. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesNoResultsAsync( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getSearchesNoResultsAsync(index, startDate, endDate, limit, offset, tags, null); - } - - /** - * (asynchronously) Returns the most popular of the latest 1,000 searches that didn't return - * any results. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesNoResultsAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getSearchesNoResultsAsync(index, null, null, null, null, null, requestOptions); - } - - /** - * (asynchronously) Returns the most popular of the latest 1,000 searches that didn't return - * any results. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSearchesNoResultsAsync(String index) throws AlgoliaRuntimeException { - return this.getSearchesNoResultsAsync(index, null, null, null, null, null, null); - } - - /** - * Return the latest update time of the Analytics API for an index. If the index has been recently - * created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The - * Analytics API is updated every 5 minutes. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetStatusResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetStatusResponse getStatus(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getStatusAsync(index, requestOptions)); - } - - /** - * Return the latest update time of the Analytics API for an index. If the index has been recently - * created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The - * Analytics API is updated every 5 minutes. - * - * @param index Index name to target. (required) - * @return GetStatusResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetStatusResponse getStatus(String index) throws AlgoliaRuntimeException { - return this.getStatus(index, null); - } - - /** - * (asynchronously) Return the latest update time of the Analytics API for an index. If the index - * has been recently created or no search has been performed yet, `updatedAt` will be - * `null`. > **Note**: The Analytics API is updated every 5&nbsp;minutes. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getStatusAsync(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getStatus`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/status"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Return the latest update time of the Analytics API for an index. If the index - * has been recently created or no search has been performed yet, `updatedAt` will be - * `null`. > **Note**: The Analytics API is updated every 5&nbsp;minutes. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getStatusAsync(String index) throws AlgoliaRuntimeException { - return this.getStatusAsync(index, null); - } - - /** - * Returns top countries. Limited to the 1,000 most frequent ones. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopCountriesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopCountriesResponse getTopCountries( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getTopCountriesAsync(index, startDate, endDate, limit, offset, tags, requestOptions)); - } - - /** - * Returns top countries. Limited to the 1,000 most frequent ones. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetTopCountriesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopCountriesResponse getTopCountries( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopCountries(index, startDate, endDate, limit, offset, tags, null); - } - - /** - * Returns top countries. Limited to the 1,000 most frequent ones. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopCountriesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopCountriesResponse getTopCountries(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getTopCountries(index, null, null, null, null, null, requestOptions); - } - - /** - * Returns top countries. Limited to the 1,000 most frequent ones. - * - * @param index Index name to target. (required) - * @return GetTopCountriesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopCountriesResponse getTopCountries(String index) throws AlgoliaRuntimeException { - return this.getTopCountries(index, null, null, null, null, null, null); - } - - /** - * (asynchronously) Returns top countries. Limited to the 1,000 most frequent ones. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopCountriesAsync( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getTopCountries`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/countries"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (limit != null) { - queryParameters.put("limit", parameterToString(limit)); - } - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns top countries. Limited to the 1,000 most frequent ones. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopCountriesAsync( - String index, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopCountriesAsync(index, startDate, endDate, limit, offset, tags, null); - } - - /** - * (asynchronously) Returns top countries. Limited to the 1,000 most frequent ones. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopCountriesAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getTopCountriesAsync(index, null, null, null, null, null, requestOptions); - } - - /** - * (asynchronously) Returns top countries. Limited to the 1,000 most frequent ones. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopCountriesAsync(String index) throws AlgoliaRuntimeException { - return this.getTopCountriesAsync(index, null, null, null, null, null, null); - } - - /** - * Return the most popular [filterable - * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in - * the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopFilterAttributesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFilterAttributesResponse getTopFilterAttributes( - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getTopFilterAttributesAsync(index, search, startDate, endDate, limit, offset, tags, requestOptions)); - } - - /** - * Return the most popular [filterable - * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in - * the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetTopFilterAttributesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFilterAttributesResponse getTopFilterAttributes( - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopFilterAttributes(index, search, startDate, endDate, limit, offset, tags, null); - } - - /** - * Return the most popular [filterable - * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in - * the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopFilterAttributesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFilterAttributesResponse getTopFilterAttributes(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getTopFilterAttributes(index, null, null, null, null, null, null, requestOptions); - } - - /** - * Return the most popular [filterable - * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in - * the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @return GetTopFilterAttributesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFilterAttributesResponse getTopFilterAttributes(String index) throws AlgoliaRuntimeException { - return this.getTopFilterAttributes(index, null, null, null, null, null, null, null); - } - - /** - * (asynchronously) Return the most popular [filterable - * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in - * the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFilterAttributesAsync( - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getTopFilterAttributes`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/filters"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (search != null) { - queryParameters.put("search", parameterToString(search)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (limit != null) { - queryParameters.put("limit", parameterToString(limit)); - } - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Return the most popular [filterable - * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in - * the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFilterAttributesAsync( - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopFilterAttributesAsync(index, search, startDate, endDate, limit, offset, tags, null); - } - - /** - * (asynchronously) Return the most popular [filterable - * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in - * the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFilterAttributesAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getTopFilterAttributesAsync(index, null, null, null, null, null, null, requestOptions); - } - - /** - * (asynchronously) Return the most popular [filterable - * attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in - * the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFilterAttributesAsync(String index) throws AlgoliaRuntimeException { - return this.getTopFilterAttributesAsync(index, null, null, null, null, null, null, null); - } - - /** - * Returns the most popular filter values for an attribute in the 1,000 most recently used - * filters. - * - * @param attribute Attribute name. (required) - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopFilterForAttributeResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFilterForAttributeResponse getTopFilterForAttribute( - String attribute, - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await( - getTopFilterForAttributeAsync(attribute, index, search, startDate, endDate, limit, offset, tags, requestOptions) - ); - } - - /** - * Returns the most popular filter values for an attribute in the 1,000 most recently used - * filters. - * - * @param attribute Attribute name. (required) - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetTopFilterForAttributeResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFilterForAttributeResponse getTopFilterForAttribute( - String attribute, - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopFilterForAttribute(attribute, index, search, startDate, endDate, limit, offset, tags, null); - } - - /** - * Returns the most popular filter values for an attribute in the 1,000 most recently used - * filters. - * - * @param attribute Attribute name. (required) - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopFilterForAttributeResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFilterForAttributeResponse getTopFilterForAttribute(String attribute, String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getTopFilterForAttribute(attribute, index, null, null, null, null, null, null, requestOptions); - } - - /** - * Returns the most popular filter values for an attribute in the 1,000 most recently used - * filters. - * - * @param attribute Attribute name. (required) - * @param index Index name to target. (required) - * @return GetTopFilterForAttributeResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFilterForAttributeResponse getTopFilterForAttribute(String attribute, String index) throws AlgoliaRuntimeException { - return this.getTopFilterForAttribute(attribute, index, null, null, null, null, null, null, null); - } - - /** - * (asynchronously) Returns the most popular filter values for an attribute in the 1,000 most - * recently used filters. - * - * @param attribute Attribute name. (required) - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFilterForAttributeAsync( - String attribute, - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (attribute == null) { - throw new AlgoliaRuntimeException("Parameter `attribute` is required when calling `getTopFilterForAttribute`."); - } - - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getTopFilterForAttribute`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/filters/{attribute}".replaceAll("\\{attribute\\}", this.escapeString(attribute.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (search != null) { - queryParameters.put("search", parameterToString(search)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (limit != null) { - queryParameters.put("limit", parameterToString(limit)); - } - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns the most popular filter values for an attribute in the 1,000 most - * recently used filters. - * - * @param attribute Attribute name. (required) - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFilterForAttributeAsync( - String attribute, - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopFilterForAttributeAsync(attribute, index, search, startDate, endDate, limit, offset, tags, null); - } - - /** - * (asynchronously) Returns the most popular filter values for an attribute in the 1,000 most - * recently used filters. - * - * @param attribute Attribute name. (required) - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFilterForAttributeAsync( - String attribute, - String index, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return this.getTopFilterForAttributeAsync(attribute, index, null, null, null, null, null, null, requestOptions); - } - - /** - * (asynchronously) Returns the most popular filter values for an attribute in the 1,000 most - * recently used filters. - * - * @param attribute Attribute name. (required) - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFilterForAttributeAsync(String attribute, String index) - throws AlgoliaRuntimeException { - return this.getTopFilterForAttributeAsync(attribute, index, null, null, null, null, null, null, null); - } - - /** - * Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 - * most recently used filters. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopFiltersNoResultsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFiltersNoResultsResponse getTopFiltersNoResults( - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getTopFiltersNoResultsAsync(index, search, startDate, endDate, limit, offset, tags, requestOptions)); - } - - /** - * Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 - * most recently used filters. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetTopFiltersNoResultsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFiltersNoResultsResponse getTopFiltersNoResults( - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopFiltersNoResults(index, search, startDate, endDate, limit, offset, tags, null); - } - - /** - * Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 - * most recently used filters. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopFiltersNoResultsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFiltersNoResultsResponse getTopFiltersNoResults(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getTopFiltersNoResults(index, null, null, null, null, null, null, requestOptions); - } - - /** - * Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 - * most recently used filters. - * - * @param index Index name to target. (required) - * @return GetTopFiltersNoResultsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopFiltersNoResultsResponse getTopFiltersNoResults(String index) throws AlgoliaRuntimeException { - return this.getTopFiltersNoResults(index, null, null, null, null, null, null, null); - } - - /** - * (asynchronously) Returns top filters for filter-enabled searches that don't return results. - * Limited to the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFiltersNoResultsAsync( - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getTopFiltersNoResults`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/filters/noResults"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (search != null) { - queryParameters.put("search", parameterToString(search)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (limit != null) { - queryParameters.put("limit", parameterToString(limit)); - } - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns top filters for filter-enabled searches that don't return results. - * Limited to the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFiltersNoResultsAsync( - String index, - String search, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopFiltersNoResultsAsync(index, search, startDate, endDate, limit, offset, tags, null); - } - - /** - * (asynchronously) Returns top filters for filter-enabled searches that don't return results. - * Limited to the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFiltersNoResultsAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getTopFiltersNoResultsAsync(index, null, null, null, null, null, null, requestOptions); - } - - /** - * (asynchronously) Returns top filters for filter-enabled searches that don't return results. - * Limited to the 1,000 most recently used filters. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopFiltersNoResultsAsync(String index) throws AlgoliaRuntimeException { - return this.getTopFiltersNoResultsAsync(index, null, null, null, null, null, null, null); - } - - /** - * Return the most popular clicked results in the last 1,000 searches. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param clickAnalytics Whether to include [click and - * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a - * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopHitsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopHitsResponse getTopHits( - String index, - String search, - Boolean clickAnalytics, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getTopHitsAsync(index, search, clickAnalytics, startDate, endDate, limit, offset, tags, requestOptions)); - } - - /** - * Return the most popular clicked results in the last 1,000 searches. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param clickAnalytics Whether to include [click and - * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a - * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetTopHitsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopHitsResponse getTopHits( - String index, - String search, - Boolean clickAnalytics, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopHits(index, search, clickAnalytics, startDate, endDate, limit, offset, tags, null); - } - - /** - * Return the most popular clicked results in the last 1,000 searches. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopHitsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopHitsResponse getTopHits(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getTopHits(index, null, null, null, null, null, null, null, requestOptions); - } - - /** - * Return the most popular clicked results in the last 1,000 searches. - * - * @param index Index name to target. (required) - * @return GetTopHitsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopHitsResponse getTopHits(String index) throws AlgoliaRuntimeException { - return this.getTopHits(index, null, null, null, null, null, null, null, null); - } - - /** - * (asynchronously) Return the most popular clicked results in the last 1,000 searches. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param clickAnalytics Whether to include [click and - * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a - * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopHitsAsync( - String index, - String search, - Boolean clickAnalytics, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getTopHits`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/hits"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (search != null) { - queryParameters.put("search", parameterToString(search)); - } - - if (clickAnalytics != null) { - queryParameters.put("clickAnalytics", parameterToString(clickAnalytics)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (limit != null) { - queryParameters.put("limit", parameterToString(limit)); - } - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Return the most popular clicked results in the last 1,000 searches. - * - * @param index Index name to target. (required) - * @param search User query. (optional) - * @param clickAnalytics Whether to include [click and - * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a - * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopHitsAsync( - String index, - String search, - Boolean clickAnalytics, - String startDate, - String endDate, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopHitsAsync(index, search, clickAnalytics, startDate, endDate, limit, offset, tags, null); - } - - /** - * (asynchronously) Return the most popular clicked results in the last 1,000 searches. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopHitsAsync(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getTopHitsAsync(index, null, null, null, null, null, null, null, requestOptions); - } - - /** - * (asynchronously) Return the most popular clicked results in the last 1,000 searches. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopHitsAsync(String index) throws AlgoliaRuntimeException { - return this.getTopHitsAsync(index, null, null, null, null, null, null, null, null); - } - - /** - * Returns the most popular of the latest 1,000 searches. For each search, also returns the number - * of hits. - * - * @param index Index name to target. (required) - * @param clickAnalytics Whether to include [click and - * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a - * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param orderBy Reorder the results. (optional, default to searchCount) - * @param direction Sorting direction of the results: ascending or descending. (optional, default - * to asc) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopSearchesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopSearchesResponse getTopSearches( - String index, - Boolean clickAnalytics, - String startDate, - String endDate, - OrderBy orderBy, - Direction direction, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await( - getTopSearchesAsync(index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, requestOptions) - ); - } - - /** - * Returns the most popular of the latest 1,000 searches. For each search, also returns the number - * of hits. - * - * @param index Index name to target. (required) - * @param clickAnalytics Whether to include [click and - * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a - * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param orderBy Reorder the results. (optional, default to searchCount) - * @param direction Sorting direction of the results: ascending or descending. (optional, default - * to asc) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetTopSearchesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopSearchesResponse getTopSearches( - String index, - Boolean clickAnalytics, - String startDate, - String endDate, - OrderBy orderBy, - Direction direction, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopSearches(index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, null); - } - - /** - * Returns the most popular of the latest 1,000 searches. For each search, also returns the number - * of hits. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopSearchesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopSearchesResponse getTopSearches(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getTopSearches(index, null, null, null, null, null, null, null, null, requestOptions); - } - - /** - * Returns the most popular of the latest 1,000 searches. For each search, also returns the number - * of hits. - * - * @param index Index name to target. (required) - * @return GetTopSearchesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopSearchesResponse getTopSearches(String index) throws AlgoliaRuntimeException { - return this.getTopSearches(index, null, null, null, null, null, null, null, null, null); - } - - /** - * (asynchronously) Returns the most popular of the latest 1,000 searches. For each search, also - * returns the number of hits. - * - * @param index Index name to target. (required) - * @param clickAnalytics Whether to include [click and - * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a - * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param orderBy Reorder the results. (optional, default to searchCount) - * @param direction Sorting direction of the results: ascending or descending. (optional, default - * to asc) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopSearchesAsync( - String index, - Boolean clickAnalytics, - String startDate, - String endDate, - OrderBy orderBy, - Direction direction, - Integer limit, - Integer offset, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getTopSearches`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/searches"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (clickAnalytics != null) { - queryParameters.put("clickAnalytics", parameterToString(clickAnalytics)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (orderBy != null) { - queryParameters.put("orderBy", parameterToString(orderBy)); - } - - if (direction != null) { - queryParameters.put("direction", parameterToString(direction)); - } - - if (limit != null) { - queryParameters.put("limit", parameterToString(limit)); - } - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns the most popular of the latest 1,000 searches. For each search, also - * returns the number of hits. - * - * @param index Index name to target. (required) - * @param clickAnalytics Whether to include [click and - * conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a - * search. (optional, default to false) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param orderBy Reorder the results. (optional, default to searchCount) - * @param direction Sorting direction of the results: ascending or descending. (optional, default - * to asc) - * @param limit Number of records to return (page size). (optional, default to 10) - * @param offset Position of the starting record. Used for paging. 0 is the first record. - * (optional, default to 0) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopSearchesAsync( - String index, - Boolean clickAnalytics, - String startDate, - String endDate, - OrderBy orderBy, - Direction direction, - Integer limit, - Integer offset, - String tags - ) throws AlgoliaRuntimeException { - return this.getTopSearchesAsync(index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, null); - } - - /** - * (asynchronously) Returns the most popular of the latest 1,000 searches. For each search, also - * returns the number of hits. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopSearchesAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getTopSearchesAsync(index, null, null, null, null, null, null, null, null, requestOptions); - } - - /** - * (asynchronously) Returns the most popular of the latest 1,000 searches. For each search, also - * returns the number of hits. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopSearchesAsync(String index) throws AlgoliaRuntimeException { - return this.getTopSearchesAsync(index, null, null, null, null, null, null, null, null, null); - } - - /** - * Return the count of unique users. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetUsersCountResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetUsersCountResponse getUsersCount(String index, String startDate, String endDate, String tags, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(getUsersCountAsync(index, startDate, endDate, tags, requestOptions)); - } - - /** - * Return the count of unique users. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return GetUsersCountResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetUsersCountResponse getUsersCount(String index, String startDate, String endDate, String tags) throws AlgoliaRuntimeException { - return this.getUsersCount(index, startDate, endDate, tags, null); - } - - /** - * Return the count of unique users. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetUsersCountResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetUsersCountResponse getUsersCount(String index, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getUsersCount(index, null, null, null, requestOptions); - } - - /** - * Return the count of unique users. - * - * @param index Index name to target. (required) - * @return GetUsersCountResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetUsersCountResponse getUsersCount(String index) throws AlgoliaRuntimeException { - return this.getUsersCount(index, null, null, null, null); - } - - /** - * (asynchronously) Return the count of unique users. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getUsersCountAsync( - String index, - String startDate, - String endDate, - String tags, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (index == null) { - throw new AlgoliaRuntimeException("Parameter `index` is required when calling `getUsersCount`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/2/users/count"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (index != null) { - queryParameters.put("index", parameterToString(index)); - } - - if (startDate != null) { - queryParameters.put("startDate", parameterToString(startDate)); - } - - if (endDate != null) { - queryParameters.put("endDate", parameterToString(endDate)); - } - - if (tags != null) { - queryParameters.put("tags", parameterToString(tags)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Return the count of unique users. - * - * @param index Index name to target. (required) - * @param startDate Start date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param endDate End date (a string in the format `YYYY-MM-DD`) of the period to analyze. - * (optional) - * @param tags Filter analytics on the - * [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) - * set at search time. Multiple tags can be combined with the operators OR and AND. If a tag - * contains characters like spaces or parentheses, it must be URL-encoded. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getUsersCountAsync(String index, String startDate, String endDate, String tags) - throws AlgoliaRuntimeException { - return this.getUsersCountAsync(index, startDate, endDate, tags, null); - } - - /** - * (asynchronously) Return the count of unique users. - * - * @param index Index name to target. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getUsersCountAsync(String index, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getUsersCountAsync(index, null, null, null, requestOptions); - } - - /** - * (asynchronously) Return the count of unique users. - * - * @param index Index name to target. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getUsersCountAsync(String index) throws AlgoliaRuntimeException { - return this.getUsersCountAsync(index, null, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(postAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.post(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.post(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path) throws AlgoliaRuntimeException { - return this.post(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `post`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.postAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(putAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.put(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.put(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path) throws AlgoliaRuntimeException { - return this.put(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `put`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.putAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/InsightsClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/InsightsClient.java deleted file mode 100644 index 210a4dd427..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/InsightsClient.java +++ /dev/null @@ -1,627 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.api; - -import com.algolia.ApiClient; -import com.algolia.exceptions.*; -import com.algolia.model.insights.*; -import com.algolia.utils.*; -import com.algolia.utils.retry.CallType; -import com.algolia.utils.retry.StatefulHost; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import okhttp3.Call; - -public class InsightsClient extends ApiClient { - - private static final String[] allowedRegions = { "de", "us" }; - - public InsightsClient(String appId, String apiKey) { - this(appId, apiKey, null, null); - } - - public InsightsClient(String appId, String apiKey, ClientOptions options) { - this(appId, apiKey, null, options); - } - - public InsightsClient(String appId, String apiKey, String region) { - this(appId, apiKey, region, null); - } - - public InsightsClient(String appId, String apiKey, String region, ClientOptions options) { - super(appId, apiKey, "Insights", "4.0.0-SNAPSHOT", options); - if (options != null && options.getHosts() != null) { - this.setHosts(options.getHosts()); - } else { - this.setHosts(getDefaultHosts(region)); - } - this.setConnectTimeout(2000); - this.setReadTimeout(5000); - this.setWriteTimeout(30000); - } - - private static List getDefaultHosts(String region) throws AlgoliaRuntimeException { - List hosts = new ArrayList(); - - boolean found = region == null; - if (region != null) { - for (String allowed : allowedRegions) { - if (allowed.equals(region)) { - found = true; - break; - } - } - } - - if (!found) { - throw new AlgoliaRuntimeException("`region` must be one of the following: de, us"); - } - - String url = region == null ? "insights.algolia.io" : "insights.{region}.algolia.io".replace("{region}", region); - - hosts.add(new StatefulHost(url, "https", EnumSet.of(CallType.READ, CallType.WRITE))); - return hosts; - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(delAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters) throws AlgoliaRuntimeException { - return this.del(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.del(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path) throws AlgoliaRuntimeException { - return this.del(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `del`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.delAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.delAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path) throws AlgoliaRuntimeException { - return this.delAsync(path, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters) throws AlgoliaRuntimeException { - return this.get(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.get(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path) throws AlgoliaRuntimeException { - return this.get(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `get`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.getAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path) throws AlgoliaRuntimeException { - return this.getAsync(path, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(postAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.post(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.post(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path) throws AlgoliaRuntimeException { - return this.post(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `post`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.postAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, null); - } - - /** - * Send a list of events to the Insights API. You can include up to 1,000 events in a single - * request, but the request body must be smaller than 2 MB. - * - * @param insightsEvents (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return EventsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public EventsResponse pushEvents(InsightsEvents insightsEvents, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(pushEventsAsync(insightsEvents, requestOptions)); - } - - /** - * Send a list of events to the Insights API. You can include up to 1,000 events in a single - * request, but the request body must be smaller than 2 MB. - * - * @param insightsEvents (required) - * @return EventsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public EventsResponse pushEvents(InsightsEvents insightsEvents) throws AlgoliaRuntimeException { - return this.pushEvents(insightsEvents, null); - } - - /** - * (asynchronously) Send a list of events to the Insights API. You can include up to 1,000 events - * in a single request, but the request body must be smaller than 2&nbsp;MB. - * - * @param insightsEvents (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture pushEventsAsync(InsightsEvents insightsEvents, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (insightsEvents == null) { - throw new AlgoliaRuntimeException("Parameter `insightsEvents` is required when calling `pushEvents`."); - } - - Object bodyObj = insightsEvents; - - // create path and map variables - String requestPath = "/1/events"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Send a list of events to the Insights API. You can include up to 1,000 events - * in a single request, but the request body must be smaller than 2&nbsp;MB. - * - * @param insightsEvents (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture pushEventsAsync(InsightsEvents insightsEvents) throws AlgoliaRuntimeException { - return this.pushEventsAsync(insightsEvents, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(putAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.put(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.put(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path) throws AlgoliaRuntimeException { - return this.put(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `put`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.putAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/MonitoringClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/MonitoringClient.java deleted file mode 100644 index 2c7c6c7446..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/MonitoringClient.java +++ /dev/null @@ -1,1131 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.api; - -import com.algolia.ApiClient; -import com.algolia.exceptions.*; -import com.algolia.model.monitoring.*; -import com.algolia.utils.*; -import com.algolia.utils.retry.CallType; -import com.algolia.utils.retry.StatefulHost; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.ArrayList; -import java.util.Collections; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.CompletableFuture; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import okhttp3.Call; - -public class MonitoringClient extends ApiClient { - - public MonitoringClient(String appId, String apiKey) { - this(appId, apiKey, null); - } - - public MonitoringClient(String appId, String apiKey, ClientOptions options) { - super(appId, apiKey, "Monitoring", "4.0.0-SNAPSHOT", options); - if (options != null && options.getHosts() != null) { - this.setHosts(options.getHosts()); - } else { - this.setHosts(getDefaultHosts(appId)); - } - this.setConnectTimeout(2000); - this.setReadTimeout(5000); - this.setWriteTimeout(30000); - } - - private static List getDefaultHosts(String appId) { - List hosts = new ArrayList(); - hosts.add(new StatefulHost(appId + "-dsn.algolia.net", "https", EnumSet.of(CallType.READ))); - hosts.add(new StatefulHost(appId + ".algolia.net", "https", EnumSet.of(CallType.WRITE))); - - List commonHosts = new ArrayList(); - hosts.add(new StatefulHost(appId + "-1.algolianet.net", "https", EnumSet.of(CallType.READ, CallType.WRITE))); - hosts.add(new StatefulHost(appId + "-2.algolianet.net", "https", EnumSet.of(CallType.READ, CallType.WRITE))); - hosts.add(new StatefulHost(appId + "-3.algolianet.net", "https", EnumSet.of(CallType.READ, CallType.WRITE))); - - Collections.shuffle(commonHosts, new Random()); - - return Stream.concat(hosts.stream(), commonHosts.stream()).collect(Collectors.toList()); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(delAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters) throws AlgoliaRuntimeException { - return this.del(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.del(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path) throws AlgoliaRuntimeException { - return this.del(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `del`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.delAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.delAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path) throws AlgoliaRuntimeException { - return this.delAsync(path, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters) throws AlgoliaRuntimeException { - return this.get(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.get(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path) throws AlgoliaRuntimeException { - return this.get(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `get`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.getAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path) throws AlgoliaRuntimeException { - return this.getAsync(path, null, null); - } - - /** - * List known incidents for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return IncidentsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public IncidentsResponse getClusterIncidents(String clusters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getClusterIncidentsAsync(clusters, requestOptions)); - } - - /** - * List known incidents for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return IncidentsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public IncidentsResponse getClusterIncidents(String clusters) throws AlgoliaRuntimeException { - return this.getClusterIncidents(clusters, null); - } - - /** - * (asynchronously) List known incidents for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClusterIncidentsAsync(String clusters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (clusters == null) { - throw new AlgoliaRuntimeException("Parameter `clusters` is required when calling `getClusterIncidents`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/incidents/{clusters}".replaceAll("\\{clusters\\}", this.escapeString(clusters.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List known incidents for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClusterIncidentsAsync(String clusters) throws AlgoliaRuntimeException { - return this.getClusterIncidentsAsync(clusters, null); - } - - /** - * Report whether a cluster is operational. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return StatusResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public StatusResponse getClusterStatus(String clusters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getClusterStatusAsync(clusters, requestOptions)); - } - - /** - * Report whether a cluster is operational. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return StatusResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public StatusResponse getClusterStatus(String clusters) throws AlgoliaRuntimeException { - return this.getClusterStatus(clusters, null); - } - - /** - * (asynchronously) Report whether a cluster is operational. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClusterStatusAsync(String clusters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (clusters == null) { - throw new AlgoliaRuntimeException("Parameter `clusters` is required when calling `getClusterStatus`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/status/{clusters}".replaceAll("\\{clusters\\}", this.escapeString(clusters.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Report whether a cluster is operational. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getClusterStatusAsync(String clusters) throws AlgoliaRuntimeException { - return this.getClusterStatusAsync(clusters, null); - } - - /** - * List known incidents for all clusters. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return IncidentsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public IncidentsResponse getIncidents(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getIncidentsAsync(requestOptions)); - } - - /** - * List known incidents for all clusters. - * - * @return IncidentsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public IncidentsResponse getIncidents() throws AlgoliaRuntimeException { - return this.getIncidents(null); - } - - /** - * (asynchronously) List known incidents for all clusters. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getIncidentsAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/incidents"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List known incidents for all clusters. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getIncidentsAsync() throws AlgoliaRuntimeException { - return this.getIncidentsAsync(null); - } - - /** - * List the average times for indexing operations for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return IndexingTimeResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public IndexingTimeResponse getIndexingTime(String clusters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getIndexingTimeAsync(clusters, requestOptions)); - } - - /** - * List the average times for indexing operations for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return IndexingTimeResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public IndexingTimeResponse getIndexingTime(String clusters) throws AlgoliaRuntimeException { - return this.getIndexingTime(clusters, null); - } - - /** - * (asynchronously) List the average times for indexing operations for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getIndexingTimeAsync(String clusters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (clusters == null) { - throw new AlgoliaRuntimeException("Parameter `clusters` is required when calling `getIndexingTime`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/indexing/{clusters}".replaceAll("\\{clusters\\}", this.escapeString(clusters.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List the average times for indexing operations for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getIndexingTimeAsync(String clusters) throws AlgoliaRuntimeException { - return this.getIndexingTimeAsync(clusters, null); - } - - /** - * List the servers belonging to clusters. The response depends on whether you authenticate your - * API request: - With authentication, the response lists the servers assigned to your Algolia - * application's cluster. - Without authentication, the response lists the servers for all Algolia - * clusters. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return InventoryResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public InventoryResponse getInventory(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getInventoryAsync(requestOptions)); - } - - /** - * List the servers belonging to clusters. The response depends on whether you authenticate your - * API request: - With authentication, the response lists the servers assigned to your Algolia - * application's cluster. - Without authentication, the response lists the servers for all Algolia - * clusters. - * - * @return InventoryResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public InventoryResponse getInventory() throws AlgoliaRuntimeException { - return this.getInventory(null); - } - - /** - * (asynchronously) List the servers belonging to clusters. The response depends on whether you - * authenticate your API request: - With authentication, the response lists the servers assigned - * to your Algolia application's cluster. - Without authentication, the response lists the - * servers for all Algolia clusters. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getInventoryAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/inventory/servers"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List the servers belonging to clusters. The response depends on whether you - * authenticate your API request: - With authentication, the response lists the servers assigned - * to your Algolia application's cluster. - Without authentication, the response lists the - * servers for all Algolia clusters. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getInventoryAsync() throws AlgoliaRuntimeException { - return this.getInventoryAsync(null); - } - - /** - * List the average latency for search requests for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return LatencyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public LatencyResponse getLatency(String clusters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getLatencyAsync(clusters, requestOptions)); - } - - /** - * List the average latency for search requests for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return LatencyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public LatencyResponse getLatency(String clusters) throws AlgoliaRuntimeException { - return this.getLatency(clusters, null); - } - - /** - * (asynchronously) List the average latency for search requests for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getLatencyAsync(String clusters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (clusters == null) { - throw new AlgoliaRuntimeException("Parameter `clusters` is required when calling `getLatency`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/latency/{clusters}".replaceAll("\\{clusters\\}", this.escapeString(clusters.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List the average latency for search requests for selected clusters. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getLatencyAsync(String clusters) throws AlgoliaRuntimeException { - return this.getLatencyAsync(clusters, null); - } - - /** - * Report the aggregate value of a metric for a selected period of time. - * - * @param metric Metric to report. For more information about the individual metrics, see the - * response. To include all metrics, use `*` as the parameter. (required) - * @param period Period over which to aggregate the metrics: - `minute`. Aggregate the last - * minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per - * minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate - * the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per - * day. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return InfrastructureResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public InfrastructureResponse getMetrics(Metric metric, Period period, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getMetricsAsync(metric, period, requestOptions)); - } - - /** - * Report the aggregate value of a metric for a selected period of time. - * - * @param metric Metric to report. For more information about the individual metrics, see the - * response. To include all metrics, use `*` as the parameter. (required) - * @param period Period over which to aggregate the metrics: - `minute`. Aggregate the last - * minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per - * minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate - * the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per - * day. (required) - * @return InfrastructureResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public InfrastructureResponse getMetrics(Metric metric, Period period) throws AlgoliaRuntimeException { - return this.getMetrics(metric, period, null); - } - - /** - * (asynchronously) Report the aggregate value of a metric for a selected period of time. - * - * @param metric Metric to report. For more information about the individual metrics, see the - * response. To include all metrics, use `*` as the parameter. (required) - * @param period Period over which to aggregate the metrics: - `minute`. Aggregate the last - * minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per - * minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate - * the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per - * day. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getMetricsAsync(Metric metric, Period period, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (metric == null) { - throw new AlgoliaRuntimeException("Parameter `metric` is required when calling `getMetrics`."); - } - - if (period == null) { - throw new AlgoliaRuntimeException("Parameter `period` is required when calling `getMetrics`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/infrastructure/{metric}/period/{period}".replaceAll("\\{metric\\}", this.escapeString(metric.toString())) - .replaceAll("\\{period\\}", this.escapeString(period.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Report the aggregate value of a metric for a selected period of time. - * - * @param metric Metric to report. For more information about the individual metrics, see the - * response. To include all metrics, use `*` as the parameter. (required) - * @param period Period over which to aggregate the metrics: - `minute`. Aggregate the last - * minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per - * minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate - * the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per - * day. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getMetricsAsync(Metric metric, Period period) throws AlgoliaRuntimeException { - return this.getMetricsAsync(metric, period, null); - } - - /** - * Test whether clusters are reachable or not. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Map> - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Map> getReachability(String clusters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getReachabilityAsync(clusters, requestOptions)); - } - - /** - * Test whether clusters are reachable or not. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return Map> - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Map> getReachability(String clusters) throws AlgoliaRuntimeException { - return this.getReachability(clusters, null); - } - - /** - * (asynchronously) Test whether clusters are reachable or not. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture>> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture>> getReachabilityAsync(String clusters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (clusters == null) { - throw new AlgoliaRuntimeException("Parameter `clusters` is required when calling `getReachability`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/reachability/{clusters}/probes".replaceAll("\\{clusters\\}", this.escapeString(clusters.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference>>() {}); - } - - /** - * (asynchronously) Test whether clusters are reachable or not. - * - * @param clusters Subset of clusters, separated by comma. (required) - * @return CompletableFuture>> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture>> getReachabilityAsync(String clusters) throws AlgoliaRuntimeException { - return this.getReachabilityAsync(clusters, null); - } - - /** - * Report whether clusters are operational. The response depends on whether you authenticate your - * API request. - With authentication, the response includes the status of the cluster assigned to - * your Algolia application. - Without authentication, the response lists the statuses of all - * public Algolia clusters. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return StatusResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public StatusResponse getStatus(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getStatusAsync(requestOptions)); - } - - /** - * Report whether clusters are operational. The response depends on whether you authenticate your - * API request. - With authentication, the response includes the status of the cluster assigned to - * your Algolia application. - Without authentication, the response lists the statuses of all - * public Algolia clusters. - * - * @return StatusResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public StatusResponse getStatus() throws AlgoliaRuntimeException { - return this.getStatus(null); - } - - /** - * (asynchronously) Report whether clusters are operational. The response depends on whether you - * authenticate your API request. - With authentication, the response includes the status of the - * cluster assigned to your Algolia application. - Without authentication, the response lists the - * statuses of all public Algolia clusters. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getStatusAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/status"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Report whether clusters are operational. The response depends on whether you - * authenticate your API request. - With authentication, the response includes the status of the - * cluster assigned to your Algolia application. - Without authentication, the response lists the - * statuses of all public Algolia clusters. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getStatusAsync() throws AlgoliaRuntimeException { - return this.getStatusAsync(null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(postAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.post(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.post(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path) throws AlgoliaRuntimeException { - return this.post(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `post`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.postAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(putAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.put(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.put(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path) throws AlgoliaRuntimeException { - return this.put(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `put`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.putAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PersonalizationClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PersonalizationClient.java deleted file mode 100644 index b4583c3d3b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PersonalizationClient.java +++ /dev/null @@ -1,851 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.api; - -import com.algolia.ApiClient; -import com.algolia.exceptions.*; -import com.algolia.model.personalization.*; -import com.algolia.utils.*; -import com.algolia.utils.retry.CallType; -import com.algolia.utils.retry.StatefulHost; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import okhttp3.Call; - -public class PersonalizationClient extends ApiClient { - - private static final String[] allowedRegions = { "eu", "us" }; - - public PersonalizationClient(String appId, String apiKey, String region) { - this(appId, apiKey, region, null); - } - - public PersonalizationClient(String appId, String apiKey, String region, ClientOptions options) { - super(appId, apiKey, "Personalization", "4.0.0-SNAPSHOT", options); - if (options != null && options.getHosts() != null) { - this.setHosts(options.getHosts()); - } else { - this.setHosts(getDefaultHosts(region)); - } - this.setConnectTimeout(2000); - this.setReadTimeout(5000); - this.setWriteTimeout(30000); - } - - private static List getDefaultHosts(String region) throws AlgoliaRuntimeException { - List hosts = new ArrayList(); - - boolean found = false; - if (region != null) { - for (String allowed : allowedRegions) { - if (allowed.equals(region)) { - found = true; - break; - } - } - } - - if (region == null || !found) { - throw new AlgoliaRuntimeException("`region` is required and must be one of the following: eu, us"); - } - - String url = "personalization.{region}.algolia.com".replace("{region}", region); - - hosts.add(new StatefulHost(url, "https", EnumSet.of(CallType.READ, CallType.WRITE))); - return hosts; - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(delAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters) throws AlgoliaRuntimeException { - return this.del(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.del(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path) throws AlgoliaRuntimeException { - return this.del(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `del`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.delAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.delAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path) throws AlgoliaRuntimeException { - return this.delAsync(path, null, null); - } - - /** - * Delete the user profile and all its associated data. Returns, as part of the response, a date - * until which the data can safely be considered as deleted for the given user. This means if you - * send events for the given user before this date, they will be ignored. Any data received after - * the deletedUntil date will start building a new user profile. It might take a couple hours for - * the deletion request to be fully processed. - * - * @param userToken userToken representing the user for which to fetch the Personalization - * profile. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeleteUserProfileResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteUserProfileResponse deleteUserProfile(String userToken, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteUserProfileAsync(userToken, requestOptions)); - } - - /** - * Delete the user profile and all its associated data. Returns, as part of the response, a date - * until which the data can safely be considered as deleted for the given user. This means if you - * send events for the given user before this date, they will be ignored. Any data received after - * the deletedUntil date will start building a new user profile. It might take a couple hours for - * the deletion request to be fully processed. - * - * @param userToken userToken representing the user for which to fetch the Personalization - * profile. (required) - * @return DeleteUserProfileResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteUserProfileResponse deleteUserProfile(String userToken) throws AlgoliaRuntimeException { - return this.deleteUserProfile(userToken, null); - } - - /** - * (asynchronously) Delete the user profile and all its associated data. Returns, as part of the - * response, a date until which the data can safely be considered as deleted for the given user. - * This means if you send events for the given user before this date, they will be ignored. Any - * data received after the deletedUntil date will start building a new user profile. It might take - * a couple hours for the deletion request to be fully processed. - * - * @param userToken userToken representing the user for which to fetch the Personalization - * profile. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteUserProfileAsync(String userToken, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (userToken == null) { - throw new AlgoliaRuntimeException("Parameter `userToken` is required when calling `deleteUserProfile`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/profiles/{userToken}".replaceAll("\\{userToken\\}", this.escapeString(userToken.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete the user profile and all its associated data. Returns, as part of the - * response, a date until which the data can safely be considered as deleted for the given user. - * This means if you send events for the given user before this date, they will be ignored. Any - * data received after the deletedUntil date will start building a new user profile. It might take - * a couple hours for the deletion request to be fully processed. - * - * @param userToken userToken representing the user for which to fetch the Personalization - * profile. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteUserProfileAsync(String userToken) throws AlgoliaRuntimeException { - return this.deleteUserProfileAsync(userToken, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters) throws AlgoliaRuntimeException { - return this.get(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.get(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path) throws AlgoliaRuntimeException { - return this.get(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `get`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.getAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path) throws AlgoliaRuntimeException { - return this.getAsync(path, null, null); - } - - /** - * The strategy contains information on the events and facets that impact user profiles and - * personalized search results. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return PersonalizationStrategyParams - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public PersonalizationStrategyParams getPersonalizationStrategy(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getPersonalizationStrategyAsync(requestOptions)); - } - - /** - * The strategy contains information on the events and facets that impact user profiles and - * personalized search results. - * - * @return PersonalizationStrategyParams - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public PersonalizationStrategyParams getPersonalizationStrategy() throws AlgoliaRuntimeException { - return this.getPersonalizationStrategy(null); - } - - /** - * (asynchronously) The strategy contains information on the events and facets that impact user - * profiles and personalized search results. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getPersonalizationStrategyAsync(RequestOptions requestOptions) - throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/strategies/personalization"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) The strategy contains information on the events and facets that impact user - * profiles and personalized search results. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getPersonalizationStrategyAsync() throws AlgoliaRuntimeException { - return this.getPersonalizationStrategyAsync(null); - } - - /** - * Get the user profile built from Personalization strategy. The profile is structured by facet - * name used in the strategy. Each facet value is mapped to its score. Each score represents the - * user affinity for a specific facet value given the userToken past events and the - * Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp - * is provided using the ISO 8601 format for debugging purposes. - * - * @param userToken userToken representing the user for which to fetch the Personalization - * profile. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetUserTokenResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetUserTokenResponse getUserTokenProfile(String userToken, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getUserTokenProfileAsync(userToken, requestOptions)); - } - - /** - * Get the user profile built from Personalization strategy. The profile is structured by facet - * name used in the strategy. Each facet value is mapped to its score. Each score represents the - * user affinity for a specific facet value given the userToken past events and the - * Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp - * is provided using the ISO 8601 format for debugging purposes. - * - * @param userToken userToken representing the user for which to fetch the Personalization - * profile. (required) - * @return GetUserTokenResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetUserTokenResponse getUserTokenProfile(String userToken) throws AlgoliaRuntimeException { - return this.getUserTokenProfile(userToken, null); - } - - /** - * (asynchronously) Get the user profile built from Personalization strategy. The profile is - * structured by facet name used in the strategy. Each facet value is mapped to its score. Each - * score represents the user affinity for a specific facet value given the userToken past events - * and the Personalization strategy defined. Scores are bounded to 20. The last processed event - * timestamp is provided using the ISO 8601 format for debugging purposes. - * - * @param userToken userToken representing the user for which to fetch the Personalization - * profile. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getUserTokenProfileAsync(String userToken, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (userToken == null) { - throw new AlgoliaRuntimeException("Parameter `userToken` is required when calling `getUserTokenProfile`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/profiles/personalization/{userToken}".replaceAll("\\{userToken\\}", this.escapeString(userToken.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get the user profile built from Personalization strategy. The profile is - * structured by facet name used in the strategy. Each facet value is mapped to its score. Each - * score represents the user affinity for a specific facet value given the userToken past events - * and the Personalization strategy defined. Scores are bounded to 20. The last processed event - * timestamp is provided using the ISO 8601 format for debugging purposes. - * - * @param userToken userToken representing the user for which to fetch the Personalization - * profile. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getUserTokenProfileAsync(String userToken) throws AlgoliaRuntimeException { - return this.getUserTokenProfileAsync(userToken, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(postAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.post(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.post(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path) throws AlgoliaRuntimeException { - return this.post(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `post`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.postAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(putAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.put(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.put(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path) throws AlgoliaRuntimeException { - return this.put(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `put`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.putAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, null); - } - - /** - * A strategy defines the events and facets that impact user profiles and personalized search - * results. - * - * @param personalizationStrategyParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SetPersonalizationStrategyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SetPersonalizationStrategyResponse setPersonalizationStrategy( - PersonalizationStrategyParams personalizationStrategyParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(setPersonalizationStrategyAsync(personalizationStrategyParams, requestOptions)); - } - - /** - * A strategy defines the events and facets that impact user profiles and personalized search - * results. - * - * @param personalizationStrategyParams (required) - * @return SetPersonalizationStrategyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SetPersonalizationStrategyResponse setPersonalizationStrategy(PersonalizationStrategyParams personalizationStrategyParams) - throws AlgoliaRuntimeException { - return this.setPersonalizationStrategy(personalizationStrategyParams, null); - } - - /** - * (asynchronously) A strategy defines the events and facets that impact user profiles and - * personalized search results. - * - * @param personalizationStrategyParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture setPersonalizationStrategyAsync( - PersonalizationStrategyParams personalizationStrategyParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (personalizationStrategyParams == null) { - throw new AlgoliaRuntimeException( - "Parameter `personalizationStrategyParams` is required when calling" + " `setPersonalizationStrategy`." - ); - } - - Object bodyObj = personalizationStrategyParams; - - // create path and map variables - String requestPath = "/1/strategies/personalization"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) A strategy defines the events and facets that impact user profiles and - * personalized search results. - * - * @param personalizationStrategyParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture setPersonalizationStrategyAsync( - PersonalizationStrategyParams personalizationStrategyParams - ) throws AlgoliaRuntimeException { - return this.setPersonalizationStrategyAsync(personalizationStrategyParams, null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PredictClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PredictClient.java deleted file mode 100644 index 3be8cba09e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PredictClient.java +++ /dev/null @@ -1,1721 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.api; - -import com.algolia.ApiClient; -import com.algolia.exceptions.*; -import com.algolia.model.predict.*; -import com.algolia.utils.*; -import com.algolia.utils.retry.CallType; -import com.algolia.utils.retry.StatefulHost; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import okhttp3.Call; - -public class PredictClient extends ApiClient { - - private static final String[] allowedRegions = { "eu", "us" }; - - public PredictClient(String appId, String apiKey, String region) { - this(appId, apiKey, region, null); - } - - public PredictClient(String appId, String apiKey, String region, ClientOptions options) { - super(appId, apiKey, "Predict", "4.0.0-SNAPSHOT", options); - if (options != null && options.getHosts() != null) { - this.setHosts(options.getHosts()); - } else { - this.setHosts(getDefaultHosts(region)); - } - this.setConnectTimeout(2000); - this.setReadTimeout(5000); - this.setWriteTimeout(30000); - } - - private static List getDefaultHosts(String region) throws AlgoliaRuntimeException { - List hosts = new ArrayList(); - - boolean found = false; - if (region != null) { - for (String allowed : allowedRegions) { - if (allowed.equals(region)) { - found = true; - break; - } - } - } - - if (region == null || !found) { - throw new AlgoliaRuntimeException("`region` is required and must be one of the following: eu, us"); - } - - String url = "predict.{region}.algolia.com".replace("{region}", region); - - hosts.add(new StatefulHost(url, "https", EnumSet.of(CallType.READ, CallType.WRITE))); - return hosts; - } - - /** - * Activate an existing model template. This action triggers the training and inference pipelines - * for the selected model. The model is added with `modelStatus=pending`. If a model with the - * exact same source & index already exists, the API endpoint returns an error. - * - * @param activateModelParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ActivateModelInstanceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ActivateModelInstanceResponse activateModelInstance(ActivateModelParams activateModelParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(activateModelInstanceAsync(activateModelParams, requestOptions)); - } - - /** - * Activate an existing model template. This action triggers the training and inference pipelines - * for the selected model. The model is added with `modelStatus=pending`. If a model with the - * exact same source & index already exists, the API endpoint returns an error. - * - * @param activateModelParams (required) - * @return ActivateModelInstanceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ActivateModelInstanceResponse activateModelInstance(ActivateModelParams activateModelParams) throws AlgoliaRuntimeException { - return this.activateModelInstance(activateModelParams, null); - } - - /** - * (asynchronously) Activate an existing model template. This action triggers the training and - * inference pipelines for the selected model. The model is added with - * `modelStatus=pending`. If a model with the exact same source & index already - * exists, the API endpoint returns an error. - * - * @param activateModelParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture activateModelInstanceAsync( - ActivateModelParams activateModelParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (activateModelParams == null) { - throw new AlgoliaRuntimeException("Parameter `activateModelParams` is required when calling `activateModelInstance`."); - } - - Object bodyObj = activateModelParams; - - // create path and map variables - String requestPath = "/1/predict/models"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Activate an existing model template. This action triggers the training and - * inference pipelines for the selected model. The model is added with - * `modelStatus=pending`. If a model with the exact same source & index already - * exists, the API endpoint returns an error. - * - * @param activateModelParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture activateModelInstanceAsync(ActivateModelParams activateModelParams) - throws AlgoliaRuntimeException { - return this.activateModelInstanceAsync(activateModelParams, null); - } - - /** - * Create a new segment. All segments added by this endpoint will have a computed type. The - * endpoint receives a filters parameter, with a syntax similar to filters for Rules. - * - * @param createSegmentParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CreateSegmentResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CreateSegmentResponse createSegment(CreateSegmentParams createSegmentParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(createSegmentAsync(createSegmentParams, requestOptions)); - } - - /** - * Create a new segment. All segments added by this endpoint will have a computed type. The - * endpoint receives a filters parameter, with a syntax similar to filters for Rules. - * - * @param createSegmentParams (required) - * @return CreateSegmentResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CreateSegmentResponse createSegment(CreateSegmentParams createSegmentParams) throws AlgoliaRuntimeException { - return this.createSegment(createSegmentParams, null); - } - - /** - * (asynchronously) Create a new segment. All segments added by this endpoint will have a computed - * type. The endpoint receives a filters parameter, with a syntax similar to filters for Rules. - * - * @param createSegmentParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture createSegmentAsync( - CreateSegmentParams createSegmentParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (createSegmentParams == null) { - throw new AlgoliaRuntimeException("Parameter `createSegmentParams` is required when calling `createSegment`."); - } - - Object bodyObj = createSegmentParams; - - // create path and map variables - String requestPath = "/1/segments"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Create a new segment. All segments added by this endpoint will have a computed - * type. The endpoint receives a filters parameter, with a syntax similar to filters for Rules. - * - * @param createSegmentParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture createSegmentAsync(CreateSegmentParams createSegmentParams) - throws AlgoliaRuntimeException { - return this.createSegmentAsync(createSegmentParams, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(delAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters) throws AlgoliaRuntimeException { - return this.del(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.del(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path) throws AlgoliaRuntimeException { - return this.del(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `del`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.delAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.delAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path) throws AlgoliaRuntimeException { - return this.delAsync(path, null, null); - } - - /** - * Delete the model’s configuration, pipelines and generated predictions. - * - * @param modelID The ID of the model to retrieve. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeleteModelInstanceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteModelInstanceResponse deleteModelInstance(String modelID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteModelInstanceAsync(modelID, requestOptions)); - } - - /** - * Delete the model’s configuration, pipelines and generated predictions. - * - * @param modelID The ID of the model to retrieve. (required) - * @return DeleteModelInstanceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteModelInstanceResponse deleteModelInstance(String modelID) throws AlgoliaRuntimeException { - return this.deleteModelInstance(modelID, null); - } - - /** - * (asynchronously) Delete the model’s configuration, pipelines and generated predictions. - * - * @param modelID The ID of the model to retrieve. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteModelInstanceAsync(String modelID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (modelID == null) { - throw new AlgoliaRuntimeException("Parameter `modelID` is required when calling `deleteModelInstance`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/predict/models/{modelID}".replaceAll("\\{modelID\\}", this.escapeString(modelID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete the model’s configuration, pipelines and generated predictions. - * - * @param modelID The ID of the model to retrieve. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteModelInstanceAsync(String modelID) throws AlgoliaRuntimeException { - return this.deleteModelInstanceAsync(modelID, null); - } - - /** - * Delete the segment’s configuration. User intents (predictions) from the segment are not - * deleted. All segment types (computed or custom) can be deleted. When the query is successful, - * the HTTP response is 200 OK and returns the date until which you can safely consider the data - * as being deleted. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeleteSegmentResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteSegmentResponse deleteSegment(String segmentID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteSegmentAsync(segmentID, requestOptions)); - } - - /** - * Delete the segment’s configuration. User intents (predictions) from the segment are not - * deleted. All segment types (computed or custom) can be deleted. When the query is successful, - * the HTTP response is 200 OK and returns the date until which you can safely consider the data - * as being deleted. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @return DeleteSegmentResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteSegmentResponse deleteSegment(String segmentID) throws AlgoliaRuntimeException { - return this.deleteSegment(segmentID, null); - } - - /** - * (asynchronously) Delete the segment’s configuration. User intents (predictions) from the - * segment are not deleted. All segment types (computed or custom) can be deleted. When the query - * is successful, the HTTP response is 200 OK and returns the date until which you can safely - * consider the data as being deleted. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteSegmentAsync(String segmentID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (segmentID == null) { - throw new AlgoliaRuntimeException("Parameter `segmentID` is required when calling `deleteSegment`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/segments/{segmentID}".replaceAll("\\{segmentID\\}", this.escapeString(segmentID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete the segment’s configuration. User intents (predictions) from the - * segment are not deleted. All segment types (computed or custom) can be deleted. When the query - * is successful, the HTTP response is 200 OK and returns the date until which you can safely - * consider the data as being deleted. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteSegmentAsync(String segmentID) throws AlgoliaRuntimeException { - return this.deleteSegmentAsync(segmentID, null); - } - - /** - * Delete all data and predictions associated with an authenticated user (userID) or an anonymous - * user (cookieID, sessionID). - * - * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users - * (visitors). (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeleteUserProfileResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteUserProfileResponse deleteUserProfile(String userID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteUserProfileAsync(userID, requestOptions)); - } - - /** - * Delete all data and predictions associated with an authenticated user (userID) or an anonymous - * user (cookieID, sessionID). - * - * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users - * (visitors). (required) - * @return DeleteUserProfileResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteUserProfileResponse deleteUserProfile(String userID) throws AlgoliaRuntimeException { - return this.deleteUserProfile(userID, null); - } - - /** - * (asynchronously) Delete all data and predictions associated with an authenticated user (userID) - * or an anonymous user (cookieID, sessionID). - * - * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users - * (visitors). (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteUserProfileAsync(String userID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (userID == null) { - throw new AlgoliaRuntimeException("Parameter `userID` is required when calling `deleteUserProfile`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/users/{userID}".replaceAll("\\{userID\\}", this.escapeString(userID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete all data and predictions associated with an authenticated user (userID) - * or an anonymous user (cookieID, sessionID). - * - * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users - * (visitors). (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteUserProfileAsync(String userID) throws AlgoliaRuntimeException { - return this.deleteUserProfileAsync(userID, null); - } - - /** - * Get the list of segments with their configuration. - * - * @param type The type of segments to fetch. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List fetchAllSegments(SegmentType type, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(fetchAllSegmentsAsync(type, requestOptions)); - } - - /** - * Get the list of segments with their configuration. - * - * @param type The type of segments to fetch. (optional) - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List fetchAllSegments(SegmentType type) throws AlgoliaRuntimeException { - return this.fetchAllSegments(type, null); - } - - /** - * Get the list of segments with their configuration. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List fetchAllSegments(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.fetchAllSegments(null, requestOptions); - } - - /** - * Get the list of segments with their configuration. - * - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List fetchAllSegments() throws AlgoliaRuntimeException { - return this.fetchAllSegments(null, null); - } - - /** - * (asynchronously) Get the list of segments with their configuration. - * - * @param type The type of segments to fetch. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> fetchAllSegmentsAsync(SegmentType type, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/segments"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (type != null) { - queryParameters.put("type", parameterToString(type)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference>() {}); - } - - /** - * (asynchronously) Get the list of segments with their configuration. - * - * @param type The type of segments to fetch. (optional) - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> fetchAllSegmentsAsync(SegmentType type) throws AlgoliaRuntimeException { - return this.fetchAllSegmentsAsync(type, null); - } - - /** - * (asynchronously) Get the list of segments with their configuration. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> fetchAllSegmentsAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.fetchAllSegmentsAsync(null, requestOptions); - } - - /** - * (asynchronously) Get the list of segments with their configuration. - * - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> fetchAllSegmentsAsync() throws AlgoliaRuntimeException { - return this.fetchAllSegmentsAsync(null, null); - } - - /** - * Get all users with predictions in the provided application. - * - * @param fetchAllUserProfilesParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return FetchAllUserProfilesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public FetchAllUserProfilesResponse fetchAllUserProfiles( - FetchAllUserProfilesParams fetchAllUserProfilesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(fetchAllUserProfilesAsync(fetchAllUserProfilesParams, requestOptions)); - } - - /** - * Get all users with predictions in the provided application. - * - * @param fetchAllUserProfilesParams (required) - * @return FetchAllUserProfilesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public FetchAllUserProfilesResponse fetchAllUserProfiles(FetchAllUserProfilesParams fetchAllUserProfilesParams) - throws AlgoliaRuntimeException { - return this.fetchAllUserProfiles(fetchAllUserProfilesParams, null); - } - - /** - * (asynchronously) Get all users with predictions in the provided application. - * - * @param fetchAllUserProfilesParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture fetchAllUserProfilesAsync( - FetchAllUserProfilesParams fetchAllUserProfilesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (fetchAllUserProfilesParams == null) { - throw new AlgoliaRuntimeException("Parameter `fetchAllUserProfilesParams` is required when calling" + " `fetchAllUserProfiles`."); - } - - Object bodyObj = fetchAllUserProfilesParams; - - // create path and map variables - String requestPath = "/1/users"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get all users with predictions in the provided application. - * - * @param fetchAllUserProfilesParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture fetchAllUserProfilesAsync(FetchAllUserProfilesParams fetchAllUserProfilesParams) - throws AlgoliaRuntimeException { - return this.fetchAllUserProfilesAsync(fetchAllUserProfilesParams, null); - } - - /** - * Get the segment configuration. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Segment - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Segment fetchSegment(String segmentID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(fetchSegmentAsync(segmentID, requestOptions)); - } - - /** - * Get the segment configuration. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @return Segment - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Segment fetchSegment(String segmentID) throws AlgoliaRuntimeException { - return this.fetchSegment(segmentID, null); - } - - /** - * (asynchronously) Get the segment configuration. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture fetchSegmentAsync(String segmentID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (segmentID == null) { - throw new AlgoliaRuntimeException("Parameter `segmentID` is required when calling `fetchSegment`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/segments/{segmentID}".replaceAll("\\{segmentID\\}", this.escapeString(segmentID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get the segment configuration. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture fetchSegmentAsync(String segmentID) throws AlgoliaRuntimeException { - return this.fetchSegmentAsync(segmentID, null); - } - - /** - * Get predictions, properties (raw, computed or custom) and segments (computed or custom) for a - * user profile. - * - * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users - * (visitors). (required) - * @param params (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UserProfile - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UserProfile fetchUserProfile(String userID, Params params, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(fetchUserProfileAsync(userID, params, requestOptions)); - } - - /** - * Get predictions, properties (raw, computed or custom) and segments (computed or custom) for a - * user profile. - * - * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users - * (visitors). (required) - * @param params (required) - * @return UserProfile - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UserProfile fetchUserProfile(String userID, Params params) throws AlgoliaRuntimeException { - return this.fetchUserProfile(userID, params, null); - } - - /** - * (asynchronously) Get predictions, properties (raw, computed or custom) and segments (computed - * or custom) for a user profile. - * - * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users - * (visitors). (required) - * @param params (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture fetchUserProfileAsync(String userID, Params params, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (userID == null) { - throw new AlgoliaRuntimeException("Parameter `userID` is required when calling `fetchUserProfile`."); - } - - if (params == null) { - throw new AlgoliaRuntimeException("Parameter `params` is required when calling `fetchUserProfile`."); - } - - Object bodyObj = params; - - // create path and map variables - String requestPath = "/1/users/{userID}/fetch".replaceAll("\\{userID\\}", this.escapeString(userID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get predictions, properties (raw, computed or custom) and segments (computed - * or custom) for a user profile. - * - * @param userID User ID for authenticated users or cookie ID for non-authenticated repeated users - * (visitors). (required) - * @param params (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture fetchUserProfileAsync(String userID, Params params) throws AlgoliaRuntimeException { - return this.fetchUserProfileAsync(userID, params, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters) throws AlgoliaRuntimeException { - return this.get(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.get(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path) throws AlgoliaRuntimeException { - return this.get(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `get`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.getAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path) throws AlgoliaRuntimeException { - return this.getAsync(path, null, null); - } - - /** - * Get a list of all available model types. Each model type can be activated more than once, by - * selecting a different data source. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List getAvailableModelTypes(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAvailableModelTypesAsync(requestOptions)); - } - - /** - * Get a list of all available model types. Each model type can be activated more than once, by - * selecting a different data source. - * - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List getAvailableModelTypes() throws AlgoliaRuntimeException { - return this.getAvailableModelTypes(null); - } - - /** - * (asynchronously) Get a list of all available model types. Each model type can be activated more - * than once, by selecting a different data source. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getAvailableModelTypesAsync(RequestOptions requestOptions) - throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/predict/modeltypes"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference>() {}); - } - - /** - * (asynchronously) Get a list of all available model types. Each model type can be activated more - * than once, by selecting a different data source. - * - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getAvailableModelTypesAsync() throws AlgoliaRuntimeException { - return this.getAvailableModelTypesAsync(null); - } - - /** - * Get the configuration for a model that was activated. - * - * @param modelID The ID of the model to retrieve. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ModelInstance - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ModelInstance getModelInstanceConfig(String modelID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getModelInstanceConfigAsync(modelID, requestOptions)); - } - - /** - * Get the configuration for a model that was activated. - * - * @param modelID The ID of the model to retrieve. (required) - * @return ModelInstance - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ModelInstance getModelInstanceConfig(String modelID) throws AlgoliaRuntimeException { - return this.getModelInstanceConfig(modelID, null); - } - - /** - * (asynchronously) Get the configuration for a model that was activated. - * - * @param modelID The ID of the model to retrieve. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getModelInstanceConfigAsync(String modelID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (modelID == null) { - throw new AlgoliaRuntimeException("Parameter `modelID` is required when calling `getModelInstanceConfig`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/predict/models/{modelID}".replaceAll("\\{modelID\\}", this.escapeString(modelID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get the configuration for a model that was activated. - * - * @param modelID The ID of the model to retrieve. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getModelInstanceConfigAsync(String modelID) throws AlgoliaRuntimeException { - return this.getModelInstanceConfigAsync(modelID, null); - } - - /** - * Get a list of all model instances. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List getModelInstances(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getModelInstancesAsync(requestOptions)); - } - - /** - * Get a list of all model instances. - * - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List getModelInstances() throws AlgoliaRuntimeException { - return this.getModelInstances(null); - } - - /** - * (asynchronously) Get a list of all model instances. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getModelInstancesAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/predict/models"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference>() {}); - } - - /** - * (asynchronously) Get a list of all model instances. - * - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getModelInstancesAsync() throws AlgoliaRuntimeException { - return this.getModelInstancesAsync(null); - } - - /** - * Get the model instance’ training metrics. - * - * @param modelID The ID of the model to retrieve. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetModelMetricsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetModelMetricsResponse getModelMetrics(String modelID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getModelMetricsAsync(modelID, requestOptions)); - } - - /** - * Get the model instance’ training metrics. - * - * @param modelID The ID of the model to retrieve. (required) - * @return GetModelMetricsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetModelMetricsResponse getModelMetrics(String modelID) throws AlgoliaRuntimeException { - return this.getModelMetrics(modelID, null); - } - - /** - * (asynchronously) Get the model instance’ training metrics. - * - * @param modelID The ID of the model to retrieve. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getModelMetricsAsync(String modelID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (modelID == null) { - throw new AlgoliaRuntimeException("Parameter `modelID` is required when calling `getModelMetrics`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/predict/models/{modelID}/metrics".replaceAll("\\{modelID\\}", this.escapeString(modelID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get the model instance’ training metrics. - * - * @param modelID The ID of the model to retrieve. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getModelMetricsAsync(String modelID) throws AlgoliaRuntimeException { - return this.getModelMetricsAsync(modelID, null); - } - - /** - * Get the profiles of users that belong to a segment. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param fetchAllUserProfilesParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetSegmentUsersResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSegmentUsersResponse getSegmentUsers( - String segmentID, - FetchAllUserProfilesParams fetchAllUserProfilesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getSegmentUsersAsync(segmentID, fetchAllUserProfilesParams, requestOptions)); - } - - /** - * Get the profiles of users that belong to a segment. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param fetchAllUserProfilesParams (required) - * @return GetSegmentUsersResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetSegmentUsersResponse getSegmentUsers(String segmentID, FetchAllUserProfilesParams fetchAllUserProfilesParams) - throws AlgoliaRuntimeException { - return this.getSegmentUsers(segmentID, fetchAllUserProfilesParams, null); - } - - /** - * (asynchronously) Get the profiles of users that belong to a segment. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param fetchAllUserProfilesParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSegmentUsersAsync( - String segmentID, - FetchAllUserProfilesParams fetchAllUserProfilesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (segmentID == null) { - throw new AlgoliaRuntimeException("Parameter `segmentID` is required when calling `getSegmentUsers`."); - } - - if (fetchAllUserProfilesParams == null) { - throw new AlgoliaRuntimeException("Parameter `fetchAllUserProfilesParams` is required when calling `getSegmentUsers`."); - } - - Object bodyObj = fetchAllUserProfilesParams; - - // create path and map variables - String requestPath = "/1/segments/{segmentID}/users".replaceAll("\\{segmentID\\}", this.escapeString(segmentID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get the profiles of users that belong to a segment. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param fetchAllUserProfilesParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSegmentUsersAsync( - String segmentID, - FetchAllUserProfilesParams fetchAllUserProfilesParams - ) throws AlgoliaRuntimeException { - return this.getSegmentUsersAsync(segmentID, fetchAllUserProfilesParams, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param body The parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(postAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param body The parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.post(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.post(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path) throws AlgoliaRuntimeException { - return this.post(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param body The parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `post`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param body The parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.postAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param body The parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(putAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param body The parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.put(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.put(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path) throws AlgoliaRuntimeException { - return this.put(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param body The parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `put`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param parameters Query parameters to be applied to the current query. (optional) - * @param body The parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.putAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path The path of the API endpoint to target, anything after the /1 needs to be - * specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, null); - } - - /** - * Update a model’s configuration. - * - * @param modelID The ID of the model to retrieve. (required) - * @param updateModelParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdateModelInstanceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdateModelInstanceResponse updateModelInstance( - String modelID, - UpdateModelParams updateModelParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(updateModelInstanceAsync(modelID, updateModelParams, requestOptions)); - } - - /** - * Update a model’s configuration. - * - * @param modelID The ID of the model to retrieve. (required) - * @param updateModelParams (required) - * @return UpdateModelInstanceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdateModelInstanceResponse updateModelInstance(String modelID, UpdateModelParams updateModelParams) - throws AlgoliaRuntimeException { - return this.updateModelInstance(modelID, updateModelParams, null); - } - - /** - * (asynchronously) Update a model’s configuration. - * - * @param modelID The ID of the model to retrieve. (required) - * @param updateModelParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture updateModelInstanceAsync( - String modelID, - UpdateModelParams updateModelParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (modelID == null) { - throw new AlgoliaRuntimeException("Parameter `modelID` is required when calling `updateModelInstance`."); - } - - if (updateModelParams == null) { - throw new AlgoliaRuntimeException("Parameter `updateModelParams` is required when calling `updateModelInstance`."); - } - - Object bodyObj = updateModelParams; - - // create path and map variables - String requestPath = "/1/predict/models/{modelID}".replaceAll("\\{modelID\\}", this.escapeString(modelID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Update a model’s configuration. - * - * @param modelID The ID of the model to retrieve. (required) - * @param updateModelParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture updateModelInstanceAsync(String modelID, UpdateModelParams updateModelParams) - throws AlgoliaRuntimeException { - return this.updateModelInstanceAsync(modelID, updateModelParams, null); - } - - /** - * Update a segment’s configuration. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param updateSegmentParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdateSegmentResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdateSegmentResponse updateSegment(String segmentID, UpdateSegmentParams updateSegmentParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(updateSegmentAsync(segmentID, updateSegmentParams, requestOptions)); - } - - /** - * Update a segment’s configuration. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param updateSegmentParams (required) - * @return UpdateSegmentResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdateSegmentResponse updateSegment(String segmentID, UpdateSegmentParams updateSegmentParams) throws AlgoliaRuntimeException { - return this.updateSegment(segmentID, updateSegmentParams, null); - } - - /** - * (asynchronously) Update a segment’s configuration. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param updateSegmentParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture updateSegmentAsync( - String segmentID, - UpdateSegmentParams updateSegmentParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (segmentID == null) { - throw new AlgoliaRuntimeException("Parameter `segmentID` is required when calling `updateSegment`."); - } - - if (updateSegmentParams == null) { - throw new AlgoliaRuntimeException("Parameter `updateSegmentParams` is required when calling `updateSegment`."); - } - - Object bodyObj = updateSegmentParams; - - // create path and map variables - String requestPath = "/1/segments/{segmentID}".replaceAll("\\{segmentID\\}", this.escapeString(segmentID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Update a segment’s configuration. - * - * @param segmentID The ID of the Segment to fetch. (required) - * @param updateSegmentParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture updateSegmentAsync(String segmentID, UpdateSegmentParams updateSegmentParams) - throws AlgoliaRuntimeException { - return this.updateSegmentAsync(segmentID, updateSegmentParams, null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/QuerySuggestionsClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/QuerySuggestionsClient.java deleted file mode 100644 index 1ac7264f5e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/QuerySuggestionsClient.java +++ /dev/null @@ -1,1012 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.api; - -import com.algolia.ApiClient; -import com.algolia.exceptions.*; -import com.algolia.model.querysuggestions.*; -import com.algolia.utils.*; -import com.algolia.utils.retry.CallType; -import com.algolia.utils.retry.StatefulHost; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import okhttp3.Call; - -public class QuerySuggestionsClient extends ApiClient { - - private static final String[] allowedRegions = { "eu", "us" }; - - public QuerySuggestionsClient(String appId, String apiKey, String region) { - this(appId, apiKey, region, null); - } - - public QuerySuggestionsClient(String appId, String apiKey, String region, ClientOptions options) { - super(appId, apiKey, "QuerySuggestions", "4.0.0-SNAPSHOT", options); - if (options != null && options.getHosts() != null) { - this.setHosts(options.getHosts()); - } else { - this.setHosts(getDefaultHosts(region)); - } - this.setConnectTimeout(2000); - this.setReadTimeout(5000); - this.setWriteTimeout(30000); - } - - private static List getDefaultHosts(String region) throws AlgoliaRuntimeException { - List hosts = new ArrayList(); - - boolean found = false; - if (region != null) { - for (String allowed : allowedRegions) { - if (allowed.equals(region)) { - found = true; - break; - } - } - } - - if (region == null || !found) { - throw new AlgoliaRuntimeException("`region` is required and must be one of the following: eu, us"); - } - - String url = "query-suggestions.{region}.algolia.com".replace("{region}", region); - - hosts.add(new StatefulHost(url, "https", EnumSet.of(CallType.READ, CallType.WRITE))); - return hosts; - } - - /** - * Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia - * application. - * - * @param querySuggestionsConfigurationWithIndex (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return BaseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BaseResponse createConfig( - QuerySuggestionsConfigurationWithIndex querySuggestionsConfigurationWithIndex, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(createConfigAsync(querySuggestionsConfigurationWithIndex, requestOptions)); - } - - /** - * Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia - * application. - * - * @param querySuggestionsConfigurationWithIndex (required) - * @return BaseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BaseResponse createConfig(QuerySuggestionsConfigurationWithIndex querySuggestionsConfigurationWithIndex) - throws AlgoliaRuntimeException { - return this.createConfig(querySuggestionsConfigurationWithIndex, null); - } - - /** - * (asynchronously) Create a new Query Suggestions configuration. You can have up to 100 - * configurations per Algolia application. - * - * @param querySuggestionsConfigurationWithIndex (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture createConfigAsync( - QuerySuggestionsConfigurationWithIndex querySuggestionsConfigurationWithIndex, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (querySuggestionsConfigurationWithIndex == null) { - throw new AlgoliaRuntimeException("Parameter `querySuggestionsConfigurationWithIndex` is required when calling" + " `createConfig`."); - } - - Object bodyObj = querySuggestionsConfigurationWithIndex; - - // create path and map variables - String requestPath = "/1/configs"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Create a new Query Suggestions configuration. You can have up to 100 - * configurations per Algolia application. - * - * @param querySuggestionsConfigurationWithIndex (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture createConfigAsync(QuerySuggestionsConfigurationWithIndex querySuggestionsConfigurationWithIndex) - throws AlgoliaRuntimeException { - return this.createConfigAsync(querySuggestionsConfigurationWithIndex, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(delAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters) throws AlgoliaRuntimeException { - return this.del(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.del(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path) throws AlgoliaRuntimeException { - return this.del(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `del`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.delAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.delAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path) throws AlgoliaRuntimeException { - return this.delAsync(path, null, null); - } - - /** - * Delete a Query Suggestions configuration. Deleting only removes the configuration and stops - * updates to the Query Suggestions index. The Query Suggestions index itself is not deleted. - * - * @param indexName Query Suggestions index name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return BaseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BaseResponse deleteConfig(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteConfigAsync(indexName, requestOptions)); - } - - /** - * Delete a Query Suggestions configuration. Deleting only removes the configuration and stops - * updates to the Query Suggestions index. The Query Suggestions index itself is not deleted. - * - * @param indexName Query Suggestions index name. (required) - * @return BaseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BaseResponse deleteConfig(String indexName) throws AlgoliaRuntimeException { - return this.deleteConfig(indexName, null); - } - - /** - * (asynchronously) Delete a Query Suggestions configuration. Deleting only removes the - * configuration and stops updates to the Query Suggestions index. The Query Suggestions index - * itself is not deleted. - * - * @param indexName Query Suggestions index name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteConfigAsync(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `deleteConfig`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/configs/{indexName}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete a Query Suggestions configuration. Deleting only removes the - * configuration and stops updates to the Query Suggestions index. The Query Suggestions index - * itself is not deleted. - * - * @param indexName Query Suggestions index name. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteConfigAsync(String indexName) throws AlgoliaRuntimeException { - return this.deleteConfigAsync(indexName, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters) throws AlgoliaRuntimeException { - return this.get(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.get(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path) throws AlgoliaRuntimeException { - return this.get(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `get`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.getAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path) throws AlgoliaRuntimeException { - return this.getAsync(path, null, null); - } - - /** - * List all Query Suggestions configurations of your Algolia application. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List getAllConfigs(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAllConfigsAsync(requestOptions)); - } - - /** - * List all Query Suggestions configurations of your Algolia application. - * - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List getAllConfigs() throws AlgoliaRuntimeException { - return this.getAllConfigs(null); - } - - /** - * (asynchronously) List all Query Suggestions configurations of your Algolia application. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getAllConfigsAsync(RequestOptions requestOptions) - throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/configs"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference>() {}); - } - - /** - * (asynchronously) List all Query Suggestions configurations of your Algolia application. - * - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getAllConfigsAsync() throws AlgoliaRuntimeException { - return this.getAllConfigsAsync(null); - } - - /** - * Get a single Query Suggestions configuration. - * - * @param indexName Query Suggestions index name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return QuerySuggestionsConfigurationResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public QuerySuggestionsConfigurationResponse getConfig(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getConfigAsync(indexName, requestOptions)); - } - - /** - * Get a single Query Suggestions configuration. - * - * @param indexName Query Suggestions index name. (required) - * @return QuerySuggestionsConfigurationResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public QuerySuggestionsConfigurationResponse getConfig(String indexName) throws AlgoliaRuntimeException { - return this.getConfig(indexName, null); - } - - /** - * (asynchronously) Get a single Query Suggestions configuration. - * - * @param indexName Query Suggestions index name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getConfigAsync(String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getConfig`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/configs/{indexName}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get a single Query Suggestions configuration. - * - * @param indexName Query Suggestions index name. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getConfigAsync(String indexName) throws AlgoliaRuntimeException { - return this.getConfigAsync(indexName, null); - } - - /** - * Report the status of a Query Suggestions index. - * - * @param indexName Query Suggestions index name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetConfigStatus200Response - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetConfigStatus200Response getConfigStatus(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getConfigStatusAsync(indexName, requestOptions)); - } - - /** - * Report the status of a Query Suggestions index. - * - * @param indexName Query Suggestions index name. (required) - * @return GetConfigStatus200Response - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetConfigStatus200Response getConfigStatus(String indexName) throws AlgoliaRuntimeException { - return this.getConfigStatus(indexName, null); - } - - /** - * (asynchronously) Report the status of a Query Suggestions index. - * - * @param indexName Query Suggestions index name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getConfigStatusAsync(String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getConfigStatus`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/configs/{indexName}/status".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Report the status of a Query Suggestions index. - * - * @param indexName Query Suggestions index name. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getConfigStatusAsync(String indexName) throws AlgoliaRuntimeException { - return this.getConfigStatusAsync(indexName, null); - } - - /** - * Get the logs for a single Query Suggestions index. - * - * @param indexName Query Suggestions index name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetLogFile200Response - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetLogFile200Response getLogFile(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getLogFileAsync(indexName, requestOptions)); - } - - /** - * Get the logs for a single Query Suggestions index. - * - * @param indexName Query Suggestions index name. (required) - * @return GetLogFile200Response - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetLogFile200Response getLogFile(String indexName) throws AlgoliaRuntimeException { - return this.getLogFile(indexName, null); - } - - /** - * (asynchronously) Get the logs for a single Query Suggestions index. - * - * @param indexName Query Suggestions index name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getLogFileAsync(String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getLogFile`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/logs/{indexName}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get the logs for a single Query Suggestions index. - * - * @param indexName Query Suggestions index name. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getLogFileAsync(String indexName) throws AlgoliaRuntimeException { - return this.getLogFileAsync(indexName, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(postAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.post(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.post(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path) throws AlgoliaRuntimeException { - return this.post(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `post`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.postAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(putAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.put(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.put(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path) throws AlgoliaRuntimeException { - return this.put(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `put`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.putAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, null); - } - - /** - * Update a QuerySuggestions configuration. - * - * @param indexName Query Suggestions index name. (required) - * @param querySuggestionsConfiguration (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return BaseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BaseResponse updateConfig( - String indexName, - QuerySuggestionsConfiguration querySuggestionsConfiguration, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(updateConfigAsync(indexName, querySuggestionsConfiguration, requestOptions)); - } - - /** - * Update a QuerySuggestions configuration. - * - * @param indexName Query Suggestions index name. (required) - * @param querySuggestionsConfiguration (required) - * @return BaseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BaseResponse updateConfig(String indexName, QuerySuggestionsConfiguration querySuggestionsConfiguration) - throws AlgoliaRuntimeException { - return this.updateConfig(indexName, querySuggestionsConfiguration, null); - } - - /** - * (asynchronously) Update a QuerySuggestions configuration. - * - * @param indexName Query Suggestions index name. (required) - * @param querySuggestionsConfiguration (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture updateConfigAsync( - String indexName, - QuerySuggestionsConfiguration querySuggestionsConfiguration, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `updateConfig`."); - } - - if (querySuggestionsConfiguration == null) { - throw new AlgoliaRuntimeException("Parameter `querySuggestionsConfiguration` is required when calling `updateConfig`."); - } - - Object bodyObj = querySuggestionsConfiguration; - - // create path and map variables - String requestPath = "/1/configs/{indexName}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Update a QuerySuggestions configuration. - * - * @param indexName Query Suggestions index name. (required) - * @param querySuggestionsConfiguration (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture updateConfigAsync(String indexName, QuerySuggestionsConfiguration querySuggestionsConfiguration) - throws AlgoliaRuntimeException { - return this.updateConfigAsync(indexName, querySuggestionsConfiguration, null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/RecommendClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/RecommendClient.java deleted file mode 100644 index 646e6e811f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/RecommendClient.java +++ /dev/null @@ -1,1101 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.api; - -import com.algolia.ApiClient; -import com.algolia.exceptions.*; -import com.algolia.model.recommend.*; -import com.algolia.utils.*; -import com.algolia.utils.retry.CallType; -import com.algolia.utils.retry.StatefulHost; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.ArrayList; -import java.util.Collections; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.CompletableFuture; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import okhttp3.Call; - -public class RecommendClient extends ApiClient { - - public RecommendClient(String appId, String apiKey) { - this(appId, apiKey, null); - } - - public RecommendClient(String appId, String apiKey, ClientOptions options) { - super(appId, apiKey, "Recommend", "4.0.0-SNAPSHOT", options); - if (options != null && options.getHosts() != null) { - this.setHosts(options.getHosts()); - } else { - this.setHosts(getDefaultHosts(appId)); - } - this.setConnectTimeout(2000); - this.setReadTimeout(5000); - this.setWriteTimeout(30000); - } - - private static List getDefaultHosts(String appId) { - List hosts = new ArrayList(); - hosts.add(new StatefulHost(appId + "-dsn.algolia.net", "https", EnumSet.of(CallType.READ))); - hosts.add(new StatefulHost(appId + ".algolia.net", "https", EnumSet.of(CallType.WRITE))); - - List commonHosts = new ArrayList(); - hosts.add(new StatefulHost(appId + "-1.algolianet.net", "https", EnumSet.of(CallType.READ, CallType.WRITE))); - hosts.add(new StatefulHost(appId + "-2.algolianet.net", "https", EnumSet.of(CallType.READ, CallType.WRITE))); - hosts.add(new StatefulHost(appId + "-3.algolianet.net", "https", EnumSet.of(CallType.READ, CallType.WRITE))); - - Collections.shuffle(commonHosts, new Random()); - - return Stream.concat(hosts.stream(), commonHosts.stream()).collect(Collectors.toList()); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(delAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters) throws AlgoliaRuntimeException { - return this.del(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.del(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path) throws AlgoliaRuntimeException { - return this.del(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `del`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.delAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.delAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path) throws AlgoliaRuntimeException { - return this.delAsync(path, null, null); - } - - /** - * Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param objectID Unique record (object) identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteRecommendRule(String indexName, RecommendModels model, String objectID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteRecommendRuleAsync(indexName, model, objectID, requestOptions)); - } - - /** - * Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param objectID Unique record (object) identifier. (required) - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteRecommendRule(String indexName, RecommendModels model, String objectID) throws AlgoliaRuntimeException { - return this.deleteRecommendRule(indexName, model, objectID, null); - } - - /** - * (asynchronously) Delete a [Recommend - * rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param objectID Unique record (object) identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteRecommendRuleAsync( - String indexName, - RecommendModels model, - String objectID, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `deleteRecommendRule`."); - } - - if (model == null) { - throw new AlgoliaRuntimeException("Parameter `model` is required when calling `deleteRecommendRule`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `deleteRecommendRule`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{model\\}", this.escapeString(model.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete a [Recommend - * rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param objectID Unique record (object) identifier. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteRecommendRuleAsync(String indexName, RecommendModels model, String objectID) - throws AlgoliaRuntimeException { - return this.deleteRecommendRuleAsync(indexName, model, objectID, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters) throws AlgoliaRuntimeException { - return this.get(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.get(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path) throws AlgoliaRuntimeException { - return this.get(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `get`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.getAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path) throws AlgoliaRuntimeException { - return this.getAsync(path, null, null); - } - - /** - * Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param objectID Unique record (object) identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return RuleResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public RuleResponse getRecommendRule(String indexName, RecommendModels model, String objectID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(getRecommendRuleAsync(indexName, model, objectID, requestOptions)); - } - - /** - * Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param objectID Unique record (object) identifier. (required) - * @return RuleResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public RuleResponse getRecommendRule(String indexName, RecommendModels model, String objectID) throws AlgoliaRuntimeException { - return this.getRecommendRule(indexName, model, objectID, null); - } - - /** - * (asynchronously) Return a [Recommend - * rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param objectID Unique record (object) identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getRecommendRuleAsync( - String indexName, - RecommendModels model, - String objectID, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getRecommendRule`."); - } - - if (model == null) { - throw new AlgoliaRuntimeException("Parameter `model` is required when calling `getRecommendRule`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `getRecommendRule`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{model\\}", this.escapeString(model.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Return a [Recommend - * rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param objectID Unique record (object) identifier. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getRecommendRuleAsync(String indexName, RecommendModels model, String objectID) - throws AlgoliaRuntimeException { - return this.getRecommendRuleAsync(indexName, model, objectID, null); - } - - /** - * Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use - * this value here to check the status of that task. - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param taskID Unique identifier of a task. Numeric value (up to 64bits). (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetRecommendTaskResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetRecommendTaskResponse getRecommendStatus(String indexName, RecommendModels model, Long taskID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(getRecommendStatusAsync(indexName, model, taskID, requestOptions)); - } - - /** - * Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use - * this value here to check the status of that task. - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param taskID Unique identifier of a task. Numeric value (up to 64bits). (required) - * @return GetRecommendTaskResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetRecommendTaskResponse getRecommendStatus(String indexName, RecommendModels model, Long taskID) throws AlgoliaRuntimeException { - return this.getRecommendStatus(indexName, model, taskID, null); - } - - /** - * (asynchronously) Some operations, such as deleting a Recommend rule, will respond with a - * `taskID` value. Use this value here to check the status of that task. - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param taskID Unique identifier of a task. Numeric value (up to 64bits). (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getRecommendStatusAsync( - String indexName, - RecommendModels model, - Long taskID, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getRecommendStatus`."); - } - - if (model == null) { - throw new AlgoliaRuntimeException("Parameter `model` is required when calling `getRecommendStatus`."); - } - - if (taskID == null) { - throw new AlgoliaRuntimeException("Parameter `taskID` is required when calling `getRecommendStatus`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/{model}/task/{taskID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{model\\}", this.escapeString(model.toString())) - .replaceAll("\\{taskID\\}", this.escapeString(taskID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Some operations, such as deleting a Recommend rule, will respond with a - * `taskID` value. Use this value here to check the status of that task. - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param taskID Unique identifier of a task. Numeric value (up to 64bits). (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getRecommendStatusAsync(String indexName, RecommendModels model, Long taskID) - throws AlgoliaRuntimeException { - return this.getRecommendStatusAsync(indexName, model, taskID, null); - } - - /** - * Returns results from either recommendation or trending models: - **Recommendations** are - * provided by the [Related - * Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) - * and [Frequently Bought - * Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) - * models - **Trending** models are [Trending Items and Trending Facet - * Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values). - * - * @param getRecommendationsParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetRecommendationsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetRecommendationsResponse getRecommendations(GetRecommendationsParams getRecommendationsParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(getRecommendationsAsync(getRecommendationsParams, requestOptions)); - } - - /** - * Returns results from either recommendation or trending models: - **Recommendations** are - * provided by the [Related - * Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) - * and [Frequently Bought - * Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) - * models - **Trending** models are [Trending Items and Trending Facet - * Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values). - * - * @param getRecommendationsParams (required) - * @return GetRecommendationsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetRecommendationsResponse getRecommendations(GetRecommendationsParams getRecommendationsParams) throws AlgoliaRuntimeException { - return this.getRecommendations(getRecommendationsParams, null); - } - - /** - * (asynchronously) Returns results from either recommendation or trending models: - - * **Recommendations** are provided by the [Related - * Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) - * and [Frequently Bought - * Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) - * models - **Trending** models are [Trending Items and Trending Facet - * Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values). - * - * @param getRecommendationsParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getRecommendationsAsync( - GetRecommendationsParams getRecommendationsParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (getRecommendationsParams == null) { - throw new AlgoliaRuntimeException("Parameter `getRecommendationsParams` is required when calling `getRecommendations`."); - } - - Object bodyObj = getRecommendationsParams; - - // create path and map variables - String requestPath = "/1/indexes/*/recommendations"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns results from either recommendation or trending models: - - * **Recommendations** are provided by the [Related - * Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) - * and [Frequently Bought - * Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) - * models - **Trending** models are [Trending Items and Trending Facet - * Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values). - * - * @param getRecommendationsParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getRecommendationsAsync(GetRecommendationsParams getRecommendationsParams) - throws AlgoliaRuntimeException { - return this.getRecommendationsAsync(getRecommendationsParams, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(postAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.post(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.post(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path) throws AlgoliaRuntimeException { - return this.post(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `post`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.postAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(putAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.put(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.put(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path) throws AlgoliaRuntimeException { - return this.put(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `put`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.putAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, null); - } - - /** - * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param searchRecommendRulesParams (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchRecommendRulesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchRecommendRulesResponse searchRecommendRules( - String indexName, - RecommendModels model, - SearchRecommendRulesParams searchRecommendRulesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(searchRecommendRulesAsync(indexName, model, searchRecommendRulesParams, requestOptions)); - } - - /** - * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param searchRecommendRulesParams (optional) - * @return SearchRecommendRulesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchRecommendRulesResponse searchRecommendRules( - String indexName, - RecommendModels model, - SearchRecommendRulesParams searchRecommendRulesParams - ) throws AlgoliaRuntimeException { - return this.searchRecommendRules(indexName, model, searchRecommendRulesParams, null); - } - - /** - * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchRecommendRulesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchRecommendRulesResponse searchRecommendRules(String indexName, RecommendModels model, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.searchRecommendRules(indexName, model, null, requestOptions); - } - - /** - * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @return SearchRecommendRulesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchRecommendRulesResponse searchRecommendRules(String indexName, RecommendModels model) throws AlgoliaRuntimeException { - return this.searchRecommendRules(indexName, model, null, null); - } - - /** - * (asynchronously) List [Recommend - * rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param searchRecommendRulesParams (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchRecommendRulesAsync( - String indexName, - RecommendModels model, - SearchRecommendRulesParams searchRecommendRulesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `searchRecommendRules`."); - } - - if (model == null) { - throw new AlgoliaRuntimeException("Parameter `model` is required when calling `searchRecommendRules`."); - } - - Object bodyObj = searchRecommendRulesParams != null ? searchRecommendRulesParams : new Object(); - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/{model}/recommend/rules/search".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{model\\}", this.escapeString(model.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List [Recommend - * rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param searchRecommendRulesParams (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchRecommendRulesAsync( - String indexName, - RecommendModels model, - SearchRecommendRulesParams searchRecommendRulesParams - ) throws AlgoliaRuntimeException { - return this.searchRecommendRulesAsync(indexName, model, searchRecommendRulesParams, null); - } - - /** - * (asynchronously) List [Recommend - * rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchRecommendRulesAsync( - String indexName, - RecommendModels model, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return this.searchRecommendRulesAsync(indexName, model, null, requestOptions); - } - - /** - * (asynchronously) List [Recommend - * rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). - * - * @param indexName Index on which to perform the request. (required) - * @param model [Recommend - * models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models). - * (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchRecommendRulesAsync(String indexName, RecommendModels model) - throws AlgoliaRuntimeException { - return this.searchRecommendRulesAsync(indexName, model, null, null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java deleted file mode 100644 index 18c18385c9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java +++ /dev/null @@ -1,6868 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.api; - -import com.algolia.ApiClient; -import com.algolia.exceptions.*; -import com.algolia.model.search.*; -import com.algolia.utils.*; -import com.algolia.utils.retry.CallType; -import com.algolia.utils.retry.StatefulHost; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.ArrayList; -import java.util.Collections; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.CompletableFuture; -import java.util.function.IntUnaryOperator; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import okhttp3.Call; - -public class SearchClient extends ApiClient { - - public SearchClient(String appId, String apiKey) { - this(appId, apiKey, null); - } - - public SearchClient(String appId, String apiKey, ClientOptions options) { - super(appId, apiKey, "Search", "4.0.0-SNAPSHOT", options); - if (options != null && options.getHosts() != null) { - this.setHosts(options.getHosts()); - } else { - this.setHosts(getDefaultHosts(appId)); - } - this.setConnectTimeout(2000); - this.setReadTimeout(5000); - this.setWriteTimeout(30000); - } - - private static List getDefaultHosts(String appId) { - List hosts = new ArrayList(); - hosts.add(new StatefulHost(appId + "-dsn.algolia.net", "https", EnumSet.of(CallType.READ))); - hosts.add(new StatefulHost(appId + ".algolia.net", "https", EnumSet.of(CallType.WRITE))); - - List commonHosts = new ArrayList(); - hosts.add(new StatefulHost(appId + "-1.algolianet.net", "https", EnumSet.of(CallType.READ, CallType.WRITE))); - hosts.add(new StatefulHost(appId + "-2.algolianet.net", "https", EnumSet.of(CallType.READ, CallType.WRITE))); - hosts.add(new StatefulHost(appId + "-3.algolianet.net", "https", EnumSet.of(CallType.READ, CallType.WRITE))); - - Collections.shuffle(commonHosts, new Random()); - - return Stream.concat(hosts.stream(), commonHosts.stream()).collect(Collectors.toList()); - } - - /** - * Add a new API key with specific permissions and restrictions. The request must be authenticated - * with the admin API key. The response returns an API key string. - * - * @param apiKey (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return AddApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public AddApiKeyResponse addApiKey(ApiKey apiKey, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(addApiKeyAsync(apiKey, requestOptions)); - } - - /** - * Add a new API key with specific permissions and restrictions. The request must be authenticated - * with the admin API key. The response returns an API key string. - * - * @param apiKey (required) - * @return AddApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public AddApiKeyResponse addApiKey(ApiKey apiKey) throws AlgoliaRuntimeException { - return this.addApiKey(apiKey, null); - } - - /** - * (asynchronously) Add a new API key with specific permissions and restrictions. The request must - * be authenticated with the admin API key. The response returns an API key string. - * - * @param apiKey (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture addApiKeyAsync(ApiKey apiKey, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (apiKey == null) { - throw new AlgoliaRuntimeException("Parameter `apiKey` is required when calling `addApiKey`."); - } - - Object bodyObj = apiKey; - - // create path and map variables - String requestPath = "/1/keys"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Add a new API key with specific permissions and restrictions. The request must - * be authenticated with the admin API key. The response returns an API key string. - * - * @param apiKey (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture addApiKeyAsync(ApiKey apiKey) throws AlgoliaRuntimeException { - return this.addApiKeyAsync(apiKey, null); - } - - /** - * If you use an existing `objectID`, the existing record will be replaced with the new one. To - * update only some attributes of an existing record, use the [`partial` - * operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your - * index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param body Algolia record. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtWithObjectIdResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtWithObjectIdResponse addOrUpdateObject(String indexName, String objectID, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(addOrUpdateObjectAsync(indexName, objectID, body, requestOptions)); - } - - /** - * If you use an existing `objectID`, the existing record will be replaced with the new one. To - * update only some attributes of an existing record, use the [`partial` - * operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your - * index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param body Algolia record. (required) - * @return UpdatedAtWithObjectIdResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtWithObjectIdResponse addOrUpdateObject(String indexName, String objectID, Object body) throws AlgoliaRuntimeException { - return this.addOrUpdateObject(indexName, objectID, body, null); - } - - /** - * (asynchronously) If you use an existing `objectID`, the existing record will be - * replaced with the new one. To update only some attributes of an existing record, use the - * [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add - * multiple records to your index in a single API request, use the [`batch` - * operation](#tag/Records/operation/batch). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param body Algolia record. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture addOrUpdateObjectAsync( - String indexName, - String objectID, - Object body, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `addOrUpdateObject`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `addOrUpdateObject`."); - } - - if (body == null) { - throw new AlgoliaRuntimeException("Parameter `body` is required when calling `addOrUpdateObject`."); - } - - Object bodyObj = body; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) If you use an existing `objectID`, the existing record will be - * replaced with the new one. To update only some attributes of an existing record, use the - * [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add - * multiple records to your index in a single API request, use the [`batch` - * operation](#tag/Records/operation/batch). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param body Algolia record. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture addOrUpdateObjectAsync(String indexName, String objectID, Object body) - throws AlgoliaRuntimeException { - return this.addOrUpdateObjectAsync(indexName, objectID, body, null); - } - - /** - * Add a source to the list of allowed sources. - * - * @param source Source to add. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CreatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CreatedAtResponse appendSource(Source source, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(appendSourceAsync(source, requestOptions)); - } - - /** - * Add a source to the list of allowed sources. - * - * @param source Source to add. (required) - * @return CreatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CreatedAtResponse appendSource(Source source) throws AlgoliaRuntimeException { - return this.appendSource(source, null); - } - - /** - * (asynchronously) Add a source to the list of allowed sources. - * - * @param source Source to add. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture appendSourceAsync(Source source, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (source == null) { - throw new AlgoliaRuntimeException("Parameter `source` is required when calling `appendSource`."); - } - - Object bodyObj = source; - - // create path and map variables - String requestPath = "/1/security/sources/append"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Add a source to the list of allowed sources. - * - * @param source Source to add. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture appendSourceAsync(Source source) throws AlgoliaRuntimeException { - return this.appendSourceAsync(source, null); - } - - /** - * Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the - * amount of data linked to the user ID. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param assignUserIdParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CreatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CreatedAtResponse assignUserId(String xAlgoliaUserID, AssignUserIdParams assignUserIdParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(assignUserIdAsync(xAlgoliaUserID, assignUserIdParams, requestOptions)); - } - - /** - * Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the - * amount of data linked to the user ID. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param assignUserIdParams (required) - * @return CreatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CreatedAtResponse assignUserId(String xAlgoliaUserID, AssignUserIdParams assignUserIdParams) throws AlgoliaRuntimeException { - return this.assignUserId(xAlgoliaUserID, assignUserIdParams, null); - } - - /** - * (asynchronously) Assign or move a user ID to a cluster. The time it takes to move a user is - * proportional to the amount of data linked to the user ID. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param assignUserIdParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture assignUserIdAsync( - String xAlgoliaUserID, - AssignUserIdParams assignUserIdParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (xAlgoliaUserID == null) { - throw new AlgoliaRuntimeException("Parameter `xAlgoliaUserID` is required when calling `assignUserId`."); - } - - if (assignUserIdParams == null) { - throw new AlgoliaRuntimeException("Parameter `assignUserIdParams` is required when calling `assignUserId`."); - } - - Object bodyObj = assignUserIdParams; - - // create path and map variables - String requestPath = "/1/clusters/mapping"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (xAlgoliaUserID != null) { - headers.put("X-Algolia-User-ID", this.parameterToString(xAlgoliaUserID)); - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Assign or move a user ID to a cluster. The time it takes to move a user is - * proportional to the amount of data linked to the user ID. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param assignUserIdParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture assignUserIdAsync(String xAlgoliaUserID, AssignUserIdParams assignUserIdParams) - throws AlgoliaRuntimeException { - return this.assignUserIdAsync(xAlgoliaUserID, assignUserIdParams, null); - } - - /** - * To reduce the time spent on network round trips, you can perform several write actions in a - * single API call. Actions are applied in the order they are specified. The supported `action`s - * are equivalent to the individual operations of the same name. - * - * @param indexName Index on which to perform the request. (required) - * @param batchWriteParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return BatchResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BatchResponse batch(String indexName, BatchWriteParams batchWriteParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(batchAsync(indexName, batchWriteParams, requestOptions)); - } - - /** - * To reduce the time spent on network round trips, you can perform several write actions in a - * single API call. Actions are applied in the order they are specified. The supported `action`s - * are equivalent to the individual operations of the same name. - * - * @param indexName Index on which to perform the request. (required) - * @param batchWriteParams (required) - * @return BatchResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BatchResponse batch(String indexName, BatchWriteParams batchWriteParams) throws AlgoliaRuntimeException { - return this.batch(indexName, batchWriteParams, null); - } - - /** - * (asynchronously) To reduce the time spent on network round trips, you can perform several write - * actions in a single API call. Actions are applied in the order they are specified. The - * supported `action`s are equivalent to the individual operations of the same name. - * - * @param indexName Index on which to perform the request. (required) - * @param batchWriteParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture batchAsync(String indexName, BatchWriteParams batchWriteParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `batch`."); - } - - if (batchWriteParams == null) { - throw new AlgoliaRuntimeException("Parameter `batchWriteParams` is required when calling `batch`."); - } - - Object bodyObj = batchWriteParams; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/batch".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) To reduce the time spent on network round trips, you can perform several write - * actions in a single API call. Actions are applied in the order they are specified. The - * supported `action`s are equivalent to the individual operations of the same name. - * - * @param indexName Index on which to perform the request. (required) - * @param batchWriteParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture batchAsync(String indexName, BatchWriteParams batchWriteParams) throws AlgoliaRuntimeException { - return this.batchAsync(indexName, batchWriteParams, null); - } - - /** - * Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param batchAssignUserIdsParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CreatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CreatedAtResponse batchAssignUserIds( - String xAlgoliaUserID, - BatchAssignUserIdsParams batchAssignUserIdsParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(batchAssignUserIdsAsync(xAlgoliaUserID, batchAssignUserIdsParams, requestOptions)); - } - - /** - * Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param batchAssignUserIdsParams (required) - * @return CreatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CreatedAtResponse batchAssignUserIds(String xAlgoliaUserID, BatchAssignUserIdsParams batchAssignUserIdsParams) - throws AlgoliaRuntimeException { - return this.batchAssignUserIds(xAlgoliaUserID, batchAssignUserIdsParams, null); - } - - /** - * (asynchronously) Assign multiple user IDs to a cluster. **You can't _move_ users with this - * operation.**. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param batchAssignUserIdsParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture batchAssignUserIdsAsync( - String xAlgoliaUserID, - BatchAssignUserIdsParams batchAssignUserIdsParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (xAlgoliaUserID == null) { - throw new AlgoliaRuntimeException("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`."); - } - - if (batchAssignUserIdsParams == null) { - throw new AlgoliaRuntimeException("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`."); - } - - Object bodyObj = batchAssignUserIdsParams; - - // create path and map variables - String requestPath = "/1/clusters/mapping/batch"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (xAlgoliaUserID != null) { - headers.put("X-Algolia-User-ID", this.parameterToString(xAlgoliaUserID)); - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Assign multiple user IDs to a cluster. **You can't _move_ users with this - * operation.**. - * - * @param xAlgoliaUserID userID to assign. (required) - * @param batchAssignUserIdsParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture batchAssignUserIdsAsync( - String xAlgoliaUserID, - BatchAssignUserIdsParams batchAssignUserIdsParams - ) throws AlgoliaRuntimeException { - return this.batchAssignUserIdsAsync(xAlgoliaUserID, batchAssignUserIdsParams, null); - } - - /** - * Add or remove a batch of dictionary entries. - * - * @param dictionaryName Dictionary to search in. (required) - * @param batchDictionaryEntriesParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse batchDictionaryEntries( - DictionaryType dictionaryName, - BatchDictionaryEntriesParams batchDictionaryEntriesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(batchDictionaryEntriesAsync(dictionaryName, batchDictionaryEntriesParams, requestOptions)); - } - - /** - * Add or remove a batch of dictionary entries. - * - * @param dictionaryName Dictionary to search in. (required) - * @param batchDictionaryEntriesParams (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse batchDictionaryEntries(DictionaryType dictionaryName, BatchDictionaryEntriesParams batchDictionaryEntriesParams) - throws AlgoliaRuntimeException { - return this.batchDictionaryEntries(dictionaryName, batchDictionaryEntriesParams, null); - } - - /** - * (asynchronously) Add or remove a batch of dictionary entries. - * - * @param dictionaryName Dictionary to search in. (required) - * @param batchDictionaryEntriesParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture batchDictionaryEntriesAsync( - DictionaryType dictionaryName, - BatchDictionaryEntriesParams batchDictionaryEntriesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (dictionaryName == null) { - throw new AlgoliaRuntimeException("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`."); - } - - if (batchDictionaryEntriesParams == null) { - throw new AlgoliaRuntimeException("Parameter `batchDictionaryEntriesParams` is required when calling" + " `batchDictionaryEntries`."); - } - - Object bodyObj = batchDictionaryEntriesParams; - - // create path and map variables - String requestPath = - "/1/dictionaries/{dictionaryName}/batch".replaceAll("\\{dictionaryName\\}", this.escapeString(dictionaryName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Add or remove a batch of dictionary entries. - * - * @param dictionaryName Dictionary to search in. (required) - * @param batchDictionaryEntriesParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture batchDictionaryEntriesAsync( - DictionaryType dictionaryName, - BatchDictionaryEntriesParams batchDictionaryEntriesParams - ) throws AlgoliaRuntimeException { - return this.batchDictionaryEntriesAsync(dictionaryName, batchDictionaryEntriesParams, null); - } - - /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better - * performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, - * proximity, words, or geographical distance. - * - * @param indexName Index on which to perform the request. (required) - * @param browseParams (optional) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return BrowseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BrowseResponse browse(String indexName, BrowseParams browseParams, Class innerType, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(browseAsync(indexName, browseParams, innerType, requestOptions)); - } - - /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better - * performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, - * proximity, words, or geographical distance. - * - * @param indexName Index on which to perform the request. (required) - * @param browseParams (optional) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return BrowseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BrowseResponse browse(String indexName, BrowseParams browseParams, Class innerType) throws AlgoliaRuntimeException { - return this.browse(indexName, browseParams, innerType, null); - } - - /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better - * performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, - * proximity, words, or geographical distance. - * - * @param indexName Index on which to perform the request. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return BrowseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BrowseResponse browse(String indexName, Class innerType, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.browse(indexName, null, innerType, requestOptions); - } - - /** - * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better - * performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, - * proximity, words, or geographical distance. - * - * @param indexName Index on which to perform the request. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return BrowseResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public BrowseResponse browse(String indexName, Class innerType) throws AlgoliaRuntimeException { - return this.browse(indexName, null, innerType, null); - } - - /** - * (asynchronously) Retrieve up to 1,000 records per call. Supports full-text search and filters. - * For better performance, it doesn't support: - The `distinct` query parameter - - * Sorting by typos, proximity, words, or geographical distance. - * - * @param indexName Index on which to perform the request. (required) - * @param browseParams (optional) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> browseAsync( - String indexName, - BrowseParams browseParams, - Class innerType, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `browse`."); - } - - Object bodyObj = browseParams != null ? browseParams : new Object(); - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/browse".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, BrowseResponse.class, innerType); - } - - /** - * (asynchronously) Retrieve up to 1,000 records per call. Supports full-text search and filters. - * For better performance, it doesn't support: - The `distinct` query parameter - - * Sorting by typos, proximity, words, or geographical distance. - * - * @param indexName Index on which to perform the request. (required) - * @param browseParams (optional) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> browseAsync(String indexName, BrowseParams browseParams, Class innerType) - throws AlgoliaRuntimeException { - return this.browseAsync(indexName, browseParams, innerType, null); - } - - /** - * (asynchronously) Retrieve up to 1,000 records per call. Supports full-text search and filters. - * For better performance, it doesn't support: - The `distinct` query parameter - - * Sorting by typos, proximity, words, or geographical distance. - * - * @param indexName Index on which to perform the request. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> browseAsync(String indexName, Class innerType, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.browseAsync(indexName, null, innerType, requestOptions); - } - - /** - * (asynchronously) Retrieve up to 1,000 records per call. Supports full-text search and filters. - * For better performance, it doesn't support: - The `distinct` query parameter - - * Sorting by typos, proximity, words, or geographical distance. - * - * @param indexName Index on which to perform the request. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> browseAsync(String indexName, Class innerType) throws AlgoliaRuntimeException { - return this.browseAsync(indexName, null, innerType, null); - } - - /** - * Delete all synonyms in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearAllSynonyms(String indexName, Boolean forwardToReplicas, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(clearAllSynonymsAsync(indexName, forwardToReplicas, requestOptions)); - } - - /** - * Delete all synonyms in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearAllSynonyms(String indexName, Boolean forwardToReplicas) throws AlgoliaRuntimeException { - return this.clearAllSynonyms(indexName, forwardToReplicas, null); - } - - /** - * Delete all synonyms in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearAllSynonyms(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.clearAllSynonyms(indexName, null, requestOptions); - } - - /** - * Delete all synonyms in the index. - * - * @param indexName Index on which to perform the request. (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearAllSynonyms(String indexName) throws AlgoliaRuntimeException { - return this.clearAllSynonyms(indexName, null, null); - } - - /** - * (asynchronously) Delete all synonyms in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearAllSynonymsAsync( - String indexName, - Boolean forwardToReplicas, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `clearAllSynonyms`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/synonyms/clear".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (forwardToReplicas != null) { - queryParameters.put("forwardToReplicas", parameterToString(forwardToReplicas)); - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete all synonyms in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearAllSynonymsAsync(String indexName, Boolean forwardToReplicas) - throws AlgoliaRuntimeException { - return this.clearAllSynonymsAsync(indexName, forwardToReplicas, null); - } - - /** - * (asynchronously) Delete all synonyms in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearAllSynonymsAsync(String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.clearAllSynonymsAsync(indexName, null, requestOptions); - } - - /** - * (asynchronously) Delete all synonyms in the index. - * - * @param indexName Index on which to perform the request. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearAllSynonymsAsync(String indexName) throws AlgoliaRuntimeException { - return this.clearAllSynonymsAsync(indexName, null, null); - } - - /** - * Delete the records but leave settings and index-specific API keys untouched. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearObjects(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(clearObjectsAsync(indexName, requestOptions)); - } - - /** - * Delete the records but leave settings and index-specific API keys untouched. - * - * @param indexName Index on which to perform the request. (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearObjects(String indexName) throws AlgoliaRuntimeException { - return this.clearObjects(indexName, null); - } - - /** - * (asynchronously) Delete the records but leave settings and index-specific API keys untouched. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearObjectsAsync(String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `clearObjects`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/clear".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete the records but leave settings and index-specific API keys untouched. - * - * @param indexName Index on which to perform the request. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearObjectsAsync(String indexName) throws AlgoliaRuntimeException { - return this.clearObjectsAsync(indexName, null); - } - - /** - * Delete all rules in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearRules(String indexName, Boolean forwardToReplicas, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(clearRulesAsync(indexName, forwardToReplicas, requestOptions)); - } - - /** - * Delete all rules in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearRules(String indexName, Boolean forwardToReplicas) throws AlgoliaRuntimeException { - return this.clearRules(indexName, forwardToReplicas, null); - } - - /** - * Delete all rules in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearRules(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.clearRules(indexName, null, requestOptions); - } - - /** - * Delete all rules in the index. - * - * @param indexName Index on which to perform the request. (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse clearRules(String indexName) throws AlgoliaRuntimeException { - return this.clearRules(indexName, null, null); - } - - /** - * (asynchronously) Delete all rules in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearRulesAsync(String indexName, Boolean forwardToReplicas, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `clearRules`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/rules/clear".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (forwardToReplicas != null) { - queryParameters.put("forwardToReplicas", parameterToString(forwardToReplicas)); - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete all rules in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearRulesAsync(String indexName, Boolean forwardToReplicas) throws AlgoliaRuntimeException { - return this.clearRulesAsync(indexName, forwardToReplicas, null); - } - - /** - * (asynchronously) Delete all rules in the index. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearRulesAsync(String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.clearRulesAsync(indexName, null, requestOptions); - } - - /** - * (asynchronously) Delete all rules in the index. - * - * @param indexName Index on which to perform the request. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture clearRulesAsync(String indexName) throws AlgoliaRuntimeException { - return this.clearRulesAsync(indexName, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(delAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, Map parameters) throws AlgoliaRuntimeException { - return this.del(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.del(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object del(String path) throws AlgoliaRuntimeException { - return this.del(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `del`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.delAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.delAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture delAsync(String path) throws AlgoliaRuntimeException { - return this.delAsync(path, null, null); - } - - /** - * Delete an existing API key. The request must be authenticated with the admin API key. - * - * @param key API key. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeleteApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteApiKeyResponse deleteApiKey(String key, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteApiKeyAsync(key, requestOptions)); - } - - /** - * Delete an existing API key. The request must be authenticated with the admin API key. - * - * @param key API key. (required) - * @return DeleteApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteApiKeyResponse deleteApiKey(String key) throws AlgoliaRuntimeException { - return this.deleteApiKey(key, null); - } - - /** - * (asynchronously) Delete an existing API key. The request must be authenticated with the admin - * API key. - * - * @param key API key. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteApiKeyAsync(String key, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (key == null) { - throw new AlgoliaRuntimeException("Parameter `key` is required when calling `deleteApiKey`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/keys/{key}".replaceAll("\\{key\\}", this.escapeString(key.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete an existing API key. The request must be authenticated with the admin - * API key. - * - * @param key API key. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteApiKeyAsync(String key) throws AlgoliaRuntimeException { - return this.deleteApiKeyAsync(key, null); - } - - /** - * This operation doesn't support all the query options, only its filters (numeric, facet, or tag) - * and geo queries. It doesn't accept empty filters or queries. - * - * @param indexName Index on which to perform the request. (required) - * @param deleteByParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteBy(String indexName, DeleteByParams deleteByParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteByAsync(indexName, deleteByParams, requestOptions)); - } - - /** - * This operation doesn't support all the query options, only its filters (numeric, facet, or tag) - * and geo queries. It doesn't accept empty filters or queries. - * - * @param indexName Index on which to perform the request. (required) - * @param deleteByParams (required) - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteBy(String indexName, DeleteByParams deleteByParams) throws AlgoliaRuntimeException { - return this.deleteBy(indexName, deleteByParams, null); - } - - /** - * (asynchronously) This operation doesn't support all the query options, only its filters - * (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. - * - * @param indexName Index on which to perform the request. (required) - * @param deleteByParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteByAsync(String indexName, DeleteByParams deleteByParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `deleteBy`."); - } - - if (deleteByParams == null) { - throw new AlgoliaRuntimeException("Parameter `deleteByParams` is required when calling `deleteBy`."); - } - - Object bodyObj = deleteByParams; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/deleteByQuery".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This operation doesn't support all the query options, only its filters - * (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries. - * - * @param indexName Index on which to perform the request. (required) - * @param deleteByParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteByAsync(String indexName, DeleteByParams deleteByParams) - throws AlgoliaRuntimeException { - return this.deleteByAsync(indexName, deleteByParams, null); - } - - /** - * Delete an existing index. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteIndex(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteIndexAsync(indexName, requestOptions)); - } - - /** - * Delete an existing index. - * - * @param indexName Index on which to perform the request. (required) - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteIndex(String indexName) throws AlgoliaRuntimeException { - return this.deleteIndex(indexName, null); - } - - /** - * (asynchronously) Delete an existing index. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteIndexAsync(String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `deleteIndex`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete an existing index. - * - * @param indexName Index on which to perform the request. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteIndexAsync(String indexName) throws AlgoliaRuntimeException { - return this.deleteIndexAsync(indexName, null); - } - - /** - * To delete a set of records matching a query, use the [`deleteByQuery` - * operation](#tag/Records/operation/deleteBy) instead. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteObject(String indexName, String objectID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteObjectAsync(indexName, objectID, requestOptions)); - } - - /** - * To delete a set of records matching a query, use the [`deleteByQuery` - * operation](#tag/Records/operation/deleteBy) instead. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteObject(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.deleteObject(indexName, objectID, null); - } - - /** - * (asynchronously) To delete a set of records matching a query, use the - * [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteObjectAsync(String indexName, String objectID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `deleteObject`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `deleteObject`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) To delete a set of records matching a query, use the - * [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteObjectAsync(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.deleteObjectAsync(indexName, objectID, null); - } - - /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` - * operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse deleteRule(String indexName, String objectID, Boolean forwardToReplicas, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteRuleAsync(indexName, objectID, forwardToReplicas, requestOptions)); - } - - /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` - * operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse deleteRule(String indexName, String objectID, Boolean forwardToReplicas) throws AlgoliaRuntimeException { - return this.deleteRule(indexName, objectID, forwardToReplicas, null); - } - - /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` - * operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse deleteRule(String indexName, String objectID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.deleteRule(indexName, objectID, null, requestOptions); - } - - /** - * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` - * operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse deleteRule(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.deleteRule(indexName, objectID, null, null); - } - - /** - * (asynchronously) Delete a rule by its `objectID`. To find the `objectID` - * for rules, use the [`search` operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteRuleAsync( - String indexName, - String objectID, - Boolean forwardToReplicas, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `deleteRule`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `deleteRule`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/rules/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (forwardToReplicas != null) { - queryParameters.put("forwardToReplicas", parameterToString(forwardToReplicas)); - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete a rule by its `objectID`. To find the `objectID` - * for rules, use the [`search` operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteRuleAsync(String indexName, String objectID, Boolean forwardToReplicas) - throws AlgoliaRuntimeException { - return this.deleteRuleAsync(indexName, objectID, forwardToReplicas, null); - } - - /** - * (asynchronously) Delete a rule by its `objectID`. To find the `objectID` - * for rules, use the [`search` operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteRuleAsync(String indexName, String objectID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.deleteRuleAsync(indexName, objectID, null, requestOptions); - } - - /** - * (asynchronously) Delete a rule by its `objectID`. To find the `objectID` - * for rules, use the [`search` operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteRuleAsync(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.deleteRuleAsync(indexName, objectID, null, null); - } - - /** - * Remove a source from the list of allowed sources. - * - * @param source IP address range of the source. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeleteSourceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteSourceResponse deleteSource(String source, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteSourceAsync(source, requestOptions)); - } - - /** - * Remove a source from the list of allowed sources. - * - * @param source IP address range of the source. (required) - * @return DeleteSourceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeleteSourceResponse deleteSource(String source) throws AlgoliaRuntimeException { - return this.deleteSource(source, null); - } - - /** - * (asynchronously) Remove a source from the list of allowed sources. - * - * @param source IP address range of the source. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteSourceAsync(String source, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (source == null) { - throw new AlgoliaRuntimeException("Parameter `source` is required when calling `deleteSource`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/security/sources/{source}".replaceAll("\\{source\\}", this.escapeString(source.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Remove a source from the list of allowed sources. - * - * @param source IP address range of the source. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteSourceAsync(String source) throws AlgoliaRuntimeException { - return this.deleteSourceAsync(source, null); - } - - /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` - * operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteSynonym(String indexName, String objectID, Boolean forwardToReplicas, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(deleteSynonymAsync(indexName, objectID, forwardToReplicas, requestOptions)); - } - - /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` - * operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteSynonym(String indexName, String objectID, Boolean forwardToReplicas) throws AlgoliaRuntimeException { - return this.deleteSynonym(indexName, objectID, forwardToReplicas, null); - } - - /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` - * operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteSynonym(String indexName, String objectID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.deleteSynonym(indexName, objectID, null, requestOptions); - } - - /** - * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` - * operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @return DeletedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public DeletedAtResponse deleteSynonym(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.deleteSynonym(indexName, objectID, null, null); - } - - /** - * (asynchronously) Delete a synonym by its `objectID`. To find the object IDs of your - * synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteSynonymAsync( - String indexName, - String objectID, - Boolean forwardToReplicas, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `deleteSynonym`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `deleteSynonym`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/synonyms/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (forwardToReplicas != null) { - queryParameters.put("forwardToReplicas", parameterToString(forwardToReplicas)); - } - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Delete a synonym by its `objectID`. To find the object IDs of your - * synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteSynonymAsync(String indexName, String objectID, Boolean forwardToReplicas) - throws AlgoliaRuntimeException { - return this.deleteSynonymAsync(indexName, objectID, forwardToReplicas, null); - } - - /** - * (asynchronously) Delete a synonym by its `objectID`. To find the object IDs of your - * synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteSynonymAsync(String indexName, String objectID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.deleteSynonymAsync(indexName, objectID, null, requestOptions); - } - - /** - * (asynchronously) Delete a synonym by its `objectID`. To find the object IDs of your - * synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture deleteSynonymAsync(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.deleteSynonymAsync(indexName, objectID, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getAsync(path, parameters, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, Map parameters) throws AlgoliaRuntimeException { - return this.get(path, parameters, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.get(path, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object get(String path) throws AlgoliaRuntimeException { - return this.get(path, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `get`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, Map parameters) throws AlgoliaRuntimeException { - return this.getAsync(path, parameters, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getAsync(path, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getAsync(String path) throws AlgoliaRuntimeException { - return this.getAsync(path, null, null); - } - - /** - * Get the permissions and restrictions of a specific API key. When authenticating with the admin - * API key, you can request information for any of your application's keys. When authenticating - * with other API keys, you can only retrieve information for that key. - * - * @param key API key. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetApiKeyResponse getApiKey(String key, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getApiKeyAsync(key, requestOptions)); - } - - /** - * Get the permissions and restrictions of a specific API key. When authenticating with the admin - * API key, you can request information for any of your application's keys. When authenticating - * with other API keys, you can only retrieve information for that key. - * - * @param key API key. (required) - * @return GetApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetApiKeyResponse getApiKey(String key) throws AlgoliaRuntimeException { - return this.getApiKey(key, null); - } - - /** - * (asynchronously) Get the permissions and restrictions of a specific API key. When - * authenticating with the admin API key, you can request information for any of your - * application's keys. When authenticating with other API keys, you can only retrieve - * information for that key. - * - * @param key API key. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getApiKeyAsync(String key, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (key == null) { - throw new AlgoliaRuntimeException("Parameter `key` is required when calling `getApiKey`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/keys/{key}".replaceAll("\\{key\\}", this.escapeString(key.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get the permissions and restrictions of a specific API key. When - * authenticating with the admin API key, you can request information for any of your - * application's keys. When authenticating with other API keys, you can only retrieve - * information for that key. - * - * @param key API key. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getApiKeyAsync(String key) throws AlgoliaRuntimeException { - return this.getApiKeyAsync(key, null); - } - - /** - * Lists Algolia's [supported - * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and any customizations applied to each language's [stop - * word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * and [segmentation - * (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * features. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Map - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Map getDictionaryLanguages(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getDictionaryLanguagesAsync(requestOptions)); - } - - /** - * Lists Algolia's [supported - * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and any customizations applied to each language's [stop - * word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * and [segmentation - * (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * features. - * - * @return Map - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Map getDictionaryLanguages() throws AlgoliaRuntimeException { - return this.getDictionaryLanguages(null); - } - - /** - * (asynchronously) Lists Algolia's [supported - * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and any customizations applied to each language's [stop - * word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * and [segmentation - * (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * features. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getDictionaryLanguagesAsync(RequestOptions requestOptions) - throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/dictionaries/*/languages"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference>() {}); - } - - /** - * (asynchronously) Lists Algolia's [supported - * languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and any customizations applied to each language's [stop - * word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * and [segmentation - * (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * features. - * - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getDictionaryLanguagesAsync() throws AlgoliaRuntimeException { - return this.getDictionaryLanguagesAsync(null); - } - - /** - * Get the languages for which [stop words are turned - * off](#tag/Dictionaries/operation/setDictionarySettings). - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetDictionarySettingsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetDictionarySettingsResponse getDictionarySettings(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getDictionarySettingsAsync(requestOptions)); - } - - /** - * Get the languages for which [stop words are turned - * off](#tag/Dictionaries/operation/setDictionarySettings). - * - * @return GetDictionarySettingsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetDictionarySettingsResponse getDictionarySettings() throws AlgoliaRuntimeException { - return this.getDictionarySettings(null); - } - - /** - * (asynchronously) Get the languages for which [stop words are turned - * off](#tag/Dictionaries/operation/setDictionarySettings). - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getDictionarySettingsAsync(RequestOptions requestOptions) - throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/dictionaries/*/settings"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get the languages for which [stop words are turned - * off](#tag/Dictionaries/operation/setDictionarySettings). - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getDictionarySettingsAsync() throws AlgoliaRuntimeException { - return this.getDictionarySettingsAsync(null); - } - - /** - * The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations - * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - * - * @param offset First log entry to retrieve. Sorted by decreasing date with 0 being the most - * recent. (optional, default to 0) - * @param length Maximum number of entries to retrieve. (optional, default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are - * retrieved for all indices. (optional) - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. - * (optional, default to all) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetLogsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetLogsResponse getLogs(Integer offset, Integer length, String indexName, LogType type, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(getLogsAsync(offset, length, indexName, type, requestOptions)); - } - - /** - * The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations - * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - * - * @param offset First log entry to retrieve. Sorted by decreasing date with 0 being the most - * recent. (optional, default to 0) - * @param length Maximum number of entries to retrieve. (optional, default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are - * retrieved for all indices. (optional) - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. - * (optional, default to all) - * @return GetLogsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetLogsResponse getLogs(Integer offset, Integer length, String indexName, LogType type) throws AlgoliaRuntimeException { - return this.getLogs(offset, length, indexName, type, null); - } - - /** - * The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations - * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetLogsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetLogsResponse getLogs(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getLogs(null, null, null, null, requestOptions); - } - - /** - * The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. This - * request counts towards your [operations - * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search - * Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - * - * @return GetLogsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetLogsResponse getLogs() throws AlgoliaRuntimeException { - return this.getLogs(null, null, null, null, null); - } - - /** - * (asynchronously) The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. - * This request counts towards your [operations - * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed - * Search Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - * - * @param offset First log entry to retrieve. Sorted by decreasing date with 0 being the most - * recent. (optional, default to 0) - * @param length Maximum number of entries to retrieve. (optional, default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are - * retrieved for all indices. (optional) - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. - * (optional, default to all) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getLogsAsync( - Integer offset, - Integer length, - String indexName, - LogType type, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/logs"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (offset != null) { - queryParameters.put("offset", parameterToString(offset)); - } - - if (length != null) { - queryParameters.put("length", parameterToString(length)); - } - - if (indexName != null) { - queryParameters.put("indexName", parameterToString(indexName)); - } - - if (type != null) { - queryParameters.put("type", parameterToString(type)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. - * This request counts towards your [operations - * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed - * Search Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - * - * @param offset First log entry to retrieve. Sorted by decreasing date with 0 being the most - * recent. (optional, default to 0) - * @param length Maximum number of entries to retrieve. (optional, default to 10) - * @param indexName Index for which log entries should be retrieved. When omitted, log entries are - * retrieved for all indices. (optional) - * @param type Type of log entries to retrieve. When omitted, all log entries are retrieved. - * (optional, default to all) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getLogsAsync(Integer offset, Integer length, String indexName, LogType type) - throws AlgoliaRuntimeException { - return this.getLogsAsync(offset, length, indexName, type, null); - } - - /** - * (asynchronously) The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. - * This request counts towards your [operations - * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed - * Search Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getLogsAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getLogsAsync(null, null, null, null, requestOptions); - } - - /** - * (asynchronously) The request must be authenticated by an API key with the [`logs` - * ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are - * held for the last seven days. There's also a logging limit of 1,000 API calls per server. - * This request counts towards your [operations - * quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) - * but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed - * Search Network (DSN) cluster, target the [DSN's - * endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers). - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getLogsAsync() throws AlgoliaRuntimeException { - return this.getLogsAsync(null, null, null, null, null); - } - - /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToRetrieve Attributes to include with the records in the response. This is - * useful to reduce the size of the API response. By default, all retrievable attributes are - * returned. `objectID` is always retrieved, even when not specified. - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - * won't be retrieved unless the request is authenticated with the admin API key. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Map - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Map getObject(String indexName, String objectID, List attributesToRetrieve, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(getObjectAsync(indexName, objectID, attributesToRetrieve, requestOptions)); - } - - /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToRetrieve Attributes to include with the records in the response. This is - * useful to reduce the size of the API response. By default, all retrievable attributes are - * returned. `objectID` is always retrieved, even when not specified. - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - * won't be retrieved unless the request is authenticated with the admin API key. (optional) - * @return Map - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Map getObject(String indexName, String objectID, List attributesToRetrieve) - throws AlgoliaRuntimeException { - return this.getObject(indexName, objectID, attributesToRetrieve, null); - } - - /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Map - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Map getObject(String indexName, String objectID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.getObject(indexName, objectID, null, requestOptions); - } - - /** - * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @return Map - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Map getObject(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.getObject(indexName, objectID, null, null); - } - - /** - * (asynchronously) To get more than one record, use the [`objects` - * operation](#tag/Records/operation/getObjects). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToRetrieve Attributes to include with the records in the response. This is - * useful to reduce the size of the API response. By default, all retrievable attributes are - * returned. `objectID` is always retrieved, even when not specified. - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - * won't be retrieved unless the request is authenticated with the admin API key. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getObjectAsync( - String indexName, - String objectID, - List attributesToRetrieve, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getObject`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `getObject`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (attributesToRetrieve != null) { - queryParameters.put("attributesToRetrieve", parameterToString(attributesToRetrieve)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference>() {}); - } - - /** - * (asynchronously) To get more than one record, use the [`objects` - * operation](#tag/Records/operation/getObjects). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToRetrieve Attributes to include with the records in the response. This is - * useful to reduce the size of the API response. By default, all retrievable attributes are - * returned. `objectID` is always retrieved, even when not specified. - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - * won't be retrieved unless the request is authenticated with the admin API key. (optional) - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getObjectAsync(String indexName, String objectID, List attributesToRetrieve) - throws AlgoliaRuntimeException { - return this.getObjectAsync(indexName, objectID, attributesToRetrieve, null); - } - - /** - * (asynchronously) To get more than one record, use the [`objects` - * operation](#tag/Records/operation/getObjects). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getObjectAsync(String indexName, String objectID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.getObjectAsync(indexName, objectID, null, requestOptions); - } - - /** - * (asynchronously) To get more than one record, use the [`objects` - * operation](#tag/Records/operation/getObjects). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getObjectAsync(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.getObjectAsync(indexName, objectID, null, null); - } - - /** - * Retrieve one or more records, potentially from different indices, in a single API operation. - * Results will be received in the same order as the requests. - * - * @param getObjectsParams Request object. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetObjectsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetObjectsResponse getObjects(GetObjectsParams getObjectsParams, Class innerType, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(getObjectsAsync(getObjectsParams, innerType, requestOptions)); - } - - /** - * Retrieve one or more records, potentially from different indices, in a single API operation. - * Results will be received in the same order as the requests. - * - * @param getObjectsParams Request object. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return GetObjectsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetObjectsResponse getObjects(GetObjectsParams getObjectsParams, Class innerType) throws AlgoliaRuntimeException { - return this.getObjects(getObjectsParams, innerType, null); - } - - /** - * (asynchronously) Retrieve one or more records, potentially from different indices, in a single - * API operation. Results will be received in the same order as the requests. - * - * @param getObjectsParams Request object. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getObjectsAsync( - GetObjectsParams getObjectsParams, - Class innerType, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (getObjectsParams == null) { - throw new AlgoliaRuntimeException("Parameter `getObjectsParams` is required when calling `getObjects`."); - } - - Object bodyObj = getObjectsParams; - - // create path and map variables - String requestPath = "/1/indexes/*/objects"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, GetObjectsResponse.class, innerType); - } - - /** - * (asynchronously) Retrieve one or more records, potentially from different indices, in a single - * API operation. Results will be received in the same order as the requests. - * - * @param getObjectsParams Request object. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getObjectsAsync(GetObjectsParams getObjectsParams, Class innerType) - throws AlgoliaRuntimeException { - return this.getObjectsAsync(getObjectsParams, innerType, null); - } - - /** - * Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` - * operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Rule - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Rule getRule(String indexName, String objectID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getRuleAsync(indexName, objectID, requestOptions)); - } - - /** - * Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` - * operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @return Rule - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Rule getRule(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.getRule(indexName, objectID, null); - } - - /** - * (asynchronously) Get a rule by its `objectID`. To find the `objectID` for - * rules, use the [`search` operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getRuleAsync(String indexName, String objectID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getRule`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `getRule`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/rules/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get a rule by its `objectID`. To find the `objectID` for - * rules, use the [`search` operation](#tag/Rules/operation/searchRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getRuleAsync(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.getRuleAsync(indexName, objectID, null); - } - - /** - * Return an object containing an index's [configuration - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return IndexSettings - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public IndexSettings getSettings(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getSettingsAsync(indexName, requestOptions)); - } - - /** - * Return an object containing an index's [configuration - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - * - * @param indexName Index on which to perform the request. (required) - * @return IndexSettings - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public IndexSettings getSettings(String indexName) throws AlgoliaRuntimeException { - return this.getSettings(indexName, null); - } - - /** - * (asynchronously) Return an object containing an index's [configuration - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSettingsAsync(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getSettings`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/settings".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Return an object containing an index's [configuration - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). - * - * @param indexName Index on which to perform the request. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSettingsAsync(String indexName) throws AlgoliaRuntimeException { - return this.getSettingsAsync(indexName, null); - } - - /** - * Get all allowed sources (IP addresses). - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List getSources(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getSourcesAsync(requestOptions)); - } - - /** - * Get all allowed sources (IP addresses). - * - * @return List - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public List getSources() throws AlgoliaRuntimeException { - return this.getSources(null); - } - - /** - * (asynchronously) Get all allowed sources (IP addresses). - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getSourcesAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/security/sources"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference>() {}); - } - - /** - * (asynchronously) Get all allowed sources (IP addresses). - * - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> getSourcesAsync() throws AlgoliaRuntimeException { - return this.getSourcesAsync(null); - } - - /** - * Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` - * operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SynonymHit - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SynonymHit getSynonym(String indexName, String objectID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getSynonymAsync(indexName, objectID, requestOptions)); - } - - /** - * Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` - * operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @return SynonymHit - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SynonymHit getSynonym(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.getSynonym(indexName, objectID, null); - } - - /** - * (asynchronously) Get a syonym by its `objectID`. To find the object IDs for your - * synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSynonymAsync(String indexName, String objectID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getSynonym`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `getSynonym`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/synonyms/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get a syonym by its `objectID`. To find the object IDs for your - * synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getSynonymAsync(String indexName, String objectID) throws AlgoliaRuntimeException { - return this.getSynonymAsync(indexName, objectID, null); - } - - /** - * Some operations, such as copying an index, will respond with a `taskID` value. Use this value - * here to check the status of that task. - * - * @param indexName Index on which to perform the request. (required) - * @param taskID Unique task identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTaskResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTaskResponse getTask(String indexName, Long taskID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getTaskAsync(indexName, taskID, requestOptions)); - } - - /** - * Some operations, such as copying an index, will respond with a `taskID` value. Use this value - * here to check the status of that task. - * - * @param indexName Index on which to perform the request. (required) - * @param taskID Unique task identifier. (required) - * @return GetTaskResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTaskResponse getTask(String indexName, Long taskID) throws AlgoliaRuntimeException { - return this.getTask(indexName, taskID, null); - } - - /** - * (asynchronously) Some operations, such as copying an index, will respond with a - * `taskID` value. Use this value here to check the status of that task. - * - * @param indexName Index on which to perform the request. (required) - * @param taskID Unique task identifier. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTaskAsync(String indexName, Long taskID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `getTask`."); - } - - if (taskID == null) { - throw new AlgoliaRuntimeException("Parameter `taskID` is required when calling `getTask`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/task/{taskID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{taskID\\}", this.escapeString(taskID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Some operations, such as copying an index, will respond with a - * `taskID` value. Use this value here to check the status of that task. - * - * @param indexName Index on which to perform the request. (required) - * @param taskID Unique task identifier. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTaskAsync(String indexName, Long taskID) throws AlgoliaRuntimeException { - return this.getTaskAsync(indexName, taskID, null); - } - - /** - * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take - * up to a few seconds to get the data from the different clusters, the response isn't real-time. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return GetTopUserIdsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopUserIdsResponse getTopUserIds(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getTopUserIdsAsync(requestOptions)); - } - - /** - * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take - * up to a few seconds to get the data from the different clusters, the response isn't real-time. - * - * @return GetTopUserIdsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public GetTopUserIdsResponse getTopUserIds() throws AlgoliaRuntimeException { - return this.getTopUserIds(null); - } - - /** - * (asynchronously) Get the IDs of the 10 users with the highest number of records per cluster. - * Since it can take up to a few seconds to get the data from the different clusters, the response - * isn't real-time. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopUserIdsAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/clusters/mapping/top"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Get the IDs of the 10 users with the highest number of records per cluster. - * Since it can take up to a few seconds to get the data from the different clusters, the response - * isn't real-time. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getTopUserIdsAsync() throws AlgoliaRuntimeException { - return this.getTopUserIdsAsync(null); - } - - /** - * Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the - * data from the different clusters, the response isn't real-time. - * - * @param userID userID to assign. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UserId - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UserId getUserId(String userID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(getUserIdAsync(userID, requestOptions)); - } - - /** - * Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the - * data from the different clusters, the response isn't real-time. - * - * @param userID userID to assign. (required) - * @return UserId - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UserId getUserId(String userID) throws AlgoliaRuntimeException { - return this.getUserId(userID, null); - } - - /** - * (asynchronously) Returns the userID data stored in the mapping. Since it can take up to a few - * seconds to get the data from the different clusters, the response isn't real-time. - * - * @param userID userID to assign. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getUserIdAsync(String userID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (userID == null) { - throw new AlgoliaRuntimeException("Parameter `userID` is required when calling `getUserId`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/clusters/mapping/{userID}".replaceAll("\\{userID\\}", this.escapeString(userID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Returns the userID data stored in the mapping. Since it can take up to a few - * seconds to get the data from the different clusters, the response isn't real-time. - * - * @param userID userID to assign. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture getUserIdAsync(String userID) throws AlgoliaRuntimeException { - return this.getUserIdAsync(userID, null); - } - - /** - * To determine when the time-consuming process of creating a large batch of users or migrating - * users from one cluster to another is complete, this operation retrieves the status of the - * process. - * - * @param getClusters Indicates whether to include the cluster's pending mapping state in the - * response. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return HasPendingMappingsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public HasPendingMappingsResponse hasPendingMappings(Boolean getClusters, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(hasPendingMappingsAsync(getClusters, requestOptions)); - } - - /** - * To determine when the time-consuming process of creating a large batch of users or migrating - * users from one cluster to another is complete, this operation retrieves the status of the - * process. - * - * @param getClusters Indicates whether to include the cluster's pending mapping state in the - * response. (optional) - * @return HasPendingMappingsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public HasPendingMappingsResponse hasPendingMappings(Boolean getClusters) throws AlgoliaRuntimeException { - return this.hasPendingMappings(getClusters, null); - } - - /** - * To determine when the time-consuming process of creating a large batch of users or migrating - * users from one cluster to another is complete, this operation retrieves the status of the - * process. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return HasPendingMappingsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public HasPendingMappingsResponse hasPendingMappings(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.hasPendingMappings(null, requestOptions); - } - - /** - * To determine when the time-consuming process of creating a large batch of users or migrating - * users from one cluster to another is complete, this operation retrieves the status of the - * process. - * - * @return HasPendingMappingsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public HasPendingMappingsResponse hasPendingMappings() throws AlgoliaRuntimeException { - return this.hasPendingMappings(null, null); - } - - /** - * (asynchronously) To determine when the time-consuming process of creating a large batch of - * users or migrating users from one cluster to another is complete, this operation retrieves the - * status of the process. - * - * @param getClusters Indicates whether to include the cluster's pending mapping state in the - * response. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture hasPendingMappingsAsync(Boolean getClusters, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/clusters/mapping/pending"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (getClusters != null) { - queryParameters.put("getClusters", parameterToString(getClusters)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) To determine when the time-consuming process of creating a large batch of - * users or migrating users from one cluster to another is complete, this operation retrieves the - * status of the process. - * - * @param getClusters Indicates whether to include the cluster's pending mapping state in the - * response. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture hasPendingMappingsAsync(Boolean getClusters) throws AlgoliaRuntimeException { - return this.hasPendingMappingsAsync(getClusters, null); - } - - /** - * (asynchronously) To determine when the time-consuming process of creating a large batch of - * users or migrating users from one cluster to another is complete, this operation retrieves the - * status of the process. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture hasPendingMappingsAsync(RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.hasPendingMappingsAsync(null, requestOptions); - } - - /** - * (asynchronously) To determine when the time-consuming process of creating a large batch of - * users or migrating users from one cluster to another is complete, this operation retrieves the - * status of the process. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture hasPendingMappingsAsync() throws AlgoliaRuntimeException { - return this.hasPendingMappingsAsync(null, null); - } - - /** - * List all API keys associated with your Algolia application, including their permissions and - * restrictions. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ListApiKeysResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListApiKeysResponse listApiKeys(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(listApiKeysAsync(requestOptions)); - } - - /** - * List all API keys associated with your Algolia application, including their permissions and - * restrictions. - * - * @return ListApiKeysResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListApiKeysResponse listApiKeys() throws AlgoliaRuntimeException { - return this.listApiKeys(null); - } - - /** - * (asynchronously) List all API keys associated with your Algolia application, including their - * permissions and restrictions. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listApiKeysAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/keys"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List all API keys associated with your Algolia application, including their - * permissions and restrictions. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listApiKeysAsync() throws AlgoliaRuntimeException { - return this.listApiKeysAsync(null); - } - - /** - * List the available clusters in a multi-cluster setup. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ListClustersResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListClustersResponse listClusters(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(listClustersAsync(requestOptions)); - } - - /** - * List the available clusters in a multi-cluster setup. - * - * @return ListClustersResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListClustersResponse listClusters() throws AlgoliaRuntimeException { - return this.listClusters(null); - } - - /** - * (asynchronously) List the available clusters in a multi-cluster setup. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listClustersAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/clusters"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List the available clusters in a multi-cluster setup. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listClustersAsync() throws AlgoliaRuntimeException { - return this.listClustersAsync(null); - } - - /** - * List indices in an Algolia application. - * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ListIndicesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListIndicesResponse listIndices(Integer page, Integer hitsPerPage, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(listIndicesAsync(page, hitsPerPage, requestOptions)); - } - - /** - * List indices in an Algolia application. - * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @return ListIndicesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListIndicesResponse listIndices(Integer page, Integer hitsPerPage) throws AlgoliaRuntimeException { - return this.listIndices(page, hitsPerPage, null); - } - - /** - * List indices in an Algolia application. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ListIndicesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListIndicesResponse listIndices(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.listIndices(null, null, requestOptions); - } - - /** - * List indices in an Algolia application. - * - * @return ListIndicesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListIndicesResponse listIndices() throws AlgoliaRuntimeException { - return this.listIndices(null, null, null); - } - - /** - * (asynchronously) List indices in an Algolia application. - * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listIndicesAsync(Integer page, Integer hitsPerPage, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/indexes"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (page != null) { - queryParameters.put("page", parameterToString(page)); - } - - if (hitsPerPage != null) { - queryParameters.put("hitsPerPage", parameterToString(hitsPerPage)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List indices in an Algolia application. - * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listIndicesAsync(Integer page, Integer hitsPerPage) throws AlgoliaRuntimeException { - return this.listIndicesAsync(page, hitsPerPage, null); - } - - /** - * (asynchronously) List indices in an Algolia application. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listIndicesAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.listIndicesAsync(null, null, requestOptions); - } - - /** - * (asynchronously) List indices in an Algolia application. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listIndicesAsync() throws AlgoliaRuntimeException { - return this.listIndicesAsync(null, null, null); - } - - /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds - * to get the data from the different clusters, the response isn't real-time. - * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ListUserIdsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListUserIdsResponse listUserIds(Integer page, Integer hitsPerPage, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(listUserIdsAsync(page, hitsPerPage, requestOptions)); - } - - /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds - * to get the data from the different clusters, the response isn't real-time. - * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @return ListUserIdsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListUserIdsResponse listUserIds(Integer page, Integer hitsPerPage) throws AlgoliaRuntimeException { - return this.listUserIds(page, hitsPerPage, null); - } - - /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds - * to get the data from the different clusters, the response isn't real-time. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ListUserIdsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListUserIdsResponse listUserIds(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.listUserIds(null, null, requestOptions); - } - - /** - * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds - * to get the data from the different clusters, the response isn't real-time. - * - * @return ListUserIdsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ListUserIdsResponse listUserIds() throws AlgoliaRuntimeException { - return this.listUserIds(null, null, null); - } - - /** - * (asynchronously) List the userIDs assigned to a multi-cluster application. Since it can take up - * to a few seconds to get the data from the different clusters, the response isn't real-time. - * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listUserIdsAsync(Integer page, Integer hitsPerPage, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/clusters/mapping"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (page != null) { - queryParameters.put("page", parameterToString(page)); - } - - if (hitsPerPage != null) { - queryParameters.put("hitsPerPage", parameterToString(hitsPerPage)); - } - - Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) List the userIDs assigned to a multi-cluster application. Since it can take up - * to a few seconds to get the data from the different clusters, the response isn't real-time. - * - * @param page Returns the requested page number. The page size is determined by the `hitsPerPage` - * parameter. You can see the number of available pages in the `nbPages` response attribute. - * When `page` is null, the API response is not paginated. (optional) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listUserIdsAsync(Integer page, Integer hitsPerPage) throws AlgoliaRuntimeException { - return this.listUserIdsAsync(page, hitsPerPage, null); - } - - /** - * (asynchronously) List the userIDs assigned to a multi-cluster application. Since it can take up - * to a few seconds to get the data from the different clusters, the response isn't real-time. - * - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listUserIdsAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.listUserIdsAsync(null, null, requestOptions); - } - - /** - * (asynchronously) List the userIDs assigned to a multi-cluster application. Since it can take up - * to a few seconds to get the data from the different clusters, the response isn't real-time. - * - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture listUserIdsAsync() throws AlgoliaRuntimeException { - return this.listUserIdsAsync(null, null, null); - } - - /** - * To reduce the time spent on network round trips, you can perform several write actions in a - * single request. It's a multi-index version of the [`batch` - * operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. - * The supported actions are equivalent to the individual operations of the same name. - * - * @param batchParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return MultipleBatchResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public MultipleBatchResponse multipleBatch(BatchParams batchParams, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(multipleBatchAsync(batchParams, requestOptions)); - } - - /** - * To reduce the time spent on network round trips, you can perform several write actions in a - * single request. It's a multi-index version of the [`batch` - * operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. - * The supported actions are equivalent to the individual operations of the same name. - * - * @param batchParams (required) - * @return MultipleBatchResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public MultipleBatchResponse multipleBatch(BatchParams batchParams) throws AlgoliaRuntimeException { - return this.multipleBatch(batchParams, null); - } - - /** - * (asynchronously) To reduce the time spent on network round trips, you can perform several write - * actions in a single request. It's a multi-index version of the [`batch` - * operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. - * The supported actions are equivalent to the individual operations of the same name. - * - * @param batchParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture multipleBatchAsync(BatchParams batchParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (batchParams == null) { - throw new AlgoliaRuntimeException("Parameter `batchParams` is required when calling `multipleBatch`."); - } - - Object bodyObj = batchParams; - - // create path and map variables - String requestPath = "/1/indexes/*/batch"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) To reduce the time spent on network round trips, you can perform several write - * actions in a single request. It's a multi-index version of the [`batch` - * operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. - * The supported actions are equivalent to the individual operations of the same name. - * - * @param batchParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture multipleBatchAsync(BatchParams batchParams) throws AlgoliaRuntimeException { - return this.multipleBatchAsync(batchParams, null); - } - - /** - * This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, - * settings, synonyms, and rules to a `destination` index. If the destination index exists, it - * will be replaced, except for index-specific API keys and analytics data. If the destination - * index doesn't exist, it will be created. The choice between moving or copying an index depends - * on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the - * same records and configuration as an existing one. > **Note**: When considering copying or - * moving, be aware of the [rate - * limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - * on these processes and the [impact on your analytics - * data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). - * - * @param indexName Index on which to perform the request. (required) - * @param operationIndexParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse operationIndex(String indexName, OperationIndexParams operationIndexParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(operationIndexAsync(indexName, operationIndexParams, requestOptions)); - } - - /** - * This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, - * settings, synonyms, and rules to a `destination` index. If the destination index exists, it - * will be replaced, except for index-specific API keys and analytics data. If the destination - * index doesn't exist, it will be created. The choice between moving or copying an index depends - * on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the - * same records and configuration as an existing one. > **Note**: When considering copying or - * moving, be aware of the [rate - * limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - * on these processes and the [impact on your analytics - * data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). - * - * @param indexName Index on which to perform the request. (required) - * @param operationIndexParams (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse operationIndex(String indexName, OperationIndexParams operationIndexParams) throws AlgoliaRuntimeException { - return this.operationIndex(indexName, operationIndexParams, null); - } - - /** - * (asynchronously) This `operation`, _copy_ or _move_, will copy or move a source - * index's (`IndexName`) records, settings, synonyms, and rules to a - * `destination` index. If the destination index exists, it will be replaced, except for - * index-specific API keys and analytics data. If the destination index doesn't exist, it will - * be created. The choice between moving or copying an index depends on your needs. Choose: - - * **Move** to rename an index. - **Copy** to create a new index with the same records and - * configuration as an existing one. > **Note**: When considering copying or moving, be aware - * of the [rate - * limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - * on these processes and the [impact on your analytics - * data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). - * - * @param indexName Index on which to perform the request. (required) - * @param operationIndexParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture operationIndexAsync( - String indexName, - OperationIndexParams operationIndexParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `operationIndex`."); - } - - if (operationIndexParams == null) { - throw new AlgoliaRuntimeException("Parameter `operationIndexParams` is required when calling `operationIndex`."); - } - - Object bodyObj = operationIndexParams; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/operation".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This `operation`, _copy_ or _move_, will copy or move a source - * index's (`IndexName`) records, settings, synonyms, and rules to a - * `destination` index. If the destination index exists, it will be replaced, except for - * index-specific API keys and analytics data. If the destination index doesn't exist, it will - * be created. The choice between moving or copying an index depends on your needs. Choose: - - * **Move** to rename an index. - **Copy** to create a new index with the same records and - * configuration as an existing one. > **Note**: When considering copying or moving, be aware - * of the [rate - * limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) - * on these processes and the [impact on your analytics - * data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/). - * - * @param indexName Index on which to perform the request. (required) - * @param operationIndexParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture operationIndexAsync(String indexName, OperationIndexParams operationIndexParams) - throws AlgoliaRuntimeException { - return this.operationIndexAsync(indexName, operationIndexParams, null); - } - - /** - * Add new attributes or update current ones in an existing record. You can use any first-level - * attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param createIfNotExists Indicates whether to create a new record if it doesn't exist yet. - * (optional, default to true) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtWithObjectIdResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtWithObjectIdResponse partialUpdateObject( - String indexName, - String objectID, - Map attributesToUpdate, - Boolean createIfNotExists, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(partialUpdateObjectAsync(indexName, objectID, attributesToUpdate, createIfNotExists, requestOptions)); - } - - /** - * Add new attributes or update current ones in an existing record. You can use any first-level - * attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param createIfNotExists Indicates whether to create a new record if it doesn't exist yet. - * (optional, default to true) - * @return UpdatedAtWithObjectIdResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtWithObjectIdResponse partialUpdateObject( - String indexName, - String objectID, - Map attributesToUpdate, - Boolean createIfNotExists - ) throws AlgoliaRuntimeException { - return this.partialUpdateObject(indexName, objectID, attributesToUpdate, createIfNotExists, null); - } - - /** - * Add new attributes or update current ones in an existing record. You can use any first-level - * attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtWithObjectIdResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtWithObjectIdResponse partialUpdateObject( - String indexName, - String objectID, - Map attributesToUpdate, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return this.partialUpdateObject(indexName, objectID, attributesToUpdate, null, requestOptions); - } - - /** - * Add new attributes or update current ones in an existing record. You can use any first-level - * attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @return UpdatedAtWithObjectIdResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtWithObjectIdResponse partialUpdateObject( - String indexName, - String objectID, - Map attributesToUpdate - ) throws AlgoliaRuntimeException { - return this.partialUpdateObject(indexName, objectID, attributesToUpdate, null, null); - } - - /** - * (asynchronously) Add new attributes or update current ones in an existing record. You can use - * any first-level attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param createIfNotExists Indicates whether to create a new record if it doesn't exist yet. - * (optional, default to true) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture partialUpdateObjectAsync( - String indexName, - String objectID, - Map attributesToUpdate, - Boolean createIfNotExists, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `partialUpdateObject`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `partialUpdateObject`."); - } - - if (attributesToUpdate == null) { - throw new AlgoliaRuntimeException("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`."); - } - - Object bodyObj = attributesToUpdate; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/{objectID}/partial".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (createIfNotExists != null) { - queryParameters.put("createIfNotExists", parameterToString(createIfNotExists)); - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Add new attributes or update current ones in an existing record. You can use - * any first-level attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param createIfNotExists Indicates whether to create a new record if it doesn't exist yet. - * (optional, default to true) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture partialUpdateObjectAsync( - String indexName, - String objectID, - Map attributesToUpdate, - Boolean createIfNotExists - ) throws AlgoliaRuntimeException { - return this.partialUpdateObjectAsync(indexName, objectID, attributesToUpdate, createIfNotExists, null); - } - - /** - * (asynchronously) Add new attributes or update current ones in an existing record. You can use - * any first-level attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture partialUpdateObjectAsync( - String indexName, - String objectID, - Map attributesToUpdate, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return this.partialUpdateObjectAsync(indexName, objectID, attributesToUpdate, null, requestOptions); - } - - /** - * (asynchronously) Add new attributes or update current ones in an existing record. You can use - * any first-level attribute but not nested attributes. If you specify a [nested - * attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), - * the engine treats it as a replacement for its first-level ancestor. - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique record (object) identifier. (required) - * @param attributesToUpdate Object with attributes to update. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture partialUpdateObjectAsync( - String indexName, - String objectID, - Map attributesToUpdate - ) throws AlgoliaRuntimeException { - return this.partialUpdateObjectAsync(indexName, objectID, attributesToUpdate, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(postAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.post(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.post(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object post(String path) throws AlgoliaRuntimeException { - return this.post(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `post`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.postAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture postAsync(String path) throws AlgoliaRuntimeException { - return this.postAsync(path, null, null, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(putAsync(path, parameters, body, requestOptions)); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.put(path, parameters, body, null); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.put(path, null, null, requestOptions); - } - - /** - * This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return Object - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public Object put(String path) throws AlgoliaRuntimeException { - return this.put(path, null, null, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (path == null) { - throw new AlgoliaRuntimeException("Parameter `path` is required when calling `put`."); - } - - Object bodyObj = body != null ? body : new Object(); - - // create path and map variables - String requestPath = "/1{path}".replaceAll("\\{path\\}", path.toString()); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (parameters != null) { - for (Map.Entry parameter : parameters.entrySet()) { - queryParameters.put(parameter.getKey().toString(), parameterToString(parameter.getValue())); - } - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param parameters Query parameters to apply to the current query. (optional) - * @param body Parameters to send with the custom request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, Map parameters, Object body) throws AlgoliaRuntimeException { - return this.putAsync(path, parameters, body, null); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, requestOptions); - } - - /** - * (asynchronously) This method allow you to send requests to the Algolia REST API. - * - * @param path Path of the endpoint, anything after \"/1\" must be specified. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture putAsync(String path) throws AlgoliaRuntimeException { - return this.putAsync(path, null, null, null); - } - - /** - * Remove a userID and its associated data from the multi-clusters. - * - * @param userID userID to assign. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return RemoveUserIdResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public RemoveUserIdResponse removeUserId(String userID, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(removeUserIdAsync(userID, requestOptions)); - } - - /** - * Remove a userID and its associated data from the multi-clusters. - * - * @param userID userID to assign. (required) - * @return RemoveUserIdResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public RemoveUserIdResponse removeUserId(String userID) throws AlgoliaRuntimeException { - return this.removeUserId(userID, null); - } - - /** - * (asynchronously) Remove a userID and its associated data from the multi-clusters. - * - * @param userID userID to assign. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture removeUserIdAsync(String userID, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (userID == null) { - throw new AlgoliaRuntimeException("Parameter `userID` is required when calling `removeUserId`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/clusters/mapping/{userID}".replaceAll("\\{userID\\}", this.escapeString(userID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "DELETE", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Remove a userID and its associated data from the multi-clusters. - * - * @param userID userID to assign. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture removeUserIdAsync(String userID) throws AlgoliaRuntimeException { - return this.removeUserIdAsync(userID, null); - } - - /** - * Replace all allowed sources. - * - * @param source Allowed sources. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return ReplaceSourceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ReplaceSourceResponse replaceSources(List source, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(replaceSourcesAsync(source, requestOptions)); - } - - /** - * Replace all allowed sources. - * - * @param source Allowed sources. (required) - * @return ReplaceSourceResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public ReplaceSourceResponse replaceSources(List source) throws AlgoliaRuntimeException { - return this.replaceSources(source, null); - } - - /** - * (asynchronously) Replace all allowed sources. - * - * @param source Allowed sources. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture replaceSourcesAsync(List source, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (source == null) { - throw new AlgoliaRuntimeException("Parameter `source` is required when calling `replaceSources`."); - } - - Object bodyObj = source; - - // create path and map variables - String requestPath = "/1/security/sources"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Replace all allowed sources. - * - * @param source Allowed sources. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture replaceSourcesAsync(List source) throws AlgoliaRuntimeException { - return this.replaceSourcesAsync(source, null); - } - - /** - * Restore a deleted API key, along with its associated permissions. The request must be - * authenticated with the admin API key. - * - * @param key API key. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return AddApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public AddApiKeyResponse restoreApiKey(String key, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(restoreApiKeyAsync(key, requestOptions)); - } - - /** - * Restore a deleted API key, along with its associated permissions. The request must be - * authenticated with the admin API key. - * - * @param key API key. (required) - * @return AddApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public AddApiKeyResponse restoreApiKey(String key) throws AlgoliaRuntimeException { - return this.restoreApiKey(key, null); - } - - /** - * (asynchronously) Restore a deleted API key, along with its associated permissions. The request - * must be authenticated with the admin API key. - * - * @param key API key. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture restoreApiKeyAsync(String key, RequestOptions requestOptions) throws AlgoliaRuntimeException { - if (key == null) { - throw new AlgoliaRuntimeException("Parameter `key` is required when calling `restoreApiKey`."); - } - - Object bodyObj = null; - - // create path and map variables - String requestPath = "/1/keys/{key}/restore".replaceAll("\\{key\\}", this.escapeString(key.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Restore a deleted API key, along with its associated permissions. The request - * must be authenticated with the admin API key. - * - * @param key API key. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture restoreApiKeyAsync(String key) throws AlgoliaRuntimeException { - return this.restoreApiKeyAsync(key, null); - } - - /** - * Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, - * Algolia automatically adds it. If you use an existing `objectID`, the existing record is - * replaced with the new one. To add multiple records to your index in a single API request, use - * the [`batch` operation](#tag/Records/operation/batch). - * - * @param indexName Index on which to perform the request. (required) - * @param body The Algolia record. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SaveObjectResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SaveObjectResponse saveObject(String indexName, Object body, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(saveObjectAsync(indexName, body, requestOptions)); - } - - /** - * Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, - * Algolia automatically adds it. If you use an existing `objectID`, the existing record is - * replaced with the new one. To add multiple records to your index in a single API request, use - * the [`batch` operation](#tag/Records/operation/batch). - * - * @param indexName Index on which to perform the request. (required) - * @param body The Algolia record. (required) - * @return SaveObjectResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SaveObjectResponse saveObject(String indexName, Object body) throws AlgoliaRuntimeException { - return this.saveObject(indexName, body, null); - } - - /** - * (asynchronously) Add a record (object) to an index or replace it. If the record doesn't - * contain an `objectID`, Algolia automatically adds it. If you use an existing - * `objectID`, the existing record is replaced with the new one. To add multiple records - * to your index in a single API request, use the [`batch` - * operation](#tag/Records/operation/batch). - * - * @param indexName Index on which to perform the request. (required) - * @param body The Algolia record. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveObjectAsync(String indexName, Object body, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `saveObject`."); - } - - if (body == null) { - throw new AlgoliaRuntimeException("Parameter `body` is required when calling `saveObject`."); - } - - Object bodyObj = body; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Add a record (object) to an index or replace it. If the record doesn't - * contain an `objectID`, Algolia automatically adds it. If you use an existing - * `objectID`, the existing record is replaced with the new one. To add multiple records - * to your index in a single API request, use the [`batch` - * operation](#tag/Records/operation/batch). - * - * @param indexName Index on which to perform the request. (required) - * @param body The Algolia record. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveObjectAsync(String indexName, Object body) throws AlgoliaRuntimeException { - return this.saveObjectAsync(indexName, body, null); - } - - /** - * To create or update more than one rule, use the [`batch` - * operation](#tag/Rules/operation/saveRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param rule (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedRuleResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedRuleResponse saveRule( - String indexName, - String objectID, - Rule rule, - Boolean forwardToReplicas, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(saveRuleAsync(indexName, objectID, rule, forwardToReplicas, requestOptions)); - } - - /** - * To create or update more than one rule, use the [`batch` - * operation](#tag/Rules/operation/saveRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param rule (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return UpdatedRuleResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedRuleResponse saveRule(String indexName, String objectID, Rule rule, Boolean forwardToReplicas) - throws AlgoliaRuntimeException { - return this.saveRule(indexName, objectID, rule, forwardToReplicas, null); - } - - /** - * To create or update more than one rule, use the [`batch` - * operation](#tag/Rules/operation/saveRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param rule (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedRuleResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedRuleResponse saveRule(String indexName, String objectID, Rule rule, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.saveRule(indexName, objectID, rule, null, requestOptions); - } - - /** - * To create or update more than one rule, use the [`batch` - * operation](#tag/Rules/operation/saveRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param rule (required) - * @return UpdatedRuleResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedRuleResponse saveRule(String indexName, String objectID, Rule rule) throws AlgoliaRuntimeException { - return this.saveRule(indexName, objectID, rule, null, null); - } - - /** - * (asynchronously) To create or update more than one rule, use the [`batch` - * operation](#tag/Rules/operation/saveRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param rule (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveRuleAsync( - String indexName, - String objectID, - Rule rule, - Boolean forwardToReplicas, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `saveRule`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `saveRule`."); - } - - if (rule == null) { - throw new AlgoliaRuntimeException("Parameter `rule` is required when calling `saveRule`."); - } - - Object bodyObj = rule; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/rules/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (forwardToReplicas != null) { - queryParameters.put("forwardToReplicas", parameterToString(forwardToReplicas)); - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) To create or update more than one rule, use the [`batch` - * operation](#tag/Rules/operation/saveRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param rule (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveRuleAsync(String indexName, String objectID, Rule rule, Boolean forwardToReplicas) - throws AlgoliaRuntimeException { - return this.saveRuleAsync(indexName, objectID, rule, forwardToReplicas, null); - } - - /** - * (asynchronously) To create or update more than one rule, use the [`batch` - * operation](#tag/Rules/operation/saveRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param rule (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveRuleAsync(String indexName, String objectID, Rule rule, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.saveRuleAsync(indexName, objectID, rule, null, requestOptions); - } - - /** - * (asynchronously) To create or update more than one rule, use the [`batch` - * operation](#tag/Rules/operation/saveRules). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a rule object. (required) - * @param rule (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveRuleAsync(String indexName, String objectID, Rule rule) throws AlgoliaRuntimeException { - return this.saveRuleAsync(indexName, objectID, rule, null, null); - } - - /** - * Create or update multiple rules. - * - * @param indexName Index on which to perform the request. (required) - * @param rules (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param clearExistingRules Indicates whether existing rules should be deleted before adding this - * batch. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse saveRules( - String indexName, - List rules, - Boolean forwardToReplicas, - Boolean clearExistingRules, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(saveRulesAsync(indexName, rules, forwardToReplicas, clearExistingRules, requestOptions)); - } - - /** - * Create or update multiple rules. - * - * @param indexName Index on which to perform the request. (required) - * @param rules (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param clearExistingRules Indicates whether existing rules should be deleted before adding this - * batch. (optional) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse saveRules(String indexName, List rules, Boolean forwardToReplicas, Boolean clearExistingRules) - throws AlgoliaRuntimeException { - return this.saveRules(indexName, rules, forwardToReplicas, clearExistingRules, null); - } - - /** - * Create or update multiple rules. - * - * @param indexName Index on which to perform the request. (required) - * @param rules (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse saveRules(String indexName, List rules, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.saveRules(indexName, rules, null, null, requestOptions); - } - - /** - * Create or update multiple rules. - * - * @param indexName Index on which to perform the request. (required) - * @param rules (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse saveRules(String indexName, List rules) throws AlgoliaRuntimeException { - return this.saveRules(indexName, rules, null, null, null); - } - - /** - * (asynchronously) Create or update multiple rules. - * - * @param indexName Index on which to perform the request. (required) - * @param rules (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param clearExistingRules Indicates whether existing rules should be deleted before adding this - * batch. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveRulesAsync( - String indexName, - List rules, - Boolean forwardToReplicas, - Boolean clearExistingRules, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `saveRules`."); - } - - if (rules == null) { - throw new AlgoliaRuntimeException("Parameter `rules` is required when calling `saveRules`."); - } - - Object bodyObj = rules; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/rules/batch".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (forwardToReplicas != null) { - queryParameters.put("forwardToReplicas", parameterToString(forwardToReplicas)); - } - - if (clearExistingRules != null) { - queryParameters.put("clearExistingRules", parameterToString(clearExistingRules)); - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Create or update multiple rules. - * - * @param indexName Index on which to perform the request. (required) - * @param rules (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param clearExistingRules Indicates whether existing rules should be deleted before adding this - * batch. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveRulesAsync( - String indexName, - List rules, - Boolean forwardToReplicas, - Boolean clearExistingRules - ) throws AlgoliaRuntimeException { - return this.saveRulesAsync(indexName, rules, forwardToReplicas, clearExistingRules, null); - } - - /** - * (asynchronously) Create or update multiple rules. - * - * @param indexName Index on which to perform the request. (required) - * @param rules (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveRulesAsync(String indexName, List rules, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.saveRulesAsync(indexName, rules, null, null, requestOptions); - } - - /** - * (asynchronously) Create or update multiple rules. - * - * @param indexName Index on which to perform the request. (required) - * @param rules (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveRulesAsync(String indexName, List rules) throws AlgoliaRuntimeException { - return this.saveRulesAsync(indexName, rules, null, null, null); - } - - /** - * Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SaveSynonymResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SaveSynonymResponse saveSynonym( - String indexName, - String objectID, - SynonymHit synonymHit, - Boolean forwardToReplicas, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(saveSynonymAsync(indexName, objectID, synonymHit, forwardToReplicas, requestOptions)); - } - - /** - * Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return SaveSynonymResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SaveSynonymResponse saveSynonym(String indexName, String objectID, SynonymHit synonymHit, Boolean forwardToReplicas) - throws AlgoliaRuntimeException { - return this.saveSynonym(indexName, objectID, synonymHit, forwardToReplicas, null); - } - - /** - * Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param synonymHit (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SaveSynonymResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SaveSynonymResponse saveSynonym(String indexName, String objectID, SynonymHit synonymHit, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.saveSynonym(indexName, objectID, synonymHit, null, requestOptions); - } - - /** - * Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If - * you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To - * add multiple synonyms in a single API request, use the [`batch` - * operation](#tag/Synonyms/operation/saveSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param synonymHit (required) - * @return SaveSynonymResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SaveSynonymResponse saveSynonym(String indexName, String objectID, SynonymHit synonymHit) throws AlgoliaRuntimeException { - return this.saveSynonym(indexName, objectID, synonymHit, null, null); - } - - /** - * (asynchronously) Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds - * a new one. If you use an existing synonym `objectID`, the existing synonym is - * replaced with the new one. To add multiple synonyms in a single API request, use the - * [`batch` operation](#tag/Synonyms/operation/saveSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveSynonymAsync( - String indexName, - String objectID, - SynonymHit synonymHit, - Boolean forwardToReplicas, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `saveSynonym`."); - } - - if (objectID == null) { - throw new AlgoliaRuntimeException("Parameter `objectID` is required when calling `saveSynonym`."); - } - - if (synonymHit == null) { - throw new AlgoliaRuntimeException("Parameter `synonymHit` is required when calling `saveSynonym`."); - } - - Object bodyObj = synonymHit; - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/synonyms/{objectID}".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{objectID\\}", this.escapeString(objectID.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (forwardToReplicas != null) { - queryParameters.put("forwardToReplicas", parameterToString(forwardToReplicas)); - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds - * a new one. If you use an existing synonym `objectID`, the existing synonym is - * replaced with the new one. To add multiple synonyms in a single API request, use the - * [`batch` operation](#tag/Synonyms/operation/saveSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveSynonymAsync( - String indexName, - String objectID, - SynonymHit synonymHit, - Boolean forwardToReplicas - ) throws AlgoliaRuntimeException { - return this.saveSynonymAsync(indexName, objectID, synonymHit, forwardToReplicas, null); - } - - /** - * (asynchronously) Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds - * a new one. If you use an existing synonym `objectID`, the existing synonym is - * replaced with the new one. To add multiple synonyms in a single API request, use the - * [`batch` operation](#tag/Synonyms/operation/saveSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param synonymHit (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveSynonymAsync( - String indexName, - String objectID, - SynonymHit synonymHit, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return this.saveSynonymAsync(indexName, objectID, synonymHit, null, requestOptions); - } - - /** - * (asynchronously) Add a - * [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) - * to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds - * a new one. If you use an existing synonym `objectID`, the existing synonym is - * replaced with the new one. To add multiple synonyms in a single API request, use the - * [`batch` operation](#tag/Synonyms/operation/saveSynonyms). - * - * @param indexName Index on which to perform the request. (required) - * @param objectID Unique identifier of a synonym object. (required) - * @param synonymHit (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveSynonymAsync(String indexName, String objectID, SynonymHit synonymHit) - throws AlgoliaRuntimeException { - return this.saveSynonymAsync(indexName, objectID, synonymHit, null, null); - } - - /** - * Create or update multiple synonyms. - * - * @param indexName Index on which to perform the request. (required) - * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param replaceExistingSynonyms Indicates whether to replace all synonyms in the index with the - * ones sent with this request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse saveSynonyms( - String indexName, - List synonymHit, - Boolean forwardToReplicas, - Boolean replaceExistingSynonyms, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(saveSynonymsAsync(indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, requestOptions)); - } - - /** - * Create or update multiple synonyms. - * - * @param indexName Index on which to perform the request. (required) - * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param replaceExistingSynonyms Indicates whether to replace all synonyms in the index with the - * ones sent with this request. (optional) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse saveSynonyms( - String indexName, - List synonymHit, - Boolean forwardToReplicas, - Boolean replaceExistingSynonyms - ) throws AlgoliaRuntimeException { - return this.saveSynonyms(indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, null); - } - - /** - * Create or update multiple synonyms. - * - * @param indexName Index on which to perform the request. (required) - * @param synonymHit (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse saveSynonyms(String indexName, List synonymHit, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.saveSynonyms(indexName, synonymHit, null, null, requestOptions); - } - - /** - * Create or update multiple synonyms. - * - * @param indexName Index on which to perform the request. (required) - * @param synonymHit (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse saveSynonyms(String indexName, List synonymHit) throws AlgoliaRuntimeException { - return this.saveSynonyms(indexName, synonymHit, null, null, null); - } - - /** - * (asynchronously) Create or update multiple synonyms. - * - * @param indexName Index on which to perform the request. (required) - * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param replaceExistingSynonyms Indicates whether to replace all synonyms in the index with the - * ones sent with this request. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveSynonymsAsync( - String indexName, - List synonymHit, - Boolean forwardToReplicas, - Boolean replaceExistingSynonyms, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `saveSynonyms`."); - } - - if (synonymHit == null) { - throw new AlgoliaRuntimeException("Parameter `synonymHit` is required when calling `saveSynonyms`."); - } - - Object bodyObj = synonymHit; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/synonyms/batch".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (forwardToReplicas != null) { - queryParameters.put("forwardToReplicas", parameterToString(forwardToReplicas)); - } - - if (replaceExistingSynonyms != null) { - queryParameters.put("replaceExistingSynonyms", parameterToString(replaceExistingSynonyms)); - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Create or update multiple synonyms. - * - * @param indexName Index on which to perform the request. (required) - * @param synonymHit (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param replaceExistingSynonyms Indicates whether to replace all synonyms in the index with the - * ones sent with this request. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveSynonymsAsync( - String indexName, - List synonymHit, - Boolean forwardToReplicas, - Boolean replaceExistingSynonyms - ) throws AlgoliaRuntimeException { - return this.saveSynonymsAsync(indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, null); - } - - /** - * (asynchronously) Create or update multiple synonyms. - * - * @param indexName Index on which to perform the request. (required) - * @param synonymHit (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveSynonymsAsync( - String indexName, - List synonymHit, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return this.saveSynonymsAsync(indexName, synonymHit, null, null, requestOptions); - } - - /** - * (asynchronously) Create or update multiple synonyms. - * - * @param indexName Index on which to perform the request. (required) - * @param synonymHit (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture saveSynonymsAsync(String indexName, List synonymHit) - throws AlgoliaRuntimeException { - return this.saveSynonymsAsync(indexName, synonymHit, null, null, null); - } - - /** - * Send multiple search queries to one or more indices. - * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchResponses - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchResponses search(SearchMethodParams searchMethodParams, Class innerType, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(searchAsync(searchMethodParams, innerType, requestOptions)); - } - - /** - * Send multiple search queries to one or more indices. - * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return SearchResponses - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchResponses search(SearchMethodParams searchMethodParams, Class innerType) throws AlgoliaRuntimeException { - return this.search(searchMethodParams, innerType, null); - } - - /** - * (asynchronously) Send multiple search queries to one or more indices. - * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> searchAsync( - SearchMethodParams searchMethodParams, - Class innerType, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (searchMethodParams == null) { - throw new AlgoliaRuntimeException("Parameter `searchMethodParams` is required when calling `search`."); - } - - Object bodyObj = searchMethodParams; - - // create path and map variables - String requestPath = "/1/indexes/*/queries"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, SearchResponses.class, innerType); - } - - /** - * (asynchronously) Send multiple search queries to one or more indices. - * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> searchAsync(SearchMethodParams searchMethodParams, Class innerType) - throws AlgoliaRuntimeException { - return this.searchAsync(searchMethodParams, innerType, null); - } - - /** - * Search for standard and - * [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - * entries in the [stop - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * or [segmentation - * (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * dictionaries. - * - * @param dictionaryName Dictionary to search in. (required) - * @param searchDictionaryEntriesParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse searchDictionaryEntries( - DictionaryType dictionaryName, - SearchDictionaryEntriesParams searchDictionaryEntriesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(searchDictionaryEntriesAsync(dictionaryName, searchDictionaryEntriesParams, requestOptions)); - } - - /** - * Search for standard and - * [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - * entries in the [stop - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * or [segmentation - * (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * dictionaries. - * - * @param dictionaryName Dictionary to search in. (required) - * @param searchDictionaryEntriesParams (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse searchDictionaryEntries( - DictionaryType dictionaryName, - SearchDictionaryEntriesParams searchDictionaryEntriesParams - ) throws AlgoliaRuntimeException { - return this.searchDictionaryEntries(dictionaryName, searchDictionaryEntriesParams, null); - } - - /** - * (asynchronously) Search for standard and - * [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - * entries in the [stop - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * or [segmentation - * (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * dictionaries. - * - * @param dictionaryName Dictionary to search in. (required) - * @param searchDictionaryEntriesParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchDictionaryEntriesAsync( - DictionaryType dictionaryName, - SearchDictionaryEntriesParams searchDictionaryEntriesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (dictionaryName == null) { - throw new AlgoliaRuntimeException("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`."); - } - - if (searchDictionaryEntriesParams == null) { - throw new AlgoliaRuntimeException( - "Parameter `searchDictionaryEntriesParams` is required when calling" + " `searchDictionaryEntries`." - ); - } - - Object bodyObj = searchDictionaryEntriesParams; - - // create path and map variables - String requestPath = - "/1/dictionaries/{dictionaryName}/search".replaceAll("\\{dictionaryName\\}", this.escapeString(dictionaryName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Search for standard and - * [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) - * entries in the [stop - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), - * [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), - * or [segmentation - * (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * dictionaries. - * - * @param dictionaryName Dictionary to search in. (required) - * @param searchDictionaryEntriesParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchDictionaryEntriesAsync( - DictionaryType dictionaryName, - SearchDictionaryEntriesParams searchDictionaryEntriesParams - ) throws AlgoliaRuntimeException { - return this.searchDictionaryEntriesAsync(dictionaryName, searchDictionaryEntriesParams, null); - } - - /** - * [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. - * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) - * @param searchForFacetValuesRequest (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchForFacetValuesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchForFacetValuesResponse searchForFacetValues( - String indexName, - String facetName, - SearchForFacetValuesRequest searchForFacetValuesRequest, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(searchForFacetValuesAsync(indexName, facetName, searchForFacetValuesRequest, requestOptions)); - } - - /** - * [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. - * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) - * @param searchForFacetValuesRequest (optional) - * @return SearchForFacetValuesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchForFacetValuesResponse searchForFacetValues( - String indexName, - String facetName, - SearchForFacetValuesRequest searchForFacetValuesRequest - ) throws AlgoliaRuntimeException { - return this.searchForFacetValues(indexName, facetName, searchForFacetValuesRequest, null); - } - - /** - * [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. - * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchForFacetValuesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchForFacetValuesResponse searchForFacetValues(String indexName, String facetName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.searchForFacetValues(indexName, facetName, null, requestOptions); - } - - /** - * [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By - * default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`. - * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) - * @return SearchForFacetValuesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchForFacetValuesResponse searchForFacetValues(String indexName, String facetName) throws AlgoliaRuntimeException { - return this.searchForFacetValues(indexName, facetName, null, null); - } - - /** - * (asynchronously) [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and - * `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but - * you can adjust this with `maxFacetHits`. - * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) - * @param searchForFacetValuesRequest (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchForFacetValuesAsync( - String indexName, - String facetName, - SearchForFacetValuesRequest searchForFacetValuesRequest, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `searchForFacetValues`."); - } - - if (facetName == null) { - throw new AlgoliaRuntimeException("Parameter `facetName` is required when calling `searchForFacetValues`."); - } - - Object bodyObj = searchForFacetValuesRequest != null ? searchForFacetValuesRequest : new Object(); - - // create path and map variables - String requestPath = - "/1/indexes/{indexName}/facets/{facetName}/query".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())) - .replaceAll("\\{facetName\\}", this.escapeString(facetName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and - * `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but - * you can adjust this with `maxFacetHits`. - * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) - * @param searchForFacetValuesRequest (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchForFacetValuesAsync( - String indexName, - String facetName, - SearchForFacetValuesRequest searchForFacetValuesRequest - ) throws AlgoliaRuntimeException { - return this.searchForFacetValuesAsync(indexName, facetName, searchForFacetValuesRequest, null); - } - - /** - * (asynchronously) [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and - * `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but - * you can adjust this with `maxFacetHits`. - * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchForFacetValuesAsync( - String indexName, - String facetName, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return this.searchForFacetValuesAsync(indexName, facetName, null, requestOptions); - } - - /** - * (asynchronously) [Search for a facet's - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), - * optionally restricting the returned values to those contained in records matching other search - * criteria. > **Note**: Pagination isn't supported (`page` and - * `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but - * you can adjust this with `maxFacetHits`. - * - * @param indexName Index on which to perform the request. (required) - * @param facetName Facet name. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchForFacetValuesAsync(String indexName, String facetName) - throws AlgoliaRuntimeException { - return this.searchForFacetValuesAsync(indexName, facetName, null, null); - } - - /** - * Search for rules in your index. You can control the search with parameters. To list all rules, - * send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param searchRulesParams (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchRulesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchRulesResponse searchRules(String indexName, SearchRulesParams searchRulesParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(searchRulesAsync(indexName, searchRulesParams, requestOptions)); - } - - /** - * Search for rules in your index. You can control the search with parameters. To list all rules, - * send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param searchRulesParams (optional) - * @return SearchRulesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchRulesResponse searchRules(String indexName, SearchRulesParams searchRulesParams) throws AlgoliaRuntimeException { - return this.searchRules(indexName, searchRulesParams, null); - } - - /** - * Search for rules in your index. You can control the search with parameters. To list all rules, - * send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchRulesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchRulesResponse searchRules(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.searchRules(indexName, null, requestOptions); - } - - /** - * Search for rules in your index. You can control the search with parameters. To list all rules, - * send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @return SearchRulesResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchRulesResponse searchRules(String indexName) throws AlgoliaRuntimeException { - return this.searchRules(indexName, null, null); - } - - /** - * (asynchronously) Search for rules in your index. You can control the search with parameters. To - * list all rules, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param searchRulesParams (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchRulesAsync( - String indexName, - SearchRulesParams searchRulesParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `searchRules`."); - } - - Object bodyObj = searchRulesParams != null ? searchRulesParams : new Object(); - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/rules/search".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Search for rules in your index. You can control the search with parameters. To - * list all rules, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param searchRulesParams (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchRulesAsync(String indexName, SearchRulesParams searchRulesParams) - throws AlgoliaRuntimeException { - return this.searchRulesAsync(indexName, searchRulesParams, null); - } - - /** - * (asynchronously) Search for rules in your index. You can control the search with parameters. To - * list all rules, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchRulesAsync(String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.searchRulesAsync(indexName, null, requestOptions); - } - - /** - * (asynchronously) Search for rules in your index. You can control the search with parameters. To - * list all rules, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchRulesAsync(String indexName) throws AlgoliaRuntimeException { - return this.searchRulesAsync(indexName, null, null); - } - - /** - * Return records that match the query. - * - * @param indexName Index on which to perform the request. (required) - * @param searchParams (optional) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchResponse searchSingleIndex( - String indexName, - SearchParams searchParams, - Class innerType, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(searchSingleIndexAsync(indexName, searchParams, innerType, requestOptions)); - } - - /** - * Return records that match the query. - * - * @param indexName Index on which to perform the request. (required) - * @param searchParams (optional) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return SearchResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchResponse searchSingleIndex(String indexName, SearchParams searchParams, Class innerType) - throws AlgoliaRuntimeException { - return this.searchSingleIndex(indexName, searchParams, innerType, null); - } - - /** - * Return records that match the query. - * - * @param indexName Index on which to perform the request. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchResponse searchSingleIndex(String indexName, Class innerType, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.searchSingleIndex(indexName, null, innerType, requestOptions); - } - - /** - * Return records that match the query. - * - * @param indexName Index on which to perform the request. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return SearchResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchResponse searchSingleIndex(String indexName, Class innerType) throws AlgoliaRuntimeException { - return this.searchSingleIndex(indexName, null, innerType, null); - } - - /** - * (asynchronously) Return records that match the query. - * - * @param indexName Index on which to perform the request. (required) - * @param searchParams (optional) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> searchSingleIndexAsync( - String indexName, - SearchParams searchParams, - Class innerType, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `searchSingleIndex`."); - } - - Object bodyObj = searchParams != null ? searchParams : new Object(); - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/query".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, SearchResponse.class, innerType); - } - - /** - * (asynchronously) Return records that match the query. - * - * @param indexName Index on which to perform the request. (required) - * @param searchParams (optional) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> searchSingleIndexAsync(String indexName, SearchParams searchParams, Class innerType) - throws AlgoliaRuntimeException { - return this.searchSingleIndexAsync(indexName, searchParams, innerType, null); - } - - /** - * (asynchronously) Return records that match the query. - * - * @param indexName Index on which to perform the request. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> searchSingleIndexAsync( - String indexName, - Class innerType, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return this.searchSingleIndexAsync(indexName, null, innerType, requestOptions); - } - - /** - * (asynchronously) Return records that match the query. - * - * @param indexName Index on which to perform the request. (required) - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> searchSingleIndexAsync(String indexName, Class innerType) - throws AlgoliaRuntimeException { - return this.searchSingleIndexAsync(indexName, null, innerType, null); - } - - /** - * Search for synonyms in your index. You can control and filter the search with parameters. To - * get all synonyms, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param type Search for specific [types of - * synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms). - * (optional) - * @param page Returns the requested page number (the first page is 0). Page size is set by - * `hitsPerPage`. When null, there's no pagination. (optional, default to 0) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @param searchSynonymsParams Body of the `searchSynonyms` operation. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchSynonymsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchSynonymsResponse searchSynonyms( - String indexName, - SynonymType type, - Integer page, - Integer hitsPerPage, - SearchSynonymsParams searchSynonymsParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(searchSynonymsAsync(indexName, type, page, hitsPerPage, searchSynonymsParams, requestOptions)); - } - - /** - * Search for synonyms in your index. You can control and filter the search with parameters. To - * get all synonyms, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param type Search for specific [types of - * synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms). - * (optional) - * @param page Returns the requested page number (the first page is 0). Page size is set by - * `hitsPerPage`. When null, there's no pagination. (optional, default to 0) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @param searchSynonymsParams Body of the `searchSynonyms` operation. (optional) - * @return SearchSynonymsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchSynonymsResponse searchSynonyms( - String indexName, - SynonymType type, - Integer page, - Integer hitsPerPage, - SearchSynonymsParams searchSynonymsParams - ) throws AlgoliaRuntimeException { - return this.searchSynonyms(indexName, type, page, hitsPerPage, searchSynonymsParams, null); - } - - /** - * Search for synonyms in your index. You can control and filter the search with parameters. To - * get all synonyms, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchSynonymsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchSynonymsResponse searchSynonyms(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return this.searchSynonyms(indexName, null, null, null, null, requestOptions); - } - - /** - * Search for synonyms in your index. You can control and filter the search with parameters. To - * get all synonyms, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @return SearchSynonymsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchSynonymsResponse searchSynonyms(String indexName) throws AlgoliaRuntimeException { - return this.searchSynonyms(indexName, null, null, null, null, null); - } - - /** - * (asynchronously) Search for synonyms in your index. You can control and filter the search with - * parameters. To get all synonyms, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param type Search for specific [types of - * synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms). - * (optional) - * @param page Returns the requested page number (the first page is 0). Page size is set by - * `hitsPerPage`. When null, there's no pagination. (optional, default to 0) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @param searchSynonymsParams Body of the `searchSynonyms` operation. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchSynonymsAsync( - String indexName, - SynonymType type, - Integer page, - Integer hitsPerPage, - SearchSynonymsParams searchSynonymsParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `searchSynonyms`."); - } - - Object bodyObj = searchSynonymsParams != null ? searchSynonymsParams : new Object(); - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/synonyms/search".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (type != null) { - queryParameters.put("type", parameterToString(type)); - } - - if (page != null) { - queryParameters.put("page", parameterToString(page)); - } - - if (hitsPerPage != null) { - queryParameters.put("hitsPerPage", parameterToString(hitsPerPage)); - } - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Search for synonyms in your index. You can control and filter the search with - * parameters. To get all synonyms, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param type Search for specific [types of - * synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms). - * (optional) - * @param page Returns the requested page number (the first page is 0). Page size is set by - * `hitsPerPage`. When null, there's no pagination. (optional, default to 0) - * @param hitsPerPage Maximum number of hits per page. (optional, default to 100) - * @param searchSynonymsParams Body of the `searchSynonyms` operation. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchSynonymsAsync( - String indexName, - SynonymType type, - Integer page, - Integer hitsPerPage, - SearchSynonymsParams searchSynonymsParams - ) throws AlgoliaRuntimeException { - return this.searchSynonymsAsync(indexName, type, page, hitsPerPage, searchSynonymsParams, null); - } - - /** - * (asynchronously) Search for synonyms in your index. You can control and filter the search with - * parameters. To get all synonyms, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchSynonymsAsync(String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.searchSynonymsAsync(indexName, null, null, null, null, requestOptions); - } - - /** - * (asynchronously) Search for synonyms in your index. You can control and filter the search with - * parameters. To get all synonyms, send an empty request body. - * - * @param indexName Index on which to perform the request. (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchSynonymsAsync(String indexName) throws AlgoliaRuntimeException { - return this.searchSynonymsAsync(indexName, null, null, null, null, null); - } - - /** - * Since it can take up to a few seconds to get the data from the different clusters, the response - * isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as - * the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID - * usage. For example, if you add or move a user ID, the search will show an old value until the - * next time the mapping is rebuilt (every 12 hours). - * - * @param searchUserIdsParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchUserIdsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchUserIdsResponse searchUserIds(SearchUserIdsParams searchUserIdsParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(searchUserIdsAsync(searchUserIdsParams, requestOptions)); - } - - /** - * Since it can take up to a few seconds to get the data from the different clusters, the response - * isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as - * the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID - * usage. For example, if you add or move a user ID, the search will show an old value until the - * next time the mapping is rebuilt (every 12 hours). - * - * @param searchUserIdsParams (required) - * @return SearchUserIdsResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchUserIdsResponse searchUserIds(SearchUserIdsParams searchUserIdsParams) throws AlgoliaRuntimeException { - return this.searchUserIds(searchUserIdsParams, null); - } - - /** - * (asynchronously) Since it can take up to a few seconds to get the data from the different - * clusters, the response isn't real-time. To ensure rapid updates, the user IDs index - * isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the - * same time as the update of user ID usage. For example, if you add or move a user ID, the search - * will show an old value until the next time the mapping is rebuilt (every 12 hours). - * - * @param searchUserIdsParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchUserIdsAsync( - SearchUserIdsParams searchUserIdsParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (searchUserIdsParams == null) { - throw new AlgoliaRuntimeException("Parameter `searchUserIdsParams` is required when calling `searchUserIds`."); - } - - Object bodyObj = searchUserIdsParams; - - // create path and map variables - String requestPath = "/1/clusters/mapping/search"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "POST", queryParameters, bodyObj, headers, requestOptions, true); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Since it can take up to a few seconds to get the data from the different - * clusters, the response isn't real-time. To ensure rapid updates, the user IDs index - * isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the - * same time as the update of user ID usage. For example, if you add or move a user ID, the search - * will show an old value until the next time the mapping is rebuilt (every 12 hours). - * - * @param searchUserIdsParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture searchUserIdsAsync(SearchUserIdsParams searchUserIdsParams) - throws AlgoliaRuntimeException { - return this.searchUserIdsAsync(searchUserIdsParams, null); - } - - /** - * Set stop word settings for a specific language. - * - * @param dictionarySettingsParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse setDictionarySettings(DictionarySettingsParams dictionarySettingsParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return LaunderThrowable.await(setDictionarySettingsAsync(dictionarySettingsParams, requestOptions)); - } - - /** - * Set stop word settings for a specific language. - * - * @param dictionarySettingsParams (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse setDictionarySettings(DictionarySettingsParams dictionarySettingsParams) throws AlgoliaRuntimeException { - return this.setDictionarySettings(dictionarySettingsParams, null); - } - - /** - * (asynchronously) Set stop word settings for a specific language. - * - * @param dictionarySettingsParams (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture setDictionarySettingsAsync( - DictionarySettingsParams dictionarySettingsParams, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (dictionarySettingsParams == null) { - throw new AlgoliaRuntimeException("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`."); - } - - Object bodyObj = dictionarySettingsParams; - - // create path and map variables - String requestPath = "/1/dictionaries/*/settings"; - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Set stop word settings for a specific language. - * - * @param dictionarySettingsParams (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture setDictionarySettingsAsync(DictionarySettingsParams dictionarySettingsParams) - throws AlgoliaRuntimeException { - return this.setDictionarySettingsAsync(dictionarySettingsParams, null); - } - - /** - * Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. - * - * @param indexName Index on which to perform the request. (required) - * @param indexSettings (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse setSettings( - String indexName, - IndexSettings indexSettings, - Boolean forwardToReplicas, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return LaunderThrowable.await(setSettingsAsync(indexName, indexSettings, forwardToReplicas, requestOptions)); - } - - /** - * Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. - * - * @param indexName Index on which to perform the request. (required) - * @param indexSettings (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse setSettings(String indexName, IndexSettings indexSettings, Boolean forwardToReplicas) - throws AlgoliaRuntimeException { - return this.setSettings(indexName, indexSettings, forwardToReplicas, null); - } - - /** - * Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. - * - * @param indexName Index on which to perform the request. (required) - * @param indexSettings (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse setSettings(String indexName, IndexSettings indexSettings, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.setSettings(indexName, indexSettings, null, requestOptions); - } - - /** - * Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. - * - * @param indexName Index on which to perform the request. (required) - * @param indexSettings (required) - * @return UpdatedAtResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdatedAtResponse setSettings(String indexName, IndexSettings indexSettings) throws AlgoliaRuntimeException { - return this.setSettings(indexName, indexSettings, null, null); - } - - /** - * (asynchronously) Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. - * - * @param indexName Index on which to perform the request. (required) - * @param indexSettings (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture setSettingsAsync( - String indexName, - IndexSettings indexSettings, - Boolean forwardToReplicas, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - if (indexName == null) { - throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `setSettings`."); - } - - if (indexSettings == null) { - throw new AlgoliaRuntimeException("Parameter `indexSettings` is required when calling `setSettings`."); - } - - Object bodyObj = indexSettings; - - // create path and map variables - String requestPath = "/1/indexes/{indexName}/settings".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - if (forwardToReplicas != null) { - queryParameters.put("forwardToReplicas", parameterToString(forwardToReplicas)); - } - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. - * - * @param indexName Index on which to perform the request. (required) - * @param indexSettings (required) - * @param forwardToReplicas Indicates whether changed index settings are forwarded to the replica - * indices. (optional) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture setSettingsAsync(String indexName, IndexSettings indexSettings, Boolean forwardToReplicas) - throws AlgoliaRuntimeException { - return this.setSettingsAsync(indexName, indexSettings, forwardToReplicas, null); - } - - /** - * (asynchronously) Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. - * - * @param indexName Index on which to perform the request. (required) - * @param indexSettings (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture setSettingsAsync( - String indexName, - IndexSettings indexSettings, - RequestOptions requestOptions - ) throws AlgoliaRuntimeException { - return this.setSettingsAsync(indexName, indexSettings, null, requestOptions); - } - - /** - * (asynchronously) Update the specified [index - * settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null - * for a setting resets it to its default value. - * - * @param indexName Index on which to perform the request. (required) - * @param indexSettings (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture setSettingsAsync(String indexName, IndexSettings indexSettings) - throws AlgoliaRuntimeException { - return this.setSettingsAsync(indexName, indexSettings, null, null); - } - - /** - * Replace the permissions of an existing API key. Any unspecified parameter resets that - * permission to its default value. The request must be authenticated with the admin API key. - * - * @param key API key. (required) - * @param apiKey (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return UpdateApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdateApiKeyResponse updateApiKey(String key, ApiKey apiKey, RequestOptions requestOptions) throws AlgoliaRuntimeException { - return LaunderThrowable.await(updateApiKeyAsync(key, apiKey, requestOptions)); - } - - /** - * Replace the permissions of an existing API key. Any unspecified parameter resets that - * permission to its default value. The request must be authenticated with the admin API key. - * - * @param key API key. (required) - * @param apiKey (required) - * @return UpdateApiKeyResponse - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public UpdateApiKeyResponse updateApiKey(String key, ApiKey apiKey) throws AlgoliaRuntimeException { - return this.updateApiKey(key, apiKey, null); - } - - /** - * (asynchronously) Replace the permissions of an existing API key. Any unspecified parameter - * resets that permission to its default value. The request must be authenticated with the admin - * API key. - * - * @param key API key. (required) - * @param apiKey (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture updateApiKeyAsync(String key, ApiKey apiKey, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - if (key == null) { - throw new AlgoliaRuntimeException("Parameter `key` is required when calling `updateApiKey`."); - } - - if (apiKey == null) { - throw new AlgoliaRuntimeException("Parameter `apiKey` is required when calling `updateApiKey`."); - } - - Object bodyObj = apiKey; - - // create path and map variables - String requestPath = "/1/keys/{key}".replaceAll("\\{key\\}", this.escapeString(key.toString())); - - Map queryParameters = new HashMap(); - Map headers = new HashMap(); - - Call call = this.buildCall(requestPath, "PUT", queryParameters, bodyObj, headers, requestOptions, false); - return this.executeAsync(call, new TypeReference() {}); - } - - /** - * (asynchronously) Replace the permissions of an existing API key. Any unspecified parameter - * resets that permission to its default value. The request must be authenticated with the admin - * API key. - * - * @param key API key. (required) - * @param apiKey (required) - * @return CompletableFuture The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture updateApiKeyAsync(String key, ApiKey apiKey) throws AlgoliaRuntimeException { - return this.updateApiKeyAsync(key, apiKey, null); - } - - /** - * Helper: Wait for a task to complete with `indexName` and `taskID`. - * - * @summary Wait for a task to complete. - * @param indexName The `indexName` where the operation was performed. - * @param taskID The `taskID` returned in the method response. - * @param maxRetries The maximum number of retry. 50 by default. (optional) - * @param timeout The function to decide how long to wait between retries. min(retries * 200, - * 5000) by default. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. (optional) - */ - public void waitForTask(String indexName, Long taskID, int maxRetries, IntUnaryOperator timeout, RequestOptions requestOptions) { - TaskUtils.retryUntil( - () -> { - return this.getTask(indexName, taskID, requestOptions); - }, - (GetTaskResponse task) -> { - return task.getStatus() == TaskStatus.PUBLISHED; - }, - maxRetries, - timeout - ); - } - - /** - * Helper: Wait for a task to complete with `indexName` and `taskID`. - * - * @summary Wait for a task to complete. - * @param indexName The `indexName` where the operation was performed. - * @param taskID The `taskID` returned in the method response. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. (optional) - */ - public void waitForTask(String indexName, Long taskID, RequestOptions requestOptions) { - this.waitForTask(indexName, taskID, TaskUtils.DEFAULT_MAX_RETRIES, TaskUtils.DEFAULT_TIMEOUT, requestOptions); - } - - /** - * Helper: Wait for a task to complete with `indexName` and `taskID`. - * - * @summary Wait for a task to complete. - * @param indexName The `indexName` where the operation was performed. - * @param taskID The `taskID` returned in the method response. - * @param maxRetries The maximum number of retry. 50 by default. (optional) - * @param timeout The function to decide how long to wait between retries. min(retries * 200, - * 5000) by default. (optional) - */ - public void waitForTask(String indexName, Long taskID, int maxRetries, IntUnaryOperator timeout) { - this.waitForTask(indexName, taskID, maxRetries, timeout, null); - } - - /** - * Helper: Wait for a task to complete with `indexName` and `taskID`. - * - * @summary Wait for a task to complete. - * @param indexName The `indexName` where the operation was performed. - * @param taskID The `taskID` returned in the method response. - */ - public void waitForTask(String indexName, Long taskID) { - this.waitForTask(indexName, taskID, TaskUtils.DEFAULT_MAX_RETRIES, TaskUtils.DEFAULT_TIMEOUT, null); - } - - /** - * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`. - * - * @summary Wait for an API key task to be processed. - * @param operation The `operation` that was done on a `key`. - * @param key The `key` that has been added, deleted or updated. - * @param apiKey Necessary to know if an `update` operation has been processed, compare fields of - * the response with it. - * @param maxRetries The maximum number of retry. 50 by default. (optional) - * @param timeout The function to decide how long to wait between retries. min(retries * 200, - * 5000) by default. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. (optional) - */ - public GetApiKeyResponse waitForApiKey( - ApiKeyOperation operation, - String key, - ApiKey apiKey, - int maxRetries, - IntUnaryOperator timeout, - RequestOptions requestOptions - ) { - if (operation == ApiKeyOperation.UPDATE) { - if (apiKey == null) { - throw new AlgoliaRetryException("`apiKey` is required when waiting for an `update` operation."); - } - - // when updating an api key, we poll the api until we receive a different key - return TaskUtils.retryUntil( - () -> { - return this.getApiKey(key, requestOptions); - }, - (GetApiKeyResponse respKey) -> { - // we need to convert to an ApiKey object to use the `equals` method - ApiKey sameType = new ApiKey() - .setAcl(respKey.getAcl()) - .setDescription(respKey.getDescription()) - .setIndexes(respKey.getIndexes()) - .setMaxHitsPerQuery(respKey.getMaxHitsPerQuery()) - .setMaxQueriesPerIPPerHour(respKey.getMaxQueriesPerIPPerHour()) - .setQueryParameters(respKey.getQueryParameters()) - .setReferers(respKey.getReferers()) - .setValidity(respKey.getValidity()); - - return apiKey.equals(sameType); - }, - maxRetries, - timeout - ); - } - - // bypass lambda restriction to modify final object - final GetApiKeyResponse[] addedKey = new GetApiKeyResponse[] { null }; - - // check the status of the getApiKey method - TaskUtils.retryUntil( - () -> { - try { - addedKey[0] = this.getApiKey(key, requestOptions); - // magic number to signify we found the key - return -2; - } catch (AlgoliaApiException e) { - return e.getHttpErrorCode(); - } - }, - (Integer status) -> { - switch (operation) { - case ADD: - // stop either when the key is created or when we don't receive 404 - return status == -2 || status != 404; - case DELETE: - // stop when the key is not found - return status == 404; - default: - // continue - return false; - } - }, - maxRetries, - timeout - ); - - return addedKey[0]; - } - - /** - * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`. - * - * @summary Wait for an API key task to be processed. - * @param operation The `operation` that was done on a `key`. (ADD or DELETE only) - * @param key The `key` that has been added, deleted or updated. - * @param maxRetries The maximum number of retry. 50 by default. (optional) - * @param timeout The function to decide how long to wait between retries. min(retries * 200, - * 5000) by default. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. (optional) - */ - public GetApiKeyResponse waitForApiKey( - ApiKeyOperation operation, - String key, - int maxRetries, - IntUnaryOperator timeout, - RequestOptions requestOptions - ) { - return this.waitForApiKey(operation, key, null, maxRetries, timeout, requestOptions); - } - - /** - * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`. - * - * @summary Wait for an API key task to be processed. - * @param operation The `operation` that was done on a `key`. - * @param key The `key` that has been added, deleted or updated. - * @param apiKey Necessary to know if an `update` operation has been processed, compare fields of - * the response with it. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. (optional) - */ - public GetApiKeyResponse waitForApiKey(ApiKeyOperation operation, String key, ApiKey apiKey, RequestOptions requestOptions) { - return this.waitForApiKey(operation, key, apiKey, TaskUtils.DEFAULT_MAX_RETRIES, TaskUtils.DEFAULT_TIMEOUT, requestOptions); - } - - /** - * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`. - * - * @summary Wait for an API key task to be processed. - * @param operation The `operation` that was done on a `key`. (ADD or DELETE only) - * @param key The `key` that has been added, deleted or updated. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. (optional) - */ - public GetApiKeyResponse waitForApiKey(ApiKeyOperation operation, String key, RequestOptions requestOptions) { - return this.waitForApiKey(operation, key, null, TaskUtils.DEFAULT_MAX_RETRIES, TaskUtils.DEFAULT_TIMEOUT, requestOptions); - } - - /** - * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`. - * - * @summary Wait for an API key task to be processed. - * @param operation The `operation` that was done on a `key`. - * @param key The `key` that has been added, deleted or updated. - * @param apiKey Necessary to know if an `update` operation has been processed, compare fields of - * the response with it. - * @param maxRetries The maximum number of retry. 50 by default. (optional) - * @param timeout The function to decide how long to wait between retries. min(retries * 200, - * 5000) by default. (optional) - */ - public GetApiKeyResponse waitForApiKey(ApiKeyOperation operation, String key, ApiKey apiKey, int maxRetries, IntUnaryOperator timeout) { - return this.waitForApiKey(operation, key, apiKey, maxRetries, timeout, null); - } - - /** - * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`. - * - * @summary Wait for an API key task to be processed. - * @param operation The `operation` that was done on a `key`. (ADD or DELETE only) - * @param key The `key` that has been added, deleted or updated. - * @param maxRetries The maximum number of retry. 50 by default. (optional) - * @param timeout The function to decide how long to wait between retries. min(retries * 200, - * 5000) by default. (optional) - */ - public GetApiKeyResponse waitForApiKey(ApiKeyOperation operation, String key, int maxRetries, IntUnaryOperator timeout) { - return this.waitForApiKey(operation, key, null, maxRetries, timeout, null); - } - - /** - * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`. - * - * @summary Wait for an API key task to be processed. - * @param operation The `operation` that was done on a `key`. - * @param key The `key` that has been added, deleted or updated. - * @param apiKey Necessary to know if an `update` operation has been processed, compare fields of - * the response with it. - */ - public GetApiKeyResponse waitForApiKey(ApiKeyOperation operation, String key, ApiKey apiKey) { - return this.waitForApiKey(operation, key, apiKey, TaskUtils.DEFAULT_MAX_RETRIES, TaskUtils.DEFAULT_TIMEOUT, null); - } - - /** - * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`. - * - * @summary Wait for an API key task to be processed. - * @param operation The `operation` that was done on a `key`. (ADD or DELETE only) - * @param key The `key` that has been added, deleted or updated. - */ - public GetApiKeyResponse waitForApiKey(ApiKeyOperation operation, String key) { - return this.waitForApiKey(operation, key, null, TaskUtils.DEFAULT_MAX_RETRIES, TaskUtils.DEFAULT_TIMEOUT, null); - } - - /** - * Helper: Returns an iterator on top of the `browse` method. - * - * @summary Returns an iterator on `browse`. - * @param indexName The index in which to perform the request. - * @param params The `browse` parameters. - * @param innerType The class held by the index, could be your custom class or {@link Object}. - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. (optional) - */ - public Iterable browseObjects(String indexName, BrowseParamsObject params, Class innerType, RequestOptions requestOptions) { - final Holder currentCursor = new Holder<>(); - - return AlgoliaIterableHelper.createIterable( - () -> { - BrowseResponse response = this.browse(indexName, BrowseParams.of(params), innerType, requestOptions); - params.setCursor(response.getCursor()); - currentCursor.value = response.getCursor(); - return response.getHits().iterator(); - }, - () -> { - return currentCursor.value != null; - } - ); - } - - /** - * Helper: Returns an iterator on top of the `browse` method. - * - * @summary Returns an iterator on `browse`. - * @param indexName The index in which to perform the request. - * @param params The `browse` parameters. - * @param innerType The class held by the index, could be your custom class or {@link Object}. - */ - public Iterable browseObjects(String indexName, BrowseParamsObject params, Class innerType) { - return browseObjects(indexName, params, innerType, null); - } - - /** - * Helper: Returns an iterator on top of the `searchSynonyms` method. - * - * @summary Returns an iterator on `searchSynonyms`. - * @param indexName The index in which to perform the request. - * @param type The synonym type. (optional) - * @param params The `searchSynonyms` parameters. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. (optional) - */ - public Iterable browseSynonyms( - String indexName, - SynonymType type, - SearchSynonymsParams params, - RequestOptions requestOptions - ) { - final Holder currentPage = new Holder<>(0); - final int hitsPerPage = 1000; - - return AlgoliaIterableHelper.createIterable( - () -> { - SearchSynonymsResponse response = this.searchSynonyms(indexName, type, currentPage.value, hitsPerPage, params, requestOptions); - currentPage.value = response.getNbHits() < hitsPerPage ? null : currentPage.value + 1; - return response.getHits().iterator(); - }, - () -> { - return currentPage.value != null; - } - ); - } - - /** - * Helper: Returns an iterator on top of the `searchSynonyms` method. - * - * @summary Returns an iterator on `searchSynonyms`. - * @param indexName The index in which to perform the request. - * @param type The synonym type. (optional) - * @param params The `searchSynonyms` parameters .(optional) - */ - public Iterable browseSynonyms(String indexName, SynonymType type, SearchSynonymsParams params) { - return browseSynonyms(indexName, type, params, null); - } - - /** - * Helper: Returns an iterator on top of the `searchSynonyms` method. - * - * @summary Returns an iterator on `searchSynonyms`. - * @param indexName The index in which to perform the request. - */ - public Iterable browseSynonyms(String indexName) { - return browseSynonyms(indexName, null, null, null); - } - - /** - * Helper: Returns an iterator on top of the `searchRules` method. - * - * @summary Returns an iterator on `searchRules`. - * @param indexName The index in which to perform the request. - * @param params The `searchRules` parameters. (optional) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. (optional) - */ - public Iterable browseRules(String indexName, SearchRulesParams params, RequestOptions requestOptions) { - final Holder currentPage = new Holder<>(0); - final int hitsPerPage = 1000; - params.setHitsPerPage(hitsPerPage); - - return AlgoliaIterableHelper.createIterable( - () -> { - SearchRulesResponse response = this.searchRules(indexName, params.setPage(currentPage.value), requestOptions); - currentPage.value = response.getNbHits() < hitsPerPage ? null : currentPage.value + 1; - return response.getHits().iterator(); - }, - () -> { - return currentPage.value != null; - } - ); - } - - /** - * Helper: Returns an iterator on top of the `searchRules` method. - * - * @summary Returns an iterator on `searchRules`. - * @param indexName The index in which to perform the request. - * @param params The `searchRules` parameters. (optional) - */ - public Iterable browseRules(String indexName, SearchRulesParams params) { - return browseRules(indexName, params, null); - } - - /** - * Helper: Returns an iterator on top of the `searchRules` method. - * - * @summary Returns an iterator on `searchRules`. - * @param indexName The index in which to perform the request. - */ - public Iterable browseRules(String indexName) { - return browseRules(indexName, null, null); - } - - /** - * (asynchronously) Send multiple search queries to one or more indices. - * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> searchAsync(SearchMethodParams searchMethodParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.searchAsync(searchMethodParams, Object.class, requestOptions); - } - - /** - * (asynchronously) Send multiple search queries to one or more indices. - * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) - * @return CompletableFuture> The awaitable future - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public CompletableFuture> searchAsync(SearchMethodParams searchMethodParams) throws AlgoliaRuntimeException { - return this.searchAsync(searchMethodParams, Object.class, null); - } - - /** - * Send multiple search queries to one or more indices. - * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) - * @param requestOptions The requestOptions to send along with the query, they will be merged with - * the transporter requestOptions. - * @return SearchResponses - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchResponses search(SearchMethodParams searchMethodParams, RequestOptions requestOptions) - throws AlgoliaRuntimeException { - return this.search(searchMethodParams, Object.class, requestOptions); - } - - /** - * Send multiple search queries to one or more indices. - * - * @param searchMethodParams Query requests and strategies. Results will be received in the same - * order as the queries. (required) - * @return SearchResponses - * @throws AlgoliaRuntimeException If it fails to process the API call - */ - public SearchResponses search(SearchMethodParams searchMethodParams) throws AlgoliaRuntimeException { - return this.search(searchMethodParams, Object.class, null); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ABTest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ABTest.java deleted file mode 100644 index 75af7519a5..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ABTest.java +++ /dev/null @@ -1,216 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ABTest */ -public class ABTest { - - @JsonProperty("abTestID") - private Integer abTestID; - - @JsonProperty("clickSignificance") - private Double clickSignificance; - - @JsonProperty("conversionSignificance") - private String conversionSignificance; - - @JsonProperty("updatedAt") - private String updatedAt; - - @JsonProperty("createdAt") - private String createdAt; - - @JsonProperty("name") - private String name; - - @JsonProperty("status") - private String status; - - @JsonProperty("variants") - private List variants = new ArrayList<>(); - - public ABTest setAbTestID(Integer abTestID) { - this.abTestID = abTestID; - return this; - } - - /** - * Unique A/B test ID. - * - * @return abTestID - */ - @javax.annotation.Nonnull - public Integer getAbTestID() { - return abTestID; - } - - public ABTest setClickSignificance(Double clickSignificance) { - this.clickSignificance = clickSignificance; - return this; - } - - /** - * [A/B test - * significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) - * based on click data. A value of 0.95 or over is considered to be _significant_. - * - * @return clickSignificance - */ - @javax.annotation.Nonnull - public Double getClickSignificance() { - return clickSignificance; - } - - public ABTest setConversionSignificance(String conversionSignificance) { - this.conversionSignificance = conversionSignificance; - return this; - } - - /** - * End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return conversionSignificance - */ - @javax.annotation.Nonnull - public String getConversionSignificance() { - return conversionSignificance; - } - - public ABTest setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Update date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - public ABTest setCreatedAt(String createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Creation date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return createdAt - */ - @javax.annotation.Nonnull - public String getCreatedAt() { - return createdAt; - } - - public ABTest setName(String name) { - this.name = name; - return this; - } - - /** - * A/B test name. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public ABTest setStatus(String status) { - this.status = status; - return this; - } - - /** - * A/B test status. - * - * @return status - */ - @javax.annotation.Nonnull - public String getStatus() { - return status; - } - - public ABTest setVariants(List variants) { - this.variants = variants; - return this; - } - - public ABTest addVariants(Variant variantsItem) { - this.variants.add(variantsItem); - return this; - } - - /** - * A/B test variants. - * - * @return variants - */ - @javax.annotation.Nonnull - public List getVariants() { - return variants; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ABTest abTest = (ABTest) o; - return ( - Objects.equals(this.abTestID, abTest.abTestID) && - Objects.equals(this.clickSignificance, abTest.clickSignificance) && - Objects.equals(this.conversionSignificance, abTest.conversionSignificance) && - Objects.equals(this.updatedAt, abTest.updatedAt) && - Objects.equals(this.createdAt, abTest.createdAt) && - Objects.equals(this.name, abTest.name) && - Objects.equals(this.status, abTest.status) && - Objects.equals(this.variants, abTest.variants) - ); - } - - @Override - public int hashCode() { - return Objects.hash(abTestID, clickSignificance, conversionSignificance, updatedAt, createdAt, name, status, variants); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ABTest {\n"); - sb.append(" abTestID: ").append(toIndentedString(abTestID)).append("\n"); - sb.append(" clickSignificance: ").append(toIndentedString(clickSignificance)).append("\n"); - sb.append(" conversionSignificance: ").append(toIndentedString(conversionSignificance)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" variants: ").append(toIndentedString(variants)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ABTestResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ABTestResponse.java deleted file mode 100644 index f3e0041a2b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ABTestResponse.java +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** ABTestResponse */ -public class ABTestResponse { - - @JsonProperty("index") - private String index; - - @JsonProperty("abTestID") - private Integer abTestID; - - @JsonProperty("taskID") - private Long taskID; - - public ABTestResponse setIndex(String index) { - this.index = index; - return this; - } - - /** - * A/B test index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ABTestResponse setAbTestID(Integer abTestID) { - this.abTestID = abTestID; - return this; - } - - /** - * Unique A/B test ID. - * - * @return abTestID - */ - @javax.annotation.Nonnull - public Integer getAbTestID() { - return abTestID; - } - - public ABTestResponse setTaskID(Long taskID) { - this.taskID = taskID; - return this; - } - - /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. - * - * @return taskID - */ - @javax.annotation.Nonnull - public Long getTaskID() { - return taskID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ABTestResponse abTestResponse = (ABTestResponse) o; - return ( - Objects.equals(this.index, abTestResponse.index) && - Objects.equals(this.abTestID, abTestResponse.abTestID) && - Objects.equals(this.taskID, abTestResponse.taskID) - ); - } - - @Override - public int hashCode() { - return Objects.hash(index, abTestID, taskID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ABTestResponse {\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" abTestID: ").append(toIndentedString(abTestID)).append("\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AbTestsVariant.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AbTestsVariant.java deleted file mode 100644 index 5890c2a74e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AbTestsVariant.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** AbTestsVariant */ -public class AbTestsVariant { - - @JsonProperty("index") - private String index; - - @JsonProperty("trafficPercentage") - private Integer trafficPercentage; - - @JsonProperty("description") - private String description; - - public AbTestsVariant setIndex(String index) { - this.index = index; - return this; - } - - /** - * A/B test index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public AbTestsVariant setTrafficPercentage(Integer trafficPercentage) { - this.trafficPercentage = trafficPercentage; - return this; - } - - /** - * A/B test traffic percentage. - * - * @return trafficPercentage - */ - @javax.annotation.Nonnull - public Integer getTrafficPercentage() { - return trafficPercentage; - } - - public AbTestsVariant setDescription(String description) { - this.description = description; - return this; - } - - /** - * A/B test description. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbTestsVariant abTestsVariant = (AbTestsVariant) o; - return ( - Objects.equals(this.index, abTestsVariant.index) && - Objects.equals(this.trafficPercentage, abTestsVariant.trafficPercentage) && - Objects.equals(this.description, abTestsVariant.description) - ); - } - - @Override - public int hashCode() { - return Objects.hash(index, trafficPercentage, description); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AbTestsVariant {\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" trafficPercentage: ").append(toIndentedString(trafficPercentage)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AbTestsVariantSearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AbTestsVariantSearchParams.java deleted file mode 100644 index a2a13d2399..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AbTestsVariantSearchParams.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** AbTestsVariantSearchParams */ -public class AbTestsVariantSearchParams { - - @JsonProperty("index") - private String index; - - @JsonProperty("trafficPercentage") - private Integer trafficPercentage; - - @JsonProperty("description") - private String description; - - @JsonProperty("customSearchParameters") - private Object customSearchParameters; - - public AbTestsVariantSearchParams setIndex(String index) { - this.index = index; - return this; - } - - /** - * A/B test index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public AbTestsVariantSearchParams setTrafficPercentage(Integer trafficPercentage) { - this.trafficPercentage = trafficPercentage; - return this; - } - - /** - * A/B test traffic percentage. - * - * @return trafficPercentage - */ - @javax.annotation.Nonnull - public Integer getTrafficPercentage() { - return trafficPercentage; - } - - public AbTestsVariantSearchParams setDescription(String description) { - this.description = description; - return this; - } - - /** - * A/B test description. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public AbTestsVariantSearchParams setCustomSearchParameters(Object customSearchParameters) { - this.customSearchParameters = customSearchParameters; - return this; - } - - /** - * Get customSearchParameters - * - * @return customSearchParameters - */ - @javax.annotation.Nonnull - public Object getCustomSearchParameters() { - return customSearchParameters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbTestsVariantSearchParams abTestsVariantSearchParams = (AbTestsVariantSearchParams) o; - return ( - Objects.equals(this.index, abTestsVariantSearchParams.index) && - Objects.equals(this.trafficPercentage, abTestsVariantSearchParams.trafficPercentage) && - Objects.equals(this.description, abTestsVariantSearchParams.description) && - Objects.equals(this.customSearchParameters, abTestsVariantSearchParams.customSearchParameters) - ); - } - - @Override - public int hashCode() { - return Objects.hash(index, trafficPercentage, description, customSearchParameters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AbTestsVariantSearchParams {\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" trafficPercentage: ").append(toIndentedString(trafficPercentage)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" customSearchParameters: ").append(toIndentedString(customSearchParameters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AddABTestsRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AddABTestsRequest.java deleted file mode 100644 index 4fc0e473bc..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AddABTestsRequest.java +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** AddABTestsRequest */ -public class AddABTestsRequest { - - @JsonProperty("name") - private String name; - - @JsonProperty("variants") - private List variants = new ArrayList<>(); - - @JsonProperty("endAt") - private String endAt; - - public AddABTestsRequest setName(String name) { - this.name = name; - return this; - } - - /** - * A/B test name. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public AddABTestsRequest setVariants(List variants) { - this.variants = variants; - return this; - } - - public AddABTestsRequest addVariants(AddABTestsVariant variantsItem) { - this.variants.add(variantsItem); - return this; - } - - /** - * A/B test variants. - * - * @return variants - */ - @javax.annotation.Nonnull - public List getVariants() { - return variants; - } - - public AddABTestsRequest setEndAt(String endAt) { - this.endAt = endAt; - return this; - } - - /** - * End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return endAt - */ - @javax.annotation.Nonnull - public String getEndAt() { - return endAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddABTestsRequest addABTestsRequest = (AddABTestsRequest) o; - return ( - Objects.equals(this.name, addABTestsRequest.name) && - Objects.equals(this.variants, addABTestsRequest.variants) && - Objects.equals(this.endAt, addABTestsRequest.endAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(name, variants, endAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AddABTestsRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" variants: ").append(toIndentedString(variants)).append("\n"); - sb.append(" endAt: ").append(toIndentedString(endAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AddABTestsVariant.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AddABTestsVariant.java deleted file mode 100644 index 112b00837d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/AddABTestsVariant.java +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** AddABTestsVariant */ -@JsonDeserialize(using = AddABTestsVariant.AddABTestsVariantDeserializer.class) -@JsonSerialize(using = AddABTestsVariant.AddABTestsVariantSerializer.class) -public abstract class AddABTestsVariant implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(AddABTestsVariant.class.getName()); - - public static AddABTestsVariant of(AbTestsVariant inside) { - return new AddABTestsVariantAbTestsVariant(inside); - } - - public static AddABTestsVariant of(AbTestsVariantSearchParams inside) { - return new AddABTestsVariantAbTestsVariantSearchParams(inside); - } - - public static class AddABTestsVariantSerializer extends StdSerializer { - - public AddABTestsVariantSerializer(Class t) { - super(t); - } - - public AddABTestsVariantSerializer() { - this(null); - } - - @Override - public void serialize(AddABTestsVariant value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class AddABTestsVariantDeserializer extends StdDeserializer { - - public AddABTestsVariantDeserializer() { - this(AddABTestsVariant.class); - } - - public AddABTestsVariantDeserializer(Class vc) { - super(vc); - } - - @Override - public AddABTestsVariant deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize AbTestsVariant - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - AbTestsVariant value = parser.readValueAs(new TypeReference() {}); - return AddABTestsVariant.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf AbTestsVariant (error: " + e.getMessage() + ") (type: AbTestsVariant)"); - } - } - - // deserialize AbTestsVariantSearchParams - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - AbTestsVariantSearchParams value = parser.readValueAs(new TypeReference() {}); - return AddABTestsVariant.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf AbTestsVariantSearchParams (error: " + e.getMessage() + ") (type: AbTestsVariantSearchParams)" - ); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public AddABTestsVariant getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "AddABTestsVariant cannot be null"); - } - } -} - -class AddABTestsVariantAbTestsVariant extends AddABTestsVariant { - - private final AbTestsVariant insideValue; - - AddABTestsVariantAbTestsVariant(AbTestsVariant insideValue) { - this.insideValue = insideValue; - } - - @Override - public AbTestsVariant getInsideValue() { - return insideValue; - } -} - -class AddABTestsVariantAbTestsVariantSearchParams extends AddABTestsVariant { - - private final AbTestsVariantSearchParams insideValue; - - AddABTestsVariantAbTestsVariantSearchParams(AbTestsVariantSearchParams insideValue) { - this.insideValue = insideValue; - } - - @Override - public AbTestsVariantSearchParams getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/CustomSearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/CustomSearchParams.java deleted file mode 100644 index 63da53e861..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/CustomSearchParams.java +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** - * Applies search parameters from [a restricted set of - * options](https://www.algolia.com/doc/api-reference/api-methods/add-ab-test/#method-param-customsearchparameters). - * Only use this parameter if the two variants use the same index. - */ -public class CustomSearchParams { - - @JsonProperty("customSearchParameters") - private Object customSearchParameters; - - public CustomSearchParams setCustomSearchParameters(Object customSearchParameters) { - this.customSearchParameters = customSearchParameters; - return this; - } - - /** - * Get customSearchParameters - * - * @return customSearchParameters - */ - @javax.annotation.Nonnull - public Object getCustomSearchParameters() { - return customSearchParameters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomSearchParams customSearchParams = (CustomSearchParams) o; - return Objects.equals(this.customSearchParameters, customSearchParams.customSearchParameters); - } - - @Override - public int hashCode() { - return Objects.hash(customSearchParameters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomSearchParams {\n"); - sb.append(" customSearchParameters: ").append(toIndentedString(customSearchParameters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ErrorBase.java deleted file mode 100644 index 63999d961e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ErrorBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Error. */ -public class ErrorBase { - - @JsonProperty("message") - private String message; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public ErrorBase setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public ErrorBase setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorBase errorBase = (ErrorBase) o; - return Objects.equals(this.message, errorBase.message) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(message, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorBase {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ListABTestsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ListABTestsResponse.java deleted file mode 100644 index c4ee99bc38..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/ListABTestsResponse.java +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ListABTestsResponse */ -public class ListABTestsResponse { - - @JsonProperty("abtests") - private List abtests = new ArrayList<>(); - - @JsonProperty("count") - private Integer count; - - @JsonProperty("total") - private Integer total; - - public ListABTestsResponse setAbtests(List abtests) { - this.abtests = abtests; - return this; - } - - public ListABTestsResponse addAbtests(ABTest abtestsItem) { - this.abtests.add(abtestsItem); - return this; - } - - /** - * A/B tests. - * - * @return abtests - */ - @javax.annotation.Nonnull - public List getAbtests() { - return abtests; - } - - public ListABTestsResponse setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of A/B tests implemented. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public ListABTestsResponse setTotal(Integer total) { - this.total = total; - return this; - } - - /** - * Number of retrievable A/B tests. - * - * @return total - */ - @javax.annotation.Nonnull - public Integer getTotal() { - return total; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListABTestsResponse listABTestsResponse = (ListABTestsResponse) o; - return ( - Objects.equals(this.abtests, listABTestsResponse.abtests) && - Objects.equals(this.count, listABTestsResponse.count) && - Objects.equals(this.total, listABTestsResponse.total) - ); - } - - @Override - public int hashCode() { - return Objects.hash(abtests, count, total); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListABTestsResponse {\n"); - sb.append(" abtests: ").append(toIndentedString(abtests)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/Variant.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/Variant.java deleted file mode 100644 index 1de10a2bdd..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/abtesting/Variant.java +++ /dev/null @@ -1,353 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.abtesting; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Variant */ -public class Variant { - - @JsonProperty("averageClickPosition") - private Integer averageClickPosition; - - @JsonProperty("clickCount") - private Integer clickCount; - - @JsonProperty("clickThroughRate") - private Double clickThroughRate; - - @JsonProperty("conversionCount") - private Integer conversionCount; - - @JsonProperty("conversionRate") - private Double conversionRate; - - @JsonProperty("description") - private String description; - - @JsonProperty("index") - private String index; - - @JsonProperty("noResultCount") - private Integer noResultCount; - - @JsonProperty("outlierTrackedSearchesCount") - private Integer outlierTrackedSearchesCount; - - @JsonProperty("outlierUsersCount") - private Integer outlierUsersCount; - - @JsonProperty("searchCount") - private Integer searchCount; - - @JsonProperty("trackedSearchCount") - private Integer trackedSearchCount; - - @JsonProperty("trafficPercentage") - private Integer trafficPercentage; - - @JsonProperty("userCount") - private Integer userCount; - - public Variant setAverageClickPosition(Integer averageClickPosition) { - this.averageClickPosition = averageClickPosition; - return this; - } - - /** - * Variant's [average click - * position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position). - * - * @return averageClickPosition - */ - @javax.annotation.Nonnull - public Integer getAverageClickPosition() { - return averageClickPosition; - } - - public Variant setClickCount(Integer clickCount) { - this.clickCount = clickCount; - return this; - } - - /** - * Number of click events for this variant. - * - * @return clickCount - */ - @javax.annotation.Nonnull - public Integer getClickCount() { - return clickCount; - } - - public Variant setClickThroughRate(Double clickThroughRate) { - this.clickThroughRate = clickThroughRate; - return this; - } - - /** - * Variant's [click-through - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * - * @return clickThroughRate - */ - @javax.annotation.Nonnull - public Double getClickThroughRate() { - return clickThroughRate; - } - - public Variant setConversionCount(Integer conversionCount) { - this.conversionCount = conversionCount; - return this; - } - - /** - * Number of click events for this variant. - * - * @return conversionCount - */ - @javax.annotation.Nonnull - public Integer getConversionCount() { - return conversionCount; - } - - public Variant setConversionRate(Double conversionRate) { - this.conversionRate = conversionRate; - return this; - } - - /** - * Variant's [conversion - * rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @return conversionRate - */ - @javax.annotation.Nonnull - public Double getConversionRate() { - return conversionRate; - } - - public Variant setDescription(String description) { - this.description = description; - return this; - } - - /** - * A/B test description. - * - * @return description - */ - @javax.annotation.Nonnull - public String getDescription() { - return description; - } - - public Variant setIndex(String index) { - this.index = index; - return this; - } - - /** - * A/B test index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public Variant setNoResultCount(Integer noResultCount) { - this.noResultCount = noResultCount; - return this; - } - - /** - * Number of [searches without - * results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) - * for that variant. - * - * @return noResultCount - */ - @javax.annotation.Nonnull - public Integer getNoResultCount() { - return noResultCount; - } - - public Variant setOutlierTrackedSearchesCount(Integer outlierTrackedSearchesCount) { - this.outlierTrackedSearchesCount = outlierTrackedSearchesCount; - return this; - } - - /** - * Number of tracked searches attributed to [outlier - * traffic](https://www.algolia.com/doc/guides/ab-testing/how-to-read-your-a-b-test-results/#is-the-split-off) - * that were removed from the A/B test. A _tracked_ search is a search request where the - * `clickAnalytics` parameter is `true`. - * - * @return outlierTrackedSearchesCount - */ - @javax.annotation.Nonnull - public Integer getOutlierTrackedSearchesCount() { - return outlierTrackedSearchesCount; - } - - public Variant setOutlierUsersCount(Integer outlierUsersCount) { - this.outlierUsersCount = outlierUsersCount; - return this; - } - - /** - * Number of users attributed to [outlier - * traffic](https://www.algolia.com/doc/guides/ab-testing/how-to-read-your-a-b-test-results/#is-the-split-off) - * that were removed from the A/B test. - * - * @return outlierUsersCount - */ - @javax.annotation.Nonnull - public Integer getOutlierUsersCount() { - return outlierUsersCount; - } - - public Variant setSearchCount(Integer searchCount) { - this.searchCount = searchCount; - return this; - } - - /** - * Number of searches carried out during the A/B test. - * - * @return searchCount - */ - @javax.annotation.Nonnull - public Integer getSearchCount() { - return searchCount; - } - - public Variant setTrackedSearchCount(Integer trackedSearchCount) { - this.trackedSearchCount = trackedSearchCount; - return this; - } - - /** - * Number of tracked searches. This is the number of search requests where the `clickAnalytics` - * parameter is `true`. - * - * @return trackedSearchCount - */ - @javax.annotation.Nonnull - public Integer getTrackedSearchCount() { - return trackedSearchCount; - } - - public Variant setTrafficPercentage(Integer trafficPercentage) { - this.trafficPercentage = trafficPercentage; - return this; - } - - /** - * A/B test traffic percentage. - * - * @return trafficPercentage - */ - @javax.annotation.Nonnull - public Integer getTrafficPercentage() { - return trafficPercentage; - } - - public Variant setUserCount(Integer userCount) { - this.userCount = userCount; - return this; - } - - /** - * Number of users during the A/B test. - * - * @return userCount - */ - @javax.annotation.Nonnull - public Integer getUserCount() { - return userCount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Variant variant = (Variant) o; - return ( - Objects.equals(this.averageClickPosition, variant.averageClickPosition) && - Objects.equals(this.clickCount, variant.clickCount) && - Objects.equals(this.clickThroughRate, variant.clickThroughRate) && - Objects.equals(this.conversionCount, variant.conversionCount) && - Objects.equals(this.conversionRate, variant.conversionRate) && - Objects.equals(this.description, variant.description) && - Objects.equals(this.index, variant.index) && - Objects.equals(this.noResultCount, variant.noResultCount) && - Objects.equals(this.outlierTrackedSearchesCount, variant.outlierTrackedSearchesCount) && - Objects.equals(this.outlierUsersCount, variant.outlierUsersCount) && - Objects.equals(this.searchCount, variant.searchCount) && - Objects.equals(this.trackedSearchCount, variant.trackedSearchCount) && - Objects.equals(this.trafficPercentage, variant.trafficPercentage) && - Objects.equals(this.userCount, variant.userCount) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - averageClickPosition, - clickCount, - clickThroughRate, - conversionCount, - conversionRate, - description, - index, - noResultCount, - outlierTrackedSearchesCount, - outlierUsersCount, - searchCount, - trackedSearchCount, - trafficPercentage, - userCount - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Variant {\n"); - sb.append(" averageClickPosition: ").append(toIndentedString(averageClickPosition)).append("\n"); - sb.append(" clickCount: ").append(toIndentedString(clickCount)).append("\n"); - sb.append(" clickThroughRate: ").append(toIndentedString(clickThroughRate)).append("\n"); - sb.append(" conversionCount: ").append(toIndentedString(conversionCount)).append("\n"); - sb.append(" conversionRate: ").append(toIndentedString(conversionRate)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" noResultCount: ").append(toIndentedString(noResultCount)).append("\n"); - sb.append(" outlierTrackedSearchesCount: ").append(toIndentedString(outlierTrackedSearchesCount)).append("\n"); - sb.append(" outlierUsersCount: ").append(toIndentedString(outlierUsersCount)).append("\n"); - sb.append(" searchCount: ").append(toIndentedString(searchCount)).append("\n"); - sb.append(" trackedSearchCount: ").append(toIndentedString(trackedSearchCount)).append("\n"); - sb.append(" trafficPercentage: ").append(toIndentedString(trafficPercentage)).append("\n"); - sb.append(" userCount: ").append(toIndentedString(userCount)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/AverageClickEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/AverageClickEvent.java deleted file mode 100644 index ed23a6d158..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/AverageClickEvent.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** AverageClickEvent */ -public class AverageClickEvent { - - @JsonProperty("average") - private Double average; - - @JsonProperty("clickCount") - private Integer clickCount; - - @JsonProperty("date") - private String date; - - public AverageClickEvent setAverage(Double average) { - this.average = average; - return this; - } - - /** - * Average count of all click events. - * - * @return average - */ - @javax.annotation.Nonnull - public Double getAverage() { - return average; - } - - public AverageClickEvent setClickCount(Integer clickCount) { - this.clickCount = clickCount; - return this; - } - - /** - * Number of click events. - * - * @return clickCount - */ - @javax.annotation.Nonnull - public Integer getClickCount() { - return clickCount; - } - - public AverageClickEvent setDate(String date) { - this.date = date; - return this; - } - - /** - * Date of the event in the format YYYY-MM-DD. - * - * @return date - */ - @javax.annotation.Nonnull - public String getDate() { - return date; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AverageClickEvent averageClickEvent = (AverageClickEvent) o; - return ( - Objects.equals(this.average, averageClickEvent.average) && - Objects.equals(this.clickCount, averageClickEvent.clickCount) && - Objects.equals(this.date, averageClickEvent.date) - ); - } - - @Override - public int hashCode() { - return Objects.hash(average, clickCount, date); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AverageClickEvent {\n"); - sb.append(" average: ").append(toIndentedString(average)).append("\n"); - sb.append(" clickCount: ").append(toIndentedString(clickCount)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ClickPosition.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ClickPosition.java deleted file mode 100644 index 177bfe8d93..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ClickPosition.java +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ClickPosition */ -public class ClickPosition { - - @JsonProperty("position") - private List position = new ArrayList<>(); - - @JsonProperty("clickCount") - private Integer clickCount; - - public ClickPosition setPosition(List position) { - this.position = position; - return this; - } - - public ClickPosition addPosition(Integer positionItem) { - this.position.add(positionItem); - return this; - } - - /** - * Range of positions with the following pattern: - For positions 1 to 10, the number of click - * events are shown for each position - For positions 11 to 20, all click events are grouped - For - * positions 21 and up, all click events are grouped. - * - * @return position - */ - @javax.annotation.Nonnull - public List getPosition() { - return position; - } - - public ClickPosition setClickCount(Integer clickCount) { - this.clickCount = clickCount; - return this; - } - - /** - * Number of click events. - * - * @return clickCount - */ - @javax.annotation.Nonnull - public Integer getClickCount() { - return clickCount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClickPosition clickPosition = (ClickPosition) o; - return Objects.equals(this.position, clickPosition.position) && Objects.equals(this.clickCount, clickPosition.clickCount); - } - - @Override - public int hashCode() { - return Objects.hash(position, clickCount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClickPosition {\n"); - sb.append(" position: ").append(toIndentedString(position)).append("\n"); - sb.append(" clickCount: ").append(toIndentedString(clickCount)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ClickThroughRateEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ClickThroughRateEvent.java deleted file mode 100644 index 90c8cae2a5..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ClickThroughRateEvent.java +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** ClickThroughRateEvent */ -public class ClickThroughRateEvent { - - @JsonProperty("rate") - private Double rate; - - @JsonProperty("clickCount") - private Integer clickCount; - - @JsonProperty("trackedSearchCount") - private Integer trackedSearchCount; - - @JsonProperty("date") - private String date; - - public ClickThroughRateEvent setRate(Double rate) { - this.rate = rate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return rate - */ - @javax.annotation.Nonnull - public Double getRate() { - return rate; - } - - public ClickThroughRateEvent setClickCount(Integer clickCount) { - this.clickCount = clickCount; - return this; - } - - /** - * Number of click events. - * - * @return clickCount - */ - @javax.annotation.Nonnull - public Integer getClickCount() { - return clickCount; - } - - public ClickThroughRateEvent setTrackedSearchCount(Integer trackedSearchCount) { - this.trackedSearchCount = trackedSearchCount; - return this; - } - - /** - * Number of tracked searches. This is the number of search requests where the `clickAnalytics` - * parameter is `true`. - * - * @return trackedSearchCount - */ - @javax.annotation.Nonnull - public Integer getTrackedSearchCount() { - return trackedSearchCount; - } - - public ClickThroughRateEvent setDate(String date) { - this.date = date; - return this; - } - - /** - * Date of the event in the format YYYY-MM-DD. - * - * @return date - */ - @javax.annotation.Nonnull - public String getDate() { - return date; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClickThroughRateEvent clickThroughRateEvent = (ClickThroughRateEvent) o; - return ( - Objects.equals(this.rate, clickThroughRateEvent.rate) && - Objects.equals(this.clickCount, clickThroughRateEvent.clickCount) && - Objects.equals(this.trackedSearchCount, clickThroughRateEvent.trackedSearchCount) && - Objects.equals(this.date, clickThroughRateEvent.date) - ); - } - - @Override - public int hashCode() { - return Objects.hash(rate, clickCount, trackedSearchCount, date); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClickThroughRateEvent {\n"); - sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); - sb.append(" clickCount: ").append(toIndentedString(clickCount)).append("\n"); - sb.append(" trackedSearchCount: ").append(toIndentedString(trackedSearchCount)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ConversionRateEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ConversionRateEvent.java deleted file mode 100644 index d9eccbaa8e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ConversionRateEvent.java +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** ConversionRateEvent */ -public class ConversionRateEvent { - - @JsonProperty("rate") - private Double rate; - - @JsonProperty("trackedSearchCount") - private Integer trackedSearchCount; - - @JsonProperty("conversionCount") - private Integer conversionCount; - - @JsonProperty("date") - private String date; - - public ConversionRateEvent setRate(Double rate) { - this.rate = rate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return rate - */ - @javax.annotation.Nonnull - public Double getRate() { - return rate; - } - - public ConversionRateEvent setTrackedSearchCount(Integer trackedSearchCount) { - this.trackedSearchCount = trackedSearchCount; - return this; - } - - /** - * Number of tracked searches. This is the number of search requests where the `clickAnalytics` - * parameter is `true`. - * - * @return trackedSearchCount - */ - @javax.annotation.Nonnull - public Integer getTrackedSearchCount() { - return trackedSearchCount; - } - - public ConversionRateEvent setConversionCount(Integer conversionCount) { - this.conversionCount = conversionCount; - return this; - } - - /** - * Number of converted clicks. - * - * @return conversionCount - */ - @javax.annotation.Nonnull - public Integer getConversionCount() { - return conversionCount; - } - - public ConversionRateEvent setDate(String date) { - this.date = date; - return this; - } - - /** - * Date of the event in the format YYYY-MM-DD. - * - * @return date - */ - @javax.annotation.Nonnull - public String getDate() { - return date; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConversionRateEvent conversionRateEvent = (ConversionRateEvent) o; - return ( - Objects.equals(this.rate, conversionRateEvent.rate) && - Objects.equals(this.trackedSearchCount, conversionRateEvent.trackedSearchCount) && - Objects.equals(this.conversionCount, conversionRateEvent.conversionCount) && - Objects.equals(this.date, conversionRateEvent.date) - ); - } - - @Override - public int hashCode() { - return Objects.hash(rate, trackedSearchCount, conversionCount, date); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConversionRateEvent {\n"); - sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); - sb.append(" trackedSearchCount: ").append(toIndentedString(trackedSearchCount)).append("\n"); - sb.append(" conversionCount: ").append(toIndentedString(conversionCount)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/Direction.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/Direction.java deleted file mode 100644 index 2c35159769..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/Direction.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets direction */ -public enum Direction { - ASC("asc"), - - DESC("desc"); - - private final String value; - - Direction(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Direction fromValue(String value) { - for (Direction b : Direction.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ErrorBase.java deleted file mode 100644 index b2d3342553..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/ErrorBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Error. */ -public class ErrorBase { - - @JsonProperty("message") - private String message; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public ErrorBase setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public ErrorBase setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorBase errorBase = (ErrorBase) o; - return Objects.equals(this.message, errorBase.message) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(message, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorBase {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetAverageClickPositionResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetAverageClickPositionResponse.java deleted file mode 100644 index 1603038080..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetAverageClickPositionResponse.java +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetAverageClickPositionResponse */ -public class GetAverageClickPositionResponse { - - @JsonProperty("average") - private Double average; - - @JsonProperty("clickCount") - private Integer clickCount; - - @JsonProperty("dates") - private List dates = new ArrayList<>(); - - public GetAverageClickPositionResponse setAverage(Double average) { - this.average = average; - return this; - } - - /** - * Average count of all click events. - * - * @return average - */ - @javax.annotation.Nonnull - public Double getAverage() { - return average; - } - - public GetAverageClickPositionResponse setClickCount(Integer clickCount) { - this.clickCount = clickCount; - return this; - } - - /** - * Number of click events. - * - * @return clickCount - */ - @javax.annotation.Nonnull - public Integer getClickCount() { - return clickCount; - } - - public GetAverageClickPositionResponse setDates(List dates) { - this.dates = dates; - return this; - } - - public GetAverageClickPositionResponse addDates(AverageClickEvent datesItem) { - this.dates.add(datesItem); - return this; - } - - /** - * Average click positions. - * - * @return dates - */ - @javax.annotation.Nonnull - public List getDates() { - return dates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAverageClickPositionResponse getAverageClickPositionResponse = (GetAverageClickPositionResponse) o; - return ( - Objects.equals(this.average, getAverageClickPositionResponse.average) && - Objects.equals(this.clickCount, getAverageClickPositionResponse.clickCount) && - Objects.equals(this.dates, getAverageClickPositionResponse.dates) - ); - } - - @Override - public int hashCode() { - return Objects.hash(average, clickCount, dates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetAverageClickPositionResponse {\n"); - sb.append(" average: ").append(toIndentedString(average)).append("\n"); - sb.append(" clickCount: ").append(toIndentedString(clickCount)).append("\n"); - sb.append(" dates: ").append(toIndentedString(dates)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java deleted file mode 100644 index 24227d2b2e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetClickPositionsResponse */ -public class GetClickPositionsResponse { - - @JsonProperty("positions") - private List positions = new ArrayList<>(); - - public GetClickPositionsResponse setPositions(List positions) { - this.positions = positions; - return this; - } - - public GetClickPositionsResponse addPositions(ClickPosition positionsItem) { - this.positions.add(positionsItem); - return this; - } - - /** - * Click positions. - * - * @return positions - */ - @javax.annotation.Nonnull - public List getPositions() { - return positions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetClickPositionsResponse getClickPositionsResponse = (GetClickPositionsResponse) o; - return Objects.equals(this.positions, getClickPositionsResponse.positions); - } - - @Override - public int hashCode() { - return Objects.hash(positions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetClickPositionsResponse {\n"); - sb.append(" positions: ").append(toIndentedString(positions)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetClickThroughRateResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetClickThroughRateResponse.java deleted file mode 100644 index 82ea8f47ed..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetClickThroughRateResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetClickThroughRateResponse */ -public class GetClickThroughRateResponse { - - @JsonProperty("rate") - private Double rate; - - @JsonProperty("clickCount") - private Integer clickCount; - - @JsonProperty("trackedSearchCount") - private Integer trackedSearchCount; - - @JsonProperty("dates") - private List dates = new ArrayList<>(); - - public GetClickThroughRateResponse setRate(Double rate) { - this.rate = rate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return rate - */ - @javax.annotation.Nonnull - public Double getRate() { - return rate; - } - - public GetClickThroughRateResponse setClickCount(Integer clickCount) { - this.clickCount = clickCount; - return this; - } - - /** - * Number of click events. - * - * @return clickCount - */ - @javax.annotation.Nonnull - public Integer getClickCount() { - return clickCount; - } - - public GetClickThroughRateResponse setTrackedSearchCount(Integer trackedSearchCount) { - this.trackedSearchCount = trackedSearchCount; - return this; - } - - /** - * Number of tracked searches. This is the number of search requests where the `clickAnalytics` - * parameter is `true`. - * - * @return trackedSearchCount - */ - @javax.annotation.Nonnull - public Integer getTrackedSearchCount() { - return trackedSearchCount; - } - - public GetClickThroughRateResponse setDates(List dates) { - this.dates = dates; - return this; - } - - public GetClickThroughRateResponse addDates(ClickThroughRateEvent datesItem) { - this.dates.add(datesItem); - return this; - } - - /** - * Click-through rate events. - * - * @return dates - */ - @javax.annotation.Nonnull - public List getDates() { - return dates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetClickThroughRateResponse getClickThroughRateResponse = (GetClickThroughRateResponse) o; - return ( - Objects.equals(this.rate, getClickThroughRateResponse.rate) && - Objects.equals(this.clickCount, getClickThroughRateResponse.clickCount) && - Objects.equals(this.trackedSearchCount, getClickThroughRateResponse.trackedSearchCount) && - Objects.equals(this.dates, getClickThroughRateResponse.dates) - ); - } - - @Override - public int hashCode() { - return Objects.hash(rate, clickCount, trackedSearchCount, dates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetClickThroughRateResponse {\n"); - sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); - sb.append(" clickCount: ").append(toIndentedString(clickCount)).append("\n"); - sb.append(" trackedSearchCount: ").append(toIndentedString(trackedSearchCount)).append("\n"); - sb.append(" dates: ").append(toIndentedString(dates)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetConversationRateResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetConversationRateResponse.java deleted file mode 100644 index 8f1eda84bc..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetConversationRateResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetConversationRateResponse */ -public class GetConversationRateResponse { - - @JsonProperty("rate") - private Double rate; - - @JsonProperty("trackedSearchCount") - private Integer trackedSearchCount; - - @JsonProperty("conversionCount") - private Integer conversionCount; - - @JsonProperty("dates") - private List dates = new ArrayList<>(); - - public GetConversationRateResponse setRate(Double rate) { - this.rate = rate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return rate - */ - @javax.annotation.Nonnull - public Double getRate() { - return rate; - } - - public GetConversationRateResponse setTrackedSearchCount(Integer trackedSearchCount) { - this.trackedSearchCount = trackedSearchCount; - return this; - } - - /** - * Number of tracked searches. This is the number of search requests where the `clickAnalytics` - * parameter is `true`. - * - * @return trackedSearchCount - */ - @javax.annotation.Nonnull - public Integer getTrackedSearchCount() { - return trackedSearchCount; - } - - public GetConversationRateResponse setConversionCount(Integer conversionCount) { - this.conversionCount = conversionCount; - return this; - } - - /** - * Number of converted clicks. - * - * @return conversionCount - */ - @javax.annotation.Nonnull - public Integer getConversionCount() { - return conversionCount; - } - - public GetConversationRateResponse setDates(List dates) { - this.dates = dates; - return this; - } - - public GetConversationRateResponse addDates(ConversionRateEvent datesItem) { - this.dates.add(datesItem); - return this; - } - - /** - * Conversion events. - * - * @return dates - */ - @javax.annotation.Nonnull - public List getDates() { - return dates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetConversationRateResponse getConversationRateResponse = (GetConversationRateResponse) o; - return ( - Objects.equals(this.rate, getConversationRateResponse.rate) && - Objects.equals(this.trackedSearchCount, getConversationRateResponse.trackedSearchCount) && - Objects.equals(this.conversionCount, getConversationRateResponse.conversionCount) && - Objects.equals(this.dates, getConversationRateResponse.dates) - ); - } - - @Override - public int hashCode() { - return Objects.hash(rate, trackedSearchCount, conversionCount, dates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetConversationRateResponse {\n"); - sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); - sb.append(" trackedSearchCount: ").append(toIndentedString(trackedSearchCount)).append("\n"); - sb.append(" conversionCount: ").append(toIndentedString(conversionCount)).append("\n"); - sb.append(" dates: ").append(toIndentedString(dates)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetNoClickRateResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetNoClickRateResponse.java deleted file mode 100644 index a9f52e26ff..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetNoClickRateResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetNoClickRateResponse */ -public class GetNoClickRateResponse { - - @JsonProperty("rate") - private Double rate; - - @JsonProperty("count") - private Integer count; - - @JsonProperty("noClickCount") - private Integer noClickCount; - - @JsonProperty("dates") - private List dates = new ArrayList<>(); - - public GetNoClickRateResponse setRate(Double rate) { - this.rate = rate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return rate - */ - @javax.annotation.Nonnull - public Double getRate() { - return rate; - } - - public GetNoClickRateResponse setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of click events. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public GetNoClickRateResponse setNoClickCount(Integer noClickCount) { - this.noClickCount = noClickCount; - return this; - } - - /** - * Number of click events. - * - * @return noClickCount - */ - @javax.annotation.Nonnull - public Integer getNoClickCount() { - return noClickCount; - } - - public GetNoClickRateResponse setDates(List dates) { - this.dates = dates; - return this; - } - - public GetNoClickRateResponse addDates(NoClickRateEvent datesItem) { - this.dates.add(datesItem); - return this; - } - - /** - * Overall count of searches without clicks plus a daily breakdown. - * - * @return dates - */ - @javax.annotation.Nonnull - public List getDates() { - return dates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNoClickRateResponse getNoClickRateResponse = (GetNoClickRateResponse) o; - return ( - Objects.equals(this.rate, getNoClickRateResponse.rate) && - Objects.equals(this.count, getNoClickRateResponse.count) && - Objects.equals(this.noClickCount, getNoClickRateResponse.noClickCount) && - Objects.equals(this.dates, getNoClickRateResponse.dates) - ); - } - - @Override - public int hashCode() { - return Objects.hash(rate, count, noClickCount, dates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNoClickRateResponse {\n"); - sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" noClickCount: ").append(toIndentedString(noClickCount)).append("\n"); - sb.append(" dates: ").append(toIndentedString(dates)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetNoResultsRateResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetNoResultsRateResponse.java deleted file mode 100644 index 06a717df77..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetNoResultsRateResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetNoResultsRateResponse */ -public class GetNoResultsRateResponse { - - @JsonProperty("rate") - private Double rate; - - @JsonProperty("count") - private Integer count; - - @JsonProperty("noResultCount") - private Integer noResultCount; - - @JsonProperty("dates") - private List dates = new ArrayList<>(); - - public GetNoResultsRateResponse setRate(Double rate) { - this.rate = rate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return rate - */ - @javax.annotation.Nonnull - public Double getRate() { - return rate; - } - - public GetNoResultsRateResponse setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public GetNoResultsRateResponse setNoResultCount(Integer noResultCount) { - this.noResultCount = noResultCount; - return this; - } - - /** - * Number of occurrences. - * - * @return noResultCount - */ - @javax.annotation.Nonnull - public Integer getNoResultCount() { - return noResultCount; - } - - public GetNoResultsRateResponse setDates(List dates) { - this.dates = dates; - return this; - } - - public GetNoResultsRateResponse addDates(NoResultsRateEvent datesItem) { - this.dates.add(datesItem); - return this; - } - - /** - * Overall count of searches without results plus a daily breakdown. - * - * @return dates - */ - @javax.annotation.Nonnull - public List getDates() { - return dates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNoResultsRateResponse getNoResultsRateResponse = (GetNoResultsRateResponse) o; - return ( - Objects.equals(this.rate, getNoResultsRateResponse.rate) && - Objects.equals(this.count, getNoResultsRateResponse.count) && - Objects.equals(this.noResultCount, getNoResultsRateResponse.noResultCount) && - Objects.equals(this.dates, getNoResultsRateResponse.dates) - ); - } - - @Override - public int hashCode() { - return Objects.hash(rate, count, noResultCount, dates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNoResultsRateResponse {\n"); - sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" noResultCount: ").append(toIndentedString(noResultCount)).append("\n"); - sb.append(" dates: ").append(toIndentedString(dates)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesCountResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesCountResponse.java deleted file mode 100644 index 5c7075679b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesCountResponse.java +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetSearchesCountResponse */ -public class GetSearchesCountResponse { - - @JsonProperty("count") - private Integer count; - - @JsonProperty("dates") - private List dates = new ArrayList<>(); - - public GetSearchesCountResponse setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public GetSearchesCountResponse setDates(List dates) { - this.dates = dates; - return this; - } - - public GetSearchesCountResponse addDates(SearchEvent datesItem) { - this.dates.add(datesItem); - return this; - } - - /** - * Search events with their associated dates and hit counts. - * - * @return dates - */ - @javax.annotation.Nonnull - public List getDates() { - return dates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchesCountResponse getSearchesCountResponse = (GetSearchesCountResponse) o; - return Objects.equals(this.count, getSearchesCountResponse.count) && Objects.equals(this.dates, getSearchesCountResponse.dates); - } - - @Override - public int hashCode() { - return Objects.hash(count, dates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetSearchesCountResponse {\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" dates: ").append(toIndentedString(dates)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesNoClicksResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesNoClicksResponse.java deleted file mode 100644 index 68bde8a2d4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesNoClicksResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetSearchesNoClicksResponse */ -public class GetSearchesNoClicksResponse { - - @JsonProperty("searches") - private List searches = new ArrayList<>(); - - public GetSearchesNoClicksResponse setSearches(List searches) { - this.searches = searches; - return this; - } - - public GetSearchesNoClicksResponse addSearches(SearchNoClickEvent searchesItem) { - this.searches.add(searchesItem); - return this; - } - - /** - * Searches with no clicks. - * - * @return searches - */ - @javax.annotation.Nonnull - public List getSearches() { - return searches; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchesNoClicksResponse getSearchesNoClicksResponse = (GetSearchesNoClicksResponse) o; - return Objects.equals(this.searches, getSearchesNoClicksResponse.searches); - } - - @Override - public int hashCode() { - return Objects.hash(searches); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetSearchesNoClicksResponse {\n"); - sb.append(" searches: ").append(toIndentedString(searches)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesNoResultsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesNoResultsResponse.java deleted file mode 100644 index 0a2f8d9b3e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetSearchesNoResultsResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetSearchesNoResultsResponse */ -public class GetSearchesNoResultsResponse { - - @JsonProperty("searches") - private List searches = new ArrayList<>(); - - public GetSearchesNoResultsResponse setSearches(List searches) { - this.searches = searches; - return this; - } - - public GetSearchesNoResultsResponse addSearches(SearchNoResultEvent searchesItem) { - this.searches.add(searchesItem); - return this; - } - - /** - * Searches with no results. - * - * @return searches - */ - @javax.annotation.Nonnull - public List getSearches() { - return searches; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSearchesNoResultsResponse getSearchesNoResultsResponse = (GetSearchesNoResultsResponse) o; - return Objects.equals(this.searches, getSearchesNoResultsResponse.searches); - } - - @Override - public int hashCode() { - return Objects.hash(searches); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetSearchesNoResultsResponse {\n"); - sb.append(" searches: ").append(toIndentedString(searches)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetStatusResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetStatusResponse.java deleted file mode 100644 index 21987161be..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetStatusResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetStatusResponse */ -public class GetStatusResponse { - - @JsonProperty("updatedAt") - private String updatedAt; - - public GetStatusResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetStatusResponse getStatusResponse = (GetStatusResponse) o; - return Objects.equals(this.updatedAt, getStatusResponse.updatedAt); - } - - @Override - public int hashCode() { - return Objects.hash(updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetStatusResponse {\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopCountriesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopCountriesResponse.java deleted file mode 100644 index c757f6313e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopCountriesResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetTopCountriesResponse */ -public class GetTopCountriesResponse { - - @JsonProperty("countries") - private List countries = new ArrayList<>(); - - public GetTopCountriesResponse setCountries(List countries) { - this.countries = countries; - return this; - } - - public GetTopCountriesResponse addCountries(TopCountry countriesItem) { - this.countries.add(countriesItem); - return this; - } - - /** - * Countries - * - * @return countries - */ - @javax.annotation.Nonnull - public List getCountries() { - return countries; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopCountriesResponse getTopCountriesResponse = (GetTopCountriesResponse) o; - return Objects.equals(this.countries, getTopCountriesResponse.countries); - } - - @Override - public int hashCode() { - return Objects.hash(countries); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTopCountriesResponse {\n"); - sb.append(" countries: ").append(toIndentedString(countries)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterAttribute.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterAttribute.java deleted file mode 100644 index 201860a23f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterAttribute.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetTopFilterAttribute */ -public class GetTopFilterAttribute { - - @JsonProperty("attribute") - private String attribute; - - @JsonProperty("count") - private Integer count; - - public GetTopFilterAttribute setAttribute(String attribute) { - this.attribute = attribute; - return this; - } - - /** - * Attribute name. - * - * @return attribute - */ - @javax.annotation.Nonnull - public String getAttribute() { - return attribute; - } - - public GetTopFilterAttribute setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopFilterAttribute getTopFilterAttribute = (GetTopFilterAttribute) o; - return Objects.equals(this.attribute, getTopFilterAttribute.attribute) && Objects.equals(this.count, getTopFilterAttribute.count); - } - - @Override - public int hashCode() { - return Objects.hash(attribute, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTopFilterAttribute {\n"); - sb.append(" attribute: ").append(toIndentedString(attribute)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterAttributesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterAttributesResponse.java deleted file mode 100644 index 45be2630c4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterAttributesResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetTopFilterAttributesResponse */ -public class GetTopFilterAttributesResponse { - - @JsonProperty("attributes") - private List attributes = new ArrayList<>(); - - public GetTopFilterAttributesResponse setAttributes(List attributes) { - this.attributes = attributes; - return this; - } - - public GetTopFilterAttributesResponse addAttributes(GetTopFilterAttribute attributesItem) { - this.attributes.add(attributesItem); - return this; - } - - /** - * Filterable attributes. - * - * @return attributes - */ - @javax.annotation.Nonnull - public List getAttributes() { - return attributes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopFilterAttributesResponse getTopFilterAttributesResponse = (GetTopFilterAttributesResponse) o; - return Objects.equals(this.attributes, getTopFilterAttributesResponse.attributes); - } - - @Override - public int hashCode() { - return Objects.hash(attributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTopFilterAttributesResponse {\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterForAttribute.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterForAttribute.java deleted file mode 100644 index b2527271d8..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterForAttribute.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetTopFilterForAttribute */ -public class GetTopFilterForAttribute { - - @JsonProperty("attribute") - private String attribute; - - @JsonProperty("operator") - private String operator; - - @JsonProperty("value") - private String value; - - @JsonProperty("count") - private Integer count; - - public GetTopFilterForAttribute setAttribute(String attribute) { - this.attribute = attribute; - return this; - } - - /** - * Attribute name. - * - * @return attribute - */ - @javax.annotation.Nonnull - public String getAttribute() { - return attribute; - } - - public GetTopFilterForAttribute setOperator(String operator) { - this.operator = operator; - return this; - } - - /** - * Operator. - * - * @return operator - */ - @javax.annotation.Nonnull - public String getOperator() { - return operator; - } - - public GetTopFilterForAttribute setValue(String value) { - this.value = value; - return this; - } - - /** - * Attribute value. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public GetTopFilterForAttribute setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopFilterForAttribute getTopFilterForAttribute = (GetTopFilterForAttribute) o; - return ( - Objects.equals(this.attribute, getTopFilterForAttribute.attribute) && - Objects.equals(this.operator, getTopFilterForAttribute.operator) && - Objects.equals(this.value, getTopFilterForAttribute.value) && - Objects.equals(this.count, getTopFilterForAttribute.count) - ); - } - - @Override - public int hashCode() { - return Objects.hash(attribute, operator, value, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTopFilterForAttribute {\n"); - sb.append(" attribute: ").append(toIndentedString(attribute)).append("\n"); - sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterForAttributeResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterForAttributeResponse.java deleted file mode 100644 index 4594b23da9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFilterForAttributeResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetTopFilterForAttributeResponse */ -public class GetTopFilterForAttributeResponse { - - @JsonProperty("values") - private List values = new ArrayList<>(); - - public GetTopFilterForAttributeResponse setValues(List values) { - this.values = values; - return this; - } - - public GetTopFilterForAttributeResponse addValues(GetTopFilterForAttribute valuesItem) { - this.values.add(valuesItem); - return this; - } - - /** - * Filter values for an attribute. - * - * @return values - */ - @javax.annotation.Nonnull - public List getValues() { - return values; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopFilterForAttributeResponse getTopFilterForAttributeResponse = (GetTopFilterForAttributeResponse) o; - return Objects.equals(this.values, getTopFilterForAttributeResponse.values); - } - - @Override - public int hashCode() { - return Objects.hash(values); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTopFilterForAttributeResponse {\n"); - sb.append(" values: ").append(toIndentedString(values)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsResponse.java deleted file mode 100644 index 8e71a92b24..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetTopFiltersNoResultsResponse */ -public class GetTopFiltersNoResultsResponse { - - @JsonProperty("values") - private List values = new ArrayList<>(); - - public GetTopFiltersNoResultsResponse setValues(List values) { - this.values = values; - return this; - } - - public GetTopFiltersNoResultsResponse addValues(GetTopFiltersNoResultsValues valuesItem) { - this.values.add(valuesItem); - return this; - } - - /** - * Filters with no results. - * - * @return values - */ - @javax.annotation.Nonnull - public List getValues() { - return values; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopFiltersNoResultsResponse getTopFiltersNoResultsResponse = (GetTopFiltersNoResultsResponse) o; - return Objects.equals(this.values, getTopFiltersNoResultsResponse.values); - } - - @Override - public int hashCode() { - return Objects.hash(values); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTopFiltersNoResultsResponse {\n"); - sb.append(" values: ").append(toIndentedString(values)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsValue.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsValue.java deleted file mode 100644 index a91927c81f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsValue.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetTopFiltersNoResultsValue */ -public class GetTopFiltersNoResultsValue { - - @JsonProperty("attribute") - private String attribute; - - @JsonProperty("operator") - private String operator; - - @JsonProperty("value") - private String value; - - public GetTopFiltersNoResultsValue setAttribute(String attribute) { - this.attribute = attribute; - return this; - } - - /** - * Attribute name. - * - * @return attribute - */ - @javax.annotation.Nonnull - public String getAttribute() { - return attribute; - } - - public GetTopFiltersNoResultsValue setOperator(String operator) { - this.operator = operator; - return this; - } - - /** - * Operator. - * - * @return operator - */ - @javax.annotation.Nonnull - public String getOperator() { - return operator; - } - - public GetTopFiltersNoResultsValue setValue(String value) { - this.value = value; - return this; - } - - /** - * Attribute value. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopFiltersNoResultsValue getTopFiltersNoResultsValue = (GetTopFiltersNoResultsValue) o; - return ( - Objects.equals(this.attribute, getTopFiltersNoResultsValue.attribute) && - Objects.equals(this.operator, getTopFiltersNoResultsValue.operator) && - Objects.equals(this.value, getTopFiltersNoResultsValue.value) - ); - } - - @Override - public int hashCode() { - return Objects.hash(attribute, operator, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTopFiltersNoResultsValue {\n"); - sb.append(" attribute: ").append(toIndentedString(attribute)).append("\n"); - sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsValues.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsValues.java deleted file mode 100644 index 7ca816f5d6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopFiltersNoResultsValues.java +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetTopFiltersNoResultsValues */ -public class GetTopFiltersNoResultsValues { - - @JsonProperty("count") - private Integer count; - - @JsonProperty("values") - private List values = new ArrayList<>(); - - public GetTopFiltersNoResultsValues setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public GetTopFiltersNoResultsValues setValues(List values) { - this.values = values; - return this; - } - - public GetTopFiltersNoResultsValues addValues(GetTopFiltersNoResultsValue valuesItem) { - this.values.add(valuesItem); - return this; - } - - /** - * Filters with no results. - * - * @return values - */ - @javax.annotation.Nonnull - public List getValues() { - return values; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopFiltersNoResultsValues getTopFiltersNoResultsValues = (GetTopFiltersNoResultsValues) o; - return ( - Objects.equals(this.count, getTopFiltersNoResultsValues.count) && Objects.equals(this.values, getTopFiltersNoResultsValues.values) - ); - } - - @Override - public int hashCode() { - return Objects.hash(count, values); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTopFiltersNoResultsValues {\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopHitsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopHitsResponse.java deleted file mode 100644 index 9513dec729..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopHitsResponse.java +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** GetTopHitsResponse */ -@JsonDeserialize(using = GetTopHitsResponse.GetTopHitsResponseDeserializer.class) -@JsonSerialize(using = GetTopHitsResponse.GetTopHitsResponseSerializer.class) -public abstract class GetTopHitsResponse implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(GetTopHitsResponse.class.getName()); - - public static GetTopHitsResponse of(TopHitsResponse inside) { - return new GetTopHitsResponseTopHitsResponse(inside); - } - - public static GetTopHitsResponse of(TopHitsResponseWithAnalytics inside) { - return new GetTopHitsResponseTopHitsResponseWithAnalytics(inside); - } - - public static class GetTopHitsResponseSerializer extends StdSerializer { - - public GetTopHitsResponseSerializer(Class t) { - super(t); - } - - public GetTopHitsResponseSerializer() { - this(null); - } - - @Override - public void serialize(GetTopHitsResponse value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class GetTopHitsResponseDeserializer extends StdDeserializer { - - public GetTopHitsResponseDeserializer() { - this(GetTopHitsResponse.class); - } - - public GetTopHitsResponseDeserializer(Class vc) { - super(vc); - } - - @Override - public GetTopHitsResponse deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize TopHitsResponse - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - TopHitsResponse value = parser.readValueAs(new TypeReference() {}); - return GetTopHitsResponse.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf TopHitsResponse (error: " + e.getMessage() + ") (type: TopHitsResponse)"); - } - } - - // deserialize TopHitsResponseWithAnalytics - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - TopHitsResponseWithAnalytics value = parser.readValueAs(new TypeReference() {}); - return GetTopHitsResponse.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf TopHitsResponseWithAnalytics (error: " + e.getMessage() + ") (type: TopHitsResponseWithAnalytics)" - ); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public GetTopHitsResponse getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "GetTopHitsResponse cannot be null"); - } - } -} - -class GetTopHitsResponseTopHitsResponse extends GetTopHitsResponse { - - private final TopHitsResponse insideValue; - - GetTopHitsResponseTopHitsResponse(TopHitsResponse insideValue) { - this.insideValue = insideValue; - } - - @Override - public TopHitsResponse getInsideValue() { - return insideValue; - } -} - -class GetTopHitsResponseTopHitsResponseWithAnalytics extends GetTopHitsResponse { - - private final TopHitsResponseWithAnalytics insideValue; - - GetTopHitsResponseTopHitsResponseWithAnalytics(TopHitsResponseWithAnalytics insideValue) { - this.insideValue = insideValue; - } - - @Override - public TopHitsResponseWithAnalytics getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopSearchesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopSearchesResponse.java deleted file mode 100644 index c81fc5616a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetTopSearchesResponse.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** GetTopSearchesResponse */ -@JsonDeserialize(using = GetTopSearchesResponse.GetTopSearchesResponseDeserializer.class) -@JsonSerialize(using = GetTopSearchesResponse.GetTopSearchesResponseSerializer.class) -public abstract class GetTopSearchesResponse implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(GetTopSearchesResponse.class.getName()); - - public static GetTopSearchesResponse of(TopSearchesResponse inside) { - return new GetTopSearchesResponseTopSearchesResponse(inside); - } - - public static GetTopSearchesResponse of(TopSearchesResponseWithAnalytics inside) { - return new GetTopSearchesResponseTopSearchesResponseWithAnalytics(inside); - } - - public static class GetTopSearchesResponseSerializer extends StdSerializer { - - public GetTopSearchesResponseSerializer(Class t) { - super(t); - } - - public GetTopSearchesResponseSerializer() { - this(null); - } - - @Override - public void serialize(GetTopSearchesResponse value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class GetTopSearchesResponseDeserializer extends StdDeserializer { - - public GetTopSearchesResponseDeserializer() { - this(GetTopSearchesResponse.class); - } - - public GetTopSearchesResponseDeserializer(Class vc) { - super(vc); - } - - @Override - public GetTopSearchesResponse deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize TopSearchesResponse - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - TopSearchesResponse value = parser.readValueAs(new TypeReference() {}); - return GetTopSearchesResponse.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf TopSearchesResponse (error: " + e.getMessage() + ") (type: TopSearchesResponse)"); - } - } - - // deserialize TopSearchesResponseWithAnalytics - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - TopSearchesResponseWithAnalytics value = parser.readValueAs(new TypeReference() {}); - return GetTopSearchesResponse.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf TopSearchesResponseWithAnalytics (error: " + - e.getMessage() + - ") (type: TopSearchesResponseWithAnalytics)" - ); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public GetTopSearchesResponse getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "GetTopSearchesResponse cannot be null"); - } - } -} - -class GetTopSearchesResponseTopSearchesResponse extends GetTopSearchesResponse { - - private final TopSearchesResponse insideValue; - - GetTopSearchesResponseTopSearchesResponse(TopSearchesResponse insideValue) { - this.insideValue = insideValue; - } - - @Override - public TopSearchesResponse getInsideValue() { - return insideValue; - } -} - -class GetTopSearchesResponseTopSearchesResponseWithAnalytics extends GetTopSearchesResponse { - - private final TopSearchesResponseWithAnalytics insideValue; - - GetTopSearchesResponseTopSearchesResponseWithAnalytics(TopSearchesResponseWithAnalytics insideValue) { - this.insideValue = insideValue; - } - - @Override - public TopSearchesResponseWithAnalytics getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetUsersCountResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetUsersCountResponse.java deleted file mode 100644 index 0f25207cfa..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/GetUsersCountResponse.java +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetUsersCountResponse */ -public class GetUsersCountResponse { - - @JsonProperty("count") - private Integer count; - - @JsonProperty("dates") - private List dates = new ArrayList<>(); - - public GetUsersCountResponse setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public GetUsersCountResponse setDates(List dates) { - this.dates = dates; - return this; - } - - public GetUsersCountResponse addDates(UserWithDate datesItem) { - this.dates.add(datesItem); - return this; - } - - /** - * User count. - * - * @return dates - */ - @javax.annotation.Nonnull - public List getDates() { - return dates; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUsersCountResponse getUsersCountResponse = (GetUsersCountResponse) o; - return Objects.equals(this.count, getUsersCountResponse.count) && Objects.equals(this.dates, getUsersCountResponse.dates); - } - - @Override - public int hashCode() { - return Objects.hash(count, dates); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetUsersCountResponse {\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" dates: ").append(toIndentedString(dates)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/NoClickRateEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/NoClickRateEvent.java deleted file mode 100644 index 4b4543d5b9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/NoClickRateEvent.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** NoClickRateEvent */ -public class NoClickRateEvent { - - @JsonProperty("rate") - private Double rate; - - @JsonProperty("count") - private Integer count; - - @JsonProperty("noClickCount") - private Integer noClickCount; - - @JsonProperty("date") - private String date; - - public NoClickRateEvent setRate(Double rate) { - this.rate = rate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return rate - */ - @javax.annotation.Nonnull - public Double getRate() { - return rate; - } - - public NoClickRateEvent setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public NoClickRateEvent setNoClickCount(Integer noClickCount) { - this.noClickCount = noClickCount; - return this; - } - - /** - * Number of click events. - * - * @return noClickCount - */ - @javax.annotation.Nonnull - public Integer getNoClickCount() { - return noClickCount; - } - - public NoClickRateEvent setDate(String date) { - this.date = date; - return this; - } - - /** - * Date of the event in the format YYYY-MM-DD. - * - * @return date - */ - @javax.annotation.Nonnull - public String getDate() { - return date; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NoClickRateEvent noClickRateEvent = (NoClickRateEvent) o; - return ( - Objects.equals(this.rate, noClickRateEvent.rate) && - Objects.equals(this.count, noClickRateEvent.count) && - Objects.equals(this.noClickCount, noClickRateEvent.noClickCount) && - Objects.equals(this.date, noClickRateEvent.date) - ); - } - - @Override - public int hashCode() { - return Objects.hash(rate, count, noClickCount, date); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NoClickRateEvent {\n"); - sb.append(" rate: ").append(toIndentedString(rate)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" noClickCount: ").append(toIndentedString(noClickCount)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/NoResultsRateEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/NoResultsRateEvent.java deleted file mode 100644 index 9a2c7ffeb7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/NoResultsRateEvent.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** NoResultsRateEvent */ -public class NoResultsRateEvent { - - @JsonProperty("date") - private String date; - - @JsonProperty("noResultCount") - private Integer noResultCount; - - @JsonProperty("count") - private Integer count; - - @JsonProperty("rate") - private Double rate; - - public NoResultsRateEvent setDate(String date) { - this.date = date; - return this; - } - - /** - * Date of the event in the format YYYY-MM-DD. - * - * @return date - */ - @javax.annotation.Nonnull - public String getDate() { - return date; - } - - public NoResultsRateEvent setNoResultCount(Integer noResultCount) { - this.noResultCount = noResultCount; - return this; - } - - /** - * Number of occurences. - * - * @return noResultCount - */ - @javax.annotation.Nonnull - public Integer getNoResultCount() { - return noResultCount; - } - - public NoResultsRateEvent setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public NoResultsRateEvent setRate(Double rate) { - this.rate = rate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return rate - */ - @javax.annotation.Nonnull - public Double getRate() { - return rate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NoResultsRateEvent noResultsRateEvent = (NoResultsRateEvent) o; - return ( - Objects.equals(this.date, noResultsRateEvent.date) && - Objects.equals(this.noResultCount, noResultsRateEvent.noResultCount) && - Objects.equals(this.count, noResultsRateEvent.count) && - Objects.equals(this.rate, noResultsRateEvent.rate) - ); - } - - @Override - public int hashCode() { - return Objects.hash(date, noResultCount, count, rate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NoResultsRateEvent {\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" noResultCount: ").append(toIndentedString(noResultCount)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" rate: ").append(toIndentedString(rate)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/OrderBy.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/OrderBy.java deleted file mode 100644 index e6f72b69ab..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/OrderBy.java +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Method for ordering results. `clickThroughRate`, `conversionRate` and `averageClickPosition` are - * only available if the `clickAnalytics` parameter is `true`. - */ -public enum OrderBy { - SEARCH_COUNT("searchCount"), - - CLICK_THROUGH_RATE("clickThroughRate"), - - CONVERSION_RATE("conversionRate"), - - AVERAGE_CLICK_POSITION("averageClickPosition"); - - private final String value; - - OrderBy(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OrderBy fromValue(String value) { - for (OrderBy b : OrderBy.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchEvent.java deleted file mode 100644 index 7a2cf8ff83..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchEvent.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchEvent */ -public class SearchEvent { - - @JsonProperty("date") - private String date; - - @JsonProperty("count") - private Integer count; - - public SearchEvent setDate(String date) { - this.date = date; - return this; - } - - /** - * Date of the event in the format YYYY-MM-DD. - * - * @return date - */ - @javax.annotation.Nonnull - public String getDate() { - return date; - } - - public SearchEvent setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchEvent searchEvent = (SearchEvent) o; - return Objects.equals(this.date, searchEvent.date) && Objects.equals(this.count, searchEvent.count); - } - - @Override - public int hashCode() { - return Objects.hash(date, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchEvent {\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchNoClickEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchNoClickEvent.java deleted file mode 100644 index e23346e9b6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchNoClickEvent.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchNoClickEvent */ -public class SearchNoClickEvent { - - @JsonProperty("search") - private String search; - - @JsonProperty("count") - private Integer count; - - @JsonProperty("withFilterCount") - private Integer withFilterCount; - - public SearchNoClickEvent setSearch(String search) { - this.search = search; - return this; - } - - /** - * User query. - * - * @return search - */ - @javax.annotation.Nonnull - public String getSearch() { - return search; - } - - public SearchNoClickEvent setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public SearchNoClickEvent setWithFilterCount(Integer withFilterCount) { - this.withFilterCount = withFilterCount; - return this; - } - - /** - * Number of occurrences. - * - * @return withFilterCount - */ - @javax.annotation.Nonnull - public Integer getWithFilterCount() { - return withFilterCount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchNoClickEvent searchNoClickEvent = (SearchNoClickEvent) o; - return ( - Objects.equals(this.search, searchNoClickEvent.search) && - Objects.equals(this.count, searchNoClickEvent.count) && - Objects.equals(this.withFilterCount, searchNoClickEvent.withFilterCount) - ); - } - - @Override - public int hashCode() { - return Objects.hash(search, count, withFilterCount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchNoClickEvent {\n"); - sb.append(" search: ").append(toIndentedString(search)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" withFilterCount: ").append(toIndentedString(withFilterCount)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchNoResultEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchNoResultEvent.java deleted file mode 100644 index efdea402e6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/SearchNoResultEvent.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchNoResultEvent */ -public class SearchNoResultEvent { - - @JsonProperty("search") - private String search; - - @JsonProperty("count") - private Integer count; - - @JsonProperty("nbHits") - private Integer nbHits; - - public SearchNoResultEvent setSearch(String search) { - this.search = search; - return this; - } - - /** - * User query. - * - * @return search - */ - @javax.annotation.Nonnull - public String getSearch() { - return search; - } - - public SearchNoResultEvent setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public SearchNoResultEvent setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchNoResultEvent searchNoResultEvent = (SearchNoResultEvent) o; - return ( - Objects.equals(this.search, searchNoResultEvent.search) && - Objects.equals(this.count, searchNoResultEvent.count) && - Objects.equals(this.nbHits, searchNoResultEvent.nbHits) - ); - } - - @Override - public int hashCode() { - return Objects.hash(search, count, nbHits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchNoResultEvent {\n"); - sb.append(" search: ").append(toIndentedString(search)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopCountry.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopCountry.java deleted file mode 100644 index 3f133b1328..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopCountry.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** TopCountry */ -public class TopCountry { - - @JsonProperty("country") - private String country; - - @JsonProperty("count") - private Integer count; - - public TopCountry setCountry(String country) { - this.country = country; - return this; - } - - /** - * Country. - * - * @return country - */ - @javax.annotation.Nonnull - public String getCountry() { - return country; - } - - public TopCountry setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TopCountry topCountry = (TopCountry) o; - return Objects.equals(this.country, topCountry.country) && Objects.equals(this.count, topCountry.count); - } - - @Override - public int hashCode() { - return Objects.hash(country, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TopCountry {\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHit.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHit.java deleted file mode 100644 index b1b3231f36..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHit.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** TopHit */ -public class TopHit { - - @JsonProperty("hit") - private String hit; - - @JsonProperty("count") - private Integer count; - - public TopHit setHit(String hit) { - this.hit = hit; - return this; - } - - /** - * Hit. - * - * @return hit - */ - @javax.annotation.Nonnull - public String getHit() { - return hit; - } - - public TopHit setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TopHit topHit = (TopHit) o; - return Objects.equals(this.hit, topHit.hit) && Objects.equals(this.count, topHit.count); - } - - @Override - public int hashCode() { - return Objects.hash(hit, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TopHit {\n"); - sb.append(" hit: ").append(toIndentedString(hit)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitWithAnalytics.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitWithAnalytics.java deleted file mode 100644 index 20eaeebdec..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitWithAnalytics.java +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** TopHitWithAnalytics */ -public class TopHitWithAnalytics { - - @JsonProperty("hit") - private String hit; - - @JsonProperty("count") - private Integer count; - - @JsonProperty("clickThroughRate") - private Double clickThroughRate; - - @JsonProperty("conversionRate") - private Double conversionRate; - - @JsonProperty("trackedSearchCount") - private Integer trackedSearchCount; - - @JsonProperty("clickCount") - private Integer clickCount; - - @JsonProperty("conversionCount") - private Integer conversionCount; - - public TopHitWithAnalytics setHit(String hit) { - this.hit = hit; - return this; - } - - /** - * Hit. - * - * @return hit - */ - @javax.annotation.Nonnull - public String getHit() { - return hit; - } - - public TopHitWithAnalytics setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public TopHitWithAnalytics setClickThroughRate(Double clickThroughRate) { - this.clickThroughRate = clickThroughRate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return clickThroughRate - */ - @javax.annotation.Nonnull - public Double getClickThroughRate() { - return clickThroughRate; - } - - public TopHitWithAnalytics setConversionRate(Double conversionRate) { - this.conversionRate = conversionRate; - return this; - } - - /** - * [Conversion rate - * (CR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @return conversionRate - */ - @javax.annotation.Nonnull - public Double getConversionRate() { - return conversionRate; - } - - public TopHitWithAnalytics setTrackedSearchCount(Integer trackedSearchCount) { - this.trackedSearchCount = trackedSearchCount; - return this; - } - - /** - * Number of tracked searches. This is the number of search requests where the `clickAnalytics` - * parameter is `true`. - * - * @return trackedSearchCount - */ - @javax.annotation.Nonnull - public Integer getTrackedSearchCount() { - return trackedSearchCount; - } - - public TopHitWithAnalytics setClickCount(Integer clickCount) { - this.clickCount = clickCount; - return this; - } - - /** - * Number of click events. - * - * @return clickCount - */ - @javax.annotation.Nonnull - public Integer getClickCount() { - return clickCount; - } - - public TopHitWithAnalytics setConversionCount(Integer conversionCount) { - this.conversionCount = conversionCount; - return this; - } - - /** - * Number of converted clicks. - * - * @return conversionCount - */ - @javax.annotation.Nonnull - public Integer getConversionCount() { - return conversionCount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TopHitWithAnalytics topHitWithAnalytics = (TopHitWithAnalytics) o; - return ( - Objects.equals(this.hit, topHitWithAnalytics.hit) && - Objects.equals(this.count, topHitWithAnalytics.count) && - Objects.equals(this.clickThroughRate, topHitWithAnalytics.clickThroughRate) && - Objects.equals(this.conversionRate, topHitWithAnalytics.conversionRate) && - Objects.equals(this.trackedSearchCount, topHitWithAnalytics.trackedSearchCount) && - Objects.equals(this.clickCount, topHitWithAnalytics.clickCount) && - Objects.equals(this.conversionCount, topHitWithAnalytics.conversionCount) - ); - } - - @Override - public int hashCode() { - return Objects.hash(hit, count, clickThroughRate, conversionRate, trackedSearchCount, clickCount, conversionCount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TopHitWithAnalytics {\n"); - sb.append(" hit: ").append(toIndentedString(hit)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" clickThroughRate: ").append(toIndentedString(clickThroughRate)).append("\n"); - sb.append(" conversionRate: ").append(toIndentedString(conversionRate)).append("\n"); - sb.append(" trackedSearchCount: ").append(toIndentedString(trackedSearchCount)).append("\n"); - sb.append(" clickCount: ").append(toIndentedString(clickCount)).append("\n"); - sb.append(" conversionCount: ").append(toIndentedString(conversionCount)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitsResponse.java deleted file mode 100644 index 8a05cd693c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitsResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** TopHitsResponse */ -public class TopHitsResponse { - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - public TopHitsResponse setHits(List hits) { - this.hits = hits; - return this; - } - - public TopHitsResponse addHits(TopHit hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Top hits. - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TopHitsResponse topHitsResponse = (TopHitsResponse) o; - return Objects.equals(this.hits, topHitsResponse.hits); - } - - @Override - public int hashCode() { - return Objects.hash(hits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TopHitsResponse {\n"); - sb.append(" hits: ").append(toIndentedString(hits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitsResponseWithAnalytics.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitsResponseWithAnalytics.java deleted file mode 100644 index 6ae1ffb336..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopHitsResponseWithAnalytics.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** TopHitsResponseWithAnalytics */ -public class TopHitsResponseWithAnalytics { - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - public TopHitsResponseWithAnalytics setHits(List hits) { - this.hits = hits; - return this; - } - - public TopHitsResponseWithAnalytics addHits(TopHitWithAnalytics hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Top hits. - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TopHitsResponseWithAnalytics topHitsResponseWithAnalytics = (TopHitsResponseWithAnalytics) o; - return Objects.equals(this.hits, topHitsResponseWithAnalytics.hits); - } - - @Override - public int hashCode() { - return Objects.hash(hits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TopHitsResponseWithAnalytics {\n"); - sb.append(" hits: ").append(toIndentedString(hits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearch.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearch.java deleted file mode 100644 index 5a119db7b6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearch.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** TopSearch */ -public class TopSearch { - - @JsonProperty("search") - private String search; - - @JsonProperty("count") - private Integer count; - - @JsonProperty("nbHits") - private Integer nbHits; - - public TopSearch setSearch(String search) { - this.search = search; - return this; - } - - /** - * User query. - * - * @return search - */ - @javax.annotation.Nonnull - public String getSearch() { - return search; - } - - public TopSearch setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public TopSearch setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TopSearch topSearch = (TopSearch) o; - return ( - Objects.equals(this.search, topSearch.search) && - Objects.equals(this.count, topSearch.count) && - Objects.equals(this.nbHits, topSearch.nbHits) - ); - } - - @Override - public int hashCode() { - return Objects.hash(search, count, nbHits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TopSearch {\n"); - sb.append(" search: ").append(toIndentedString(search)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java deleted file mode 100644 index e1eec9898d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** TopSearchWithAnalytics */ -public class TopSearchWithAnalytics { - - @JsonProperty("search") - private String search; - - @JsonProperty("count") - private Integer count; - - @JsonProperty("clickThroughRate") - private Double clickThroughRate; - - @JsonProperty("averageClickPosition") - private Integer averageClickPosition; - - @JsonProperty("conversionRate") - private Double conversionRate; - - @JsonProperty("trackedSearchCount") - private Integer trackedSearchCount; - - @JsonProperty("clickCount") - private Integer clickCount; - - @JsonProperty("conversionCount") - private Integer conversionCount; - - @JsonProperty("nbHits") - private Integer nbHits; - - public TopSearchWithAnalytics setSearch(String search) { - this.search = search; - return this; - } - - /** - * User query. - * - * @return search - */ - @javax.annotation.Nonnull - public String getSearch() { - return search; - } - - public TopSearchWithAnalytics setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of tracked _and_ untracked searches (where the `clickAnalytics` parameter isn't `true`). - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - public TopSearchWithAnalytics setClickThroughRate(Double clickThroughRate) { - this.clickThroughRate = clickThroughRate; - return this; - } - - /** - * [Click-through rate - * (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). - * minimum: 0 maximum: 1 - * - * @return clickThroughRate - */ - @javax.annotation.Nonnull - public Double getClickThroughRate() { - return clickThroughRate; - } - - public TopSearchWithAnalytics setAverageClickPosition(Integer averageClickPosition) { - this.averageClickPosition = averageClickPosition; - return this; - } - - /** - * Average - * [position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position) - * of clicked search result. - * - * @return averageClickPosition - */ - @javax.annotation.Nonnull - public Integer getAverageClickPosition() { - return averageClickPosition; - } - - public TopSearchWithAnalytics setConversionRate(Double conversionRate) { - this.conversionRate = conversionRate; - return this; - } - - /** - * [Conversion rate - * (CR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). - * - * @return conversionRate - */ - @javax.annotation.Nonnull - public Double getConversionRate() { - return conversionRate; - } - - public TopSearchWithAnalytics setTrackedSearchCount(Integer trackedSearchCount) { - this.trackedSearchCount = trackedSearchCount; - return this; - } - - /** - * Number of tracked searches. This is the number of search requests where the `clickAnalytics` - * parameter is `true`. - * - * @return trackedSearchCount - */ - @javax.annotation.Nonnull - public Integer getTrackedSearchCount() { - return trackedSearchCount; - } - - public TopSearchWithAnalytics setClickCount(Integer clickCount) { - this.clickCount = clickCount; - return this; - } - - /** - * Number of click events. - * - * @return clickCount - */ - @javax.annotation.Nonnull - public Integer getClickCount() { - return clickCount; - } - - public TopSearchWithAnalytics setConversionCount(Integer conversionCount) { - this.conversionCount = conversionCount; - return this; - } - - /** - * Number of converted clicks. - * - * @return conversionCount - */ - @javax.annotation.Nonnull - public Integer getConversionCount() { - return conversionCount; - } - - public TopSearchWithAnalytics setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TopSearchWithAnalytics topSearchWithAnalytics = (TopSearchWithAnalytics) o; - return ( - Objects.equals(this.search, topSearchWithAnalytics.search) && - Objects.equals(this.count, topSearchWithAnalytics.count) && - Objects.equals(this.clickThroughRate, topSearchWithAnalytics.clickThroughRate) && - Objects.equals(this.averageClickPosition, topSearchWithAnalytics.averageClickPosition) && - Objects.equals(this.conversionRate, topSearchWithAnalytics.conversionRate) && - Objects.equals(this.trackedSearchCount, topSearchWithAnalytics.trackedSearchCount) && - Objects.equals(this.clickCount, topSearchWithAnalytics.clickCount) && - Objects.equals(this.conversionCount, topSearchWithAnalytics.conversionCount) && - Objects.equals(this.nbHits, topSearchWithAnalytics.nbHits) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - search, - count, - clickThroughRate, - averageClickPosition, - conversionRate, - trackedSearchCount, - clickCount, - conversionCount, - nbHits - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TopSearchWithAnalytics {\n"); - sb.append(" search: ").append(toIndentedString(search)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" clickThroughRate: ").append(toIndentedString(clickThroughRate)).append("\n"); - sb.append(" averageClickPosition: ").append(toIndentedString(averageClickPosition)).append("\n"); - sb.append(" conversionRate: ").append(toIndentedString(conversionRate)).append("\n"); - sb.append(" trackedSearchCount: ").append(toIndentedString(trackedSearchCount)).append("\n"); - sb.append(" clickCount: ").append(toIndentedString(clickCount)).append("\n"); - sb.append(" conversionCount: ").append(toIndentedString(conversionCount)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchesResponse.java deleted file mode 100644 index d5b6f7a5d4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchesResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** TopSearchesResponse */ -public class TopSearchesResponse { - - @JsonProperty("searches") - private List searches = new ArrayList<>(); - - public TopSearchesResponse setSearches(List searches) { - this.searches = searches; - return this; - } - - public TopSearchesResponse addSearches(TopSearch searchesItem) { - this.searches.add(searchesItem); - return this; - } - - /** - * Top searches with their hits count. - * - * @return searches - */ - @javax.annotation.Nonnull - public List getSearches() { - return searches; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TopSearchesResponse topSearchesResponse = (TopSearchesResponse) o; - return Objects.equals(this.searches, topSearchesResponse.searches); - } - - @Override - public int hashCode() { - return Objects.hash(searches); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TopSearchesResponse {\n"); - sb.append(" searches: ").append(toIndentedString(searches)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchesResponseWithAnalytics.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchesResponseWithAnalytics.java deleted file mode 100644 index f24f51bc9a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/TopSearchesResponseWithAnalytics.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** TopSearchesResponseWithAnalytics */ -public class TopSearchesResponseWithAnalytics { - - @JsonProperty("searches") - private List searches = new ArrayList<>(); - - public TopSearchesResponseWithAnalytics setSearches(List searches) { - this.searches = searches; - return this; - } - - public TopSearchesResponseWithAnalytics addSearches(TopSearchWithAnalytics searchesItem) { - this.searches.add(searchesItem); - return this; - } - - /** - * Top searches with their hits count and analytics. - * - * @return searches - */ - @javax.annotation.Nonnull - public List getSearches() { - return searches; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TopSearchesResponseWithAnalytics topSearchesResponseWithAnalytics = (TopSearchesResponseWithAnalytics) o; - return Objects.equals(this.searches, topSearchesResponseWithAnalytics.searches); - } - - @Override - public int hashCode() { - return Objects.hash(searches); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TopSearchesResponseWithAnalytics {\n"); - sb.append(" searches: ").append(toIndentedString(searches)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/UserWithDate.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/UserWithDate.java deleted file mode 100644 index 0caf6a3d3e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/analytics/UserWithDate.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.analytics; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** UserWithDate */ -public class UserWithDate { - - @JsonProperty("date") - private String date; - - @JsonProperty("count") - private Integer count; - - public UserWithDate setDate(String date) { - this.date = date; - return this; - } - - /** - * Date of the event in the format YYYY-MM-DD. - * - * @return date - */ - @javax.annotation.Nonnull - public String getDate() { - return date; - } - - public UserWithDate setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of occurrences. - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserWithDate userWithDate = (UserWithDate) o; - return Objects.equals(this.date, userWithDate.date) && Objects.equals(this.count, userWithDate.count); - } - - @Override - public int hashCode() { - return Objects.hash(date, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserWithDate {\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickEvent.java deleted file mode 100644 index beeae8777a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickEvent.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets ClickEvent */ -public enum ClickEvent { - CLICK("click"); - - private final String value; - - ClickEvent(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ClickEvent fromValue(String value) { - for (ClickEvent b : ClickEvent.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedFilters.java deleted file mode 100644 index bf45653f45..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedFilters.java +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Use this event to track when users click facet filters in your user interface. */ -public class ClickedFilters { - - @JsonProperty("eventName") - private String eventName; - - @JsonProperty("eventType") - private ClickEvent eventType; - - @JsonProperty("index") - private String index; - - @JsonProperty("filters") - private List filters = new ArrayList<>(); - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("timestamp") - private Long timestamp; - - public ClickedFilters setEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by - * adopting Segment's - * [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) - * framework. - * - * @return eventName - */ - @javax.annotation.Nonnull - public String getEventName() { - return eventName; - } - - public ClickedFilters setEventType(ClickEvent eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get eventType - * - * @return eventType - */ - @javax.annotation.Nonnull - public ClickEvent getEventType() { - return eventType; - } - - public ClickedFilters setIndex(String index) { - this.index = index; - return this; - } - - /** - * Name of the Algolia index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ClickedFilters setFilters(List filters) { - this.filters = filters; - return this; - } - - public ClickedFilters addFilters(String filtersItem) { - this.filters.add(filtersItem); - return this; - } - - /** - * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`. - * - * @return filters - */ - @javax.annotation.Nonnull - public List getFilters() { - return filters; - } - - public ClickedFilters setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable - * information in user tokens. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public ClickedFilters setTimestamp(Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). - * By default, the Insights API uses the time it receives an event as its timestamp. - * - * @return timestamp - */ - @javax.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClickedFilters clickedFilters = (ClickedFilters) o; - return ( - Objects.equals(this.eventName, clickedFilters.eventName) && - Objects.equals(this.eventType, clickedFilters.eventType) && - Objects.equals(this.index, clickedFilters.index) && - Objects.equals(this.filters, clickedFilters.filters) && - Objects.equals(this.userToken, clickedFilters.userToken) && - Objects.equals(this.timestamp, clickedFilters.timestamp) - ); - } - - @Override - public int hashCode() { - return Objects.hash(eventName, eventType, index, filters, userToken, timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClickedFilters {\n"); - sb.append(" eventName: ").append(toIndentedString(eventName)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedObjectIDs.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedObjectIDs.java deleted file mode 100644 index 93e1831109..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedObjectIDs.java +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * Use this event to track when users click items unrelated to a previous Algolia request. For - * example, if you don't use Algolia to build your category pages, use this event. To track click - * events related to Algolia requests, use the \"Clicked object IDs after search\" event. - */ -public class ClickedObjectIDs { - - @JsonProperty("eventName") - private String eventName; - - @JsonProperty("eventType") - private ClickEvent eventType; - - @JsonProperty("index") - private String index; - - @JsonProperty("objectIDs") - private List objectIDs = new ArrayList<>(); - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("timestamp") - private Long timestamp; - - public ClickedObjectIDs setEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by - * adopting Segment's - * [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) - * framework. - * - * @return eventName - */ - @javax.annotation.Nonnull - public String getEventName() { - return eventName; - } - - public ClickedObjectIDs setEventType(ClickEvent eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get eventType - * - * @return eventType - */ - @javax.annotation.Nonnull - public ClickEvent getEventType() { - return eventType; - } - - public ClickedObjectIDs setIndex(String index) { - this.index = index; - return this; - } - - /** - * Name of the Algolia index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ClickedObjectIDs setObjectIDs(List objectIDs) { - this.objectIDs = objectIDs; - return this; - } - - public ClickedObjectIDs addObjectIDs(String objectIDsItem) { - this.objectIDs.add(objectIDsItem); - return this; - } - - /** - * List of object identifiers for items of an Algolia index. - * - * @return objectIDs - */ - @javax.annotation.Nonnull - public List getObjectIDs() { - return objectIDs; - } - - public ClickedObjectIDs setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable - * information in user tokens. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public ClickedObjectIDs setTimestamp(Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). - * By default, the Insights API uses the time it receives an event as its timestamp. - * - * @return timestamp - */ - @javax.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClickedObjectIDs clickedObjectIDs = (ClickedObjectIDs) o; - return ( - Objects.equals(this.eventName, clickedObjectIDs.eventName) && - Objects.equals(this.eventType, clickedObjectIDs.eventType) && - Objects.equals(this.index, clickedObjectIDs.index) && - Objects.equals(this.objectIDs, clickedObjectIDs.objectIDs) && - Objects.equals(this.userToken, clickedObjectIDs.userToken) && - Objects.equals(this.timestamp, clickedObjectIDs.timestamp) - ); - } - - @Override - public int hashCode() { - return Objects.hash(eventName, eventType, index, objectIDs, userToken, timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClickedObjectIDs {\n"); - sb.append(" eventName: ").append(toIndentedString(eventName)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" objectIDs: ").append(toIndentedString(objectIDs)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedObjectIDsAfterSearch.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedObjectIDsAfterSearch.java deleted file mode 100644 index 33a50be559..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ClickedObjectIDsAfterSearch.java +++ /dev/null @@ -1,230 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * Click event after an Algolia request. Use this event to track when users click items in the - * search results. If you're building your category pages with Algolia, you'll also use this event. - */ -public class ClickedObjectIDsAfterSearch { - - @JsonProperty("eventName") - private String eventName; - - @JsonProperty("eventType") - private ClickEvent eventType; - - @JsonProperty("index") - private String index; - - @JsonProperty("objectIDs") - private List objectIDs = new ArrayList<>(); - - @JsonProperty("positions") - private List positions = new ArrayList<>(); - - @JsonProperty("queryID") - private String queryID; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("timestamp") - private Long timestamp; - - public ClickedObjectIDsAfterSearch setEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by - * adopting Segment's - * [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) - * framework. - * - * @return eventName - */ - @javax.annotation.Nonnull - public String getEventName() { - return eventName; - } - - public ClickedObjectIDsAfterSearch setEventType(ClickEvent eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get eventType - * - * @return eventType - */ - @javax.annotation.Nonnull - public ClickEvent getEventType() { - return eventType; - } - - public ClickedObjectIDsAfterSearch setIndex(String index) { - this.index = index; - return this; - } - - /** - * Name of the Algolia index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ClickedObjectIDsAfterSearch setObjectIDs(List objectIDs) { - this.objectIDs = objectIDs; - return this; - } - - public ClickedObjectIDsAfterSearch addObjectIDs(String objectIDsItem) { - this.objectIDs.add(objectIDsItem); - return this; - } - - /** - * List of object identifiers for items of an Algolia index. - * - * @return objectIDs - */ - @javax.annotation.Nonnull - public List getObjectIDs() { - return objectIDs; - } - - public ClickedObjectIDsAfterSearch setPositions(List positions) { - this.positions = positions; - return this; - } - - public ClickedObjectIDsAfterSearch addPositions(Integer positionsItem) { - this.positions.add(positionsItem); - return this; - } - - /** - * Position of the clicked objects in the search results. The first search result has a position - * of 1 (not 0). You must provide 1 `position` for each `objectID`. - * - * @return positions - */ - @javax.annotation.Nonnull - public List getPositions() { - return positions; - } - - public ClickedObjectIDsAfterSearch setQueryID(String queryID) { - this.queryID = queryID; - return this; - } - - /** - * Unique identifier for a search query. The query ID is required for events related to search or - * browse requests. If you add `clickAnalytics: true` as a search request parameter, the query ID - * is included in the API response. - * - * @return queryID - */ - @javax.annotation.Nonnull - public String getQueryID() { - return queryID; - } - - public ClickedObjectIDsAfterSearch setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable - * information in user tokens. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public ClickedObjectIDsAfterSearch setTimestamp(Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). - * By default, the Insights API uses the time it receives an event as its timestamp. - * - * @return timestamp - */ - @javax.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClickedObjectIDsAfterSearch clickedObjectIDsAfterSearch = (ClickedObjectIDsAfterSearch) o; - return ( - Objects.equals(this.eventName, clickedObjectIDsAfterSearch.eventName) && - Objects.equals(this.eventType, clickedObjectIDsAfterSearch.eventType) && - Objects.equals(this.index, clickedObjectIDsAfterSearch.index) && - Objects.equals(this.objectIDs, clickedObjectIDsAfterSearch.objectIDs) && - Objects.equals(this.positions, clickedObjectIDsAfterSearch.positions) && - Objects.equals(this.queryID, clickedObjectIDsAfterSearch.queryID) && - Objects.equals(this.userToken, clickedObjectIDsAfterSearch.userToken) && - Objects.equals(this.timestamp, clickedObjectIDsAfterSearch.timestamp) - ); - } - - @Override - public int hashCode() { - return Objects.hash(eventName, eventType, index, objectIDs, positions, queryID, userToken, timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClickedObjectIDsAfterSearch {\n"); - sb.append(" eventName: ").append(toIndentedString(eventName)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" objectIDs: ").append(toIndentedString(objectIDs)).append("\n"); - sb.append(" positions: ").append(toIndentedString(positions)).append("\n"); - sb.append(" queryID: ").append(toIndentedString(queryID)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConversionEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConversionEvent.java deleted file mode 100644 index 289f6da3f2..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConversionEvent.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets ConversionEvent */ -public enum ConversionEvent { - CONVERSION("conversion"); - - private final String value; - - ConversionEvent(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ConversionEvent fromValue(String value) { - for (ConversionEvent b : ConversionEvent.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedFilters.java deleted file mode 100644 index 82d9d443cf..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedFilters.java +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ConvertedFilters */ -public class ConvertedFilters { - - @JsonProperty("eventName") - private String eventName; - - @JsonProperty("eventType") - private ConversionEvent eventType; - - @JsonProperty("index") - private String index; - - @JsonProperty("filters") - private List filters = new ArrayList<>(); - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("timestamp") - private Long timestamp; - - public ConvertedFilters setEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by - * adopting Segment's - * [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) - * framework. - * - * @return eventName - */ - @javax.annotation.Nonnull - public String getEventName() { - return eventName; - } - - public ConvertedFilters setEventType(ConversionEvent eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get eventType - * - * @return eventType - */ - @javax.annotation.Nonnull - public ConversionEvent getEventType() { - return eventType; - } - - public ConvertedFilters setIndex(String index) { - this.index = index; - return this; - } - - /** - * Name of the Algolia index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ConvertedFilters setFilters(List filters) { - this.filters = filters; - return this; - } - - public ConvertedFilters addFilters(String filtersItem) { - this.filters.add(filtersItem); - return this; - } - - /** - * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`. - * - * @return filters - */ - @javax.annotation.Nonnull - public List getFilters() { - return filters; - } - - public ConvertedFilters setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable - * information in user tokens. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public ConvertedFilters setTimestamp(Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). - * By default, the Insights API uses the time it receives an event as its timestamp. - * - * @return timestamp - */ - @javax.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConvertedFilters convertedFilters = (ConvertedFilters) o; - return ( - Objects.equals(this.eventName, convertedFilters.eventName) && - Objects.equals(this.eventType, convertedFilters.eventType) && - Objects.equals(this.index, convertedFilters.index) && - Objects.equals(this.filters, convertedFilters.filters) && - Objects.equals(this.userToken, convertedFilters.userToken) && - Objects.equals(this.timestamp, convertedFilters.timestamp) - ); - } - - @Override - public int hashCode() { - return Objects.hash(eventName, eventType, index, filters, userToken, timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConvertedFilters {\n"); - sb.append(" eventName: ").append(toIndentedString(eventName)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedObjectIDs.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedObjectIDs.java deleted file mode 100644 index 1030da7e00..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedObjectIDs.java +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * Use this event to track when users convert on items unrelated to a previous Algolia request. For - * example, if you don't use Algolia to build your category pages, use this event. To track - * conversion events related to Algolia requests, use the \"Converted object IDs after search\" - * event. - */ -public class ConvertedObjectIDs { - - @JsonProperty("eventName") - private String eventName; - - @JsonProperty("eventType") - private ConversionEvent eventType; - - @JsonProperty("index") - private String index; - - @JsonProperty("objectIDs") - private List objectIDs = new ArrayList<>(); - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("timestamp") - private Long timestamp; - - public ConvertedObjectIDs setEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by - * adopting Segment's - * [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) - * framework. - * - * @return eventName - */ - @javax.annotation.Nonnull - public String getEventName() { - return eventName; - } - - public ConvertedObjectIDs setEventType(ConversionEvent eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get eventType - * - * @return eventType - */ - @javax.annotation.Nonnull - public ConversionEvent getEventType() { - return eventType; - } - - public ConvertedObjectIDs setIndex(String index) { - this.index = index; - return this; - } - - /** - * Name of the Algolia index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ConvertedObjectIDs setObjectIDs(List objectIDs) { - this.objectIDs = objectIDs; - return this; - } - - public ConvertedObjectIDs addObjectIDs(String objectIDsItem) { - this.objectIDs.add(objectIDsItem); - return this; - } - - /** - * List of object identifiers for items of an Algolia index. - * - * @return objectIDs - */ - @javax.annotation.Nonnull - public List getObjectIDs() { - return objectIDs; - } - - public ConvertedObjectIDs setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable - * information in user tokens. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public ConvertedObjectIDs setTimestamp(Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). - * By default, the Insights API uses the time it receives an event as its timestamp. - * - * @return timestamp - */ - @javax.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConvertedObjectIDs convertedObjectIDs = (ConvertedObjectIDs) o; - return ( - Objects.equals(this.eventName, convertedObjectIDs.eventName) && - Objects.equals(this.eventType, convertedObjectIDs.eventType) && - Objects.equals(this.index, convertedObjectIDs.index) && - Objects.equals(this.objectIDs, convertedObjectIDs.objectIDs) && - Objects.equals(this.userToken, convertedObjectIDs.userToken) && - Objects.equals(this.timestamp, convertedObjectIDs.timestamp) - ); - } - - @Override - public int hashCode() { - return Objects.hash(eventName, eventType, index, objectIDs, userToken, timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConvertedObjectIDs {\n"); - sb.append(" eventName: ").append(toIndentedString(eventName)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" objectIDs: ").append(toIndentedString(objectIDs)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedObjectIDsAfterSearch.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedObjectIDsAfterSearch.java deleted file mode 100644 index 899427d3c9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ConvertedObjectIDsAfterSearch.java +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * Use this event to track when users convert after a previous Algolia request. For example, a user - * clicks on an item in the search results to view the product detail page. Then, the user adds the - * item to their shopping cart. If you're building your category pages with Algolia, you'll also use - * this event. - */ -public class ConvertedObjectIDsAfterSearch { - - @JsonProperty("eventName") - private String eventName; - - @JsonProperty("eventType") - private ConversionEvent eventType; - - @JsonProperty("index") - private String index; - - @JsonProperty("objectIDs") - private List objectIDs = new ArrayList<>(); - - @JsonProperty("queryID") - private String queryID; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("timestamp") - private Long timestamp; - - public ConvertedObjectIDsAfterSearch setEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by - * adopting Segment's - * [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) - * framework. - * - * @return eventName - */ - @javax.annotation.Nonnull - public String getEventName() { - return eventName; - } - - public ConvertedObjectIDsAfterSearch setEventType(ConversionEvent eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get eventType - * - * @return eventType - */ - @javax.annotation.Nonnull - public ConversionEvent getEventType() { - return eventType; - } - - public ConvertedObjectIDsAfterSearch setIndex(String index) { - this.index = index; - return this; - } - - /** - * Name of the Algolia index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ConvertedObjectIDsAfterSearch setObjectIDs(List objectIDs) { - this.objectIDs = objectIDs; - return this; - } - - public ConvertedObjectIDsAfterSearch addObjectIDs(String objectIDsItem) { - this.objectIDs.add(objectIDsItem); - return this; - } - - /** - * List of object identifiers for items of an Algolia index. - * - * @return objectIDs - */ - @javax.annotation.Nonnull - public List getObjectIDs() { - return objectIDs; - } - - public ConvertedObjectIDsAfterSearch setQueryID(String queryID) { - this.queryID = queryID; - return this; - } - - /** - * Unique identifier for a search query. The query ID is required for events related to search or - * browse requests. If you add `clickAnalytics: true` as a search request parameter, the query ID - * is included in the API response. - * - * @return queryID - */ - @javax.annotation.Nonnull - public String getQueryID() { - return queryID; - } - - public ConvertedObjectIDsAfterSearch setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable - * information in user tokens. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public ConvertedObjectIDsAfterSearch setTimestamp(Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). - * By default, the Insights API uses the time it receives an event as its timestamp. - * - * @return timestamp - */ - @javax.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConvertedObjectIDsAfterSearch convertedObjectIDsAfterSearch = (ConvertedObjectIDsAfterSearch) o; - return ( - Objects.equals(this.eventName, convertedObjectIDsAfterSearch.eventName) && - Objects.equals(this.eventType, convertedObjectIDsAfterSearch.eventType) && - Objects.equals(this.index, convertedObjectIDsAfterSearch.index) && - Objects.equals(this.objectIDs, convertedObjectIDsAfterSearch.objectIDs) && - Objects.equals(this.queryID, convertedObjectIDsAfterSearch.queryID) && - Objects.equals(this.userToken, convertedObjectIDsAfterSearch.userToken) && - Objects.equals(this.timestamp, convertedObjectIDsAfterSearch.timestamp) - ); - } - - @Override - public int hashCode() { - return Objects.hash(eventName, eventType, index, objectIDs, queryID, userToken, timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConvertedObjectIDsAfterSearch {\n"); - sb.append(" eventName: ").append(toIndentedString(eventName)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" objectIDs: ").append(toIndentedString(objectIDs)).append("\n"); - sb.append(" queryID: ").append(toIndentedString(queryID)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ErrorBase.java deleted file mode 100644 index 5f185e6ad0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ErrorBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Error. */ -public class ErrorBase { - - @JsonProperty("message") - private String message; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public ErrorBase setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public ErrorBase setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorBase errorBase = (ErrorBase) o; - return Objects.equals(this.message, errorBase.message) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(message, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorBase {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/EventsItems.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/EventsItems.java deleted file mode 100644 index 1006b2e782..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/EventsItems.java +++ /dev/null @@ -1,302 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** EventsItems */ -@JsonDeserialize(using = EventsItems.EventsItemsDeserializer.class) -@JsonSerialize(using = EventsItems.EventsItemsSerializer.class) -public abstract class EventsItems implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(EventsItems.class.getName()); - - public static EventsItems of(ClickedFilters inside) { - return new EventsItemsClickedFilters(inside); - } - - public static EventsItems of(ClickedObjectIDs inside) { - return new EventsItemsClickedObjectIDs(inside); - } - - public static EventsItems of(ClickedObjectIDsAfterSearch inside) { - return new EventsItemsClickedObjectIDsAfterSearch(inside); - } - - public static EventsItems of(ConvertedFilters inside) { - return new EventsItemsConvertedFilters(inside); - } - - public static EventsItems of(ConvertedObjectIDs inside) { - return new EventsItemsConvertedObjectIDs(inside); - } - - public static EventsItems of(ConvertedObjectIDsAfterSearch inside) { - return new EventsItemsConvertedObjectIDsAfterSearch(inside); - } - - public static EventsItems of(ViewedFilters inside) { - return new EventsItemsViewedFilters(inside); - } - - public static EventsItems of(ViewedObjectIDs inside) { - return new EventsItemsViewedObjectIDs(inside); - } - - public static class EventsItemsSerializer extends StdSerializer { - - public EventsItemsSerializer(Class t) { - super(t); - } - - public EventsItemsSerializer() { - this(null); - } - - @Override - public void serialize(EventsItems value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class EventsItemsDeserializer extends StdDeserializer { - - public EventsItemsDeserializer() { - this(EventsItems.class); - } - - public EventsItemsDeserializer(Class vc) { - super(vc); - } - - @Override - public EventsItems deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize ClickedFilters - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ClickedFilters value = parser.readValueAs(new TypeReference() {}); - return EventsItems.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf ClickedFilters (error: " + e.getMessage() + ") (type: ClickedFilters)"); - } - } - - // deserialize ClickedObjectIDs - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ClickedObjectIDs value = parser.readValueAs(new TypeReference() {}); - return EventsItems.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf ClickedObjectIDs (error: " + e.getMessage() + ") (type: ClickedObjectIDs)"); - } - } - - // deserialize ClickedObjectIDsAfterSearch - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ClickedObjectIDsAfterSearch value = parser.readValueAs(new TypeReference() {}); - return EventsItems.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf ClickedObjectIDsAfterSearch (error: " + e.getMessage() + ") (type: ClickedObjectIDsAfterSearch)" - ); - } - } - - // deserialize ConvertedFilters - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ConvertedFilters value = parser.readValueAs(new TypeReference() {}); - return EventsItems.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf ConvertedFilters (error: " + e.getMessage() + ") (type: ConvertedFilters)"); - } - } - - // deserialize ConvertedObjectIDs - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ConvertedObjectIDs value = parser.readValueAs(new TypeReference() {}); - return EventsItems.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf ConvertedObjectIDs (error: " + e.getMessage() + ") (type: ConvertedObjectIDs)"); - } - } - - // deserialize ConvertedObjectIDsAfterSearch - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ConvertedObjectIDsAfterSearch value = parser.readValueAs(new TypeReference() {}); - return EventsItems.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf ConvertedObjectIDsAfterSearch (error: " + - e.getMessage() + - ") (type: ConvertedObjectIDsAfterSearch)" - ); - } - } - - // deserialize ViewedFilters - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ViewedFilters value = parser.readValueAs(new TypeReference() {}); - return EventsItems.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf ViewedFilters (error: " + e.getMessage() + ") (type: ViewedFilters)"); - } - } - - // deserialize ViewedObjectIDs - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ViewedObjectIDs value = parser.readValueAs(new TypeReference() {}); - return EventsItems.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf ViewedObjectIDs (error: " + e.getMessage() + ") (type: ViewedObjectIDs)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public EventsItems getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "EventsItems cannot be null"); - } - } -} - -class EventsItemsClickedFilters extends EventsItems { - - private final ClickedFilters insideValue; - - EventsItemsClickedFilters(ClickedFilters insideValue) { - this.insideValue = insideValue; - } - - @Override - public ClickedFilters getInsideValue() { - return insideValue; - } -} - -class EventsItemsClickedObjectIDs extends EventsItems { - - private final ClickedObjectIDs insideValue; - - EventsItemsClickedObjectIDs(ClickedObjectIDs insideValue) { - this.insideValue = insideValue; - } - - @Override - public ClickedObjectIDs getInsideValue() { - return insideValue; - } -} - -class EventsItemsClickedObjectIDsAfterSearch extends EventsItems { - - private final ClickedObjectIDsAfterSearch insideValue; - - EventsItemsClickedObjectIDsAfterSearch(ClickedObjectIDsAfterSearch insideValue) { - this.insideValue = insideValue; - } - - @Override - public ClickedObjectIDsAfterSearch getInsideValue() { - return insideValue; - } -} - -class EventsItemsConvertedFilters extends EventsItems { - - private final ConvertedFilters insideValue; - - EventsItemsConvertedFilters(ConvertedFilters insideValue) { - this.insideValue = insideValue; - } - - @Override - public ConvertedFilters getInsideValue() { - return insideValue; - } -} - -class EventsItemsConvertedObjectIDs extends EventsItems { - - private final ConvertedObjectIDs insideValue; - - EventsItemsConvertedObjectIDs(ConvertedObjectIDs insideValue) { - this.insideValue = insideValue; - } - - @Override - public ConvertedObjectIDs getInsideValue() { - return insideValue; - } -} - -class EventsItemsConvertedObjectIDsAfterSearch extends EventsItems { - - private final ConvertedObjectIDsAfterSearch insideValue; - - EventsItemsConvertedObjectIDsAfterSearch(ConvertedObjectIDsAfterSearch insideValue) { - this.insideValue = insideValue; - } - - @Override - public ConvertedObjectIDsAfterSearch getInsideValue() { - return insideValue; - } -} - -class EventsItemsViewedFilters extends EventsItems { - - private final ViewedFilters insideValue; - - EventsItemsViewedFilters(ViewedFilters insideValue) { - this.insideValue = insideValue; - } - - @Override - public ViewedFilters getInsideValue() { - return insideValue; - } -} - -class EventsItemsViewedObjectIDs extends EventsItems { - - private final ViewedObjectIDs insideValue; - - EventsItemsViewedObjectIDs(ViewedObjectIDs insideValue) { - this.insideValue = insideValue; - } - - @Override - public ViewedObjectIDs getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/EventsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/EventsResponse.java deleted file mode 100644 index 2880ad4933..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/EventsResponse.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** The response of the Insights API. */ -public class EventsResponse { - - @JsonProperty("message") - private String message; - - @JsonProperty("status") - private Integer status; - - public EventsResponse setMessage(String message) { - this.message = message; - return this; - } - - /** - * Details about the response, such as error messages. - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public EventsResponse setStatus(Integer status) { - this.status = status; - return this; - } - - /** - * The HTTP status code of the response. - * - * @return status - */ - @javax.annotation.Nullable - public Integer getStatus() { - return status; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EventsResponse eventsResponse = (EventsResponse) o; - return Objects.equals(this.message, eventsResponse.message) && Objects.equals(this.status, eventsResponse.status); - } - - @Override - public int hashCode() { - return Objects.hash(message, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EventsResponse {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/InsightsEvents.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/InsightsEvents.java deleted file mode 100644 index 99228a20f4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/InsightsEvents.java +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** InsightsEvents */ -public class InsightsEvents { - - @JsonProperty("events") - private List events = new ArrayList<>(); - - public InsightsEvents setEvents(List events) { - this.events = events; - return this; - } - - public InsightsEvents addEvents(EventsItems eventsItem) { - this.events.add(eventsItem); - return this; - } - - /** - * List of click and conversion events. An event is an object representing a user interaction. - * Events have attributes that describe the interaction, such as an event name, a type, or a user - * token. Some attributes require other attributes to be declared, and some attributes can't be - * declared at the same time. **All** events must be valid, otherwise the API returns an error. - * - * @return events - */ - @javax.annotation.Nonnull - public List getEvents() { - return events; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InsightsEvents insightsEvents = (InsightsEvents) o; - return Objects.equals(this.events, insightsEvents.events); - } - - @Override - public int hashCode() { - return Objects.hash(events); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InsightsEvents {\n"); - sb.append(" events: ").append(toIndentedString(events)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewEvent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewEvent.java deleted file mode 100644 index f7059a7738..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewEvent.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets ViewEvent */ -public enum ViewEvent { - VIEW("view"); - - private final String value; - - ViewEvent(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ViewEvent fromValue(String value) { - for (ViewEvent b : ViewEvent.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewedFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewedFilters.java deleted file mode 100644 index d294c6faf6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewedFilters.java +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * Use this method to capture active filters. For example, when browsing a category page, users see - * content filtered on that specific category. - */ -public class ViewedFilters { - - @JsonProperty("eventName") - private String eventName; - - @JsonProperty("eventType") - private ViewEvent eventType; - - @JsonProperty("index") - private String index; - - @JsonProperty("filters") - private List filters = new ArrayList<>(); - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("timestamp") - private Long timestamp; - - public ViewedFilters setEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by - * adopting Segment's - * [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) - * framework. - * - * @return eventName - */ - @javax.annotation.Nonnull - public String getEventName() { - return eventName; - } - - public ViewedFilters setEventType(ViewEvent eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get eventType - * - * @return eventType - */ - @javax.annotation.Nonnull - public ViewEvent getEventType() { - return eventType; - } - - public ViewedFilters setIndex(String index) { - this.index = index; - return this; - } - - /** - * Name of the Algolia index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ViewedFilters setFilters(List filters) { - this.filters = filters; - return this; - } - - public ViewedFilters addFilters(String filtersItem) { - this.filters.add(filtersItem); - return this; - } - - /** - * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`. - * - * @return filters - */ - @javax.annotation.Nonnull - public List getFilters() { - return filters; - } - - public ViewedFilters setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable - * information in user tokens. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public ViewedFilters setTimestamp(Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). - * By default, the Insights API uses the time it receives an event as its timestamp. - * - * @return timestamp - */ - @javax.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ViewedFilters viewedFilters = (ViewedFilters) o; - return ( - Objects.equals(this.eventName, viewedFilters.eventName) && - Objects.equals(this.eventType, viewedFilters.eventType) && - Objects.equals(this.index, viewedFilters.index) && - Objects.equals(this.filters, viewedFilters.filters) && - Objects.equals(this.userToken, viewedFilters.userToken) && - Objects.equals(this.timestamp, viewedFilters.timestamp) - ); - } - - @Override - public int hashCode() { - return Objects.hash(eventName, eventType, index, filters, userToken, timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ViewedFilters {\n"); - sb.append(" eventName: ").append(toIndentedString(eventName)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewedObjectIDs.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewedObjectIDs.java deleted file mode 100644 index 6adfb5e7bd..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/insights/ViewedObjectIDs.java +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.insights; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Use this event to track when users viewed items in the search results. */ -public class ViewedObjectIDs { - - @JsonProperty("eventName") - private String eventName; - - @JsonProperty("eventType") - private ViewEvent eventType; - - @JsonProperty("index") - private String index; - - @JsonProperty("objectIDs") - private List objectIDs = new ArrayList<>(); - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("timestamp") - private Long timestamp; - - public ViewedObjectIDs setEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by - * adopting Segment's - * [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) - * framework. - * - * @return eventName - */ - @javax.annotation.Nonnull - public String getEventName() { - return eventName; - } - - public ViewedObjectIDs setEventType(ViewEvent eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get eventType - * - * @return eventType - */ - @javax.annotation.Nonnull - public ViewEvent getEventType() { - return eventType; - } - - public ViewedObjectIDs setIndex(String index) { - this.index = index; - return this; - } - - /** - * Name of the Algolia index. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ViewedObjectIDs setObjectIDs(List objectIDs) { - this.objectIDs = objectIDs; - return this; - } - - public ViewedObjectIDs addObjectIDs(String objectIDsItem) { - this.objectIDs.add(objectIDsItem); - return this; - } - - /** - * List of object identifiers for items of an Algolia index. - * - * @return objectIDs - */ - @javax.annotation.Nonnull - public List getObjectIDs() { - return objectIDs; - } - - public ViewedObjectIDs setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable - * information in user tokens. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public ViewedObjectIDs setTimestamp(Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). - * By default, the Insights API uses the time it receives an event as its timestamp. - * - * @return timestamp - */ - @javax.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ViewedObjectIDs viewedObjectIDs = (ViewedObjectIDs) o; - return ( - Objects.equals(this.eventName, viewedObjectIDs.eventName) && - Objects.equals(this.eventType, viewedObjectIDs.eventType) && - Objects.equals(this.index, viewedObjectIDs.index) && - Objects.equals(this.objectIDs, viewedObjectIDs.objectIDs) && - Objects.equals(this.userToken, viewedObjectIDs.userToken) && - Objects.equals(this.timestamp, viewedObjectIDs.timestamp) - ); - } - - @Override - public int hashCode() { - return Objects.hash(eventName, eventType, index, objectIDs, userToken, timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ViewedObjectIDs {\n"); - sb.append(" eventName: ").append(toIndentedString(eventName)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" objectIDs: ").append(toIndentedString(objectIDs)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ErrorBase.java deleted file mode 100644 index 7c88fbe37a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ErrorBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Error. */ -public class ErrorBase { - - @JsonProperty("message") - private String message; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public ErrorBase setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public ErrorBase setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorBase errorBase = (ErrorBase) o; - return Objects.equals(this.message, errorBase.message) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(message, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorBase {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/GetInventory403Response.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/GetInventory403Response.java deleted file mode 100644 index 8bc784f87d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/GetInventory403Response.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetInventory403Response */ -public class GetInventory403Response { - - @JsonProperty("reason") - private String reason; - - public GetInventory403Response setReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Get reason - * - * @return reason - */ - @javax.annotation.Nullable - public String getReason() { - return reason; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetInventory403Response getInventory403Response = (GetInventory403Response) o; - return Objects.equals(this.reason, getInventory403Response.reason); - } - - @Override - public int hashCode() { - return Objects.hash(reason); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetInventory403Response {\n"); - sb.append(" reason: ").append(toIndentedString(reason)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Incident.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Incident.java deleted file mode 100644 index 320804c8db..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Incident.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Incident details. */ -public class Incident { - - @JsonProperty("title") - private String title; - - @JsonProperty("status") - private Status status; - - public Incident setTitle(String title) { - this.title = title; - return this; - } - - /** - * Description of the incident. - * - * @return title - */ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - public Incident setStatus(Status status) { - this.status = status; - return this; - } - - /** - * Get status - * - * @return status - */ - @javax.annotation.Nullable - public Status getStatus() { - return status; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Incident incident = (Incident) o; - return Objects.equals(this.title, incident.title) && Objects.equals(this.status, incident.status); - } - - @Override - public int hashCode() { - return Objects.hash(title, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Incident {\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IncidentsInner.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IncidentsInner.java deleted file mode 100644 index a84493149e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IncidentsInner.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** IncidentsInner */ -public class IncidentsInner { - - @JsonProperty("t") - private Long t; - - @JsonProperty("v") - private Incident v; - - public IncidentsInner setT(Long t) { - this.t = t; - return this; - } - - /** - * Timestamp in [Unix epoch time](https://wikipedia.org/wiki/Unix_time) in milliseconds. - * - * @return t - */ - @javax.annotation.Nullable - public Long getT() { - return t; - } - - public IncidentsInner setV(Incident v) { - this.v = v; - return this; - } - - /** - * Get v - * - * @return v - */ - @javax.annotation.Nullable - public Incident getV() { - return v; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentsInner incidentsInner = (IncidentsInner) o; - return Objects.equals(this.t, incidentsInner.t) && Objects.equals(this.v, incidentsInner.v); - } - - @Override - public int hashCode() { - return Objects.hash(t, v); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentsInner {\n"); - sb.append(" t: ").append(toIndentedString(t)).append("\n"); - sb.append(" v: ").append(toIndentedString(v)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java deleted file mode 100644 index cafa2eb52e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** IncidentsResponse */ -public class IncidentsResponse { - - @JsonProperty("incidents") - private Map> incidents; - - public IncidentsResponse setIncidents(Map> incidents) { - this.incidents = incidents; - return this; - } - - public IncidentsResponse putIncidents(String key, List incidentsItem) { - if (this.incidents == null) { - this.incidents = new HashMap<>(); - } - this.incidents.put(key, incidentsItem); - return this; - } - - /** - * Get incidents - * - * @return incidents - */ - @javax.annotation.Nullable - public Map> getIncidents() { - return incidents; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncidentsResponse incidentsResponse = (IncidentsResponse) o; - return Objects.equals(this.incidents, incidentsResponse.incidents); - } - - @Override - public int hashCode() { - return Objects.hash(incidents); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncidentsResponse {\n"); - sb.append(" incidents: ").append(toIndentedString(incidents)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java deleted file mode 100644 index 32c09ce70c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** IndexingTimeResponse */ -public class IndexingTimeResponse { - - @JsonProperty("metrics") - private IndexingTimeResponseMetrics metrics; - - public IndexingTimeResponse setMetrics(IndexingTimeResponseMetrics metrics) { - this.metrics = metrics; - return this; - } - - /** - * Get metrics - * - * @return metrics - */ - @javax.annotation.Nullable - public IndexingTimeResponseMetrics getMetrics() { - return metrics; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndexingTimeResponse indexingTimeResponse = (IndexingTimeResponse) o; - return Objects.equals(this.metrics, indexingTimeResponse.metrics); - } - - @Override - public int hashCode() { - return Objects.hash(metrics); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndexingTimeResponse {\n"); - sb.append(" metrics: ").append(toIndentedString(metrics)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java deleted file mode 100644 index 4f72b912ba..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** IndexingTimeResponseMetrics */ -public class IndexingTimeResponseMetrics { - - @JsonProperty("indexing") - private Map> indexing; - - public IndexingTimeResponseMetrics setIndexing(Map> indexing) { - this.indexing = indexing; - return this; - } - - public IndexingTimeResponseMetrics putIndexing(String key, List indexingItem) { - if (this.indexing == null) { - this.indexing = new HashMap<>(); - } - this.indexing.put(key, indexingItem); - return this; - } - - /** - * Get indexing - * - * @return indexing - */ - @javax.annotation.Nullable - public Map> getIndexing() { - return indexing; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndexingTimeResponseMetrics indexingTimeResponseMetrics = (IndexingTimeResponseMetrics) o; - return Objects.equals(this.indexing, indexingTimeResponseMetrics.indexing); - } - - @Override - public int hashCode() { - return Objects.hash(indexing); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndexingTimeResponseMetrics {\n"); - sb.append(" indexing: ").append(toIndentedString(indexing)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java deleted file mode 100644 index ca5f512730..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** InfrastructureResponse */ -public class InfrastructureResponse { - - @JsonProperty("metrics") - private InfrastructureResponseMetrics metrics; - - public InfrastructureResponse setMetrics(InfrastructureResponseMetrics metrics) { - this.metrics = metrics; - return this; - } - - /** - * Get metrics - * - * @return metrics - */ - @javax.annotation.Nullable - public InfrastructureResponseMetrics getMetrics() { - return metrics; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InfrastructureResponse infrastructureResponse = (InfrastructureResponse) o; - return Objects.equals(this.metrics, infrastructureResponse.metrics); - } - - @Override - public int hashCode() { - return Objects.hash(metrics); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InfrastructureResponse {\n"); - sb.append(" metrics: ").append(toIndentedString(metrics)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java deleted file mode 100644 index 22dfd38021..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** InfrastructureResponseMetrics */ -public class InfrastructureResponseMetrics { - - @JsonProperty("cpu_usage") - private Map> cpuUsage; - - @JsonProperty("ram_indexing_usage") - private Map> ramIndexingUsage; - - @JsonProperty("ram_search_usage") - private Map> ramSearchUsage; - - @JsonProperty("ssd_usage") - private Map> ssdUsage; - - @JsonProperty("avg_build_time") - private Map> avgBuildTime; - - public InfrastructureResponseMetrics setCpuUsage(Map> cpuUsage) { - this.cpuUsage = cpuUsage; - return this; - } - - public InfrastructureResponseMetrics putCpuUsage(String key, List cpuUsageItem) { - if (this.cpuUsage == null) { - this.cpuUsage = new HashMap<>(); - } - this.cpuUsage.put(key, cpuUsageItem); - return this; - } - - /** - * CPU idleness in %. - * - * @return cpuUsage - */ - @javax.annotation.Nullable - public Map> getCpuUsage() { - return cpuUsage; - } - - public InfrastructureResponseMetrics setRamIndexingUsage(Map> ramIndexingUsage) { - this.ramIndexingUsage = ramIndexingUsage; - return this; - } - - public InfrastructureResponseMetrics putRamIndexingUsage(String key, List ramIndexingUsageItem) { - if (this.ramIndexingUsage == null) { - this.ramIndexingUsage = new HashMap<>(); - } - this.ramIndexingUsage.put(key, ramIndexingUsageItem); - return this; - } - - /** - * RAM used for indexing in MB. - * - * @return ramIndexingUsage - */ - @javax.annotation.Nullable - public Map> getRamIndexingUsage() { - return ramIndexingUsage; - } - - public InfrastructureResponseMetrics setRamSearchUsage(Map> ramSearchUsage) { - this.ramSearchUsage = ramSearchUsage; - return this; - } - - public InfrastructureResponseMetrics putRamSearchUsage(String key, List ramSearchUsageItem) { - if (this.ramSearchUsage == null) { - this.ramSearchUsage = new HashMap<>(); - } - this.ramSearchUsage.put(key, ramSearchUsageItem); - return this; - } - - /** - * RAM used for search in MB. - * - * @return ramSearchUsage - */ - @javax.annotation.Nullable - public Map> getRamSearchUsage() { - return ramSearchUsage; - } - - public InfrastructureResponseMetrics setSsdUsage(Map> ssdUsage) { - this.ssdUsage = ssdUsage; - return this; - } - - public InfrastructureResponseMetrics putSsdUsage(String key, List ssdUsageItem) { - if (this.ssdUsage == null) { - this.ssdUsage = new HashMap<>(); - } - this.ssdUsage.put(key, ssdUsageItem); - return this; - } - - /** - * Solid-state disk (SSD) usage expressed as % of RAM. 0% means no SSD usage. A value of 50% - * indicates 32 GB SSD usage for a machine with 64 RAM. - * - * @return ssdUsage - */ - @javax.annotation.Nullable - public Map> getSsdUsage() { - return ssdUsage; - } - - public InfrastructureResponseMetrics setAvgBuildTime(Map> avgBuildTime) { - this.avgBuildTime = avgBuildTime; - return this; - } - - public InfrastructureResponseMetrics putAvgBuildTime(String key, List avgBuildTimeItem) { - if (this.avgBuildTime == null) { - this.avgBuildTime = new HashMap<>(); - } - this.avgBuildTime.put(key, avgBuildTimeItem); - return this; - } - - /** - * Average build time of the indices in seconds. - * - * @return avgBuildTime - */ - @javax.annotation.Nullable - public Map> getAvgBuildTime() { - return avgBuildTime; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InfrastructureResponseMetrics infrastructureResponseMetrics = (InfrastructureResponseMetrics) o; - return ( - Objects.equals(this.cpuUsage, infrastructureResponseMetrics.cpuUsage) && - Objects.equals(this.ramIndexingUsage, infrastructureResponseMetrics.ramIndexingUsage) && - Objects.equals(this.ramSearchUsage, infrastructureResponseMetrics.ramSearchUsage) && - Objects.equals(this.ssdUsage, infrastructureResponseMetrics.ssdUsage) && - Objects.equals(this.avgBuildTime, infrastructureResponseMetrics.avgBuildTime) - ); - } - - @Override - public int hashCode() { - return Objects.hash(cpuUsage, ramIndexingUsage, ramSearchUsage, ssdUsage, avgBuildTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InfrastructureResponseMetrics {\n"); - sb.append(" cpuUsage: ").append(toIndentedString(cpuUsage)).append("\n"); - sb.append(" ramIndexingUsage: ").append(toIndentedString(ramIndexingUsage)).append("\n"); - sb.append(" ramSearchUsage: ").append(toIndentedString(ramSearchUsage)).append("\n"); - sb.append(" ssdUsage: ").append(toIndentedString(ssdUsage)).append("\n"); - sb.append(" avgBuildTime: ").append(toIndentedString(avgBuildTime)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InventoryResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InventoryResponse.java deleted file mode 100644 index d2fe0b0269..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/InventoryResponse.java +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** InventoryResponse */ -public class InventoryResponse { - - @JsonProperty("inventory") - private List inventory; - - public InventoryResponse setInventory(List inventory) { - this.inventory = inventory; - return this; - } - - public InventoryResponse addInventory(Server inventoryItem) { - if (this.inventory == null) { - this.inventory = new ArrayList<>(); - } - this.inventory.add(inventoryItem); - return this; - } - - /** - * Get inventory - * - * @return inventory - */ - @javax.annotation.Nullable - public List getInventory() { - return inventory; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InventoryResponse inventoryResponse = (InventoryResponse) o; - return Objects.equals(this.inventory, inventoryResponse.inventory); - } - - @Override - public int hashCode() { - return Objects.hash(inventory); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InventoryResponse {\n"); - sb.append(" inventory: ").append(toIndentedString(inventory)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/LatencyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/LatencyResponse.java deleted file mode 100644 index d8a19a90f1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/LatencyResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** LatencyResponse */ -public class LatencyResponse { - - @JsonProperty("metrics") - private LatencyResponseMetrics metrics; - - public LatencyResponse setMetrics(LatencyResponseMetrics metrics) { - this.metrics = metrics; - return this; - } - - /** - * Get metrics - * - * @return metrics - */ - @javax.annotation.Nullable - public LatencyResponseMetrics getMetrics() { - return metrics; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LatencyResponse latencyResponse = (LatencyResponse) o; - return Objects.equals(this.metrics, latencyResponse.metrics); - } - - @Override - public int hashCode() { - return Objects.hash(metrics); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LatencyResponse {\n"); - sb.append(" metrics: ").append(toIndentedString(metrics)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java deleted file mode 100644 index 1d5f856c10..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** LatencyResponseMetrics */ -public class LatencyResponseMetrics { - - @JsonProperty("latency") - private Map> latency; - - public LatencyResponseMetrics setLatency(Map> latency) { - this.latency = latency; - return this; - } - - public LatencyResponseMetrics putLatency(String key, List latencyItem) { - if (this.latency == null) { - this.latency = new HashMap<>(); - } - this.latency.put(key, latencyItem); - return this; - } - - /** - * Get latency - * - * @return latency - */ - @javax.annotation.Nullable - public Map> getLatency() { - return latency; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LatencyResponseMetrics latencyResponseMetrics = (LatencyResponseMetrics) o; - return Objects.equals(this.latency, latencyResponseMetrics.latency); - } - - @Override - public int hashCode() { - return Objects.hash(latency); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LatencyResponseMetrics {\n"); - sb.append(" latency: ").append(toIndentedString(latency)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Metric.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Metric.java deleted file mode 100644 index cd995fd6b8..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Metric.java +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets Metric */ -public enum Metric { - AVG_BUILD_TIME("avg_build_time"), - - SSD_USAGE("ssd_usage"), - - RAM_SEARCH_USAGE("ram_search_usage"), - - RAM_INDEXING_USAGE("ram_indexing_usage"), - - CPU_USAGE("cpu_usage"), - - ALL("*"); - - private final String value; - - Metric(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Metric fromValue(String value) { - for (Metric b : Metric.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Period.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Period.java deleted file mode 100644 index dfd772260a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Period.java +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets Period */ -public enum Period { - MINUTE("minute"), - - HOUR("hour"), - - DAY("day"), - - WEEK("week"), - - MONTH("month"); - - private final String value; - - Period(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Period fromValue(String value) { - for (Period b : Period.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ProbesMetric.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ProbesMetric.java deleted file mode 100644 index 625b062b8f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ProbesMetric.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** ProbesMetric */ -public class ProbesMetric { - - @JsonProperty("t") - private Long t; - - @JsonProperty("v") - private Integer v; - - public ProbesMetric setT(Long t) { - this.t = t; - return this; - } - - /** - * Timestamp in [Unix epoch time](https://wikipedia.org/wiki/Unix_time) in milliseconds. - * - * @return t - */ - @javax.annotation.Nullable - public Long getT() { - return t; - } - - public ProbesMetric setV(Integer v) { - this.v = v; - return this; - } - - /** - * Value of the metric. - * - * @return v - */ - @javax.annotation.Nullable - public Integer getV() { - return v; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProbesMetric probesMetric = (ProbesMetric) o; - return Objects.equals(this.t, probesMetric.t) && Objects.equals(this.v, probesMetric.v); - } - - @Override - public int hashCode() { - return Objects.hash(t, v); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProbesMetric {\n"); - sb.append(" t: ").append(toIndentedString(t)).append("\n"); - sb.append(" v: ").append(toIndentedString(v)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Region.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Region.java deleted file mode 100644 index 61c93b4dd4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Region.java +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The region where the cluster is located. */ -public enum Region { - AU("au"), - - BR("br"), - - CA("ca"), - - DE("de"), - - EU("eu"), - - HK("hk"), - - IN("in"), - - JP("jp"), - - SG("sg"), - - UAE("uae"), - - UK("uk"), - - USC("usc"), - - USE("use"), - - USW("usw"), - - ZA("za"); - - private final String value; - - Region(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Region fromValue(String value) { - for (Region b : Region.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Server.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Server.java deleted file mode 100644 index a40b622c11..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Server.java +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Server */ -public class Server { - - @JsonProperty("name") - private String name; - - @JsonProperty("region") - private Region region; - - @JsonProperty("is_slave") - private Boolean isSlave; - - @JsonProperty("is_replica") - private Boolean isReplica; - - @JsonProperty("cluster") - private String cluster; - - @JsonProperty("status") - private ServerStatus status; - - @JsonProperty("type") - private Type type; - - public Server setName(String name) { - this.name = name; - return this; - } - - /** - * Server name. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public Server setRegion(Region region) { - this.region = region; - return this; - } - - /** - * Get region - * - * @return region - */ - @javax.annotation.Nullable - public Region getRegion() { - return region; - } - - public Server setIsSlave(Boolean isSlave) { - this.isSlave = isSlave; - return this; - } - - /** - * Included to support legacy applications. Do not rely on this attribute being present in the - * response. Use `is_replica` instead. - * - * @return isSlave - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable - public Boolean getIsSlave() { - return isSlave; - } - - public Server setIsReplica(Boolean isReplica) { - this.isReplica = isReplica; - return this; - } - - /** - * Indicates whether this server is a replica of another server. - * - * @return isReplica - */ - @javax.annotation.Nullable - public Boolean getIsReplica() { - return isReplica; - } - - public Server setCluster(String cluster) { - this.cluster = cluster; - return this; - } - - /** - * Name of the cluster to which this server belongs. - * - * @return cluster - */ - @javax.annotation.Nullable - public String getCluster() { - return cluster; - } - - public Server setStatus(ServerStatus status) { - this.status = status; - return this; - } - - /** - * Get status - * - * @return status - */ - @javax.annotation.Nullable - public ServerStatus getStatus() { - return status; - } - - public Server setType(Type type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nullable - public Type getType() { - return type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Server server = (Server) o; - return ( - Objects.equals(this.name, server.name) && - Objects.equals(this.region, server.region) && - Objects.equals(this.isSlave, server.isSlave) && - Objects.equals(this.isReplica, server.isReplica) && - Objects.equals(this.cluster, server.cluster) && - Objects.equals(this.status, server.status) && - Objects.equals(this.type, server.type) - ); - } - - @Override - public int hashCode() { - return Objects.hash(name, region, isSlave, isReplica, cluster, status, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Server {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" region: ").append(toIndentedString(region)).append("\n"); - sb.append(" isSlave: ").append(toIndentedString(isSlave)).append("\n"); - sb.append(" isReplica: ").append(toIndentedString(isReplica)).append("\n"); - sb.append(" cluster: ").append(toIndentedString(cluster)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ServerStatus.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ServerStatus.java deleted file mode 100644 index 01f2778b53..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/ServerStatus.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets ServerStatus */ -public enum ServerStatus { - PRODUCTION("PRODUCTION"); - - private final String value; - - ServerStatus(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ServerStatus fromValue(String value) { - for (ServerStatus b : ServerStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Status.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Status.java deleted file mode 100644 index 5184bb5cf0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Status.java +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Status of the cluster. */ -public enum Status { - OPERATIONAL("operational"), - - DEGRADED_PERFORMANCE("degraded_performance"), - - PARTIAL_OUTAGE("partial_outage"), - - MAJOR_OUTAGE("major_outage"); - - private final String value; - - Status(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Status fromValue(String value) { - for (Status b : Status.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/StatusResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/StatusResponse.java deleted file mode 100644 index 1ad00cbde7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/StatusResponse.java +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** StatusResponse */ -public class StatusResponse { - - @JsonProperty("status") - private Map status; - - public StatusResponse setStatus(Map status) { - this.status = status; - return this; - } - - public StatusResponse putStatus(String key, Status statusItem) { - if (this.status == null) { - this.status = new HashMap<>(); - } - this.status.put(key, statusItem); - return this; - } - - /** - * Get status - * - * @return status - */ - @javax.annotation.Nullable - public Map getStatus() { - return status; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StatusResponse statusResponse = (StatusResponse) o; - return Objects.equals(this.status, statusResponse.status); - } - - @Override - public int hashCode() { - return Objects.hash(status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StatusResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/TimeInner.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/TimeInner.java deleted file mode 100644 index 803d007dfe..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/TimeInner.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** TimeInner */ -public class TimeInner { - - @JsonProperty("t") - private Long t; - - @JsonProperty("v") - private Integer v; - - public TimeInner setT(Long t) { - this.t = t; - return this; - } - - /** - * Timestamp in [Unix epoch time](https://wikipedia.org/wiki/Unix_time) in milliseconds. - * - * @return t - */ - @javax.annotation.Nullable - public Long getT() { - return t; - } - - public TimeInner setV(Integer v) { - this.v = v; - return this; - } - - /** - * Time in ms. - * - * @return v - */ - @javax.annotation.Nullable - public Integer getV() { - return v; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TimeInner timeInner = (TimeInner) o; - return Objects.equals(this.t, timeInner.t) && Objects.equals(this.v, timeInner.v); - } - - @Override - public int hashCode() { - return Objects.hash(t, v); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TimeInner {\n"); - sb.append(" t: ").append(toIndentedString(t)).append("\n"); - sb.append(" v: ").append(toIndentedString(v)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Type.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Type.java deleted file mode 100644 index 2fce928a62..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/monitoring/Type.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.monitoring; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets Type */ -public enum Type { - CLUSTER("cluster"); - - private final String value; - - Type(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Type fromValue(String value) { - for (Type b : Type.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/DeleteUserProfileResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/DeleteUserProfileResponse.java deleted file mode 100644 index 5b22d28b07..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/DeleteUserProfileResponse.java +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.personalization; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** DeleteUserProfileResponse */ -public class DeleteUserProfileResponse { - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("deletedUntil") - private String deletedUntil; - - public DeleteUserProfileResponse setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * userToken representing the user for which to fetch the Personalization profile. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public DeleteUserProfileResponse setDeletedUntil(String deletedUntil) { - this.deletedUntil = deletedUntil; - return this; - } - - /** - * A date until which the data can safely be considered as deleted for the given user. Any data - * received after the `deletedUntil` date will start building a new user profile. - * - * @return deletedUntil - */ - @javax.annotation.Nonnull - public String getDeletedUntil() { - return deletedUntil; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteUserProfileResponse deleteUserProfileResponse = (DeleteUserProfileResponse) o; - return ( - Objects.equals(this.userToken, deleteUserProfileResponse.userToken) && - Objects.equals(this.deletedUntil, deleteUserProfileResponse.deletedUntil) - ); - } - - @Override - public int hashCode() { - return Objects.hash(userToken, deletedUntil); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteUserProfileResponse {\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" deletedUntil: ").append(toIndentedString(deletedUntil)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/ErrorBase.java deleted file mode 100644 index f7616e8e30..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/ErrorBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.personalization; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Error. */ -public class ErrorBase { - - @JsonProperty("message") - private String message; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public ErrorBase setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public ErrorBase setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorBase errorBase = (ErrorBase) o; - return Objects.equals(this.message, errorBase.message) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(message, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorBase {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/EventScoring.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/EventScoring.java deleted file mode 100644 index c49ce631fb..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/EventScoring.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.personalization; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** EventScoring */ -public class EventScoring { - - @JsonProperty("score") - private Integer score; - - @JsonProperty("eventName") - private String eventName; - - @JsonProperty("eventType") - private String eventType; - - public EventScoring setScore(Integer score) { - this.score = score; - return this; - } - - /** - * The score for the event. - * - * @return score - */ - @javax.annotation.Nonnull - public Integer getScore() { - return score; - } - - public EventScoring setEventName(String eventName) { - this.eventName = eventName; - return this; - } - - /** - * The name of the event. - * - * @return eventName - */ - @javax.annotation.Nonnull - public String getEventName() { - return eventName; - } - - public EventScoring setEventType(String eventType) { - this.eventType = eventType; - return this; - } - - /** - * The type of the event. - * - * @return eventType - */ - @javax.annotation.Nonnull - public String getEventType() { - return eventType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EventScoring eventScoring = (EventScoring) o; - return ( - Objects.equals(this.score, eventScoring.score) && - Objects.equals(this.eventName, eventScoring.eventName) && - Objects.equals(this.eventType, eventScoring.eventType) - ); - } - - @Override - public int hashCode() { - return Objects.hash(score, eventName, eventType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EventScoring {\n"); - sb.append(" score: ").append(toIndentedString(score)).append("\n"); - sb.append(" eventName: ").append(toIndentedString(eventName)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/FacetScoring.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/FacetScoring.java deleted file mode 100644 index 18978d0380..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/FacetScoring.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.personalization; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** FacetScoring */ -public class FacetScoring { - - @JsonProperty("score") - private Integer score; - - @JsonProperty("facetName") - private String facetName; - - public FacetScoring setScore(Integer score) { - this.score = score; - return this; - } - - /** - * The score for the event. - * - * @return score - */ - @javax.annotation.Nonnull - public Integer getScore() { - return score; - } - - public FacetScoring setFacetName(String facetName) { - this.facetName = facetName; - return this; - } - - /** - * The name of the facet. - * - * @return facetName - */ - @javax.annotation.Nonnull - public String getFacetName() { - return facetName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FacetScoring facetScoring = (FacetScoring) o; - return Objects.equals(this.score, facetScoring.score) && Objects.equals(this.facetName, facetScoring.facetName); - } - - @Override - public int hashCode() { - return Objects.hash(score, facetName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FacetScoring {\n"); - sb.append(" score: ").append(toIndentedString(score)).append("\n"); - sb.append(" facetName: ").append(toIndentedString(facetName)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/GetUserTokenResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/GetUserTokenResponse.java deleted file mode 100644 index dd1882c208..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/GetUserTokenResponse.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.personalization; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetUserTokenResponse */ -public class GetUserTokenResponse { - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("lastEventAt") - private String lastEventAt; - - @JsonProperty("scores") - private Object scores; - - public GetUserTokenResponse setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * userToken representing the user for which to fetch the Personalization profile. - * - * @return userToken - */ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - public GetUserTokenResponse setLastEventAt(String lastEventAt) { - this.lastEventAt = lastEventAt; - return this; - } - - /** - * Date of last event update. (ISO-8601 format). - * - * @return lastEventAt - */ - @javax.annotation.Nonnull - public String getLastEventAt() { - return lastEventAt; - } - - public GetUserTokenResponse setScores(Object scores) { - this.scores = scores; - return this; - } - - /** - * The userToken scores. - * - * @return scores - */ - @javax.annotation.Nonnull - public Object getScores() { - return scores; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetUserTokenResponse getUserTokenResponse = (GetUserTokenResponse) o; - return ( - Objects.equals(this.userToken, getUserTokenResponse.userToken) && - Objects.equals(this.lastEventAt, getUserTokenResponse.lastEventAt) && - Objects.equals(this.scores, getUserTokenResponse.scores) - ); - } - - @Override - public int hashCode() { - return Objects.hash(userToken, lastEventAt, scores); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetUserTokenResponse {\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" lastEventAt: ").append(toIndentedString(lastEventAt)).append("\n"); - sb.append(" scores: ").append(toIndentedString(scores)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/PersonalizationStrategyParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/PersonalizationStrategyParams.java deleted file mode 100644 index ee9db5ed03..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/PersonalizationStrategyParams.java +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.personalization; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** PersonalizationStrategyParams */ -public class PersonalizationStrategyParams { - - @JsonProperty("eventScoring") - private List eventScoring = new ArrayList<>(); - - @JsonProperty("facetScoring") - private List facetScoring = new ArrayList<>(); - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - public PersonalizationStrategyParams setEventScoring(List eventScoring) { - this.eventScoring = eventScoring; - return this; - } - - public PersonalizationStrategyParams addEventScoring(EventScoring eventScoringItem) { - this.eventScoring.add(eventScoringItem); - return this; - } - - /** - * Scores associated with the events. - * - * @return eventScoring - */ - @javax.annotation.Nonnull - public List getEventScoring() { - return eventScoring; - } - - public PersonalizationStrategyParams setFacetScoring(List facetScoring) { - this.facetScoring = facetScoring; - return this; - } - - public PersonalizationStrategyParams addFacetScoring(FacetScoring facetScoringItem) { - this.facetScoring.add(facetScoringItem); - return this; - } - - /** - * Scores associated with the facets. - * - * @return facetScoring - */ - @javax.annotation.Nonnull - public List getFacetScoring() { - return facetScoring; - } - - public PersonalizationStrategyParams setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * The impact that personalization has on search results: a number between 0 (personalization - * disabled) and 100 (personalization fully enabled). - * - * @return personalizationImpact - */ - @javax.annotation.Nonnull - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PersonalizationStrategyParams personalizationStrategyParams = (PersonalizationStrategyParams) o; - return ( - Objects.equals(this.eventScoring, personalizationStrategyParams.eventScoring) && - Objects.equals(this.facetScoring, personalizationStrategyParams.facetScoring) && - Objects.equals(this.personalizationImpact, personalizationStrategyParams.personalizationImpact) - ); - } - - @Override - public int hashCode() { - return Objects.hash(eventScoring, facetScoring, personalizationImpact); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PersonalizationStrategyParams {\n"); - sb.append(" eventScoring: ").append(toIndentedString(eventScoring)).append("\n"); - sb.append(" facetScoring: ").append(toIndentedString(facetScoring)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/SetPersonalizationStrategyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/SetPersonalizationStrategyResponse.java deleted file mode 100644 index 271d810bd8..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/personalization/SetPersonalizationStrategyResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.personalization; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SetPersonalizationStrategyResponse */ -public class SetPersonalizationStrategyResponse { - - @JsonProperty("message") - private String message; - - public SetPersonalizationStrategyResponse setMessage(String message) { - this.message = message; - return this; - } - - /** - * A message confirming the strategy update. - * - * @return message - */ - @javax.annotation.Nonnull - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SetPersonalizationStrategyResponse setPersonalizationStrategyResponse = (SetPersonalizationStrategyResponse) o; - return Objects.equals(this.message, setPersonalizationStrategyResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SetPersonalizationStrategyResponse {\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ActivateModelInstanceResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ActivateModelInstanceResponse.java deleted file mode 100644 index 82c3cc35a1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ActivateModelInstanceResponse.java +++ /dev/null @@ -1,87 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** ActivateModelInstanceResponse */ -public class ActivateModelInstanceResponse { - - @JsonProperty("modelID") - private String modelID; - - @JsonProperty("updatedAt") - private String updatedAt; - - public ActivateModelInstanceResponse setModelID(String modelID) { - this.modelID = modelID; - return this; - } - - /** - * The ID of the model. - * - * @return modelID - */ - @javax.annotation.Nonnull - public String getModelID() { - return modelID; - } - - public ActivateModelInstanceResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Date of last update (ISO-8601 format). - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ActivateModelInstanceResponse activateModelInstanceResponse = (ActivateModelInstanceResponse) o; - return ( - Objects.equals(this.modelID, activateModelInstanceResponse.modelID) && - Objects.equals(this.updatedAt, activateModelInstanceResponse.updatedAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(modelID, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActivateModelInstanceResponse {\n"); - sb.append(" modelID: ").append(toIndentedString(modelID)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ActivateModelParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ActivateModelParams.java deleted file mode 100644 index 0eece3b071..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ActivateModelParams.java +++ /dev/null @@ -1,185 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ActivateModelParams */ -public class ActivateModelParams { - - @JsonProperty("type") - private ModelsToRetrieve type; - - @JsonProperty("name") - private String name; - - @JsonProperty("sourceID") - private String sourceID; - - @JsonProperty("index") - private String index; - - @JsonProperty("modelAttributes") - private List modelAttributes; - - @JsonProperty("contentAttributes") - private List contentAttributes; - - public ActivateModelParams setType(ModelsToRetrieve type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - public ModelsToRetrieve getType() { - return type; - } - - public ActivateModelParams setName(String name) { - this.name = name; - return this; - } - - /** - * The model’s instance name. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public ActivateModelParams setSourceID(String sourceID) { - this.sourceID = sourceID; - return this; - } - - /** - * The data source ID, as returned by the (external) sources API. - * - * @return sourceID - */ - @javax.annotation.Nonnull - public String getSourceID() { - return sourceID; - } - - public ActivateModelParams setIndex(String index) { - this.index = index; - return this; - } - - /** - * The index name. - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ActivateModelParams setModelAttributes(List modelAttributes) { - this.modelAttributes = modelAttributes; - return this; - } - - public ActivateModelParams addModelAttributes(String modelAttributesItem) { - if (this.modelAttributes == null) { - this.modelAttributes = new ArrayList<>(); - } - this.modelAttributes.add(modelAttributesItem); - return this; - } - - /** - * Get modelAttributes - * - * @return modelAttributes - */ - @javax.annotation.Nullable - public List getModelAttributes() { - return modelAttributes; - } - - public ActivateModelParams setContentAttributes(List contentAttributes) { - this.contentAttributes = contentAttributes; - return this; - } - - public ActivateModelParams addContentAttributes(String contentAttributesItem) { - if (this.contentAttributes == null) { - this.contentAttributes = new ArrayList<>(); - } - this.contentAttributes.add(contentAttributesItem); - return this; - } - - /** - * Get contentAttributes - * - * @return contentAttributes - */ - @javax.annotation.Nullable - public List getContentAttributes() { - return contentAttributes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ActivateModelParams activateModelParams = (ActivateModelParams) o; - return ( - Objects.equals(this.type, activateModelParams.type) && - Objects.equals(this.name, activateModelParams.name) && - Objects.equals(this.sourceID, activateModelParams.sourceID) && - Objects.equals(this.index, activateModelParams.index) && - Objects.equals(this.modelAttributes, activateModelParams.modelAttributes) && - Objects.equals(this.contentAttributes, activateModelParams.contentAttributes) - ); - } - - @Override - public int hashCode() { - return Objects.hash(type, name, sourceID, index, modelAttributes, contentAttributes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActivateModelParams {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" sourceID: ").append(toIndentedString(sourceID)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" modelAttributes: ").append(toIndentedString(modelAttributes)).append("\n"); - sb.append(" contentAttributes: ").append(toIndentedString(contentAttributes)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Affinity.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Affinity.java deleted file mode 100644 index fda4c8a6bc..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Affinity.java +++ /dev/null @@ -1,107 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Affinity */ -public class Affinity { - - @JsonProperty("name") - private String name; - - @JsonProperty("value") - private String value; - - @JsonProperty("probability") - private Double probability; - - public Affinity setName(String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public Affinity setValue(String value) { - this.value = value; - return this; - } - - /** - * Get value - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public Affinity setProbability(Double probability) { - this.probability = probability; - return this; - } - - /** - * Get probability minimum: 0 maximum: 1 - * - * @return probability - */ - @javax.annotation.Nonnull - public Double getProbability() { - return probability; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Affinity affinity = (Affinity) o; - return ( - Objects.equals(this.name, affinity.name) && - Objects.equals(this.value, affinity.value) && - Objects.equals(this.probability, affinity.probability) - ); - } - - @Override - public int hashCode() { - return Objects.hash(name, value, probability); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Affinity {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" probability: ").append(toIndentedString(probability)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/AllParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/AllParams.java deleted file mode 100644 index 8c7e657bda..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/AllParams.java +++ /dev/null @@ -1,104 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** AllParams */ -public class AllParams { - - @JsonProperty("modelsToRetrieve") - private List modelsToRetrieve; - - @JsonProperty("typesToRetrieve") - private List typesToRetrieve; - - public AllParams setModelsToRetrieve(List modelsToRetrieve) { - this.modelsToRetrieve = modelsToRetrieve; - return this; - } - - public AllParams addModelsToRetrieve(ModelsToRetrieve modelsToRetrieveItem) { - if (this.modelsToRetrieve == null) { - this.modelsToRetrieve = new ArrayList<>(); - } - this.modelsToRetrieve.add(modelsToRetrieveItem); - return this; - } - - /** - * Get modelsToRetrieve - * - * @return modelsToRetrieve - */ - @javax.annotation.Nullable - public List getModelsToRetrieve() { - return modelsToRetrieve; - } - - public AllParams setTypesToRetrieve(List typesToRetrieve) { - this.typesToRetrieve = typesToRetrieve; - return this; - } - - public AllParams addTypesToRetrieve(TypesToRetrieve typesToRetrieveItem) { - if (this.typesToRetrieve == null) { - this.typesToRetrieve = new ArrayList<>(); - } - this.typesToRetrieve.add(typesToRetrieveItem); - return this; - } - - /** - * Get typesToRetrieve - * - * @return typesToRetrieve - */ - @javax.annotation.Nullable - public List getTypesToRetrieve() { - return typesToRetrieve; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AllParams allParams = (AllParams) o; - return ( - Objects.equals(this.modelsToRetrieve, allParams.modelsToRetrieve) && Objects.equals(this.typesToRetrieve, allParams.typesToRetrieve) - ); - } - - @Override - public int hashCode() { - return Objects.hash(modelsToRetrieve, typesToRetrieve); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AllParams {\n"); - sb.append(" modelsToRetrieve: ").append(toIndentedString(modelsToRetrieve)).append("\n"); - sb.append(" typesToRetrieve: ").append(toIndentedString(typesToRetrieve)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/AllUpdateSegmentParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/AllUpdateSegmentParams.java deleted file mode 100644 index f75c89f2d6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/AllUpdateSegmentParams.java +++ /dev/null @@ -1,84 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** AllUpdateSegmentParams */ -public class AllUpdateSegmentParams { - - @JsonProperty("name") - private String name; - - @JsonProperty("conditions") - private String conditions; - - public AllUpdateSegmentParams setName(String name) { - this.name = name; - return this; - } - - /** - * The name or description of the segment. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public AllUpdateSegmentParams setConditions(String conditions) { - this.conditions = conditions; - return this; - } - - /** - * The filters that define the segment, defined in the same way as filters for Rules. - * - * @return conditions - */ - @javax.annotation.Nullable - public String getConditions() { - return conditions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AllUpdateSegmentParams allUpdateSegmentParams = (AllUpdateSegmentParams) o; - return Objects.equals(this.name, allUpdateSegmentParams.name) && Objects.equals(this.conditions, allUpdateSegmentParams.conditions); - } - - @Override - public int hashCode() { - return Objects.hash(name, conditions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AllUpdateSegmentParams {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" conditions: ").append(toIndentedString(conditions)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CompatibleSources.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CompatibleSources.java deleted file mode 100644 index f128f11100..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CompatibleSources.java +++ /dev/null @@ -1,39 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets compatibleSources */ -public enum CompatibleSources { - BIGQUERY("bigquery"); - - private final String value; - - CompatibleSources(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static CompatibleSources fromValue(String value) { - for (CompatibleSources b : CompatibleSources.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CreateSegmentParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CreateSegmentParams.java deleted file mode 100644 index d7c850188d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CreateSegmentParams.java +++ /dev/null @@ -1,84 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** CreateSegmentParams */ -public class CreateSegmentParams { - - @JsonProperty("name") - private String name; - - @JsonProperty("conditions") - private String conditions; - - public CreateSegmentParams setName(String name) { - this.name = name; - return this; - } - - /** - * The name or description of the segment. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public CreateSegmentParams setConditions(String conditions) { - this.conditions = conditions; - return this; - } - - /** - * The filters that define the segment, defined in the same way as filters for Rules. - * - * @return conditions - */ - @javax.annotation.Nonnull - public String getConditions() { - return conditions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSegmentParams createSegmentParams = (CreateSegmentParams) o; - return Objects.equals(this.name, createSegmentParams.name) && Objects.equals(this.conditions, createSegmentParams.conditions); - } - - @Override - public int hashCode() { - return Objects.hash(name, conditions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSegmentParams {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" conditions: ").append(toIndentedString(conditions)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CreateSegmentResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CreateSegmentResponse.java deleted file mode 100644 index cb852751fb..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/CreateSegmentResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** CreateSegmentResponse */ -public class CreateSegmentResponse { - - @JsonProperty("segmentID") - private String segmentID; - - @JsonProperty("updatedAt") - private String updatedAt; - - public CreateSegmentResponse setSegmentID(String segmentID) { - this.segmentID = segmentID; - return this; - } - - /** - * The ID of the segment. - * - * @return segmentID - */ - @javax.annotation.Nonnull - public String getSegmentID() { - return segmentID; - } - - public CreateSegmentResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * The date and time at which the segment was last updated. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSegmentResponse createSegmentResponse = (CreateSegmentResponse) o; - return ( - Objects.equals(this.segmentID, createSegmentResponse.segmentID) && Objects.equals(this.updatedAt, createSegmentResponse.updatedAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(segmentID, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSegmentResponse {\n"); - sb.append(" segmentID: ").append(toIndentedString(segmentID)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteModelInstanceResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteModelInstanceResponse.java deleted file mode 100644 index 45d66c0e6b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteModelInstanceResponse.java +++ /dev/null @@ -1,87 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** DeleteModelInstanceResponse */ -public class DeleteModelInstanceResponse { - - @JsonProperty("modelID") - private String modelID; - - @JsonProperty("deletedUntil") - private String deletedUntil; - - public DeleteModelInstanceResponse setModelID(String modelID) { - this.modelID = modelID; - return this; - } - - /** - * The ID of the model. - * - * @return modelID - */ - @javax.annotation.Nonnull - public String getModelID() { - return modelID; - } - - public DeleteModelInstanceResponse setDeletedUntil(String deletedUntil) { - this.deletedUntil = deletedUntil; - return this; - } - - /** - * The date until which you can safely consider the data as being deleted. - * - * @return deletedUntil - */ - @javax.annotation.Nonnull - public String getDeletedUntil() { - return deletedUntil; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteModelInstanceResponse deleteModelInstanceResponse = (DeleteModelInstanceResponse) o; - return ( - Objects.equals(this.modelID, deleteModelInstanceResponse.modelID) && - Objects.equals(this.deletedUntil, deleteModelInstanceResponse.deletedUntil) - ); - } - - @Override - public int hashCode() { - return Objects.hash(modelID, deletedUntil); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteModelInstanceResponse {\n"); - sb.append(" modelID: ").append(toIndentedString(modelID)).append("\n"); - sb.append(" deletedUntil: ").append(toIndentedString(deletedUntil)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteSegmentResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteSegmentResponse.java deleted file mode 100644 index c2856f0097..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteSegmentResponse.java +++ /dev/null @@ -1,87 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** DeleteSegmentResponse */ -public class DeleteSegmentResponse { - - @JsonProperty("segmentID") - private String segmentID; - - @JsonProperty("deletedUntil") - private String deletedUntil; - - public DeleteSegmentResponse setSegmentID(String segmentID) { - this.segmentID = segmentID; - return this; - } - - /** - * The ID of the segment. - * - * @return segmentID - */ - @javax.annotation.Nonnull - public String getSegmentID() { - return segmentID; - } - - public DeleteSegmentResponse setDeletedUntil(String deletedUntil) { - this.deletedUntil = deletedUntil; - return this; - } - - /** - * The date and time at which the segment will be re-ingested. - * - * @return deletedUntil - */ - @javax.annotation.Nonnull - public String getDeletedUntil() { - return deletedUntil; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSegmentResponse deleteSegmentResponse = (DeleteSegmentResponse) o; - return ( - Objects.equals(this.segmentID, deleteSegmentResponse.segmentID) && - Objects.equals(this.deletedUntil, deleteSegmentResponse.deletedUntil) - ); - } - - @Override - public int hashCode() { - return Objects.hash(segmentID, deletedUntil); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSegmentResponse {\n"); - sb.append(" segmentID: ").append(toIndentedString(segmentID)).append("\n"); - sb.append(" deletedUntil: ").append(toIndentedString(deletedUntil)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteUserProfileResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteUserProfileResponse.java deleted file mode 100644 index 851c601203..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/DeleteUserProfileResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** DeleteUserProfileResponse */ -public class DeleteUserProfileResponse { - - @JsonProperty("user") - private String user; - - @JsonProperty("deletedUntil") - private String deletedUntil; - - public DeleteUserProfileResponse setUser(String user) { - this.user = user; - return this; - } - - /** - * The ID of the user that was deleted. - * - * @return user - */ - @javax.annotation.Nonnull - public String getUser() { - return user; - } - - public DeleteUserProfileResponse setDeletedUntil(String deletedUntil) { - this.deletedUntil = deletedUntil; - return this; - } - - /** - * The time the same user ID will be imported again when the data is ingested. - * - * @return deletedUntil - */ - @javax.annotation.Nonnull - public String getDeletedUntil() { - return deletedUntil; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteUserProfileResponse deleteUserProfileResponse = (DeleteUserProfileResponse) o; - return ( - Objects.equals(this.user, deleteUserProfileResponse.user) && Objects.equals(this.deletedUntil, deleteUserProfileResponse.deletedUntil) - ); - } - - @Override - public int hashCode() { - return Objects.hash(user, deletedUntil); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteUserProfileResponse {\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append(" deletedUntil: ").append(toIndentedString(deletedUntil)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Error.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Error.java deleted file mode 100644 index c9e39d9090..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Error.java +++ /dev/null @@ -1,65 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** The error when the model is not available. */ -public class Error { - - @JsonProperty("error") - private String error; - - public Error setError(String error) { - this.error = error; - return this; - } - - /** - * Get error - * - * @return error - */ - @javax.annotation.Nonnull - public String getError() { - return error; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Error error = (Error) o; - return Objects.equals(this.error, error.error); - } - - @Override - public int hashCode() { - return Objects.hash(error); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Error {\n"); - sb.append(" error: ").append(toIndentedString(error)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ErrorBase.java deleted file mode 100644 index 6802f83bd0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ErrorBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Error. */ -public class ErrorBase { - - @JsonProperty("message") - private String message; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public ErrorBase setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public ErrorBase setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorBase errorBase = (ErrorBase) o; - return Objects.equals(this.message, errorBase.message) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(message, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorBase {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FetchAllUserProfilesParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FetchAllUserProfilesParams.java deleted file mode 100644 index e510b5c489..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FetchAllUserProfilesParams.java +++ /dev/null @@ -1,319 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; - -/** FetchAllUserProfilesParams */ -@JsonDeserialize(using = FetchAllUserProfilesParams.FetchAllUserProfilesParamsDeserializer.class) -@JsonSerialize(using = FetchAllUserProfilesParams.FetchAllUserProfilesParamsSerializer.class) -public abstract class FetchAllUserProfilesParams implements CompoundType { - - public static FetchAllUserProfilesParams of(LimitParam inside) { - return new FetchAllUserProfilesParamsLimitParam(inside); - } - - public static FetchAllUserProfilesParams of(ModelsToRetrieveParam inside) { - return new FetchAllUserProfilesParamsModelsToRetrieveParam(inside); - } - - public static FetchAllUserProfilesParams of(NextPageTokenParam inside) { - return new FetchAllUserProfilesParamsNextPageTokenParam(inside); - } - - public static FetchAllUserProfilesParams of(PreviousPageTokenParam inside) { - return new FetchAllUserProfilesParamsPreviousPageTokenParam(inside); - } - - public static FetchAllUserProfilesParams of(TypesToRetrieveParam inside) { - return new FetchAllUserProfilesParamsTypesToRetrieveParam(inside); - } - - public static class FetchAllUserProfilesParamsSerializer extends StdSerializer { - - public FetchAllUserProfilesParamsSerializer(Class t) { - super(t); - } - - public FetchAllUserProfilesParamsSerializer() { - this(null); - } - - @Override - public void serialize(FetchAllUserProfilesParams value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class FetchAllUserProfilesParamsDeserializer extends StdDeserializer { - - public FetchAllUserProfilesParamsDeserializer() { - this(FetchAllUserProfilesParams.class); - } - - public FetchAllUserProfilesParamsDeserializer(Class vc) { - super(vc); - } - - @Override - public FetchAllUserProfilesParams deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - JsonNode tree = jp.readValueAsTree(); - FetchAllUserProfilesParams deserialized = null; - - int match = 0; - JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - String currentType = ""; - // deserialize LimitParam - try { - boolean attemptParsing = true; - currentType = "LimitParam"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - FetchAllUserProfilesParams.of((LimitParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - FetchAllUserProfilesParams.of((LimitParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf LimitParam (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - // deserialize ModelsToRetrieveParam - try { - boolean attemptParsing = true; - currentType = "ModelsToRetrieveParam"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - FetchAllUserProfilesParams.of( - (ModelsToRetrieveParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - FetchAllUserProfilesParams.of( - (ModelsToRetrieveParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf ModelsToRetrieveParam (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - // deserialize NextPageTokenParam - try { - boolean attemptParsing = true; - currentType = "NextPageTokenParam"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - FetchAllUserProfilesParams.of( - (NextPageTokenParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - FetchAllUserProfilesParams.of( - (NextPageTokenParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf NextPageTokenParam (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - // deserialize PreviousPageTokenParam - try { - boolean attemptParsing = true; - currentType = "PreviousPageTokenParam"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - FetchAllUserProfilesParams.of( - (PreviousPageTokenParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - FetchAllUserProfilesParams.of( - (PreviousPageTokenParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println( - "Failed to deserialize oneOf PreviousPageTokenParam (error: " + e.getMessage() + ") (type: " + currentType + ")" - ); - } - - // deserialize TypesToRetrieveParam - try { - boolean attemptParsing = true; - currentType = "TypesToRetrieveParam"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - FetchAllUserProfilesParams.of( - (TypesToRetrieveParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - FetchAllUserProfilesParams.of( - (TypesToRetrieveParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf TypesToRetrieveParam (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - if (match == 1) { - return deserialized; - } - throw new IOException( - String.format("Failed deserialization for FetchAllUserProfilesParams: %d classes match result," + " expected 1", match) - ); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public FetchAllUserProfilesParams getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "FetchAllUserProfilesParams cannot be null"); - } - } -} - -class FetchAllUserProfilesParamsLimitParam extends FetchAllUserProfilesParams { - - private final LimitParam insideValue; - - FetchAllUserProfilesParamsLimitParam(LimitParam insideValue) { - this.insideValue = insideValue; - } - - @Override - public LimitParam getInsideValue() { - return insideValue; - } -} - -class FetchAllUserProfilesParamsModelsToRetrieveParam extends FetchAllUserProfilesParams { - - private final ModelsToRetrieveParam insideValue; - - FetchAllUserProfilesParamsModelsToRetrieveParam(ModelsToRetrieveParam insideValue) { - this.insideValue = insideValue; - } - - @Override - public ModelsToRetrieveParam getInsideValue() { - return insideValue; - } -} - -class FetchAllUserProfilesParamsNextPageTokenParam extends FetchAllUserProfilesParams { - - private final NextPageTokenParam insideValue; - - FetchAllUserProfilesParamsNextPageTokenParam(NextPageTokenParam insideValue) { - this.insideValue = insideValue; - } - - @Override - public NextPageTokenParam getInsideValue() { - return insideValue; - } -} - -class FetchAllUserProfilesParamsPreviousPageTokenParam extends FetchAllUserProfilesParams { - - private final PreviousPageTokenParam insideValue; - - FetchAllUserProfilesParamsPreviousPageTokenParam(PreviousPageTokenParam insideValue) { - this.insideValue = insideValue; - } - - @Override - public PreviousPageTokenParam getInsideValue() { - return insideValue; - } -} - -class FetchAllUserProfilesParamsTypesToRetrieveParam extends FetchAllUserProfilesParams { - - private final TypesToRetrieveParam insideValue; - - FetchAllUserProfilesParamsTypesToRetrieveParam(TypesToRetrieveParam insideValue) { - this.insideValue = insideValue; - } - - @Override - public TypesToRetrieveParam getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FetchAllUserProfilesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FetchAllUserProfilesResponse.java deleted file mode 100644 index d6c819ba1d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FetchAllUserProfilesResponse.java +++ /dev/null @@ -1,120 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** FetchAllUserProfilesResponse */ -public class FetchAllUserProfilesResponse { - - @JsonProperty("users") - private List users = new ArrayList<>(); - - @JsonProperty("previousPageToken") - private String previousPageToken; - - @JsonProperty("nextPageToken") - private String nextPageToken; - - public FetchAllUserProfilesResponse setUsers(List users) { - this.users = users; - return this; - } - - public FetchAllUserProfilesResponse addUsers(UserProfile usersItem) { - this.users.add(usersItem); - return this; - } - - /** - * Get users - * - * @return users - */ - @javax.annotation.Nonnull - public List getUsers() { - return users; - } - - public FetchAllUserProfilesResponse setPreviousPageToken(String previousPageToken) { - this.previousPageToken = previousPageToken; - return this; - } - - /** - * The token is used to navigate backward in the user list. To navigate from the current user list - * to the previous page, the API generates the previous page token and it sends the token in the - * response, beside the current user list. NOTE: This body param cannot be used with - * `nextPageToken` at the same time. - * - * @return previousPageToken - */ - @javax.annotation.Nullable - public String getPreviousPageToken() { - return previousPageToken; - } - - public FetchAllUserProfilesResponse setNextPageToken(String nextPageToken) { - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token is used to navigate forward in the user list. To navigate from the current user list - * to the next page, the API generates the next page token and it sends the token in the response, - * beside the current user list. NOTE: This body param cannot be used with `previousPageToken` at - * the same time. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public String getNextPageToken() { - return nextPageToken; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchAllUserProfilesResponse fetchAllUserProfilesResponse = (FetchAllUserProfilesResponse) o; - return ( - Objects.equals(this.users, fetchAllUserProfilesResponse.users) && - Objects.equals(this.previousPageToken, fetchAllUserProfilesResponse.previousPageToken) && - Objects.equals(this.nextPageToken, fetchAllUserProfilesResponse.nextPageToken) - ); - } - - @Override - public int hashCode() { - return Objects.hash(users, previousPageToken, nextPageToken); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchAllUserProfilesResponse {\n"); - sb.append(" users: ").append(toIndentedString(users)).append("\n"); - sb.append(" previousPageToken: ").append(toIndentedString(previousPageToken)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FunnelStage.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FunnelStage.java deleted file mode 100644 index ccb1fac348..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/FunnelStage.java +++ /dev/null @@ -1,84 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** FunnelStage */ -public class FunnelStage { - - @JsonProperty("name") - private String name; - - @JsonProperty("probability") - private Double probability; - - public FunnelStage setName(String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public FunnelStage setProbability(Double probability) { - this.probability = probability; - return this; - } - - /** - * Get probability minimum: 0 maximum: 1 - * - * @return probability - */ - @javax.annotation.Nonnull - public Double getProbability() { - return probability; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FunnelStage funnelStage = (FunnelStage) o; - return Objects.equals(this.name, funnelStage.name) && Objects.equals(this.probability, funnelStage.probability); - } - - @Override - public int hashCode() { - return Objects.hash(name, probability); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FunnelStage {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" probability: ").append(toIndentedString(probability)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetAvailableModelTypesResponseInner.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetAvailableModelTypesResponseInner.java deleted file mode 100644 index af8c2de74f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetAvailableModelTypesResponseInner.java +++ /dev/null @@ -1,134 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetAvailableModelTypesResponseInner */ -public class GetAvailableModelTypesResponseInner { - - @JsonProperty("name") - private String name; - - @JsonProperty("type") - private String type; - - @JsonProperty("compatibleSources") - private List compatibleSources = new ArrayList<>(); - - @JsonProperty("dataRequirements") - private GetAvailableModelTypesResponseInnerDataRequirements dataRequirements; - - public GetAvailableModelTypesResponseInner setName(String name) { - this.name = name; - return this; - } - - /** - * Name of the model. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public GetAvailableModelTypesResponseInner setType(String type) { - this.type = type; - return this; - } - - /** - * Description of the model. - * - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public GetAvailableModelTypesResponseInner setCompatibleSources(List compatibleSources) { - this.compatibleSources = compatibleSources; - return this; - } - - public GetAvailableModelTypesResponseInner addCompatibleSources(CompatibleSources compatibleSourcesItem) { - this.compatibleSources.add(compatibleSourcesItem); - return this; - } - - /** - * Get compatibleSources - * - * @return compatibleSources - */ - @javax.annotation.Nonnull - public List getCompatibleSources() { - return compatibleSources; - } - - public GetAvailableModelTypesResponseInner setDataRequirements(GetAvailableModelTypesResponseInnerDataRequirements dataRequirements) { - this.dataRequirements = dataRequirements; - return this; - } - - /** - * Get dataRequirements - * - * @return dataRequirements - */ - @javax.annotation.Nonnull - public GetAvailableModelTypesResponseInnerDataRequirements getDataRequirements() { - return dataRequirements; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAvailableModelTypesResponseInner getAvailableModelTypesResponseInner = (GetAvailableModelTypesResponseInner) o; - return ( - Objects.equals(this.name, getAvailableModelTypesResponseInner.name) && - Objects.equals(this.type, getAvailableModelTypesResponseInner.type) && - Objects.equals(this.compatibleSources, getAvailableModelTypesResponseInner.compatibleSources) && - Objects.equals(this.dataRequirements, getAvailableModelTypesResponseInner.dataRequirements) - ); - } - - @Override - public int hashCode() { - return Objects.hash(name, type, compatibleSources, dataRequirements); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetAvailableModelTypesResponseInner {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" compatibleSources: ").append(toIndentedString(compatibleSources)).append("\n"); - sb.append(" dataRequirements: ").append(toIndentedString(dataRequirements)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetAvailableModelTypesResponseInnerDataRequirements.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetAvailableModelTypesResponseInnerDataRequirements.java deleted file mode 100644 index e39612109c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetAvailableModelTypesResponseInnerDataRequirements.java +++ /dev/null @@ -1,88 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetAvailableModelTypesResponseInnerDataRequirements */ -public class GetAvailableModelTypesResponseInnerDataRequirements { - - @JsonProperty("minUsers") - private Integer minUsers; - - @JsonProperty("minDays") - private Integer minDays; - - public GetAvailableModelTypesResponseInnerDataRequirements setMinUsers(Integer minUsers) { - this.minUsers = minUsers; - return this; - } - - /** - * Minimum number of users required for this model. - * - * @return minUsers - */ - @javax.annotation.Nonnull - public Integer getMinUsers() { - return minUsers; - } - - public GetAvailableModelTypesResponseInnerDataRequirements setMinDays(Integer minDays) { - this.minDays = minDays; - return this; - } - - /** - * Minimum number of days model needs to run. - * - * @return minDays - */ - @javax.annotation.Nonnull - public Integer getMinDays() { - return minDays; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAvailableModelTypesResponseInnerDataRequirements getAvailableModelTypesResponseInnerDataRequirements = - (GetAvailableModelTypesResponseInnerDataRequirements) o; - return ( - Objects.equals(this.minUsers, getAvailableModelTypesResponseInnerDataRequirements.minUsers) && - Objects.equals(this.minDays, getAvailableModelTypesResponseInnerDataRequirements.minDays) - ); - } - - @Override - public int hashCode() { - return Objects.hash(minUsers, minDays); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetAvailableModelTypesResponseInnerDataRequirements {\n"); - sb.append(" minUsers: ").append(toIndentedString(minUsers)).append("\n"); - sb.append(" minDays: ").append(toIndentedString(minDays)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetModelInstanceConfigStatus.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetModelInstanceConfigStatus.java deleted file mode 100644 index 5993fa7542..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetModelInstanceConfigStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * `pending` - model has just been created and the pipelines are being set up for the first train & - * inference. \\ `active` - model is running and generating predictions. \\ `invalid` - model has - * failed training (ex. can’t retrieve data from source). An additional `errorMessage` field will be - * set for this status. \\ `inactive` - model has been deactivated from the dashboard. Pipelines - * still exist but they are not currently running. - */ -public enum GetModelInstanceConfigStatus { - PENDING("pending"), - - ACTIVE("active"), - - INVALID("invalid"), - - INACTIVE("inactive"); - - private final String value; - - GetModelInstanceConfigStatus(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static GetModelInstanceConfigStatus fromValue(String value) { - for (GetModelInstanceConfigStatus b : GetModelInstanceConfigStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetModelMetricsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetModelMetricsResponse.java deleted file mode 100644 index b9b32afd4c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetModelMetricsResponse.java +++ /dev/null @@ -1,91 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetModelMetricsResponse */ -public class GetModelMetricsResponse { - - @JsonProperty("modelID") - private String modelID; - - @JsonProperty("metrics") - private List metrics = new ArrayList<>(); - - public GetModelMetricsResponse setModelID(String modelID) { - this.modelID = modelID; - return this; - } - - /** - * The ID of the model. - * - * @return modelID - */ - @javax.annotation.Nonnull - public String getModelID() { - return modelID; - } - - public GetModelMetricsResponse setMetrics(List metrics) { - this.metrics = metrics; - return this; - } - - public GetModelMetricsResponse addMetrics(ModelMetrics metricsItem) { - this.metrics.add(metricsItem); - return this; - } - - /** - * Get metrics - * - * @return metrics - */ - @javax.annotation.Nonnull - public List getMetrics() { - return metrics; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetModelMetricsResponse getModelMetricsResponse = (GetModelMetricsResponse) o; - return Objects.equals(this.modelID, getModelMetricsResponse.modelID) && Objects.equals(this.metrics, getModelMetricsResponse.metrics); - } - - @Override - public int hashCode() { - return Objects.hash(modelID, metrics); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetModelMetricsResponse {\n"); - sb.append(" modelID: ").append(toIndentedString(modelID)).append("\n"); - sb.append(" metrics: ").append(toIndentedString(metrics)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetSegmentUsersResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetSegmentUsersResponse.java deleted file mode 100644 index 5f91ca3d4b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetSegmentUsersResponse.java +++ /dev/null @@ -1,140 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetSegmentUsersResponse */ -public class GetSegmentUsersResponse { - - @JsonProperty("segmentID") - private String segmentID; - - @JsonProperty("users") - private List users = new ArrayList<>(); - - @JsonProperty("previousPageToken") - private String previousPageToken; - - @JsonProperty("nextPageToken") - private String nextPageToken; - - public GetSegmentUsersResponse setSegmentID(String segmentID) { - this.segmentID = segmentID; - return this; - } - - /** - * The ID of the segment. - * - * @return segmentID - */ - @javax.annotation.Nonnull - public String getSegmentID() { - return segmentID; - } - - public GetSegmentUsersResponse setUsers(List users) { - this.users = users; - return this; - } - - public GetSegmentUsersResponse addUsers(UserProfile usersItem) { - this.users.add(usersItem); - return this; - } - - /** - * Get users - * - * @return users - */ - @javax.annotation.Nonnull - public List getUsers() { - return users; - } - - public GetSegmentUsersResponse setPreviousPageToken(String previousPageToken) { - this.previousPageToken = previousPageToken; - return this; - } - - /** - * The token is used to navigate backward in the user list. To navigate from the current user list - * to the previous page, the API generates the previous page token and it sends the token in the - * response, beside the current user list. NOTE: This body param cannot be used with - * `nextPageToken` at the same time. - * - * @return previousPageToken - */ - @javax.annotation.Nullable - public String getPreviousPageToken() { - return previousPageToken; - } - - public GetSegmentUsersResponse setNextPageToken(String nextPageToken) { - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token is used to navigate forward in the user list. To navigate from the current user list - * to the next page, the API generates the next page token and it sends the token in the response, - * beside the current user list. NOTE: This body param cannot be used with `previousPageToken` at - * the same time. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public String getNextPageToken() { - return nextPageToken; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetSegmentUsersResponse getSegmentUsersResponse = (GetSegmentUsersResponse) o; - return ( - Objects.equals(this.segmentID, getSegmentUsersResponse.segmentID) && - Objects.equals(this.users, getSegmentUsersResponse.users) && - Objects.equals(this.previousPageToken, getSegmentUsersResponse.previousPageToken) && - Objects.equals(this.nextPageToken, getSegmentUsersResponse.nextPageToken) - ); - } - - @Override - public int hashCode() { - return Objects.hash(segmentID, users, previousPageToken, nextPageToken); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetSegmentUsersResponse {\n"); - sb.append(" segmentID: ").append(toIndentedString(segmentID)).append("\n"); - sb.append(" users: ").append(toIndentedString(users)).append("\n"); - sb.append(" previousPageToken: ").append(toIndentedString(previousPageToken)).append("\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/LimitParam.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/LimitParam.java deleted file mode 100644 index 88ab0571c6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/LimitParam.java +++ /dev/null @@ -1,65 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** LimitParam */ -public class LimitParam { - - @JsonProperty("limit") - private Integer limit; - - public LimitParam setLimit(Integer limit) { - this.limit = limit; - return this; - } - - /** - * Get limit - * - * @return limit - */ - @javax.annotation.Nullable - public Integer getLimit() { - return limit; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LimitParam limitParam = (LimitParam) o; - return Objects.equals(this.limit, limitParam.limit); - } - - @Override - public int hashCode() { - return Objects.hash(limit); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LimitParam {\n"); - sb.append(" limit: ").append(toIndentedString(limit)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelAttributes.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelAttributes.java deleted file mode 100644 index 07a3f2bce0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelAttributes.java +++ /dev/null @@ -1,94 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ModelAttributes */ -public class ModelAttributes { - - @JsonProperty("name") - private String name; - - @JsonProperty("values") - private List values; - - public ModelAttributes setName(String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public ModelAttributes setValues(List values) { - this.values = values; - return this; - } - - public ModelAttributes addValues(String valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); - return this; - } - - /** - * Get values - * - * @return values - */ - @javax.annotation.Nullable - public List getValues() { - return values; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelAttributes modelAttributes = (ModelAttributes) o; - return Objects.equals(this.name, modelAttributes.name) && Objects.equals(this.values, modelAttributes.values); - } - - @Override - public int hashCode() { - return Objects.hash(name, values); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelAttributes {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelInstance.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelInstance.java deleted file mode 100644 index 47757ba437..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelInstance.java +++ /dev/null @@ -1,297 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ModelInstance */ -public class ModelInstance { - - @JsonProperty("modelID") - private String modelID; - - @JsonProperty("name") - private String name; - - @JsonProperty("type") - private ModelsToRetrieve type; - - @JsonProperty("sourceID") - private String sourceID; - - @JsonProperty("index") - private String index; - - @JsonProperty("modelAttributes") - private List modelAttributes; - - @JsonProperty("contentAttributes") - private List contentAttributes; - - @JsonProperty("lastTrained") - private String lastTrained; - - @JsonProperty("lastInference") - private String lastInference; - - @JsonProperty("errorMessage") - private String errorMessage; - - @JsonProperty("modelStatus") - private GetModelInstanceConfigStatus modelStatus; - - public ModelInstance setModelID(String modelID) { - this.modelID = modelID; - return this; - } - - /** - * ID of the model. - * - * @return modelID - */ - @javax.annotation.Nonnull - public String getModelID() { - return modelID; - } - - public ModelInstance setName(String name) { - this.name = name; - return this; - } - - /** - * Name of model instance. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public ModelInstance setType(ModelsToRetrieve type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - public ModelsToRetrieve getType() { - return type; - } - - public ModelInstance setSourceID(String sourceID) { - this.sourceID = sourceID; - return this; - } - - /** - * Get sourceID - * - * @return sourceID - */ - @javax.annotation.Nonnull - public String getSourceID() { - return sourceID; - } - - public ModelInstance setIndex(String index) { - this.index = index; - return this; - } - - /** - * Get index - * - * @return index - */ - @javax.annotation.Nonnull - public String getIndex() { - return index; - } - - public ModelInstance setModelAttributes(List modelAttributes) { - this.modelAttributes = modelAttributes; - return this; - } - - public ModelInstance addModelAttributes(ModelAttributes modelAttributesItem) { - if (this.modelAttributes == null) { - this.modelAttributes = new ArrayList<>(); - } - this.modelAttributes.add(modelAttributesItem); - return this; - } - - /** - * Get modelAttributes - * - * @return modelAttributes - */ - @javax.annotation.Nullable - public List getModelAttributes() { - return modelAttributes; - } - - public ModelInstance setContentAttributes(List contentAttributes) { - this.contentAttributes = contentAttributes; - return this; - } - - public ModelInstance addContentAttributes(String contentAttributesItem) { - if (this.contentAttributes == null) { - this.contentAttributes = new ArrayList<>(); - } - this.contentAttributes.add(contentAttributesItem); - return this; - } - - /** - * Get contentAttributes - * - * @return contentAttributes - */ - @javax.annotation.Nullable - public List getContentAttributes() { - return contentAttributes; - } - - public ModelInstance setLastTrained(String lastTrained) { - this.lastTrained = lastTrained; - return this; - } - - /** - * The date and time this model instance was last trained. - * - * @return lastTrained - */ - @javax.annotation.Nonnull - public String getLastTrained() { - return lastTrained; - } - - public ModelInstance setLastInference(String lastInference) { - this.lastInference = lastInference; - return this; - } - - /** - * The date and time this model instance generated its last inference. - * - * @return lastInference - */ - @javax.annotation.Nonnull - public String getLastInference() { - return lastInference; - } - - public ModelInstance setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Get errorMessage - * - * @return errorMessage - */ - @javax.annotation.Nullable - public String getErrorMessage() { - return errorMessage; - } - - public ModelInstance setModelStatus(GetModelInstanceConfigStatus modelStatus) { - this.modelStatus = modelStatus; - return this; - } - - /** - * Get modelStatus - * - * @return modelStatus - */ - @javax.annotation.Nonnull - public GetModelInstanceConfigStatus getModelStatus() { - return modelStatus; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelInstance modelInstance = (ModelInstance) o; - return ( - Objects.equals(this.modelID, modelInstance.modelID) && - Objects.equals(this.name, modelInstance.name) && - Objects.equals(this.type, modelInstance.type) && - Objects.equals(this.sourceID, modelInstance.sourceID) && - Objects.equals(this.index, modelInstance.index) && - Objects.equals(this.modelAttributes, modelInstance.modelAttributes) && - Objects.equals(this.contentAttributes, modelInstance.contentAttributes) && - Objects.equals(this.lastTrained, modelInstance.lastTrained) && - Objects.equals(this.lastInference, modelInstance.lastInference) && - Objects.equals(this.errorMessage, modelInstance.errorMessage) && - Objects.equals(this.modelStatus, modelInstance.modelStatus) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - modelID, - name, - type, - sourceID, - index, - modelAttributes, - contentAttributes, - lastTrained, - lastInference, - errorMessage, - modelStatus - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelInstance {\n"); - sb.append(" modelID: ").append(toIndentedString(modelID)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" sourceID: ").append(toIndentedString(sourceID)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" modelAttributes: ").append(toIndentedString(modelAttributes)).append("\n"); - sb.append(" contentAttributes: ").append(toIndentedString(contentAttributes)).append("\n"); - sb.append(" lastTrained: ").append(toIndentedString(lastTrained)).append("\n"); - sb.append(" lastInference: ").append(toIndentedString(lastInference)).append("\n"); - sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); - sb.append(" modelStatus: ").append(toIndentedString(modelStatus)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelMetrics.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelMetrics.java deleted file mode 100644 index 596505b9ae..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelMetrics.java +++ /dev/null @@ -1,167 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** ModelMetrics */ -public class ModelMetrics { - - @JsonProperty("precision") - private Double precision; - - @JsonProperty("recall") - private Double recall; - - @JsonProperty("mrr") - private Double mrr; - - @JsonProperty("coverage") - private Double coverage; - - @JsonProperty("f1_score") - private Double f1Score; - - @JsonProperty("updatedAt") - private String updatedAt; - - public ModelMetrics setPrecision(Double precision) { - this.precision = precision; - return this; - } - - /** - * Get precision - * - * @return precision - */ - @javax.annotation.Nullable - public Double getPrecision() { - return precision; - } - - public ModelMetrics setRecall(Double recall) { - this.recall = recall; - return this; - } - - /** - * Get recall - * - * @return recall - */ - @javax.annotation.Nullable - public Double getRecall() { - return recall; - } - - public ModelMetrics setMrr(Double mrr) { - this.mrr = mrr; - return this; - } - - /** - * Get mrr - * - * @return mrr - */ - @javax.annotation.Nullable - public Double getMrr() { - return mrr; - } - - public ModelMetrics setCoverage(Double coverage) { - this.coverage = coverage; - return this; - } - - /** - * Get coverage - * - * @return coverage - */ - @javax.annotation.Nullable - public Double getCoverage() { - return coverage; - } - - public ModelMetrics setF1Score(Double f1Score) { - this.f1Score = f1Score; - return this; - } - - /** - * Get f1Score - * - * @return f1Score - */ - @javax.annotation.Nullable - public Double getF1Score() { - return f1Score; - } - - public ModelMetrics setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Date of last update (ISO-8601 format). - * - * @return updatedAt - */ - @javax.annotation.Nullable - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelMetrics modelMetrics = (ModelMetrics) o; - return ( - Objects.equals(this.precision, modelMetrics.precision) && - Objects.equals(this.recall, modelMetrics.recall) && - Objects.equals(this.mrr, modelMetrics.mrr) && - Objects.equals(this.coverage, modelMetrics.coverage) && - Objects.equals(this.f1Score, modelMetrics.f1Score) && - Objects.equals(this.updatedAt, modelMetrics.updatedAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(precision, recall, mrr, coverage, f1Score, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelMetrics {\n"); - sb.append(" precision: ").append(toIndentedString(precision)).append("\n"); - sb.append(" recall: ").append(toIndentedString(recall)).append("\n"); - sb.append(" mrr: ").append(toIndentedString(mrr)).append("\n"); - sb.append(" coverage: ").append(toIndentedString(coverage)).append("\n"); - sb.append(" f1Score: ").append(toIndentedString(f1Score)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelStatus.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelStatus.java deleted file mode 100644 index 0bc1aff92e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelStatus.java +++ /dev/null @@ -1,45 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * `active` - model is running and generating predictions. The active value is allowed only if the - * current status of the model is `inactive`. \\ `inactive` - model training and inference have been - * paused. The inactive value is allowed only if the current status of the model is `active`. - */ -public enum ModelStatus { - ACTIVE("active"), - - INACTIVE("inactive"); - - private final String value; - - ModelStatus(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ModelStatus fromValue(String value) { - for (ModelStatus b : ModelStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelsToRetrieve.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelsToRetrieve.java deleted file mode 100644 index 88b73a356e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelsToRetrieve.java +++ /dev/null @@ -1,43 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets modelsToRetrieve */ -public enum ModelsToRetrieve { - FUNNEL_STAGE("funnel_stage"), - - ORDER_VALUE("order_value"), - - AFFINITIES("affinities"); - - private final String value; - - ModelsToRetrieve(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ModelsToRetrieve fromValue(String value) { - for (ModelsToRetrieve b : ModelsToRetrieve.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelsToRetrieveParam.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelsToRetrieveParam.java deleted file mode 100644 index 2b780c10f7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelsToRetrieveParam.java +++ /dev/null @@ -1,75 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ModelsToRetrieveParam */ -public class ModelsToRetrieveParam { - - @JsonProperty("modelsToRetrieve") - private List modelsToRetrieve; - - public ModelsToRetrieveParam setModelsToRetrieve(List modelsToRetrieve) { - this.modelsToRetrieve = modelsToRetrieve; - return this; - } - - public ModelsToRetrieveParam addModelsToRetrieve(ModelsToRetrieve modelsToRetrieveItem) { - if (this.modelsToRetrieve == null) { - this.modelsToRetrieve = new ArrayList<>(); - } - this.modelsToRetrieve.add(modelsToRetrieveItem); - return this; - } - - /** - * Get modelsToRetrieve - * - * @return modelsToRetrieve - */ - @javax.annotation.Nullable - public List getModelsToRetrieve() { - return modelsToRetrieve; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelsToRetrieveParam modelsToRetrieveParam = (ModelsToRetrieveParam) o; - return Objects.equals(this.modelsToRetrieve, modelsToRetrieveParam.modelsToRetrieve); - } - - @Override - public int hashCode() { - return Objects.hash(modelsToRetrieve); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelsToRetrieveParam {\n"); - sb.append(" modelsToRetrieve: ").append(toIndentedString(modelsToRetrieve)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/NextPageTokenParam.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/NextPageTokenParam.java deleted file mode 100644 index 516da89ec9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/NextPageTokenParam.java +++ /dev/null @@ -1,68 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** NextPageTokenParam */ -public class NextPageTokenParam { - - @JsonProperty("nextPageToken") - private String nextPageToken; - - public NextPageTokenParam setNextPageToken(String nextPageToken) { - this.nextPageToken = nextPageToken; - return this; - } - - /** - * The token is used to navigate forward in the user list. To navigate from the current user list - * to the next page, the API generates the next page token and it sends the token in the response, - * beside the current user list. NOTE: This body param cannot be used with `previousPageToken` at - * the same time. - * - * @return nextPageToken - */ - @javax.annotation.Nullable - public String getNextPageToken() { - return nextPageToken; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NextPageTokenParam nextPageTokenParam = (NextPageTokenParam) o; - return Objects.equals(this.nextPageToken, nextPageTokenParam.nextPageToken); - } - - @Override - public int hashCode() { - return Objects.hash(nextPageToken); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NextPageTokenParam {\n"); - sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Params.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Params.java deleted file mode 100644 index d36d950608..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Params.java +++ /dev/null @@ -1,204 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; - -/** Params */ -@JsonDeserialize(using = Params.ParamsDeserializer.class) -@JsonSerialize(using = Params.ParamsSerializer.class) -public abstract class Params implements CompoundType { - - public static Params of(AllParams inside) { - return new ParamsAllParams(inside); - } - - public static Params of(ModelsToRetrieveParam inside) { - return new ParamsModelsToRetrieveParam(inside); - } - - public static Params of(TypesToRetrieveParam inside) { - return new ParamsTypesToRetrieveParam(inside); - } - - public static class ParamsSerializer extends StdSerializer { - - public ParamsSerializer(Class t) { - super(t); - } - - public ParamsSerializer() { - this(null); - } - - @Override - public void serialize(Params value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class ParamsDeserializer extends StdDeserializer { - - public ParamsDeserializer() { - this(Params.class); - } - - public ParamsDeserializer(Class vc) { - super(vc); - } - - @Override - public Params deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - JsonNode tree = jp.readValueAsTree(); - Params deserialized = null; - - int match = 0; - JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - String currentType = ""; - // deserialize AllParams - try { - boolean attemptParsing = true; - currentType = "AllParams"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = Params.of((AllParams) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = Params.of((AllParams) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf AllParams (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - // deserialize ModelsToRetrieveParam - try { - boolean attemptParsing = true; - currentType = "ModelsToRetrieveParam"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - Params.of((ModelsToRetrieveParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - Params.of((ModelsToRetrieveParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf ModelsToRetrieveParam (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - // deserialize TypesToRetrieveParam - try { - boolean attemptParsing = true; - currentType = "TypesToRetrieveParam"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - Params.of((TypesToRetrieveParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - Params.of((TypesToRetrieveParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf TypesToRetrieveParam (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - if (match == 1) { - return deserialized; - } - throw new IOException(String.format("Failed deserialization for Params: %d classes match result, expected 1", match)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public Params getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "Params cannot be null"); - } - } -} - -class ParamsAllParams extends Params { - - private final AllParams insideValue; - - ParamsAllParams(AllParams insideValue) { - this.insideValue = insideValue; - } - - @Override - public AllParams getInsideValue() { - return insideValue; - } -} - -class ParamsModelsToRetrieveParam extends Params { - - private final ModelsToRetrieveParam insideValue; - - ParamsModelsToRetrieveParam(ModelsToRetrieveParam insideValue) { - this.insideValue = insideValue; - } - - @Override - public ModelsToRetrieveParam getInsideValue() { - return insideValue; - } -} - -class ParamsTypesToRetrieveParam extends Params { - - private final TypesToRetrieveParam insideValue; - - ParamsTypesToRetrieveParam(TypesToRetrieveParam insideValue) { - this.insideValue = insideValue; - } - - @Override - public TypesToRetrieveParam getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Predictions.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Predictions.java deleted file mode 100644 index de346c8f07..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Predictions.java +++ /dev/null @@ -1,107 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Predictions */ -public class Predictions { - - @JsonProperty("funnel_stage") - private PredictionsFunnelStage funnelStage; - - @JsonProperty("order_value") - private PredictionsOrderValue orderValue; - - @JsonProperty("affinities") - private PredictionsAffinities affinities; - - public Predictions setFunnelStage(PredictionsFunnelStage funnelStage) { - this.funnelStage = funnelStage; - return this; - } - - /** - * Get funnelStage - * - * @return funnelStage - */ - @javax.annotation.Nullable - public PredictionsFunnelStage getFunnelStage() { - return funnelStage; - } - - public Predictions setOrderValue(PredictionsOrderValue orderValue) { - this.orderValue = orderValue; - return this; - } - - /** - * Get orderValue - * - * @return orderValue - */ - @javax.annotation.Nullable - public PredictionsOrderValue getOrderValue() { - return orderValue; - } - - public Predictions setAffinities(PredictionsAffinities affinities) { - this.affinities = affinities; - return this; - } - - /** - * Get affinities - * - * @return affinities - */ - @javax.annotation.Nullable - public PredictionsAffinities getAffinities() { - return affinities; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Predictions predictions = (Predictions) o; - return ( - Objects.equals(this.funnelStage, predictions.funnelStage) && - Objects.equals(this.orderValue, predictions.orderValue) && - Objects.equals(this.affinities, predictions.affinities) - ); - } - - @Override - public int hashCode() { - return Objects.hash(funnelStage, orderValue, affinities); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Predictions {\n"); - sb.append(" funnelStage: ").append(toIndentedString(funnelStage)).append("\n"); - sb.append(" orderValue: ").append(toIndentedString(orderValue)).append("\n"); - sb.append(" affinities: ").append(toIndentedString(affinities)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsAffinities.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsAffinities.java deleted file mode 100644 index 68d2246b98..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsAffinities.java +++ /dev/null @@ -1,169 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; - -/** PredictionsAffinities */ -@JsonDeserialize(using = PredictionsAffinities.PredictionsAffinitiesDeserializer.class) -@JsonSerialize(using = PredictionsAffinities.PredictionsAffinitiesSerializer.class) -public abstract class PredictionsAffinities implements CompoundType { - - public static PredictionsAffinities of(Error inside) { - return new PredictionsAffinitiesError(inside); - } - - public static PredictionsAffinities of(PredictionsAffinitiesSuccess inside) { - return new PredictionsAffinitiesPredictionsAffinitiesSuccess(inside); - } - - public static class PredictionsAffinitiesSerializer extends StdSerializer { - - public PredictionsAffinitiesSerializer(Class t) { - super(t); - } - - public PredictionsAffinitiesSerializer() { - this(null); - } - - @Override - public void serialize(PredictionsAffinities value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class PredictionsAffinitiesDeserializer extends StdDeserializer { - - public PredictionsAffinitiesDeserializer() { - this(PredictionsAffinities.class); - } - - public PredictionsAffinitiesDeserializer(Class vc) { - super(vc); - } - - @Override - public PredictionsAffinities deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - JsonNode tree = jp.readValueAsTree(); - PredictionsAffinities deserialized = null; - - int match = 0; - JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - String currentType = ""; - // deserialize Error - try { - boolean attemptParsing = true; - currentType = "Error"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = PredictionsAffinities.of((Error) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = PredictionsAffinities.of((Error) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf Error (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - // deserialize PredictionsAffinitiesSuccess - try { - boolean attemptParsing = true; - currentType = "PredictionsAffinitiesSuccess"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - PredictionsAffinities.of( - (PredictionsAffinitiesSuccess) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - PredictionsAffinities.of( - (PredictionsAffinitiesSuccess) tree - .traverse(jp.getCodec()) - .readValueAs(new TypeReference() {}) - ); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println( - "Failed to deserialize oneOf PredictionsAffinitiesSuccess (error: " + e.getMessage() + ") (type: " + currentType + ")" - ); - } - - if (match == 1) { - return deserialized; - } - throw new IOException( - String.format("Failed deserialization for PredictionsAffinities: %d classes match result, expected" + " 1", match) - ); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public PredictionsAffinities getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "PredictionsAffinities cannot be null"); - } - } -} - -class PredictionsAffinitiesError extends PredictionsAffinities { - - private final Error insideValue; - - PredictionsAffinitiesError(Error insideValue) { - this.insideValue = insideValue; - } - - @Override - public Error getInsideValue() { - return insideValue; - } -} - -class PredictionsAffinitiesPredictionsAffinitiesSuccess extends PredictionsAffinities { - - private final PredictionsAffinitiesSuccess insideValue; - - PredictionsAffinitiesPredictionsAffinitiesSuccess(PredictionsAffinitiesSuccess insideValue) { - this.insideValue = insideValue; - } - - @Override - public PredictionsAffinitiesSuccess getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsAffinitiesSuccess.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsAffinitiesSuccess.java deleted file mode 100644 index 93b7e150c4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsAffinitiesSuccess.java +++ /dev/null @@ -1,94 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Prediction for the **affinities** model. */ -public class PredictionsAffinitiesSuccess { - - @JsonProperty("value") - private List value = new ArrayList<>(); - - @JsonProperty("lastUpdatedAt") - private String lastUpdatedAt; - - public PredictionsAffinitiesSuccess setValue(List value) { - this.value = value; - return this; - } - - public PredictionsAffinitiesSuccess addValue(Affinity valueItem) { - this.value.add(valueItem); - return this; - } - - /** - * Get value - * - * @return value - */ - @javax.annotation.Nonnull - public List getValue() { - return value; - } - - public PredictionsAffinitiesSuccess setLastUpdatedAt(String lastUpdatedAt) { - this.lastUpdatedAt = lastUpdatedAt; - return this; - } - - /** - * Get lastUpdatedAt - * - * @return lastUpdatedAt - */ - @javax.annotation.Nonnull - public String getLastUpdatedAt() { - return lastUpdatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PredictionsAffinitiesSuccess predictionsAffinitiesSuccess = (PredictionsAffinitiesSuccess) o; - return ( - Objects.equals(this.value, predictionsAffinitiesSuccess.value) && - Objects.equals(this.lastUpdatedAt, predictionsAffinitiesSuccess.lastUpdatedAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(value, lastUpdatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PredictionsAffinitiesSuccess {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsFunnelStage.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsFunnelStage.java deleted file mode 100644 index 1494183f11..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsFunnelStage.java +++ /dev/null @@ -1,171 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; - -/** PredictionsFunnelStage */ -@JsonDeserialize(using = PredictionsFunnelStage.PredictionsFunnelStageDeserializer.class) -@JsonSerialize(using = PredictionsFunnelStage.PredictionsFunnelStageSerializer.class) -public abstract class PredictionsFunnelStage implements CompoundType { - - public static PredictionsFunnelStage of(Error inside) { - return new PredictionsFunnelStageError(inside); - } - - public static PredictionsFunnelStage of(PredictionsFunnelStageSuccess inside) { - return new PredictionsFunnelStagePredictionsFunnelStageSuccess(inside); - } - - public static class PredictionsFunnelStageSerializer extends StdSerializer { - - public PredictionsFunnelStageSerializer(Class t) { - super(t); - } - - public PredictionsFunnelStageSerializer() { - this(null); - } - - @Override - public void serialize(PredictionsFunnelStage value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class PredictionsFunnelStageDeserializer extends StdDeserializer { - - public PredictionsFunnelStageDeserializer() { - this(PredictionsFunnelStage.class); - } - - public PredictionsFunnelStageDeserializer(Class vc) { - super(vc); - } - - @Override - public PredictionsFunnelStage deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - JsonNode tree = jp.readValueAsTree(); - PredictionsFunnelStage deserialized = null; - - int match = 0; - JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - String currentType = ""; - // deserialize Error - try { - boolean attemptParsing = true; - currentType = "Error"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = PredictionsFunnelStage.of((Error) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = PredictionsFunnelStage.of((Error) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf Error (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - // deserialize PredictionsFunnelStageSuccess - try { - boolean attemptParsing = true; - currentType = "PredictionsFunnelStageSuccess"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - PredictionsFunnelStage.of( - (PredictionsFunnelStageSuccess) tree - .traverse(jp.getCodec()) - .readValueAs(new TypeReference() {}) - ); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - PredictionsFunnelStage.of( - (PredictionsFunnelStageSuccess) tree - .traverse(jp.getCodec()) - .readValueAs(new TypeReference() {}) - ); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println( - "Failed to deserialize oneOf PredictionsFunnelStageSuccess (error: " + e.getMessage() + ") (type: " + currentType + ")" - ); - } - - if (match == 1) { - return deserialized; - } - throw new IOException( - String.format("Failed deserialization for PredictionsFunnelStage: %d classes match result, expected" + " 1", match) - ); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public PredictionsFunnelStage getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "PredictionsFunnelStage cannot be null"); - } - } -} - -class PredictionsFunnelStageError extends PredictionsFunnelStage { - - private final Error insideValue; - - PredictionsFunnelStageError(Error insideValue) { - this.insideValue = insideValue; - } - - @Override - public Error getInsideValue() { - return insideValue; - } -} - -class PredictionsFunnelStagePredictionsFunnelStageSuccess extends PredictionsFunnelStage { - - private final PredictionsFunnelStageSuccess insideValue; - - PredictionsFunnelStagePredictionsFunnelStageSuccess(PredictionsFunnelStageSuccess insideValue) { - this.insideValue = insideValue; - } - - @Override - public PredictionsFunnelStageSuccess getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsFunnelStageSuccess.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsFunnelStageSuccess.java deleted file mode 100644 index 5c194baefd..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsFunnelStageSuccess.java +++ /dev/null @@ -1,94 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Prediction for the **funnel_stage** model. */ -public class PredictionsFunnelStageSuccess { - - @JsonProperty("value") - private List value = new ArrayList<>(); - - @JsonProperty("lastUpdatedAt") - private String lastUpdatedAt; - - public PredictionsFunnelStageSuccess setValue(List value) { - this.value = value; - return this; - } - - public PredictionsFunnelStageSuccess addValue(FunnelStage valueItem) { - this.value.add(valueItem); - return this; - } - - /** - * Get value - * - * @return value - */ - @javax.annotation.Nonnull - public List getValue() { - return value; - } - - public PredictionsFunnelStageSuccess setLastUpdatedAt(String lastUpdatedAt) { - this.lastUpdatedAt = lastUpdatedAt; - return this; - } - - /** - * Get lastUpdatedAt - * - * @return lastUpdatedAt - */ - @javax.annotation.Nonnull - public String getLastUpdatedAt() { - return lastUpdatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PredictionsFunnelStageSuccess predictionsFunnelStageSuccess = (PredictionsFunnelStageSuccess) o; - return ( - Objects.equals(this.value, predictionsFunnelStageSuccess.value) && - Objects.equals(this.lastUpdatedAt, predictionsFunnelStageSuccess.lastUpdatedAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(value, lastUpdatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PredictionsFunnelStageSuccess {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsOrderValue.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsOrderValue.java deleted file mode 100644 index 71c861b858..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsOrderValue.java +++ /dev/null @@ -1,169 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; - -/** PredictionsOrderValue */ -@JsonDeserialize(using = PredictionsOrderValue.PredictionsOrderValueDeserializer.class) -@JsonSerialize(using = PredictionsOrderValue.PredictionsOrderValueSerializer.class) -public abstract class PredictionsOrderValue implements CompoundType { - - public static PredictionsOrderValue of(Error inside) { - return new PredictionsOrderValueError(inside); - } - - public static PredictionsOrderValue of(PredictionsOrderValueSuccess inside) { - return new PredictionsOrderValuePredictionsOrderValueSuccess(inside); - } - - public static class PredictionsOrderValueSerializer extends StdSerializer { - - public PredictionsOrderValueSerializer(Class t) { - super(t); - } - - public PredictionsOrderValueSerializer() { - this(null); - } - - @Override - public void serialize(PredictionsOrderValue value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class PredictionsOrderValueDeserializer extends StdDeserializer { - - public PredictionsOrderValueDeserializer() { - this(PredictionsOrderValue.class); - } - - public PredictionsOrderValueDeserializer(Class vc) { - super(vc); - } - - @Override - public PredictionsOrderValue deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - JsonNode tree = jp.readValueAsTree(); - PredictionsOrderValue deserialized = null; - - int match = 0; - JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - String currentType = ""; - // deserialize Error - try { - boolean attemptParsing = true; - currentType = "Error"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = PredictionsOrderValue.of((Error) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = PredictionsOrderValue.of((Error) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf Error (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - // deserialize PredictionsOrderValueSuccess - try { - boolean attemptParsing = true; - currentType = "PredictionsOrderValueSuccess"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - PredictionsOrderValue.of( - (PredictionsOrderValueSuccess) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - PredictionsOrderValue.of( - (PredictionsOrderValueSuccess) tree - .traverse(jp.getCodec()) - .readValueAs(new TypeReference() {}) - ); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println( - "Failed to deserialize oneOf PredictionsOrderValueSuccess (error: " + e.getMessage() + ") (type: " + currentType + ")" - ); - } - - if (match == 1) { - return deserialized; - } - throw new IOException( - String.format("Failed deserialization for PredictionsOrderValue: %d classes match result, expected" + " 1", match) - ); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public PredictionsOrderValue getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "PredictionsOrderValue cannot be null"); - } - } -} - -class PredictionsOrderValueError extends PredictionsOrderValue { - - private final Error insideValue; - - PredictionsOrderValueError(Error insideValue) { - this.insideValue = insideValue; - } - - @Override - public Error getInsideValue() { - return insideValue; - } -} - -class PredictionsOrderValuePredictionsOrderValueSuccess extends PredictionsOrderValue { - - private final PredictionsOrderValueSuccess insideValue; - - PredictionsOrderValuePredictionsOrderValueSuccess(PredictionsOrderValueSuccess insideValue) { - this.insideValue = insideValue; - } - - @Override - public PredictionsOrderValueSuccess getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsOrderValueSuccess.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsOrderValueSuccess.java deleted file mode 100644 index b67edf93aa..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PredictionsOrderValueSuccess.java +++ /dev/null @@ -1,87 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Prediction for the **order_value** model. */ -public class PredictionsOrderValueSuccess { - - @JsonProperty("value") - private Double value; - - @JsonProperty("lastUpdatedAt") - private String lastUpdatedAt; - - public PredictionsOrderValueSuccess setValue(Double value) { - this.value = value; - return this; - } - - /** - * Get value minimum: 0 - * - * @return value - */ - @javax.annotation.Nonnull - public Double getValue() { - return value; - } - - public PredictionsOrderValueSuccess setLastUpdatedAt(String lastUpdatedAt) { - this.lastUpdatedAt = lastUpdatedAt; - return this; - } - - /** - * Get lastUpdatedAt - * - * @return lastUpdatedAt - */ - @javax.annotation.Nonnull - public String getLastUpdatedAt() { - return lastUpdatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PredictionsOrderValueSuccess predictionsOrderValueSuccess = (PredictionsOrderValueSuccess) o; - return ( - Objects.equals(this.value, predictionsOrderValueSuccess.value) && - Objects.equals(this.lastUpdatedAt, predictionsOrderValueSuccess.lastUpdatedAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(value, lastUpdatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PredictionsOrderValueSuccess {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PreviousPageTokenParam.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PreviousPageTokenParam.java deleted file mode 100644 index ce2a9148c9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/PreviousPageTokenParam.java +++ /dev/null @@ -1,68 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** PreviousPageTokenParam */ -public class PreviousPageTokenParam { - - @JsonProperty("previousPageToken") - private String previousPageToken; - - public PreviousPageTokenParam setPreviousPageToken(String previousPageToken) { - this.previousPageToken = previousPageToken; - return this; - } - - /** - * The token is used to navigate backward in the user list. To navigate from the current user list - * to the previous page, the API generates the previous page token and it sends the token in the - * response, beside the current user list. NOTE: This body param cannot be used with - * `nextPageToken` at the same time. - * - * @return previousPageToken - */ - @javax.annotation.Nullable - public String getPreviousPageToken() { - return previousPageToken; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PreviousPageTokenParam previousPageTokenParam = (PreviousPageTokenParam) o; - return Objects.equals(this.previousPageToken, previousPageTokenParam.previousPageToken); - } - - @Override - public int hashCode() { - return Objects.hash(previousPageToken); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PreviousPageTokenParam {\n"); - sb.append(" previousPageToken: ").append(toIndentedString(previousPageToken)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Properties.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Properties.java deleted file mode 100644 index 9d9c06226f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Properties.java +++ /dev/null @@ -1,107 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Properties for the user profile. */ -public class Properties { - - @JsonProperty("raw") - private Object raw; - - @JsonProperty("computed") - private Object computed; - - @JsonProperty("custom") - private Object custom; - - public Properties setRaw(Object raw) { - this.raw = raw; - return this; - } - - /** - * Raw user properties (key-value pairs). - * - * @return raw - */ - @javax.annotation.Nullable - public Object getRaw() { - return raw; - } - - public Properties setComputed(Object computed) { - this.computed = computed; - return this; - } - - /** - * Computed user properties (key-value pairs). - * - * @return computed - */ - @javax.annotation.Nullable - public Object getComputed() { - return computed; - } - - public Properties setCustom(Object custom) { - this.custom = custom; - return this; - } - - /** - * Custom user properties (key-value pairs). - * - * @return custom - */ - @javax.annotation.Nullable - public Object getCustom() { - return custom; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Properties properties = (Properties) o; - return ( - Objects.equals(this.raw, properties.raw) && - Objects.equals(this.computed, properties.computed) && - Objects.equals(this.custom, properties.custom) - ); - } - - @Override - public int hashCode() { - return Objects.hash(raw, computed, custom); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Properties {\n"); - sb.append(" raw: ").append(toIndentedString(raw)).append("\n"); - sb.append(" computed: ").append(toIndentedString(computed)).append("\n"); - sb.append(" custom: ").append(toIndentedString(custom)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Segment.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Segment.java deleted file mode 100644 index ddf3b5d529..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Segment.java +++ /dev/null @@ -1,167 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Segment */ -public class Segment { - - @JsonProperty("segmentID") - private String segmentID; - - @JsonProperty("name") - private String name; - - @JsonProperty("conditions") - private String conditions; - - @JsonProperty("segmentStatus") - private SegmentStatus segmentStatus; - - @JsonProperty("type") - private SegmentType type; - - @JsonProperty("errorMessage") - private String errorMessage; - - public Segment setSegmentID(String segmentID) { - this.segmentID = segmentID; - return this; - } - - /** - * The ID of the segment. - * - * @return segmentID - */ - @javax.annotation.Nonnull - public String getSegmentID() { - return segmentID; - } - - public Segment setName(String name) { - this.name = name; - return this; - } - - /** - * Get name - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public Segment setConditions(String conditions) { - this.conditions = conditions; - return this; - } - - /** - * Get conditions - * - * @return conditions - */ - @javax.annotation.Nonnull - public String getConditions() { - return conditions; - } - - public Segment setSegmentStatus(SegmentStatus segmentStatus) { - this.segmentStatus = segmentStatus; - return this; - } - - /** - * Get segmentStatus - * - * @return segmentStatus - */ - @javax.annotation.Nonnull - public SegmentStatus getSegmentStatus() { - return segmentStatus; - } - - public Segment setType(SegmentType type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - public SegmentType getType() { - return type; - } - - public Segment setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Get errorMessage - * - * @return errorMessage - */ - @javax.annotation.Nullable - public String getErrorMessage() { - return errorMessage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Segment segment = (Segment) o; - return ( - Objects.equals(this.segmentID, segment.segmentID) && - Objects.equals(this.name, segment.name) && - Objects.equals(this.conditions, segment.conditions) && - Objects.equals(this.segmentStatus, segment.segmentStatus) && - Objects.equals(this.type, segment.type) && - Objects.equals(this.errorMessage, segment.errorMessage) - ); - } - - @Override - public int hashCode() { - return Objects.hash(segmentID, name, conditions, segmentStatus, type, errorMessage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Segment {\n"); - sb.append(" segmentID: ").append(toIndentedString(segmentID)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); - sb.append(" segmentStatus: ").append(toIndentedString(segmentStatus)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentConditionsParam.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentConditionsParam.java deleted file mode 100644 index 95169192e9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentConditionsParam.java +++ /dev/null @@ -1,65 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SegmentConditionsParam */ -public class SegmentConditionsParam { - - @JsonProperty("conditions") - private String conditions; - - public SegmentConditionsParam setConditions(String conditions) { - this.conditions = conditions; - return this; - } - - /** - * The filters that define the segment, defined in the same way as filters for Rules. - * - * @return conditions - */ - @javax.annotation.Nullable - public String getConditions() { - return conditions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SegmentConditionsParam segmentConditionsParam = (SegmentConditionsParam) o; - return Objects.equals(this.conditions, segmentConditionsParam.conditions); - } - - @Override - public int hashCode() { - return Objects.hash(conditions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SegmentConditionsParam {\n"); - sb.append(" conditions: ").append(toIndentedString(conditions)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentNameParam.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentNameParam.java deleted file mode 100644 index ea378ce61a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentNameParam.java +++ /dev/null @@ -1,65 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SegmentNameParam */ -public class SegmentNameParam { - - @JsonProperty("name") - private String name; - - public SegmentNameParam setName(String name) { - this.name = name; - return this; - } - - /** - * The name or description of the segment. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SegmentNameParam segmentNameParam = (SegmentNameParam) o; - return Objects.equals(this.name, segmentNameParam.name); - } - - @Override - public int hashCode() { - return Objects.hash(name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SegmentNameParam {\n"); - sb.append(" name: ").append(toIndentedString(name)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentStatus.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentStatus.java deleted file mode 100644 index fe017db144..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentStatus.java +++ /dev/null @@ -1,43 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets segmentStatus */ -public enum SegmentStatus { - ACTIVE("active"), - - PENDING("pending"), - - FAILED("failed"); - - private final String value; - - SegmentStatus(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SegmentStatus fromValue(String value) { - for (SegmentStatus b : SegmentStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentType.java deleted file mode 100644 index 50492c0f14..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/SegmentType.java +++ /dev/null @@ -1,41 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets segmentType */ -public enum SegmentType { - COMPUTED("computed"), - - CUSTOM("custom"); - - private final String value; - - SegmentType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SegmentType fromValue(String value) { - for (SegmentType b : SegmentType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Segments.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Segments.java deleted file mode 100644 index 67a2cd0f5a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/Segments.java +++ /dev/null @@ -1,96 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Segments that the user belongs to. */ -public class Segments { - - @JsonProperty("computed") - private List computed = new ArrayList<>(); - - @JsonProperty("custom") - private List custom = new ArrayList<>(); - - public Segments setComputed(List computed) { - this.computed = computed; - return this; - } - - public Segments addComputed(String computedItem) { - this.computed.add(computedItem); - return this; - } - - /** - * List of computed segments IDs. - * - * @return computed - */ - @javax.annotation.Nonnull - public List getComputed() { - return computed; - } - - public Segments setCustom(List custom) { - this.custom = custom; - return this; - } - - public Segments addCustom(String customItem) { - this.custom.add(customItem); - return this; - } - - /** - * List of custom segments IDs. - * - * @return custom - */ - @javax.annotation.Nonnull - public List getCustom() { - return custom; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Segments segments = (Segments) o; - return Objects.equals(this.computed, segments.computed) && Objects.equals(this.custom, segments.custom); - } - - @Override - public int hashCode() { - return Objects.hash(computed, custom); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Segments {\n"); - sb.append(" computed: ").append(toIndentedString(computed)).append("\n"); - sb.append(" custom: ").append(toIndentedString(custom)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/TypesToRetrieve.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/TypesToRetrieve.java deleted file mode 100644 index d888df8b97..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/TypesToRetrieve.java +++ /dev/null @@ -1,41 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets typesToRetrieve */ -public enum TypesToRetrieve { - PROPERTIES("properties"), - - SEGMENTS("segments"); - - private final String value; - - TypesToRetrieve(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypesToRetrieve fromValue(String value) { - for (TypesToRetrieve b : TypesToRetrieve.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/TypesToRetrieveParam.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/TypesToRetrieveParam.java deleted file mode 100644 index 84f54667e7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/TypesToRetrieveParam.java +++ /dev/null @@ -1,75 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** TypesToRetrieveParam */ -public class TypesToRetrieveParam { - - @JsonProperty("typesToRetrieve") - private List typesToRetrieve; - - public TypesToRetrieveParam setTypesToRetrieve(List typesToRetrieve) { - this.typesToRetrieve = typesToRetrieve; - return this; - } - - public TypesToRetrieveParam addTypesToRetrieve(TypesToRetrieve typesToRetrieveItem) { - if (this.typesToRetrieve == null) { - this.typesToRetrieve = new ArrayList<>(); - } - this.typesToRetrieve.add(typesToRetrieveItem); - return this; - } - - /** - * Get typesToRetrieve - * - * @return typesToRetrieve - */ - @javax.annotation.Nullable - public List getTypesToRetrieve() { - return typesToRetrieve; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypesToRetrieveParam typesToRetrieveParam = (TypesToRetrieveParam) o; - return Objects.equals(this.typesToRetrieve, typesToRetrieveParam.typesToRetrieve); - } - - @Override - public int hashCode() { - return Objects.hash(typesToRetrieve); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypesToRetrieveParam {\n"); - sb.append(" typesToRetrieve: ").append(toIndentedString(typesToRetrieve)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateModelInstanceResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateModelInstanceResponse.java deleted file mode 100644 index 84ae652e90..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateModelInstanceResponse.java +++ /dev/null @@ -1,87 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** UpdateModelInstanceResponse */ -public class UpdateModelInstanceResponse { - - @JsonProperty("modelID") - private String modelID; - - @JsonProperty("updatedAt") - private String updatedAt; - - public UpdateModelInstanceResponse setModelID(String modelID) { - this.modelID = modelID; - return this; - } - - /** - * The ID of the model. - * - * @return modelID - */ - @javax.annotation.Nonnull - public String getModelID() { - return modelID; - } - - public UpdateModelInstanceResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Date of last update (ISO-8601 format). - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateModelInstanceResponse updateModelInstanceResponse = (UpdateModelInstanceResponse) o; - return ( - Objects.equals(this.modelID, updateModelInstanceResponse.modelID) && - Objects.equals(this.updatedAt, updateModelInstanceResponse.updatedAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(modelID, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateModelInstanceResponse {\n"); - sb.append(" modelID: ").append(toIndentedString(modelID)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateModelParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateModelParams.java deleted file mode 100644 index ff48c7cd2d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateModelParams.java +++ /dev/null @@ -1,145 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** UpdateModelParams */ -public class UpdateModelParams { - - @JsonProperty("name") - private String name; - - @JsonProperty("modelAttributes") - private List modelAttributes; - - @JsonProperty("contentAttributes") - private List contentAttributes; - - @JsonProperty("modelStatus") - private ModelStatus modelStatus; - - public UpdateModelParams setName(String name) { - this.name = name; - return this; - } - - /** - * The model’s instance name. - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public UpdateModelParams setModelAttributes(List modelAttributes) { - this.modelAttributes = modelAttributes; - return this; - } - - public UpdateModelParams addModelAttributes(String modelAttributesItem) { - if (this.modelAttributes == null) { - this.modelAttributes = new ArrayList<>(); - } - this.modelAttributes.add(modelAttributesItem); - return this; - } - - /** - * Get modelAttributes - * - * @return modelAttributes - */ - @javax.annotation.Nullable - public List getModelAttributes() { - return modelAttributes; - } - - public UpdateModelParams setContentAttributes(List contentAttributes) { - this.contentAttributes = contentAttributes; - return this; - } - - public UpdateModelParams addContentAttributes(String contentAttributesItem) { - if (this.contentAttributes == null) { - this.contentAttributes = new ArrayList<>(); - } - this.contentAttributes.add(contentAttributesItem); - return this; - } - - /** - * Get contentAttributes - * - * @return contentAttributes - */ - @javax.annotation.Nullable - public List getContentAttributes() { - return contentAttributes; - } - - public UpdateModelParams setModelStatus(ModelStatus modelStatus) { - this.modelStatus = modelStatus; - return this; - } - - /** - * Get modelStatus - * - * @return modelStatus - */ - @javax.annotation.Nullable - public ModelStatus getModelStatus() { - return modelStatus; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateModelParams updateModelParams = (UpdateModelParams) o; - return ( - Objects.equals(this.name, updateModelParams.name) && - Objects.equals(this.modelAttributes, updateModelParams.modelAttributes) && - Objects.equals(this.contentAttributes, updateModelParams.contentAttributes) && - Objects.equals(this.modelStatus, updateModelParams.modelStatus) - ); - } - - @Override - public int hashCode() { - return Objects.hash(name, modelAttributes, contentAttributes, modelStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateModelParams {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" modelAttributes: ").append(toIndentedString(modelAttributes)).append("\n"); - sb.append(" contentAttributes: ").append(toIndentedString(contentAttributes)).append("\n"); - sb.append(" modelStatus: ").append(toIndentedString(modelStatus)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateSegmentParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateSegmentParams.java deleted file mode 100644 index 40620ec624..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateSegmentParams.java +++ /dev/null @@ -1,219 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; - -/** UpdateSegmentParams */ -@JsonDeserialize(using = UpdateSegmentParams.UpdateSegmentParamsDeserializer.class) -@JsonSerialize(using = UpdateSegmentParams.UpdateSegmentParamsSerializer.class) -public abstract class UpdateSegmentParams implements CompoundType { - - public static UpdateSegmentParams of(AllUpdateSegmentParams inside) { - return new UpdateSegmentParamsAllUpdateSegmentParams(inside); - } - - public static UpdateSegmentParams of(SegmentConditionsParam inside) { - return new UpdateSegmentParamsSegmentConditionsParam(inside); - } - - public static UpdateSegmentParams of(SegmentNameParam inside) { - return new UpdateSegmentParamsSegmentNameParam(inside); - } - - public static class UpdateSegmentParamsSerializer extends StdSerializer { - - public UpdateSegmentParamsSerializer(Class t) { - super(t); - } - - public UpdateSegmentParamsSerializer() { - this(null); - } - - @Override - public void serialize(UpdateSegmentParams value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class UpdateSegmentParamsDeserializer extends StdDeserializer { - - public UpdateSegmentParamsDeserializer() { - this(UpdateSegmentParams.class); - } - - public UpdateSegmentParamsDeserializer(Class vc) { - super(vc); - } - - @Override - public UpdateSegmentParams deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - JsonNode tree = jp.readValueAsTree(); - UpdateSegmentParams deserialized = null; - - int match = 0; - JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - String currentType = ""; - // deserialize AllUpdateSegmentParams - try { - boolean attemptParsing = true; - currentType = "AllUpdateSegmentParams"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - UpdateSegmentParams.of( - (AllUpdateSegmentParams) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - UpdateSegmentParams.of( - (AllUpdateSegmentParams) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println( - "Failed to deserialize oneOf AllUpdateSegmentParams (error: " + e.getMessage() + ") (type: " + currentType + ")" - ); - } - - // deserialize SegmentConditionsParam - try { - boolean attemptParsing = true; - currentType = "SegmentConditionsParam"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - UpdateSegmentParams.of( - (SegmentConditionsParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - UpdateSegmentParams.of( - (SegmentConditionsParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {}) - ); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println( - "Failed to deserialize oneOf SegmentConditionsParam (error: " + e.getMessage() + ") (type: " + currentType + ")" - ); - } - - // deserialize SegmentNameParam - try { - boolean attemptParsing = true; - currentType = "SegmentNameParam"; - if ( - ((currentType.equals("Integer") || currentType.equals("Long")) && token == JsonToken.VALUE_NUMBER_INT) | - ((currentType.equals("Float") || currentType.equals("Double")) && token == JsonToken.VALUE_NUMBER_FLOAT) | - (currentType.equals("Boolean") && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)) | - (currentType.equals("String") && token == JsonToken.VALUE_STRING) | - (currentType.startsWith("List<") && token == JsonToken.START_ARRAY) - ) { - deserialized = - UpdateSegmentParams.of((SegmentNameParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } else if (token == JsonToken.START_OBJECT) { - try { - deserialized = - UpdateSegmentParams.of((SegmentNameParam) tree.traverse(jp.getCodec()).readValueAs(new TypeReference() {})); - match++; - } catch (IOException e) { - // do nothing - } - } - } catch (Exception e) { - // deserialization failed, continue - System.err.println("Failed to deserialize oneOf SegmentNameParam (error: " + e.getMessage() + ") (type: " + currentType + ")"); - } - - if (match == 1) { - return deserialized; - } - throw new IOException(String.format("Failed deserialization for UpdateSegmentParams: %d classes match result, expected 1", match)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public UpdateSegmentParams getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "UpdateSegmentParams cannot be null"); - } - } -} - -class UpdateSegmentParamsAllUpdateSegmentParams extends UpdateSegmentParams { - - private final AllUpdateSegmentParams insideValue; - - UpdateSegmentParamsAllUpdateSegmentParams(AllUpdateSegmentParams insideValue) { - this.insideValue = insideValue; - } - - @Override - public AllUpdateSegmentParams getInsideValue() { - return insideValue; - } -} - -class UpdateSegmentParamsSegmentConditionsParam extends UpdateSegmentParams { - - private final SegmentConditionsParam insideValue; - - UpdateSegmentParamsSegmentConditionsParam(SegmentConditionsParam insideValue) { - this.insideValue = insideValue; - } - - @Override - public SegmentConditionsParam getInsideValue() { - return insideValue; - } -} - -class UpdateSegmentParamsSegmentNameParam extends UpdateSegmentParams { - - private final SegmentNameParam insideValue; - - UpdateSegmentParamsSegmentNameParam(SegmentNameParam insideValue) { - this.insideValue = insideValue; - } - - @Override - public SegmentNameParam getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateSegmentResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateSegmentResponse.java deleted file mode 100644 index d9281af6c4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UpdateSegmentResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** UpdateSegmentResponse */ -public class UpdateSegmentResponse { - - @JsonProperty("segmentID") - private String segmentID; - - @JsonProperty("updatedAt") - private String updatedAt; - - public UpdateSegmentResponse setSegmentID(String segmentID) { - this.segmentID = segmentID; - return this; - } - - /** - * The ID of the segment. - * - * @return segmentID - */ - @javax.annotation.Nonnull - public String getSegmentID() { - return segmentID; - } - - public UpdateSegmentResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * The date and time at which the segment was last updated. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateSegmentResponse updateSegmentResponse = (UpdateSegmentResponse) o; - return ( - Objects.equals(this.segmentID, updateSegmentResponse.segmentID) && Objects.equals(this.updatedAt, updateSegmentResponse.updatedAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(segmentID, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateSegmentResponse {\n"); - sb.append(" segmentID: ").append(toIndentedString(segmentID)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UserProfile.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UserProfile.java deleted file mode 100644 index b65d5ead6a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/UserProfile.java +++ /dev/null @@ -1,127 +0,0 @@ -// This file is generated, manual changes will be lost - read more on -// https://github.com/algolia/api-clients-automation. - -package com.algolia.model.predict; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** UserProfile */ -public class UserProfile { - - @JsonProperty("user") - private String user; - - @JsonProperty("predictions") - private Predictions predictions; - - @JsonProperty("properties") - private Properties properties; - - @JsonProperty("segments") - private Segments segments; - - public UserProfile setUser(String user) { - this.user = user; - return this; - } - - /** - * Get user - * - * @return user - */ - @javax.annotation.Nonnull - public String getUser() { - return user; - } - - public UserProfile setPredictions(Predictions predictions) { - this.predictions = predictions; - return this; - } - - /** - * Get predictions - * - * @return predictions - */ - @javax.annotation.Nullable - public Predictions getPredictions() { - return predictions; - } - - public UserProfile setProperties(Properties properties) { - this.properties = properties; - return this; - } - - /** - * Get properties - * - * @return properties - */ - @javax.annotation.Nullable - public Properties getProperties() { - return properties; - } - - public UserProfile setSegments(Segments segments) { - this.segments = segments; - return this; - } - - /** - * Get segments - * - * @return segments - */ - @javax.annotation.Nullable - public Segments getSegments() { - return segments; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserProfile userProfile = (UserProfile) o; - return ( - Objects.equals(this.user, userProfile.user) && - Objects.equals(this.predictions, userProfile.predictions) && - Objects.equals(this.properties, userProfile.properties) && - Objects.equals(this.segments, userProfile.segments) - ); - } - - @Override - public int hashCode() { - return Objects.hash(user, predictions, properties, segments); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserProfile {\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append(" predictions: ").append(toIndentedString(predictions)).append("\n"); - sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); - sb.append(" segments: ").append(toIndentedString(segments)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/BaseResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/BaseResponse.java deleted file mode 100644 index 917aa8d0e1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/BaseResponse.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** BaseResponse */ -public class BaseResponse { - - @JsonProperty("status") - private Integer status; - - @JsonProperty("message") - private String message; - - public BaseResponse setStatus(Integer status) { - this.status = status; - return this; - } - - /** - * HTTP status code. - * - * @return status - */ - @javax.annotation.Nullable - public Integer getStatus() { - return status; - } - - public BaseResponse setMessage(String message) { - this.message = message; - return this; - } - - /** - * Details about the response, such as error messages. - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseResponse baseResponse = (BaseResponse) o; - return Objects.equals(this.status, baseResponse.status) && Objects.equals(this.message, baseResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(status, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/ErrorBase.java deleted file mode 100644 index 7724f58371..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/ErrorBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Error. */ -public class ErrorBase { - - @JsonProperty("message") - private String message; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public ErrorBase setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public ErrorBase setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorBase errorBase = (ErrorBase) o; - return Objects.equals(this.message, errorBase.message) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(message, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorBase {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/Facet.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/Facet.java deleted file mode 100644 index e4494b7030..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/Facet.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Facet to use as category. */ -public class Facet { - - @JsonProperty("attribute") - private String attribute; - - @JsonProperty("amount") - private Integer amount; - - public Facet setAttribute(String attribute) { - this.attribute = attribute; - return this; - } - - /** - * Facet name. - * - * @return attribute - */ - @javax.annotation.Nullable - public String getAttribute() { - return attribute; - } - - public Facet setAmount(Integer amount) { - this.amount = amount; - return this; - } - - /** - * Number of suggestions. - * - * @return amount - */ - @javax.annotation.Nullable - public Integer getAmount() { - return amount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Facet facet = (Facet) o; - return Objects.equals(this.attribute, facet.attribute) && Objects.equals(this.amount, facet.amount); - } - - @Override - public int hashCode() { - return Objects.hash(attribute, amount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Facet {\n"); - sb.append(" attribute: ").append(toIndentedString(attribute)).append("\n"); - sb.append(" amount: ").append(toIndentedString(amount)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java deleted file mode 100644 index 26f5264e62..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetConfigStatus200Response */ -public class GetConfigStatus200Response { - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("isRunning") - private Boolean isRunning; - - @JsonProperty("lastBuiltAt") - private String lastBuiltAt; - - @JsonProperty("lastSuccessfulBuiltAt") - private String lastSuccessfulBuiltAt; - - @JsonProperty("lastSuccessfulBuildDuration") - private String lastSuccessfulBuildDuration; - - public GetConfigStatus200Response setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Query Suggestions index name. - * - * @return indexName - */ - @javax.annotation.Nullable - public String getIndexName() { - return indexName; - } - - public GetConfigStatus200Response setIsRunning(Boolean isRunning) { - this.isRunning = isRunning; - return this; - } - - /** - * Indicates whether the creation or update of the Query Suggestions is in progress. - * - * @return isRunning - */ - @javax.annotation.Nullable - public Boolean getIsRunning() { - return isRunning; - } - - public GetConfigStatus200Response setLastBuiltAt(String lastBuiltAt) { - this.lastBuiltAt = lastBuiltAt; - return this; - } - - /** - * Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions - * index was last built. - * - * @return lastBuiltAt - */ - @javax.annotation.Nullable - public String getLastBuiltAt() { - return lastBuiltAt; - } - - public GetConfigStatus200Response setLastSuccessfulBuiltAt(String lastSuccessfulBuiltAt) { - this.lastSuccessfulBuiltAt = lastSuccessfulBuiltAt; - return this; - } - - /** - * Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions - * index was last updated successfully. - * - * @return lastSuccessfulBuiltAt - */ - @javax.annotation.Nullable - public String getLastSuccessfulBuiltAt() { - return lastSuccessfulBuiltAt; - } - - public GetConfigStatus200Response setLastSuccessfulBuildDuration(String lastSuccessfulBuildDuration) { - this.lastSuccessfulBuildDuration = lastSuccessfulBuildDuration; - return this; - } - - /** - * Duration of the last successful build in seconds. - * - * @return lastSuccessfulBuildDuration - */ - @javax.annotation.Nullable - public String getLastSuccessfulBuildDuration() { - return lastSuccessfulBuildDuration; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetConfigStatus200Response getConfigStatus200Response = (GetConfigStatus200Response) o; - return ( - Objects.equals(this.indexName, getConfigStatus200Response.indexName) && - Objects.equals(this.isRunning, getConfigStatus200Response.isRunning) && - Objects.equals(this.lastBuiltAt, getConfigStatus200Response.lastBuiltAt) && - Objects.equals(this.lastSuccessfulBuiltAt, getConfigStatus200Response.lastSuccessfulBuiltAt) && - Objects.equals(this.lastSuccessfulBuildDuration, getConfigStatus200Response.lastSuccessfulBuildDuration) - ); - } - - @Override - public int hashCode() { - return Objects.hash(indexName, isRunning, lastBuiltAt, lastSuccessfulBuiltAt, lastSuccessfulBuildDuration); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetConfigStatus200Response {\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" isRunning: ").append(toIndentedString(isRunning)).append("\n"); - sb.append(" lastBuiltAt: ").append(toIndentedString(lastBuiltAt)).append("\n"); - sb.append(" lastSuccessfulBuiltAt: ").append(toIndentedString(lastSuccessfulBuiltAt)).append("\n"); - sb.append(" lastSuccessfulBuildDuration: ").append(toIndentedString(lastSuccessfulBuildDuration)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java deleted file mode 100644 index 8f873c1d1d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetLogFile200Response */ -public class GetLogFile200Response { - - @JsonProperty("timestamp") - private String timestamp; - - @JsonProperty("level") - private LogLevel level; - - @JsonProperty("message") - private String message; - - @JsonProperty("contextLevel") - private Integer contextLevel; - - public GetLogFile200Response setTimestamp(String timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return timestamp - */ - @javax.annotation.Nullable - public String getTimestamp() { - return timestamp; - } - - public GetLogFile200Response setLevel(LogLevel level) { - this.level = level; - return this; - } - - /** - * Get level - * - * @return level - */ - @javax.annotation.Nullable - public LogLevel getLevel() { - return level; - } - - public GetLogFile200Response setMessage(String message) { - this.message = message; - return this; - } - - /** - * Details about this log entry. - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public GetLogFile200Response setContextLevel(Integer contextLevel) { - this.contextLevel = contextLevel; - return this; - } - - /** - * Level indicating the position of a suggestion in a hierarchy of records. For example, a - * `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with - * `contextLevel` 0. - * - * @return contextLevel - */ - @javax.annotation.Nullable - public Integer getContextLevel() { - return contextLevel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLogFile200Response getLogFile200Response = (GetLogFile200Response) o; - return ( - Objects.equals(this.timestamp, getLogFile200Response.timestamp) && - Objects.equals(this.level, getLogFile200Response.level) && - Objects.equals(this.message, getLogFile200Response.message) && - Objects.equals(this.contextLevel, getLogFile200Response.contextLevel) - ); - } - - @Override - public int hashCode() { - return Objects.hash(timestamp, level, message, contextLevel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetLogFile200Response {\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append(" level: ").append(toIndentedString(level)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" contextLevel: ").append(toIndentedString(contextLevel)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/Languages.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/Languages.java deleted file mode 100644 index 7acba838b7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/Languages.java +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * Set the language for deduplicating singular and plural suggestions. If specified, only the more - * popular form is included. - */ -@JsonDeserialize(using = Languages.LanguagesDeserializer.class) -@JsonSerialize(using = Languages.LanguagesSerializer.class) -public abstract class Languages implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(Languages.class.getName()); - - public static Languages of(Boolean inside) { - return new LanguagesBoolean(inside); - } - - public static Languages of(List inside) { - return new LanguagesListOfString(inside); - } - - public static class LanguagesSerializer extends StdSerializer { - - public LanguagesSerializer(Class t) { - super(t); - } - - public LanguagesSerializer() { - this(null); - } - - @Override - public void serialize(Languages value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class LanguagesDeserializer extends StdDeserializer { - - public LanguagesDeserializer() { - this(Languages.class); - } - - public LanguagesDeserializer(Class vc) { - super(vc); - } - - @Override - public Languages deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize Boolean - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Boolean value = parser.readValueAs(new TypeReference() {}); - return Languages.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Boolean (error: " + e.getMessage() + ") (type: Boolean)"); - } - } - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return Languages.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public Languages getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "Languages cannot be null"); - } - } -} - -class LanguagesBoolean extends Languages { - - private final Boolean insideValue; - - LanguagesBoolean(Boolean insideValue) { - this.insideValue = insideValue; - } - - @Override - public Boolean getInsideValue() { - return insideValue; - } -} - -class LanguagesListOfString extends Languages { - - private final List insideValue; - - LanguagesListOfString(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/LogLevel.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/LogLevel.java deleted file mode 100644 index 0934e3b5d9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/LogLevel.java +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * The type of log entry. - `SKIP`. A query is skipped because it doesn't match the conditions for - * successful inclusion. For example, when a query doesn't generate enough search results. - `INFO`. - * An informative log entry. - `ERROR`. The Query Suggestions process encountered an error. - */ -public enum LogLevel { - SKIP("SKIP"), - - INFO("INFO"), - - ERROR("ERROR"); - - private final String value; - - LogLevel(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static LogLevel fromValue(String value) { - for (LogLevel b : LogLevel.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfiguration.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfiguration.java deleted file mode 100644 index ccc39e0d10..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfiguration.java +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Query Suggestions configuration. */ -public class QuerySuggestionsConfiguration { - - @JsonProperty("sourceIndices") - private List sourceIndices = new ArrayList<>(); - - @JsonProperty("languages") - private Languages languages; - - @JsonProperty("exclude") - private List exclude; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("allowSpecialCharacters") - private Boolean allowSpecialCharacters; - - public QuerySuggestionsConfiguration setSourceIndices(List sourceIndices) { - this.sourceIndices = sourceIndices; - return this; - } - - public QuerySuggestionsConfiguration addSourceIndices(SourceIndex sourceIndicesItem) { - this.sourceIndices.add(sourceIndicesItem); - return this; - } - - /** - * Algolia indices from which to get the popular searches for query suggestions. - * - * @return sourceIndices - */ - @javax.annotation.Nonnull - public List getSourceIndices() { - return sourceIndices; - } - - public QuerySuggestionsConfiguration setLanguages(Languages languages) { - this.languages = languages; - return this; - } - - /** - * Get languages - * - * @return languages - */ - @javax.annotation.Nullable - public Languages getLanguages() { - return languages; - } - - public QuerySuggestionsConfiguration setExclude(List exclude) { - this.exclude = exclude; - return this; - } - - public QuerySuggestionsConfiguration addExclude(String excludeItem) { - if (this.exclude == null) { - this.exclude = new ArrayList<>(); - } - this.exclude.add(excludeItem); - return this; - } - - /** - * Patterns to exclude from query suggestions. - * - * @return exclude - */ - @javax.annotation.Nullable - public List getExclude() { - return exclude; - } - - public QuerySuggestionsConfiguration setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Turn on personalized query suggestions. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public QuerySuggestionsConfiguration setAllowSpecialCharacters(Boolean allowSpecialCharacters) { - this.allowSpecialCharacters = allowSpecialCharacters; - return this; - } - - /** - * Allow suggestions with special characters. - * - * @return allowSpecialCharacters - */ - @javax.annotation.Nullable - public Boolean getAllowSpecialCharacters() { - return allowSpecialCharacters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuerySuggestionsConfiguration querySuggestionsConfiguration = (QuerySuggestionsConfiguration) o; - return ( - Objects.equals(this.sourceIndices, querySuggestionsConfiguration.sourceIndices) && - Objects.equals(this.languages, querySuggestionsConfiguration.languages) && - Objects.equals(this.exclude, querySuggestionsConfiguration.exclude) && - Objects.equals(this.enablePersonalization, querySuggestionsConfiguration.enablePersonalization) && - Objects.equals(this.allowSpecialCharacters, querySuggestionsConfiguration.allowSpecialCharacters) - ); - } - - @Override - public int hashCode() { - return Objects.hash(sourceIndices, languages, exclude, enablePersonalization, allowSpecialCharacters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QuerySuggestionsConfiguration {\n"); - sb.append(" sourceIndices: ").append(toIndentedString(sourceIndices)).append("\n"); - sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); - sb.append(" exclude: ").append(toIndentedString(exclude)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" allowSpecialCharacters: ").append(toIndentedString(allowSpecialCharacters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationResponse.java deleted file mode 100644 index fd20432a71..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationResponse.java +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** QuerySuggestionsConfigurationResponse */ -public class QuerySuggestionsConfigurationResponse { - - @JsonProperty("appId") - private String appId; - - @JsonProperty("sourceIndicesAPIKey") - private String sourceIndicesAPIKey; - - @JsonProperty("suggestionsIndicesAPIKey") - private String suggestionsIndicesAPIKey; - - @JsonProperty("externalIndicesAPIKey") - private String externalIndicesAPIKey; - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("sourceIndices") - private List sourceIndices = new ArrayList<>(); - - @JsonProperty("languages") - private Languages languages; - - @JsonProperty("exclude") - private List exclude; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("allowSpecialCharacters") - private Boolean allowSpecialCharacters; - - public QuerySuggestionsConfigurationResponse setAppId(String appId) { - this.appId = appId; - return this; - } - - /** - * Your Algolia application ID. - * - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public QuerySuggestionsConfigurationResponse setSourceIndicesAPIKey(String sourceIndicesAPIKey) { - this.sourceIndicesAPIKey = sourceIndicesAPIKey; - return this; - } - - /** - * API key used to read from your source index. - * - * @return sourceIndicesAPIKey - */ - @javax.annotation.Nullable - public String getSourceIndicesAPIKey() { - return sourceIndicesAPIKey; - } - - public QuerySuggestionsConfigurationResponse setSuggestionsIndicesAPIKey(String suggestionsIndicesAPIKey) { - this.suggestionsIndicesAPIKey = suggestionsIndicesAPIKey; - return this; - } - - /** - * API key used to write and configure your Query Suggestions index. - * - * @return suggestionsIndicesAPIKey - */ - @javax.annotation.Nullable - public String getSuggestionsIndicesAPIKey() { - return suggestionsIndicesAPIKey; - } - - public QuerySuggestionsConfigurationResponse setExternalIndicesAPIKey(String externalIndicesAPIKey) { - this.externalIndicesAPIKey = externalIndicesAPIKey; - return this; - } - - /** - * API key used to read from external Algolia indices. - * - * @return externalIndicesAPIKey - */ - @javax.annotation.Nullable - public String getExternalIndicesAPIKey() { - return externalIndicesAPIKey; - } - - public QuerySuggestionsConfigurationResponse setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Query Suggestions index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public QuerySuggestionsConfigurationResponse setSourceIndices(List sourceIndices) { - this.sourceIndices = sourceIndices; - return this; - } - - public QuerySuggestionsConfigurationResponse addSourceIndices(SourceIndex sourceIndicesItem) { - this.sourceIndices.add(sourceIndicesItem); - return this; - } - - /** - * Algolia indices from which to get the popular searches for query suggestions. - * - * @return sourceIndices - */ - @javax.annotation.Nonnull - public List getSourceIndices() { - return sourceIndices; - } - - public QuerySuggestionsConfigurationResponse setLanguages(Languages languages) { - this.languages = languages; - return this; - } - - /** - * Get languages - * - * @return languages - */ - @javax.annotation.Nullable - public Languages getLanguages() { - return languages; - } - - public QuerySuggestionsConfigurationResponse setExclude(List exclude) { - this.exclude = exclude; - return this; - } - - public QuerySuggestionsConfigurationResponse addExclude(String excludeItem) { - if (this.exclude == null) { - this.exclude = new ArrayList<>(); - } - this.exclude.add(excludeItem); - return this; - } - - /** - * Patterns to exclude from query suggestions. - * - * @return exclude - */ - @javax.annotation.Nullable - public List getExclude() { - return exclude; - } - - public QuerySuggestionsConfigurationResponse setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Turn on personalized query suggestions. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public QuerySuggestionsConfigurationResponse setAllowSpecialCharacters(Boolean allowSpecialCharacters) { - this.allowSpecialCharacters = allowSpecialCharacters; - return this; - } - - /** - * Allow suggestions with special characters. - * - * @return allowSpecialCharacters - */ - @javax.annotation.Nullable - public Boolean getAllowSpecialCharacters() { - return allowSpecialCharacters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuerySuggestionsConfigurationResponse querySuggestionsConfigurationResponse = (QuerySuggestionsConfigurationResponse) o; - return ( - Objects.equals(this.appId, querySuggestionsConfigurationResponse.appId) && - Objects.equals(this.sourceIndicesAPIKey, querySuggestionsConfigurationResponse.sourceIndicesAPIKey) && - Objects.equals(this.suggestionsIndicesAPIKey, querySuggestionsConfigurationResponse.suggestionsIndicesAPIKey) && - Objects.equals(this.externalIndicesAPIKey, querySuggestionsConfigurationResponse.externalIndicesAPIKey) && - Objects.equals(this.indexName, querySuggestionsConfigurationResponse.indexName) && - Objects.equals(this.sourceIndices, querySuggestionsConfigurationResponse.sourceIndices) && - Objects.equals(this.languages, querySuggestionsConfigurationResponse.languages) && - Objects.equals(this.exclude, querySuggestionsConfigurationResponse.exclude) && - Objects.equals(this.enablePersonalization, querySuggestionsConfigurationResponse.enablePersonalization) && - Objects.equals(this.allowSpecialCharacters, querySuggestionsConfigurationResponse.allowSpecialCharacters) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - appId, - sourceIndicesAPIKey, - suggestionsIndicesAPIKey, - externalIndicesAPIKey, - indexName, - sourceIndices, - languages, - exclude, - enablePersonalization, - allowSpecialCharacters - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QuerySuggestionsConfigurationResponse {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" sourceIndicesAPIKey: ").append(toIndentedString(sourceIndicesAPIKey)).append("\n"); - sb.append(" suggestionsIndicesAPIKey: ").append(toIndentedString(suggestionsIndicesAPIKey)).append("\n"); - sb.append(" externalIndicesAPIKey: ").append(toIndentedString(externalIndicesAPIKey)).append("\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" sourceIndices: ").append(toIndentedString(sourceIndices)).append("\n"); - sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); - sb.append(" exclude: ").append(toIndentedString(exclude)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" allowSpecialCharacters: ").append(toIndentedString(allowSpecialCharacters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationResponseAllOf.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationResponseAllOf.java deleted file mode 100644 index 6ab6002be4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationResponseAllOf.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** QuerySuggestionsConfigurationResponseAllOf */ -public class QuerySuggestionsConfigurationResponseAllOf { - - @JsonProperty("appId") - private String appId; - - @JsonProperty("sourceIndicesAPIKey") - private String sourceIndicesAPIKey; - - @JsonProperty("suggestionsIndicesAPIKey") - private String suggestionsIndicesAPIKey; - - @JsonProperty("externalIndicesAPIKey") - private String externalIndicesAPIKey; - - public QuerySuggestionsConfigurationResponseAllOf setAppId(String appId) { - this.appId = appId; - return this; - } - - /** - * Your Algolia application ID. - * - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public QuerySuggestionsConfigurationResponseAllOf setSourceIndicesAPIKey(String sourceIndicesAPIKey) { - this.sourceIndicesAPIKey = sourceIndicesAPIKey; - return this; - } - - /** - * API key used to read from your source index. - * - * @return sourceIndicesAPIKey - */ - @javax.annotation.Nullable - public String getSourceIndicesAPIKey() { - return sourceIndicesAPIKey; - } - - public QuerySuggestionsConfigurationResponseAllOf setSuggestionsIndicesAPIKey(String suggestionsIndicesAPIKey) { - this.suggestionsIndicesAPIKey = suggestionsIndicesAPIKey; - return this; - } - - /** - * API key used to write and configure your Query Suggestions index. - * - * @return suggestionsIndicesAPIKey - */ - @javax.annotation.Nullable - public String getSuggestionsIndicesAPIKey() { - return suggestionsIndicesAPIKey; - } - - public QuerySuggestionsConfigurationResponseAllOf setExternalIndicesAPIKey(String externalIndicesAPIKey) { - this.externalIndicesAPIKey = externalIndicesAPIKey; - return this; - } - - /** - * API key used to read from external Algolia indices. - * - * @return externalIndicesAPIKey - */ - @javax.annotation.Nullable - public String getExternalIndicesAPIKey() { - return externalIndicesAPIKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuerySuggestionsConfigurationResponseAllOf querySuggestionsConfigurationResponseAllOf = (QuerySuggestionsConfigurationResponseAllOf) o; - return ( - Objects.equals(this.appId, querySuggestionsConfigurationResponseAllOf.appId) && - Objects.equals(this.sourceIndicesAPIKey, querySuggestionsConfigurationResponseAllOf.sourceIndicesAPIKey) && - Objects.equals(this.suggestionsIndicesAPIKey, querySuggestionsConfigurationResponseAllOf.suggestionsIndicesAPIKey) && - Objects.equals(this.externalIndicesAPIKey, querySuggestionsConfigurationResponseAllOf.externalIndicesAPIKey) - ); - } - - @Override - public int hashCode() { - return Objects.hash(appId, sourceIndicesAPIKey, suggestionsIndicesAPIKey, externalIndicesAPIKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QuerySuggestionsConfigurationResponseAllOf {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" sourceIndicesAPIKey: ").append(toIndentedString(sourceIndicesAPIKey)).append("\n"); - sb.append(" suggestionsIndicesAPIKey: ").append(toIndentedString(suggestionsIndicesAPIKey)).append("\n"); - sb.append(" externalIndicesAPIKey: ").append(toIndentedString(externalIndicesAPIKey)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationWithIndex.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationWithIndex.java deleted file mode 100644 index e93af5b013..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationWithIndex.java +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Query Suggestions configuration. */ -public class QuerySuggestionsConfigurationWithIndex { - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("sourceIndices") - private List sourceIndices = new ArrayList<>(); - - @JsonProperty("languages") - private Languages languages; - - @JsonProperty("exclude") - private List exclude; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("allowSpecialCharacters") - private Boolean allowSpecialCharacters; - - public QuerySuggestionsConfigurationWithIndex setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Query Suggestions index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public QuerySuggestionsConfigurationWithIndex setSourceIndices(List sourceIndices) { - this.sourceIndices = sourceIndices; - return this; - } - - public QuerySuggestionsConfigurationWithIndex addSourceIndices(SourceIndex sourceIndicesItem) { - this.sourceIndices.add(sourceIndicesItem); - return this; - } - - /** - * Algolia indices from which to get the popular searches for query suggestions. - * - * @return sourceIndices - */ - @javax.annotation.Nonnull - public List getSourceIndices() { - return sourceIndices; - } - - public QuerySuggestionsConfigurationWithIndex setLanguages(Languages languages) { - this.languages = languages; - return this; - } - - /** - * Get languages - * - * @return languages - */ - @javax.annotation.Nullable - public Languages getLanguages() { - return languages; - } - - public QuerySuggestionsConfigurationWithIndex setExclude(List exclude) { - this.exclude = exclude; - return this; - } - - public QuerySuggestionsConfigurationWithIndex addExclude(String excludeItem) { - if (this.exclude == null) { - this.exclude = new ArrayList<>(); - } - this.exclude.add(excludeItem); - return this; - } - - /** - * Patterns to exclude from query suggestions. - * - * @return exclude - */ - @javax.annotation.Nullable - public List getExclude() { - return exclude; - } - - public QuerySuggestionsConfigurationWithIndex setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Turn on personalized query suggestions. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public QuerySuggestionsConfigurationWithIndex setAllowSpecialCharacters(Boolean allowSpecialCharacters) { - this.allowSpecialCharacters = allowSpecialCharacters; - return this; - } - - /** - * Allow suggestions with special characters. - * - * @return allowSpecialCharacters - */ - @javax.annotation.Nullable - public Boolean getAllowSpecialCharacters() { - return allowSpecialCharacters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuerySuggestionsConfigurationWithIndex querySuggestionsConfigurationWithIndex = (QuerySuggestionsConfigurationWithIndex) o; - return ( - Objects.equals(this.indexName, querySuggestionsConfigurationWithIndex.indexName) && - Objects.equals(this.sourceIndices, querySuggestionsConfigurationWithIndex.sourceIndices) && - Objects.equals(this.languages, querySuggestionsConfigurationWithIndex.languages) && - Objects.equals(this.exclude, querySuggestionsConfigurationWithIndex.exclude) && - Objects.equals(this.enablePersonalization, querySuggestionsConfigurationWithIndex.enablePersonalization) && - Objects.equals(this.allowSpecialCharacters, querySuggestionsConfigurationWithIndex.allowSpecialCharacters) - ); - } - - @Override - public int hashCode() { - return Objects.hash(indexName, sourceIndices, languages, exclude, enablePersonalization, allowSpecialCharacters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QuerySuggestionsConfigurationWithIndex {\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" sourceIndices: ").append(toIndentedString(sourceIndices)).append("\n"); - sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); - sb.append(" exclude: ").append(toIndentedString(exclude)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" allowSpecialCharacters: ").append(toIndentedString(allowSpecialCharacters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationWithIndexAllOf.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationWithIndexAllOf.java deleted file mode 100644 index 8b49e91caf..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/QuerySuggestionsConfigurationWithIndexAllOf.java +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** QuerySuggestionsConfigurationWithIndexAllOf */ -public class QuerySuggestionsConfigurationWithIndexAllOf { - - @JsonProperty("indexName") - private String indexName; - - public QuerySuggestionsConfigurationWithIndexAllOf setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Query Suggestions index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuerySuggestionsConfigurationWithIndexAllOf querySuggestionsConfigurationWithIndexAllOf = - (QuerySuggestionsConfigurationWithIndexAllOf) o; - return Objects.equals(this.indexName, querySuggestionsConfigurationWithIndexAllOf.indexName); - } - - @Override - public int hashCode() { - return Objects.hash(indexName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QuerySuggestionsConfigurationWithIndexAllOf {\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/SourceIndex.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/SourceIndex.java deleted file mode 100644 index 78532f61cb..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/querysuggestions/SourceIndex.java +++ /dev/null @@ -1,251 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.querysuggestions; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Configuration of an Algolia index for Query Suggestions. */ -public class SourceIndex { - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("replicas") - private Boolean replicas; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("minHits") - private Integer minHits; - - @JsonProperty("minLetters") - private Integer minLetters; - - @JsonProperty("generate") - private List> generate; - - @JsonProperty("external") - private List external; - - public SourceIndex setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Name of the Algolia index to use as source for query suggestions. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public SourceIndex setReplicas(Boolean replicas) { - this.replicas = replicas; - return this; - } - - /** - * If true, Query Suggestions uses all replicas of the primary index to find popular searches. If - * false, only the primary index is used. - * - * @return replicas - */ - @javax.annotation.Nullable - public Boolean getReplicas() { - return replicas; - } - - public SourceIndex setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public SourceIndex addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * [Analytics tags](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) for - * filtering the popular searches. - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public SourceIndex setFacets(List facets) { - this.facets = facets; - return this; - } - - public SourceIndex addFacets(Facet facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Facets to use as top categories with your suggestions. If provided, Query Suggestions adds the - * top facet values to each suggestion. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public SourceIndex setMinHits(Integer minHits) { - this.minHits = minHits; - return this; - } - - /** - * Minimum number of hits required to be included as a suggestion. A search query must at least - * generate `minHits` hits to be included in the Query Suggestions index. minimum: 0 - * - * @return minHits - */ - @javax.annotation.Nullable - public Integer getMinHits() { - return minHits; - } - - public SourceIndex setMinLetters(Integer minLetters) { - this.minLetters = minLetters; - return this; - } - - /** - * Minimum letters required to be included as a suggestion. A search query must be at least - * `minLetters` long to be included in the Query Suggestions index. minimum: 0 - * - * @return minLetters - */ - @javax.annotation.Nullable - public Integer getMinLetters() { - return minLetters; - } - - public SourceIndex setGenerate(List> generate) { - this.generate = generate; - return this; - } - - public SourceIndex addGenerate(List generateItem) { - if (this.generate == null) { - this.generate = new ArrayList<>(); - } - this.generate.add(generateItem); - return this; - } - - /** - * Get generate - * - * @return generate - */ - @javax.annotation.Nullable - public List> getGenerate() { - return generate; - } - - public SourceIndex setExternal(List external) { - this.external = external; - return this; - } - - public SourceIndex addExternal(String externalItem) { - if (this.external == null) { - this.external = new ArrayList<>(); - } - this.external.add(externalItem); - return this; - } - - /** - * Algolia indices with popular searches to use as query suggestions. Records of these indices - * must have these attributes: - `query`: search query which will be added as a suggestion - - * `count`: measure of popularity of that search query For example, you can export popular - * searches from an external analytics tool, such as Google Analytics or Adobe Analytics, and feed - * this data into an external Algolia index. You can use this external index to generate query - * suggestions until your Algolia analytics has collected enough data. - * - * @return external - */ - @javax.annotation.Nullable - public List getExternal() { - return external; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SourceIndex sourceIndex = (SourceIndex) o; - return ( - Objects.equals(this.indexName, sourceIndex.indexName) && - Objects.equals(this.replicas, sourceIndex.replicas) && - Objects.equals(this.analyticsTags, sourceIndex.analyticsTags) && - Objects.equals(this.facets, sourceIndex.facets) && - Objects.equals(this.minHits, sourceIndex.minHits) && - Objects.equals(this.minLetters, sourceIndex.minLetters) && - Objects.equals(this.generate, sourceIndex.generate) && - Objects.equals(this.external, sourceIndex.external) - ); - } - - @Override - public int hashCode() { - return Objects.hash(indexName, replicas, analyticsTags, facets, minHits, minLetters, generate, external); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SourceIndex {\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" replicas: ").append(toIndentedString(replicas)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" minHits: ").append(toIndentedString(minHits)).append("\n"); - sb.append(" minLetters: ").append(toIndentedString(minLetters)).append("\n"); - sb.append(" generate: ").append(toIndentedString(generate)).append("\n"); - sb.append(" external: ").append(toIndentedString(external)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AdvancedSyntaxFeatures.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AdvancedSyntaxFeatures.java deleted file mode 100644 index d2b6d648ed..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AdvancedSyntaxFeatures.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets advancedSyntaxFeatures */ -public enum AdvancedSyntaxFeatures { - EXACT_PHRASE("exactPhrase"), - - EXCLUDE_WORDS("excludeWords"); - - private final String value; - - AdvancedSyntaxFeatures(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AdvancedSyntaxFeatures fromValue(String value) { - for (AdvancedSyntaxFeatures b : AdvancedSyntaxFeatures.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AlternativesAsExact.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AlternativesAsExact.java deleted file mode 100644 index 25c997de79..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AlternativesAsExact.java +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets alternativesAsExact */ -public enum AlternativesAsExact { - IGNORE_PLURALS("ignorePlurals"), - - SINGLE_WORD_SYNONYM("singleWordSynonym"), - - MULTI_WORDS_SYNONYM("multiWordsSynonym"); - - private final String value; - - AlternativesAsExact(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AlternativesAsExact fromValue(String value) { - for (AlternativesAsExact b : AlternativesAsExact.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Anchoring.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Anchoring.java deleted file mode 100644 index 2c1e4b1caa..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Anchoring.java +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the - * query string, is an exact match (`is`), or a partial match (`contains`). - */ -public enum Anchoring { - IS("is"), - - STARTS_WITH("startsWith"), - - ENDS_WITH("endsWith"), - - CONTAINS("contains"); - - private final String value; - - Anchoring(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Anchoring fromValue(String value) { - for (Anchoring b : Anchoring.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AroundRadius.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AroundRadius.java deleted file mode 100644 index 0923621202..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AroundRadius.java +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** - * [Maximum - * radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - * for a geographical search (in meters). - */ -@JsonDeserialize(using = AroundRadius.AroundRadiusDeserializer.class) -@JsonSerialize(using = AroundRadius.AroundRadiusSerializer.class) -public abstract class AroundRadius implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(AroundRadius.class.getName()); - - public static AroundRadius of(AroundRadiusAll inside) { - return new AroundRadiusAroundRadiusAll(inside); - } - - public static AroundRadius of(Integer inside) { - return new AroundRadiusInteger(inside); - } - - public static class AroundRadiusSerializer extends StdSerializer { - - public AroundRadiusSerializer(Class t) { - super(t); - } - - public AroundRadiusSerializer() { - this(null); - } - - @Override - public void serialize(AroundRadius value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class AroundRadiusDeserializer extends StdDeserializer { - - public AroundRadiusDeserializer() { - this(AroundRadius.class); - } - - public AroundRadiusDeserializer(Class vc) { - super(vc); - } - - @Override - public AroundRadius deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize AroundRadiusAll - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - AroundRadiusAll value = parser.readValueAs(new TypeReference() {}); - return AroundRadius.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf AroundRadiusAll (error: " + e.getMessage() + ") (type: AroundRadiusAll)"); - } - } - - // deserialize Integer - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Integer value = parser.readValueAs(new TypeReference() {}); - return AroundRadius.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Integer (error: " + e.getMessage() + ") (type: Integer)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public AroundRadius getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "AroundRadius cannot be null"); - } - } -} - -class AroundRadiusAroundRadiusAll extends AroundRadius { - - private final AroundRadiusAll insideValue; - - AroundRadiusAroundRadiusAll(AroundRadiusAll insideValue) { - this.insideValue = insideValue; - } - - @Override - public AroundRadiusAll getInsideValue() { - return insideValue; - } -} - -class AroundRadiusInteger extends AroundRadius { - - private final Integer insideValue; - - AroundRadiusInteger(Integer insideValue) { - this.insideValue = insideValue; - } - - @Override - public Integer getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AroundRadiusAll.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AroundRadiusAll.java deleted file mode 100644 index 6bff83e6bc..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AroundRadiusAll.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets aroundRadiusAll */ -public enum AroundRadiusAll { - ALL("all"); - - private final String value; - - AroundRadiusAll(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AroundRadiusAll fromValue(String value) { - for (AroundRadiusAll b : AroundRadiusAll.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AutomaticFacetFilter.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AutomaticFacetFilter.java deleted file mode 100644 index ce26bec6b9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AutomaticFacetFilter.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Automatic facet Filter. */ -public class AutomaticFacetFilter { - - @JsonProperty("facet") - private String facet; - - @JsonProperty("score") - private Integer score; - - @JsonProperty("disjunctive") - private Boolean disjunctive; - - public AutomaticFacetFilter setFacet(String facet) { - this.facet = facet; - return this; - } - - /** - * Attribute to filter on. This must match a facet placeholder in the Rule's pattern. - * - * @return facet - */ - @javax.annotation.Nonnull - public String getFacet() { - return facet; - } - - public AutomaticFacetFilter setScore(Integer score) { - this.score = score; - return this; - } - - /** - * Score for the filter. Typically used for optional or disjunctive filters. - * - * @return score - */ - @javax.annotation.Nullable - public Integer getScore() { - return score; - } - - public AutomaticFacetFilter setDisjunctive(Boolean disjunctive) { - this.disjunctive = disjunctive; - return this; - } - - /** - * Whether the filter is disjunctive (true) or conjunctive (false). - * - * @return disjunctive - */ - @javax.annotation.Nullable - public Boolean getDisjunctive() { - return disjunctive; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AutomaticFacetFilter automaticFacetFilter = (AutomaticFacetFilter) o; - return ( - Objects.equals(this.facet, automaticFacetFilter.facet) && - Objects.equals(this.score, automaticFacetFilter.score) && - Objects.equals(this.disjunctive, automaticFacetFilter.disjunctive) - ); - } - - @Override - public int hashCode() { - return Objects.hash(facet, score, disjunctive); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AutomaticFacetFilter {\n"); - sb.append(" facet: ").append(toIndentedString(facet)).append("\n"); - sb.append(" score: ").append(toIndentedString(score)).append("\n"); - sb.append(" disjunctive: ").append(toIndentedString(disjunctive)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AutomaticFacetFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AutomaticFacetFilters.java deleted file mode 100644 index 2187cae114..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/AutomaticFacetFilters.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * Names of facets to which automatic filtering must be applied; they must match the facet name of a - * facet value placeholder in the query pattern. - */ -@JsonDeserialize(using = AutomaticFacetFilters.AutomaticFacetFiltersDeserializer.class) -@JsonSerialize(using = AutomaticFacetFilters.AutomaticFacetFiltersSerializer.class) -public abstract class AutomaticFacetFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(AutomaticFacetFilters.class.getName()); - - public static AutomaticFacetFilters ofListOfAutomaticFacetFilter(List inside) { - return new AutomaticFacetFiltersListOfAutomaticFacetFilter(inside); - } - - public static AutomaticFacetFilters ofListOfString(List inside) { - return new AutomaticFacetFiltersListOfString(inside); - } - - public static class AutomaticFacetFiltersSerializer extends StdSerializer { - - public AutomaticFacetFiltersSerializer(Class t) { - super(t); - } - - public AutomaticFacetFiltersSerializer() { - this(null); - } - - @Override - public void serialize(AutomaticFacetFilters value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class AutomaticFacetFiltersDeserializer extends StdDeserializer { - - public AutomaticFacetFiltersDeserializer() { - this(AutomaticFacetFilters.class); - } - - public AutomaticFacetFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public AutomaticFacetFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return AutomaticFacetFilters.ofListOfAutomaticFacetFilter(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return AutomaticFacetFilters.ofListOfString(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public AutomaticFacetFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "AutomaticFacetFilters cannot be null"); - } - } -} - -class AutomaticFacetFiltersListOfAutomaticFacetFilter extends AutomaticFacetFilters { - - private final List insideValue; - - AutomaticFacetFiltersListOfAutomaticFacetFilter(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class AutomaticFacetFiltersListOfString extends AutomaticFacetFilters { - - private final List insideValue; - - AutomaticFacetFiltersListOfString(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseRecommendRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseRecommendRequest.java deleted file mode 100644 index 3023b9370d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseRecommendRequest.java +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** BaseRecommendRequest */ -public class BaseRecommendRequest { - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("threshold") - private Integer threshold; - - @JsonProperty("maxRecommendations") - private Integer maxRecommendations; - - @JsonProperty("queryParameters") - private SearchParamsObject queryParameters; - - @JsonProperty("fallbackParameters") - private SearchParamsObject fallbackParameters; - - public BaseRecommendRequest setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Algolia index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public BaseRecommendRequest setThreshold(Integer threshold) { - this.threshold = threshold; - return this; - } - - /** - * Recommendations with a confidence score lower than `threshold` won't appear in results. > - * **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to - * 100, the more relevant the recommendations are. minimum: 0 maximum: 100 - * - * @return threshold - */ - @javax.annotation.Nonnull - public Integer getThreshold() { - return threshold; - } - - public BaseRecommendRequest setMaxRecommendations(Integer maxRecommendations) { - this.maxRecommendations = maxRecommendations; - return this; - } - - /** - * Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. - * - * @return maxRecommendations - */ - @javax.annotation.Nullable - public Integer getMaxRecommendations() { - return maxRecommendations; - } - - public BaseRecommendRequest setQueryParameters(SearchParamsObject queryParameters) { - this.queryParameters = queryParameters; - return this; - } - - /** - * Get queryParameters - * - * @return queryParameters - */ - @javax.annotation.Nullable - public SearchParamsObject getQueryParameters() { - return queryParameters; - } - - public BaseRecommendRequest setFallbackParameters(SearchParamsObject fallbackParameters) { - this.fallbackParameters = fallbackParameters; - return this; - } - - /** - * Get fallbackParameters - * - * @return fallbackParameters - */ - @javax.annotation.Nullable - public SearchParamsObject getFallbackParameters() { - return fallbackParameters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseRecommendRequest baseRecommendRequest = (BaseRecommendRequest) o; - return ( - Objects.equals(this.indexName, baseRecommendRequest.indexName) && - Objects.equals(this.threshold, baseRecommendRequest.threshold) && - Objects.equals(this.maxRecommendations, baseRecommendRequest.maxRecommendations) && - Objects.equals(this.queryParameters, baseRecommendRequest.queryParameters) && - Objects.equals(this.fallbackParameters, baseRecommendRequest.fallbackParameters) - ); - } - - @Override - public int hashCode() { - return Objects.hash(indexName, threshold, maxRecommendations, queryParameters, fallbackParameters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseRecommendRequest {\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" threshold: ").append(toIndentedString(threshold)).append("\n"); - sb.append(" maxRecommendations: ").append(toIndentedString(maxRecommendations)).append("\n"); - sb.append(" queryParameters: ").append(toIndentedString(queryParameters)).append("\n"); - sb.append(" fallbackParameters: ").append(toIndentedString(fallbackParameters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseRecommendationRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseRecommendationRequest.java deleted file mode 100644 index 5e066f7a88..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseRecommendationRequest.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** BaseRecommendationRequest */ -public class BaseRecommendationRequest { - - @JsonProperty("model") - private RecommendationModels model; - - @JsonProperty("objectID") - private String objectID; - - public BaseRecommendationRequest setModel(RecommendationModels model) { - this.model = model; - return this; - } - - /** - * Get model - * - * @return model - */ - @javax.annotation.Nonnull - public RecommendationModels getModel() { - return model; - } - - public BaseRecommendationRequest setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique object identifier. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseRecommendationRequest baseRecommendationRequest = (BaseRecommendationRequest) o; - return Objects.equals(this.model, baseRecommendationRequest.model) && Objects.equals(this.objectID, baseRecommendationRequest.objectID); - } - - @Override - public int hashCode() { - return Objects.hash(model, objectID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseRecommendationRequest {\n"); - sb.append(" model: ").append(toIndentedString(model)).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchParams.java deleted file mode 100644 index 1ba44f9454..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchParams.java +++ /dev/null @@ -1,854 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** BaseSearchParams */ -public class BaseSearchParams { - - @JsonProperty("query") - private String query; - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - public BaseSearchParams setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public BaseSearchParams setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public BaseSearchParams setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public BaseSearchParams setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public BaseSearchParams setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public BaseSearchParams setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public BaseSearchParams setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public BaseSearchParams setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public BaseSearchParams setFacets(List facets) { - this.facets = facets; - return this; - } - - public BaseSearchParams addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public BaseSearchParams setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public BaseSearchParams setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public BaseSearchParams setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public BaseSearchParams setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public BaseSearchParams setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public BaseSearchParams setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public BaseSearchParams setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public BaseSearchParams setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public BaseSearchParams setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public BaseSearchParams setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public BaseSearchParams setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public BaseSearchParams setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public BaseSearchParams addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public BaseSearchParams setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public BaseSearchParams addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public BaseSearchParams setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public BaseSearchParams addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public BaseSearchParams setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public BaseSearchParams addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public BaseSearchParams setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public BaseSearchParams setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public BaseSearchParams setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public BaseSearchParams setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public BaseSearchParams setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public BaseSearchParams setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public BaseSearchParams addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public BaseSearchParams setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public BaseSearchParams setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public BaseSearchParams setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public BaseSearchParams setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseSearchParams baseSearchParams = (BaseSearchParams) o; - return ( - Objects.equals(this.query, baseSearchParams.query) && - Objects.equals(this.similarQuery, baseSearchParams.similarQuery) && - Objects.equals(this.filters, baseSearchParams.filters) && - Objects.equals(this.facetFilters, baseSearchParams.facetFilters) && - Objects.equals(this.optionalFilters, baseSearchParams.optionalFilters) && - Objects.equals(this.numericFilters, baseSearchParams.numericFilters) && - Objects.equals(this.tagFilters, baseSearchParams.tagFilters) && - Objects.equals(this.sumOrFiltersScores, baseSearchParams.sumOrFiltersScores) && - Objects.equals(this.facets, baseSearchParams.facets) && - Objects.equals(this.maxValuesPerFacet, baseSearchParams.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, baseSearchParams.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, baseSearchParams.sortFacetValuesBy) && - Objects.equals(this.page, baseSearchParams.page) && - Objects.equals(this.offset, baseSearchParams.offset) && - Objects.equals(this.length, baseSearchParams.length) && - Objects.equals(this.aroundLatLng, baseSearchParams.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, baseSearchParams.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, baseSearchParams.aroundRadius) && - Objects.equals(this.aroundPrecision, baseSearchParams.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, baseSearchParams.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, baseSearchParams.insideBoundingBox) && - Objects.equals(this.insidePolygon, baseSearchParams.insidePolygon) && - Objects.equals(this.naturalLanguages, baseSearchParams.naturalLanguages) && - Objects.equals(this.ruleContexts, baseSearchParams.ruleContexts) && - Objects.equals(this.personalizationImpact, baseSearchParams.personalizationImpact) && - Objects.equals(this.userToken, baseSearchParams.userToken) && - Objects.equals(this.getRankingInfo, baseSearchParams.getRankingInfo) && - Objects.equals(this.clickAnalytics, baseSearchParams.clickAnalytics) && - Objects.equals(this.analytics, baseSearchParams.analytics) && - Objects.equals(this.analyticsTags, baseSearchParams.analyticsTags) && - Objects.equals(this.percentileComputation, baseSearchParams.percentileComputation) && - Objects.equals(this.enableABTest, baseSearchParams.enableABTest) && - Objects.equals(this.enableReRanking, baseSearchParams.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, baseSearchParams.reRankingApplyFilter) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - query, - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseSearchParams {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchParamsWithoutQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchParamsWithoutQuery.java deleted file mode 100644 index 6f3c80d687..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchParamsWithoutQuery.java +++ /dev/null @@ -1,833 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** BaseSearchParamsWithoutQuery */ -public class BaseSearchParamsWithoutQuery { - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - public BaseSearchParamsWithoutQuery setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public BaseSearchParamsWithoutQuery setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public BaseSearchParamsWithoutQuery setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public BaseSearchParamsWithoutQuery setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public BaseSearchParamsWithoutQuery setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public BaseSearchParamsWithoutQuery setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public BaseSearchParamsWithoutQuery setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public BaseSearchParamsWithoutQuery setFacets(List facets) { - this.facets = facets; - return this; - } - - public BaseSearchParamsWithoutQuery addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public BaseSearchParamsWithoutQuery setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public BaseSearchParamsWithoutQuery setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public BaseSearchParamsWithoutQuery setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public BaseSearchParamsWithoutQuery setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public BaseSearchParamsWithoutQuery setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public BaseSearchParamsWithoutQuery setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public BaseSearchParamsWithoutQuery setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public BaseSearchParamsWithoutQuery setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public BaseSearchParamsWithoutQuery setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public BaseSearchParamsWithoutQuery setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public BaseSearchParamsWithoutQuery setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public BaseSearchParamsWithoutQuery setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public BaseSearchParamsWithoutQuery addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public BaseSearchParamsWithoutQuery setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public BaseSearchParamsWithoutQuery addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public BaseSearchParamsWithoutQuery setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public BaseSearchParamsWithoutQuery addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public BaseSearchParamsWithoutQuery setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public BaseSearchParamsWithoutQuery addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public BaseSearchParamsWithoutQuery setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public BaseSearchParamsWithoutQuery setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public BaseSearchParamsWithoutQuery setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public BaseSearchParamsWithoutQuery setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public BaseSearchParamsWithoutQuery setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public BaseSearchParamsWithoutQuery setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public BaseSearchParamsWithoutQuery addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public BaseSearchParamsWithoutQuery setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public BaseSearchParamsWithoutQuery setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public BaseSearchParamsWithoutQuery setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public BaseSearchParamsWithoutQuery setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseSearchParamsWithoutQuery baseSearchParamsWithoutQuery = (BaseSearchParamsWithoutQuery) o; - return ( - Objects.equals(this.similarQuery, baseSearchParamsWithoutQuery.similarQuery) && - Objects.equals(this.filters, baseSearchParamsWithoutQuery.filters) && - Objects.equals(this.facetFilters, baseSearchParamsWithoutQuery.facetFilters) && - Objects.equals(this.optionalFilters, baseSearchParamsWithoutQuery.optionalFilters) && - Objects.equals(this.numericFilters, baseSearchParamsWithoutQuery.numericFilters) && - Objects.equals(this.tagFilters, baseSearchParamsWithoutQuery.tagFilters) && - Objects.equals(this.sumOrFiltersScores, baseSearchParamsWithoutQuery.sumOrFiltersScores) && - Objects.equals(this.facets, baseSearchParamsWithoutQuery.facets) && - Objects.equals(this.maxValuesPerFacet, baseSearchParamsWithoutQuery.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, baseSearchParamsWithoutQuery.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, baseSearchParamsWithoutQuery.sortFacetValuesBy) && - Objects.equals(this.page, baseSearchParamsWithoutQuery.page) && - Objects.equals(this.offset, baseSearchParamsWithoutQuery.offset) && - Objects.equals(this.length, baseSearchParamsWithoutQuery.length) && - Objects.equals(this.aroundLatLng, baseSearchParamsWithoutQuery.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, baseSearchParamsWithoutQuery.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, baseSearchParamsWithoutQuery.aroundRadius) && - Objects.equals(this.aroundPrecision, baseSearchParamsWithoutQuery.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, baseSearchParamsWithoutQuery.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, baseSearchParamsWithoutQuery.insideBoundingBox) && - Objects.equals(this.insidePolygon, baseSearchParamsWithoutQuery.insidePolygon) && - Objects.equals(this.naturalLanguages, baseSearchParamsWithoutQuery.naturalLanguages) && - Objects.equals(this.ruleContexts, baseSearchParamsWithoutQuery.ruleContexts) && - Objects.equals(this.personalizationImpact, baseSearchParamsWithoutQuery.personalizationImpact) && - Objects.equals(this.userToken, baseSearchParamsWithoutQuery.userToken) && - Objects.equals(this.getRankingInfo, baseSearchParamsWithoutQuery.getRankingInfo) && - Objects.equals(this.clickAnalytics, baseSearchParamsWithoutQuery.clickAnalytics) && - Objects.equals(this.analytics, baseSearchParamsWithoutQuery.analytics) && - Objects.equals(this.analyticsTags, baseSearchParamsWithoutQuery.analyticsTags) && - Objects.equals(this.percentileComputation, baseSearchParamsWithoutQuery.percentileComputation) && - Objects.equals(this.enableABTest, baseSearchParamsWithoutQuery.enableABTest) && - Objects.equals(this.enableReRanking, baseSearchParamsWithoutQuery.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, baseSearchParamsWithoutQuery.reRankingApplyFilter) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseSearchParamsWithoutQuery {\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchResponse.java deleted file mode 100644 index d569ba61eb..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchResponse.java +++ /dev/null @@ -1,616 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** BaseSearchResponse */ -public class BaseSearchResponse { - - @JsonProperty("abTestID") - private Integer abTestID; - - @JsonProperty("abTestVariantID") - private Integer abTestVariantID; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("automaticRadius") - private String automaticRadius; - - @JsonProperty("exhaustiveFacetsCount") - private Boolean exhaustiveFacetsCount; - - @JsonProperty("exhaustiveNbHits") - private Boolean exhaustiveNbHits; - - @JsonProperty("exhaustiveTypo") - private Boolean exhaustiveTypo; - - @JsonProperty("facets") - private Map> facets; - - @JsonProperty("facets_stats") - private Map facetsStats; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("index") - private String index; - - @JsonProperty("indexUsed") - private String indexUsed; - - @JsonProperty("message") - private String message; - - @JsonProperty("nbHits") - private Integer nbHits; - - @JsonProperty("nbPages") - private Integer nbPages; - - @JsonProperty("nbSortedHits") - private Integer nbSortedHits; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("params") - private String params; - - @JsonProperty("redirect") - private BaseSearchResponseRedirect redirect; - - @JsonProperty("parsedQuery") - private String parsedQuery; - - @JsonProperty("processingTimeMS") - private Integer processingTimeMS; - - @JsonProperty("query") - private String query; - - @JsonProperty("queryAfterRemoval") - private String queryAfterRemoval; - - @JsonProperty("serverUsed") - private String serverUsed; - - @JsonProperty("userData") - private Object userData; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - public BaseSearchResponse setAbTestID(Integer abTestID) { - this.abTestID = abTestID; - return this; - } - - /** - * A/B test ID. This is only included in the response for indices that are part of an A/B test. - * - * @return abTestID - */ - @javax.annotation.Nullable - public Integer getAbTestID() { - return abTestID; - } - - public BaseSearchResponse setAbTestVariantID(Integer abTestVariantID) { - this.abTestVariantID = abTestVariantID; - return this; - } - - /** - * Variant ID. This is only included in the response for indices that are part of an A/B test. - * minimum: 1 - * - * @return abTestVariantID - */ - @javax.annotation.Nullable - public Integer getAbTestVariantID() { - return abTestVariantID; - } - - public BaseSearchResponse setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Computed geographical location. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public BaseSearchResponse setAutomaticRadius(String automaticRadius) { - this.automaticRadius = automaticRadius; - return this; - } - - /** - * Automatically-computed radius. - * - * @return automaticRadius - */ - @javax.annotation.Nullable - public String getAutomaticRadius() { - return automaticRadius; - } - - public BaseSearchResponse setExhaustiveFacetsCount(Boolean exhaustiveFacetsCount) { - this.exhaustiveFacetsCount = exhaustiveFacetsCount; - return this; - } - - /** - * Indicates whether the facet count is exhaustive (exact) or approximate. - * - * @return exhaustiveFacetsCount - */ - @javax.annotation.Nullable - public Boolean getExhaustiveFacetsCount() { - return exhaustiveFacetsCount; - } - - public BaseSearchResponse setExhaustiveNbHits(Boolean exhaustiveNbHits) { - this.exhaustiveNbHits = exhaustiveNbHits; - return this; - } - - /** - * Indicates whether the number of hits `nbHits` is exhaustive (exact) or approximate. - * - * @return exhaustiveNbHits - */ - @javax.annotation.Nonnull - public Boolean getExhaustiveNbHits() { - return exhaustiveNbHits; - } - - public BaseSearchResponse setExhaustiveTypo(Boolean exhaustiveTypo) { - this.exhaustiveTypo = exhaustiveTypo; - return this; - } - - /** - * Indicates whether the search for typos was exhaustive (exact) or approximate. - * - * @return exhaustiveTypo - */ - @javax.annotation.Nullable - public Boolean getExhaustiveTypo() { - return exhaustiveTypo; - } - - public BaseSearchResponse setFacets(Map> facets) { - this.facets = facets; - return this; - } - - public BaseSearchResponse putFacets(String key, Map facetsItem) { - if (this.facets == null) { - this.facets = new HashMap<>(); - } - this.facets.put(key, facetsItem); - return this; - } - - /** - * Mapping of each facet name to the corresponding facet counts. - * - * @return facets - */ - @javax.annotation.Nullable - public Map> getFacets() { - return facets; - } - - public BaseSearchResponse setFacetsStats(Map facetsStats) { - this.facetsStats = facetsStats; - return this; - } - - public BaseSearchResponse putFacetsStats(String key, FacetsStats facetsStatsItem) { - if (this.facetsStats == null) { - this.facetsStats = new HashMap<>(); - } - this.facetsStats.put(key, facetsStatsItem); - return this; - } - - /** - * Statistics for numerical facets. - * - * @return facetsStats - */ - @javax.annotation.Nullable - public Map getFacetsStats() { - return facetsStats; - } - - public BaseSearchResponse setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nonnull - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public BaseSearchResponse setIndex(String index) { - this.index = index; - return this; - } - - /** - * Index name used for the query. - * - * @return index - */ - @javax.annotation.Nullable - public String getIndex() { - return index; - } - - public BaseSearchResponse setIndexUsed(String indexUsed) { - this.indexUsed = indexUsed; - return this; - } - - /** - * Index name used for the query. During A/B testing, the targeted index isn't always the index - * used by the query. - * - * @return indexUsed - */ - @javax.annotation.Nullable - public String getIndexUsed() { - return indexUsed; - } - - public BaseSearchResponse setMessage(String message) { - this.message = message; - return this; - } - - /** - * Warnings about the query. - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public BaseSearchResponse setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - public BaseSearchResponse setNbPages(Integer nbPages) { - this.nbPages = nbPages; - return this; - } - - /** - * Number of pages of results for the current query. - * - * @return nbPages - */ - @javax.annotation.Nonnull - public Integer getNbPages() { - return nbPages; - } - - public BaseSearchResponse setNbSortedHits(Integer nbSortedHits) { - this.nbSortedHits = nbSortedHits; - return this; - } - - /** - * Number of hits selected and sorted by the relevant sort algorithm. - * - * @return nbSortedHits - */ - @javax.annotation.Nullable - public Integer getNbSortedHits() { - return nbSortedHits; - } - - public BaseSearchResponse setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nonnull - public Integer getPage() { - return page; - } - - public BaseSearchResponse setParams(String params) { - this.params = params; - return this; - } - - /** - * URL-encoded string of all search parameters. - * - * @return params - */ - @javax.annotation.Nonnull - public String getParams() { - return params; - } - - public BaseSearchResponse setRedirect(BaseSearchResponseRedirect redirect) { - this.redirect = redirect; - return this; - } - - /** - * Get redirect - * - * @return redirect - */ - @javax.annotation.Nullable - public BaseSearchResponseRedirect getRedirect() { - return redirect; - } - - public BaseSearchResponse setParsedQuery(String parsedQuery) { - this.parsedQuery = parsedQuery; - return this; - } - - /** - * Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) - * query string that will be searched. - * - * @return parsedQuery - */ - @javax.annotation.Nullable - public String getParsedQuery() { - return parsedQuery; - } - - public BaseSearchResponse setProcessingTimeMS(Integer processingTimeMS) { - this.processingTimeMS = processingTimeMS; - return this; - } - - /** - * Time the server took to process the request, in milliseconds. - * - * @return processingTimeMS - */ - @javax.annotation.Nonnull - public Integer getProcessingTimeMS() { - return processingTimeMS; - } - - public BaseSearchResponse setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } - - public BaseSearchResponse setQueryAfterRemoval(String queryAfterRemoval) { - this.queryAfterRemoval = queryAfterRemoval; - return this; - } - - /** - * Markup text indicating which parts of the original query have been removed to retrieve a - * non-empty result set. - * - * @return queryAfterRemoval - */ - @javax.annotation.Nullable - public String getQueryAfterRemoval() { - return queryAfterRemoval; - } - - public BaseSearchResponse setServerUsed(String serverUsed) { - this.serverUsed = serverUsed; - return this; - } - - /** - * Host name of the server that processed the request. - * - * @return serverUsed - */ - @javax.annotation.Nullable - public String getServerUsed() { - return serverUsed; - } - - public BaseSearchResponse setUserData(Object userData) { - this.userData = userData; - return this; - } - - /** - * Lets you store custom data in your indices. - * - * @return userData - */ - @javax.annotation.Nullable - public Object getUserData() { - return userData; - } - - public BaseSearchResponse setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseSearchResponse baseSearchResponse = (BaseSearchResponse) o; - return ( - Objects.equals(this.abTestID, baseSearchResponse.abTestID) && - Objects.equals(this.abTestVariantID, baseSearchResponse.abTestVariantID) && - Objects.equals(this.aroundLatLng, baseSearchResponse.aroundLatLng) && - Objects.equals(this.automaticRadius, baseSearchResponse.automaticRadius) && - Objects.equals(this.exhaustiveFacetsCount, baseSearchResponse.exhaustiveFacetsCount) && - Objects.equals(this.exhaustiveNbHits, baseSearchResponse.exhaustiveNbHits) && - Objects.equals(this.exhaustiveTypo, baseSearchResponse.exhaustiveTypo) && - Objects.equals(this.facets, baseSearchResponse.facets) && - Objects.equals(this.facetsStats, baseSearchResponse.facetsStats) && - Objects.equals(this.hitsPerPage, baseSearchResponse.hitsPerPage) && - Objects.equals(this.index, baseSearchResponse.index) && - Objects.equals(this.indexUsed, baseSearchResponse.indexUsed) && - Objects.equals(this.message, baseSearchResponse.message) && - Objects.equals(this.nbHits, baseSearchResponse.nbHits) && - Objects.equals(this.nbPages, baseSearchResponse.nbPages) && - Objects.equals(this.nbSortedHits, baseSearchResponse.nbSortedHits) && - Objects.equals(this.page, baseSearchResponse.page) && - Objects.equals(this.params, baseSearchResponse.params) && - Objects.equals(this.redirect, baseSearchResponse.redirect) && - Objects.equals(this.parsedQuery, baseSearchResponse.parsedQuery) && - Objects.equals(this.processingTimeMS, baseSearchResponse.processingTimeMS) && - Objects.equals(this.query, baseSearchResponse.query) && - Objects.equals(this.queryAfterRemoval, baseSearchResponse.queryAfterRemoval) && - Objects.equals(this.serverUsed, baseSearchResponse.serverUsed) && - Objects.equals(this.userData, baseSearchResponse.userData) && - Objects.equals(this.renderingContent, baseSearchResponse.renderingContent) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - abTestID, - abTestVariantID, - aroundLatLng, - automaticRadius, - exhaustiveFacetsCount, - exhaustiveNbHits, - exhaustiveTypo, - facets, - facetsStats, - hitsPerPage, - index, - indexUsed, - message, - nbHits, - nbPages, - nbSortedHits, - page, - params, - redirect, - parsedQuery, - processingTimeMS, - query, - queryAfterRemoval, - serverUsed, - userData, - renderingContent - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseSearchResponse {\n"); - sb.append(" abTestID: ").append(toIndentedString(abTestID)).append("\n"); - sb.append(" abTestVariantID: ").append(toIndentedString(abTestVariantID)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" automaticRadius: ").append(toIndentedString(automaticRadius)).append("\n"); - sb.append(" exhaustiveFacetsCount: ").append(toIndentedString(exhaustiveFacetsCount)).append("\n"); - sb.append(" exhaustiveNbHits: ").append(toIndentedString(exhaustiveNbHits)).append("\n"); - sb.append(" exhaustiveTypo: ").append(toIndentedString(exhaustiveTypo)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" facetsStats: ").append(toIndentedString(facetsStats)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" indexUsed: ").append(toIndentedString(indexUsed)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).append("\n"); - sb.append(" nbPages: ").append(toIndentedString(nbPages)).append("\n"); - sb.append(" nbSortedHits: ").append(toIndentedString(nbSortedHits)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n"); - sb.append(" parsedQuery: ").append(toIndentedString(parsedQuery)).append("\n"); - sb.append(" processingTimeMS: ").append(toIndentedString(processingTimeMS)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" queryAfterRemoval: ").append(toIndentedString(queryAfterRemoval)).append("\n"); - sb.append(" serverUsed: ").append(toIndentedString(serverUsed)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchResponseRedirect.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchResponseRedirect.java deleted file mode 100644 index 6148ea26fd..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseSearchResponseRedirect.java +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * [Redirect results to a - * URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/). - */ -public class BaseSearchResponseRedirect { - - @JsonProperty("index") - private List index; - - public BaseSearchResponseRedirect setIndex(List index) { - this.index = index; - return this; - } - - public BaseSearchResponseRedirect addIndex(RedirectRuleIndexMetadata indexItem) { - if (this.index == null) { - this.index = new ArrayList<>(); - } - this.index.add(indexItem); - return this; - } - - /** - * Get index - * - * @return index - */ - @javax.annotation.Nullable - public List getIndex() { - return index; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseSearchResponseRedirect baseSearchResponseRedirect = (BaseSearchResponseRedirect) o; - return Objects.equals(this.index, baseSearchResponseRedirect.index); - } - - @Override - public int hashCode() { - return Objects.hash(index); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseSearchResponseRedirect {\n"); - sb.append(" index: ").append(toIndentedString(index)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseTrendingRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseTrendingRequest.java deleted file mode 100644 index d2b8350fc9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/BaseTrendingRequest.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** BaseTrendingRequest */ -public class BaseTrendingRequest { - - @JsonProperty("model") - private TrendingModels model; - - @JsonProperty("facetName") - private String facetName; - - @JsonProperty("facetValue") - private String facetValue; - - public BaseTrendingRequest setModel(TrendingModels model) { - this.model = model; - return this; - } - - /** - * Get model - * - * @return model - */ - @javax.annotation.Nonnull - public TrendingModels getModel() { - return model; - } - - public BaseTrendingRequest setFacetName(String facetName) { - this.facetName = facetName; - return this; - } - - /** - * Facet name for trending models. - * - * @return facetName - */ - @javax.annotation.Nullable - public String getFacetName() { - return facetName; - } - - public BaseTrendingRequest setFacetValue(String facetValue) { - this.facetValue = facetValue; - return this; - } - - /** - * Facet value for trending models. - * - * @return facetValue - */ - @javax.annotation.Nullable - public String getFacetValue() { - return facetValue; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseTrendingRequest baseTrendingRequest = (BaseTrendingRequest) o; - return ( - Objects.equals(this.model, baseTrendingRequest.model) && - Objects.equals(this.facetName, baseTrendingRequest.facetName) && - Objects.equals(this.facetValue, baseTrendingRequest.facetValue) - ); - } - - @Override - public int hashCode() { - return Objects.hash(model, facetName, facetValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseTrendingRequest {\n"); - sb.append(" model: ").append(toIndentedString(model)).append("\n"); - sb.append(" facetName: ").append(toIndentedString(facetName)).append("\n"); - sb.append(" facetValue: ").append(toIndentedString(facetValue)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Condition.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Condition.java deleted file mode 100644 index 577d78d16c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Condition.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Condition */ -public class Condition { - - @JsonProperty("pattern") - private String pattern; - - @JsonProperty("anchoring") - private Anchoring anchoring; - - @JsonProperty("alternatives") - private Boolean alternatives; - - @JsonProperty("context") - private String context; - - public Condition setPattern(String pattern) { - this.pattern = pattern; - return this; - } - - /** - * Query pattern syntax. - * - * @return pattern - */ - @javax.annotation.Nullable - public String getPattern() { - return pattern; - } - - public Condition setAnchoring(Anchoring anchoring) { - this.anchoring = anchoring; - return this; - } - - /** - * Get anchoring - * - * @return anchoring - */ - @javax.annotation.Nullable - public Anchoring getAnchoring() { - return anchoring; - } - - public Condition setAlternatives(Boolean alternatives) { - this.alternatives = alternatives; - return this; - } - - /** - * Whether the pattern matches on plurals, synonyms, and typos. - * - * @return alternatives - */ - @javax.annotation.Nullable - public Boolean getAlternatives() { - return alternatives; - } - - public Condition setContext(String context) { - this.context = context; - return this; - } - - /** - * Rule context format: [A-Za-z0-9_-]+). - * - * @return context - */ - @javax.annotation.Nullable - public String getContext() { - return context; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Condition condition = (Condition) o; - return ( - Objects.equals(this.pattern, condition.pattern) && - Objects.equals(this.anchoring, condition.anchoring) && - Objects.equals(this.alternatives, condition.alternatives) && - Objects.equals(this.context, condition.context) - ); - } - - @Override - public int hashCode() { - return Objects.hash(pattern, anchoring, alternatives, context); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Condition {\n"); - sb.append(" pattern: ").append(toIndentedString(pattern)).append("\n"); - sb.append(" anchoring: ").append(toIndentedString(anchoring)).append("\n"); - sb.append(" alternatives: ").append(toIndentedString(alternatives)).append("\n"); - sb.append(" context: ").append(toIndentedString(context)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Consequence.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Consequence.java deleted file mode 100644 index d7eb15befa..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Consequence.java +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) - * of a rule. - */ -public class Consequence { - - @JsonProperty("params") - private ConsequenceParams params; - - @JsonProperty("promote") - private List promote; - - @JsonProperty("filterPromotes") - private Boolean filterPromotes; - - @JsonProperty("hide") - private List hide; - - @JsonProperty("userData") - private Object userData; - - public Consequence setParams(ConsequenceParams params) { - this.params = params; - return this; - } - - /** - * Get params - * - * @return params - */ - @javax.annotation.Nullable - public ConsequenceParams getParams() { - return params; - } - - public Consequence setPromote(List promote) { - this.promote = promote; - return this; - } - - public Consequence addPromote(Promote promoteItem) { - if (this.promote == null) { - this.promote = new ArrayList<>(); - } - this.promote.add(promoteItem); - return this; - } - - /** - * Records to promote. - * - * @return promote - */ - @javax.annotation.Nullable - public List getPromote() { - return promote; - } - - public Consequence setFilterPromotes(Boolean filterPromotes) { - this.filterPromotes = filterPromotes; - return this; - } - - /** - * Only use in combination with the `promote` consequence. When `true`, promoted results will be - * restricted to match the filters of the current search. When `false`, the promoted results will - * show up regardless of the filters. - * - * @return filterPromotes - */ - @javax.annotation.Nullable - public Boolean getFilterPromotes() { - return filterPromotes; - } - - public Consequence setHide(List hide) { - this.hide = hide; - return this; - } - - public Consequence addHide(ConsequenceHide hideItem) { - if (this.hide == null) { - this.hide = new ArrayList<>(); - } - this.hide.add(hideItem); - return this; - } - - /** - * Records to hide. By default, you can hide up to 50 records per rule. - * - * @return hide - */ - @javax.annotation.Nullable - public List getHide() { - return hide; - } - - public Consequence setUserData(Object userData) { - this.userData = userData; - return this; - } - - /** - * Custom JSON object that will be appended to the userData array in the response. This object - * isn't interpreted by the API. It's limited to 1kB of minified JSON. - * - * @return userData - */ - @javax.annotation.Nullable - public Object getUserData() { - return userData; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Consequence consequence = (Consequence) o; - return ( - Objects.equals(this.params, consequence.params) && - Objects.equals(this.promote, consequence.promote) && - Objects.equals(this.filterPromotes, consequence.filterPromotes) && - Objects.equals(this.hide, consequence.hide) && - Objects.equals(this.userData, consequence.userData) - ); - } - - @Override - public int hashCode() { - return Objects.hash(params, promote, filterPromotes, hide, userData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Consequence {\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" promote: ").append(toIndentedString(promote)).append("\n"); - sb.append(" filterPromotes: ").append(toIndentedString(filterPromotes)).append("\n"); - sb.append(" hide: ").append(toIndentedString(hide)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceHide.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceHide.java deleted file mode 100644 index 6f87b5b1cf..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceHide.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Unique identifier of the record to hide. */ -public class ConsequenceHide { - - @JsonProperty("objectID") - private String objectID; - - public ConsequenceHide setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique object identifier. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConsequenceHide consequenceHide = (ConsequenceHide) o; - return Objects.equals(this.objectID, consequenceHide.objectID); - } - - @Override - public int hashCode() { - return Objects.hash(objectID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConsequenceHide {\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceParams.java deleted file mode 100644 index 2c95f74557..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceParams.java +++ /dev/null @@ -1,2005 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ConsequenceParams */ -public class ConsequenceParams { - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - @JsonProperty("query") - private ConsequenceQuery query; - - @JsonProperty("automaticFacetFilters") - private AutomaticFacetFilters automaticFacetFilters; - - @JsonProperty("automaticOptionalFacetFilters") - private AutomaticFacetFilters automaticOptionalFacetFilters; - - public ConsequenceParams setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public ConsequenceParams setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public ConsequenceParams setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public ConsequenceParams setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public ConsequenceParams setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public ConsequenceParams setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public ConsequenceParams setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public ConsequenceParams setFacets(List facets) { - this.facets = facets; - return this; - } - - public ConsequenceParams addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public ConsequenceParams setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public ConsequenceParams setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public ConsequenceParams setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public ConsequenceParams setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public ConsequenceParams setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public ConsequenceParams setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public ConsequenceParams setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public ConsequenceParams setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public ConsequenceParams setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public ConsequenceParams setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public ConsequenceParams setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public ConsequenceParams setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public ConsequenceParams addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public ConsequenceParams setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public ConsequenceParams addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public ConsequenceParams setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public ConsequenceParams addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public ConsequenceParams setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public ConsequenceParams addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public ConsequenceParams setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public ConsequenceParams setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public ConsequenceParams setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public ConsequenceParams setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public ConsequenceParams setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public ConsequenceParams setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public ConsequenceParams addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public ConsequenceParams setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public ConsequenceParams setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public ConsequenceParams setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public ConsequenceParams setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - public ConsequenceParams setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public ConsequenceParams addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public ConsequenceParams setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public ConsequenceParams addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public ConsequenceParams setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public ConsequenceParams addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public ConsequenceParams setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public ConsequenceParams addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public ConsequenceParams setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public ConsequenceParams addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public ConsequenceParams setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public ConsequenceParams setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public ConsequenceParams addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public ConsequenceParams setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public ConsequenceParams addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public ConsequenceParams setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public ConsequenceParams setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public ConsequenceParams setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public ConsequenceParams setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public ConsequenceParams setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public ConsequenceParams setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public ConsequenceParams setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public ConsequenceParams setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public ConsequenceParams setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public ConsequenceParams setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public ConsequenceParams addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public ConsequenceParams setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public ConsequenceParams setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public ConsequenceParams setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public ConsequenceParams setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public ConsequenceParams addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public ConsequenceParams setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public ConsequenceParams setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public ConsequenceParams setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public ConsequenceParams setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public ConsequenceParams setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public ConsequenceParams setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public ConsequenceParams setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public ConsequenceParams setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public ConsequenceParams setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public ConsequenceParams addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public ConsequenceParams setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public ConsequenceParams addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public ConsequenceParams setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public ConsequenceParams setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public ConsequenceParams addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public ConsequenceParams setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public ConsequenceParams addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public ConsequenceParams setExplain(List explain) { - this.explain = explain; - return this; - } - - public ConsequenceParams addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public ConsequenceParams setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public ConsequenceParams setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public ConsequenceParams setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public ConsequenceParams setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public ConsequenceParams setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public ConsequenceParams setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public ConsequenceParams addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public ConsequenceParams setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public ConsequenceParams setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public ConsequenceParams setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - public ConsequenceParams setQuery(ConsequenceQuery query) { - this.query = query; - return this; - } - - /** - * Get query - * - * @return query - */ - @javax.annotation.Nullable - public ConsequenceQuery getQuery() { - return query; - } - - public ConsequenceParams setAutomaticFacetFilters(AutomaticFacetFilters automaticFacetFilters) { - this.automaticFacetFilters = automaticFacetFilters; - return this; - } - - /** - * Get automaticFacetFilters - * - * @return automaticFacetFilters - */ - @javax.annotation.Nullable - public AutomaticFacetFilters getAutomaticFacetFilters() { - return automaticFacetFilters; - } - - public ConsequenceParams setAutomaticOptionalFacetFilters(AutomaticFacetFilters automaticOptionalFacetFilters) { - this.automaticOptionalFacetFilters = automaticOptionalFacetFilters; - return this; - } - - /** - * Get automaticOptionalFacetFilters - * - * @return automaticOptionalFacetFilters - */ - @javax.annotation.Nullable - public AutomaticFacetFilters getAutomaticOptionalFacetFilters() { - return automaticOptionalFacetFilters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConsequenceParams consequenceParams = (ConsequenceParams) o; - return ( - Objects.equals(this.similarQuery, consequenceParams.similarQuery) && - Objects.equals(this.filters, consequenceParams.filters) && - Objects.equals(this.facetFilters, consequenceParams.facetFilters) && - Objects.equals(this.optionalFilters, consequenceParams.optionalFilters) && - Objects.equals(this.numericFilters, consequenceParams.numericFilters) && - Objects.equals(this.tagFilters, consequenceParams.tagFilters) && - Objects.equals(this.sumOrFiltersScores, consequenceParams.sumOrFiltersScores) && - Objects.equals(this.facets, consequenceParams.facets) && - Objects.equals(this.maxValuesPerFacet, consequenceParams.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, consequenceParams.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, consequenceParams.sortFacetValuesBy) && - Objects.equals(this.page, consequenceParams.page) && - Objects.equals(this.offset, consequenceParams.offset) && - Objects.equals(this.length, consequenceParams.length) && - Objects.equals(this.aroundLatLng, consequenceParams.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, consequenceParams.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, consequenceParams.aroundRadius) && - Objects.equals(this.aroundPrecision, consequenceParams.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, consequenceParams.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, consequenceParams.insideBoundingBox) && - Objects.equals(this.insidePolygon, consequenceParams.insidePolygon) && - Objects.equals(this.naturalLanguages, consequenceParams.naturalLanguages) && - Objects.equals(this.ruleContexts, consequenceParams.ruleContexts) && - Objects.equals(this.personalizationImpact, consequenceParams.personalizationImpact) && - Objects.equals(this.userToken, consequenceParams.userToken) && - Objects.equals(this.getRankingInfo, consequenceParams.getRankingInfo) && - Objects.equals(this.clickAnalytics, consequenceParams.clickAnalytics) && - Objects.equals(this.analytics, consequenceParams.analytics) && - Objects.equals(this.analyticsTags, consequenceParams.analyticsTags) && - Objects.equals(this.percentileComputation, consequenceParams.percentileComputation) && - Objects.equals(this.enableABTest, consequenceParams.enableABTest) && - Objects.equals(this.enableReRanking, consequenceParams.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, consequenceParams.reRankingApplyFilter) && - Objects.equals(this.attributesForFaceting, consequenceParams.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, consequenceParams.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, consequenceParams.restrictSearchableAttributes) && - Objects.equals(this.ranking, consequenceParams.ranking) && - Objects.equals(this.customRanking, consequenceParams.customRanking) && - Objects.equals(this.relevancyStrictness, consequenceParams.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, consequenceParams.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, consequenceParams.attributesToSnippet) && - Objects.equals(this.highlightPreTag, consequenceParams.highlightPreTag) && - Objects.equals(this.highlightPostTag, consequenceParams.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, consequenceParams.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, consequenceParams.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, consequenceParams.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, consequenceParams.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, consequenceParams.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, consequenceParams.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, consequenceParams.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, consequenceParams.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, consequenceParams.ignorePlurals) && - Objects.equals(this.removeStopWords, consequenceParams.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, consequenceParams.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, consequenceParams.queryLanguages) && - Objects.equals(this.decompoundQuery, consequenceParams.decompoundQuery) && - Objects.equals(this.enableRules, consequenceParams.enableRules) && - Objects.equals(this.enablePersonalization, consequenceParams.enablePersonalization) && - Objects.equals(this.queryType, consequenceParams.queryType) && - Objects.equals(this.removeWordsIfNoResults, consequenceParams.removeWordsIfNoResults) && - Objects.equals(this.mode, consequenceParams.mode) && - Objects.equals(this.semanticSearch, consequenceParams.semanticSearch) && - Objects.equals(this.advancedSyntax, consequenceParams.advancedSyntax) && - Objects.equals(this.optionalWords, consequenceParams.optionalWords) && - Objects.equals(this.disableExactOnAttributes, consequenceParams.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, consequenceParams.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, consequenceParams.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, consequenceParams.advancedSyntaxFeatures) && - Objects.equals(this.explain, consequenceParams.explain) && - Objects.equals(this.distinct, consequenceParams.distinct) && - Objects.equals(this.attributeForDistinct, consequenceParams.attributeForDistinct) && - Objects.equals(this.synonyms, consequenceParams.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, consequenceParams.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, consequenceParams.minProximity) && - Objects.equals(this.responseFields, consequenceParams.responseFields) && - Objects.equals(this.maxFacetHits, consequenceParams.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, consequenceParams.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, consequenceParams.renderingContent) && - Objects.equals(this.query, consequenceParams.query) && - Objects.equals(this.automaticFacetFilters, consequenceParams.automaticFacetFilters) && - Objects.equals(this.automaticOptionalFacetFilters, consequenceParams.automaticOptionalFacetFilters) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter, - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent, - query, - automaticFacetFilters, - automaticOptionalFacetFilters - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConsequenceParams {\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" automaticFacetFilters: ").append(toIndentedString(automaticFacetFilters)).append("\n"); - sb.append(" automaticOptionalFacetFilters: ").append(toIndentedString(automaticOptionalFacetFilters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceQuery.java deleted file mode 100644 index 8e04a9df25..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceQuery.java +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** - * When providing a string, it replaces the entire query string. When providing an object, it - * describes incremental edits to be made to the query string (but you can't do both). - */ -@JsonDeserialize(using = ConsequenceQuery.ConsequenceQueryDeserializer.class) -@JsonSerialize(using = ConsequenceQuery.ConsequenceQuerySerializer.class) -public abstract class ConsequenceQuery implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(ConsequenceQuery.class.getName()); - - public static ConsequenceQuery of(ConsequenceQueryObject inside) { - return new ConsequenceQueryConsequenceQueryObject(inside); - } - - public static ConsequenceQuery of(String inside) { - return new ConsequenceQueryString(inside); - } - - public static class ConsequenceQuerySerializer extends StdSerializer { - - public ConsequenceQuerySerializer(Class t) { - super(t); - } - - public ConsequenceQuerySerializer() { - this(null); - } - - @Override - public void serialize(ConsequenceQuery value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class ConsequenceQueryDeserializer extends StdDeserializer { - - public ConsequenceQueryDeserializer() { - this(ConsequenceQuery.class); - } - - public ConsequenceQueryDeserializer(Class vc) { - super(vc); - } - - @Override - public ConsequenceQuery deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize ConsequenceQueryObject - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ConsequenceQueryObject value = parser.readValueAs(new TypeReference() {}); - return ConsequenceQuery.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf ConsequenceQueryObject (error: " + e.getMessage() + ") (type: ConsequenceQueryObject)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return ConsequenceQuery.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public ConsequenceQuery getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "ConsequenceQuery cannot be null"); - } - } -} - -class ConsequenceQueryConsequenceQueryObject extends ConsequenceQuery { - - private final ConsequenceQueryObject insideValue; - - ConsequenceQueryConsequenceQueryObject(ConsequenceQueryObject insideValue) { - this.insideValue = insideValue; - } - - @Override - public ConsequenceQueryObject getInsideValue() { - return insideValue; - } -} - -class ConsequenceQueryString extends ConsequenceQuery { - - private final String insideValue; - - ConsequenceQueryString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceQueryObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceQueryObject.java deleted file mode 100644 index acee6bf17c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ConsequenceQueryObject.java +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ConsequenceQueryObject */ -public class ConsequenceQueryObject { - - @JsonProperty("remove") - private List remove; - - @JsonProperty("edits") - private List edits; - - public ConsequenceQueryObject setRemove(List remove) { - this.remove = remove; - return this; - } - - public ConsequenceQueryObject addRemove(String removeItem) { - if (this.remove == null) { - this.remove = new ArrayList<>(); - } - this.remove.add(removeItem); - return this; - } - - /** - * Words to remove. - * - * @return remove - */ - @javax.annotation.Nullable - public List getRemove() { - return remove; - } - - public ConsequenceQueryObject setEdits(List edits) { - this.edits = edits; - return this; - } - - public ConsequenceQueryObject addEdits(Edit editsItem) { - if (this.edits == null) { - this.edits = new ArrayList<>(); - } - this.edits.add(editsItem); - return this; - } - - /** - * Edits to apply. - * - * @return edits - */ - @javax.annotation.Nullable - public List getEdits() { - return edits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConsequenceQueryObject consequenceQueryObject = (ConsequenceQueryObject) o; - return Objects.equals(this.remove, consequenceQueryObject.remove) && Objects.equals(this.edits, consequenceQueryObject.edits); - } - - @Override - public int hashCode() { - return Objects.hash(remove, edits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConsequenceQueryObject {\n"); - sb.append(" remove: ").append(toIndentedString(remove)).append("\n"); - sb.append(" edits: ").append(toIndentedString(edits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/DeletedAtResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/DeletedAtResponse.java deleted file mode 100644 index 2b5c9d0418..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/DeletedAtResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Response, taskID, and deletion timestamp. */ -public class DeletedAtResponse { - - @JsonProperty("taskID") - private Long taskID; - - @JsonProperty("deletedAt") - private String deletedAt; - - public DeletedAtResponse setTaskID(Long taskID) { - this.taskID = taskID; - return this; - } - - /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. - * - * @return taskID - */ - @javax.annotation.Nonnull - public Long getTaskID() { - return taskID; - } - - public DeletedAtResponse setDeletedAt(String deletedAt) { - this.deletedAt = deletedAt; - return this; - } - - /** - * Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return deletedAt - */ - @javax.annotation.Nonnull - public String getDeletedAt() { - return deletedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletedAtResponse deletedAtResponse = (DeletedAtResponse) o; - return Objects.equals(this.taskID, deletedAtResponse.taskID) && Objects.equals(this.deletedAt, deletedAtResponse.deletedAt); - } - - @Override - public int hashCode() { - return Objects.hash(taskID, deletedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeletedAtResponse {\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).append("\n"); - sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Distinct.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Distinct.java deleted file mode 100644 index 0ad863785f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Distinct.java +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** - * Enables [deduplication or grouping of results (Algolia's _distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). - */ -@JsonDeserialize(using = Distinct.DistinctDeserializer.class) -@JsonSerialize(using = Distinct.DistinctSerializer.class) -public abstract class Distinct implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(Distinct.class.getName()); - - public static Distinct of(Boolean inside) { - return new DistinctBoolean(inside); - } - - public static Distinct of(Integer inside) { - return new DistinctInteger(inside); - } - - public static class DistinctSerializer extends StdSerializer { - - public DistinctSerializer(Class t) { - super(t); - } - - public DistinctSerializer() { - this(null); - } - - @Override - public void serialize(Distinct value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class DistinctDeserializer extends StdDeserializer { - - public DistinctDeserializer() { - this(Distinct.class); - } - - public DistinctDeserializer(Class vc) { - super(vc); - } - - @Override - public Distinct deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize Boolean - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Boolean value = parser.readValueAs(new TypeReference() {}); - return Distinct.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Boolean (error: " + e.getMessage() + ") (type: Boolean)"); - } - } - - // deserialize Integer - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Integer value = parser.readValueAs(new TypeReference() {}); - return Distinct.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Integer (error: " + e.getMessage() + ") (type: Integer)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public Distinct getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "Distinct cannot be null"); - } - } -} - -class DistinctBoolean extends Distinct { - - private final Boolean insideValue; - - DistinctBoolean(Boolean insideValue) { - this.insideValue = insideValue; - } - - @Override - public Boolean getInsideValue() { - return insideValue; - } -} - -class DistinctInteger extends Distinct { - - private final Integer insideValue; - - DistinctInteger(Integer insideValue) { - this.insideValue = insideValue; - } - - @Override - public Integer getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Edit.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Edit.java deleted file mode 100644 index 9896d12dab..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Edit.java +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Edit */ -public class Edit { - - @JsonProperty("type") - private EditType type; - - @JsonProperty("delete") - private String delete; - - @JsonProperty("insert") - private String insert; - - public Edit setType(EditType type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nullable - public EditType getType() { - return type; - } - - public Edit setDelete(String delete) { - this.delete = delete; - return this; - } - - /** - * Text or patterns to remove from the query string. - * - * @return delete - */ - @javax.annotation.Nullable - public String getDelete() { - return delete; - } - - public Edit setInsert(String insert) { - this.insert = insert; - return this; - } - - /** - * Text that should be inserted in place of the removed text inside the query string. - * - * @return insert - */ - @javax.annotation.Nullable - public String getInsert() { - return insert; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Edit edit = (Edit) o; - return Objects.equals(this.type, edit.type) && Objects.equals(this.delete, edit.delete) && Objects.equals(this.insert, edit.insert); - } - - @Override - public int hashCode() { - return Objects.hash(type, delete, insert); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Edit {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" delete: ").append(toIndentedString(delete)).append("\n"); - sb.append(" insert: ").append(toIndentedString(insert)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/EditType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/EditType.java deleted file mode 100644 index b84bb1fa4b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/EditType.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Type of edit. */ -public enum EditType { - REMOVE("remove"), - - REPLACE("replace"); - - private final String value; - - EditType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EditType fromValue(String value) { - for (EditType b : EditType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ErrorBase.java deleted file mode 100644 index e25ef1a24e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ErrorBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Error. */ -public class ErrorBase { - - @JsonProperty("message") - private String message; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public ErrorBase setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public ErrorBase setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorBase errorBase = (ErrorBase) o; - return Objects.equals(this.message, errorBase.message) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(message, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorBase {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ExactOnSingleWordQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ExactOnSingleWordQuery.java deleted file mode 100644 index 1a2e72e067..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ExactOnSingleWordQuery.java +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Determines how the [Exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - * is computed when the query contains only one word. - */ -public enum ExactOnSingleWordQuery { - ATTRIBUTE("attribute"), - - NONE("none"), - - WORD("word"); - - private final String value; - - ExactOnSingleWordQuery(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ExactOnSingleWordQuery fromValue(String value) { - for (ExactOnSingleWordQuery b : ExactOnSingleWordQuery.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetFilters.java deleted file mode 100644 index 3a9e53faab..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetFilters.java +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * [Filter hits by facet - * value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). - */ -@JsonDeserialize(using = FacetFilters.FacetFiltersDeserializer.class) -@JsonSerialize(using = FacetFilters.FacetFiltersSerializer.class) -public abstract class FacetFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(FacetFilters.class.getName()); - - public static FacetFilters of(List inside) { - return new FacetFiltersListOfMixedSearchFilters(inside); - } - - public static FacetFilters of(String inside) { - return new FacetFiltersString(inside); - } - - public static class FacetFiltersSerializer extends StdSerializer { - - public FacetFiltersSerializer(Class t) { - super(t); - } - - public FacetFiltersSerializer() { - this(null); - } - - @Override - public void serialize(FacetFilters value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class FacetFiltersDeserializer extends StdDeserializer { - - public FacetFiltersDeserializer() { - this(FacetFilters.class); - } - - public FacetFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public FacetFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return FacetFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return FacetFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public FacetFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "FacetFilters cannot be null"); - } - } -} - -class FacetFiltersListOfMixedSearchFilters extends FacetFilters { - - private final List insideValue; - - FacetFiltersListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class FacetFiltersString extends FacetFilters { - - private final String insideValue; - - FacetFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetOrdering.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetOrdering.java deleted file mode 100644 index d8ac5bb2d9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetOrdering.java +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Defines the ordering of facets (widgets). */ -public class FacetOrdering { - - @JsonProperty("facets") - private Facets facets; - - @JsonProperty("values") - private Map values; - - public FacetOrdering setFacets(Facets facets) { - this.facets = facets; - return this; - } - - /** - * Get facets - * - * @return facets - */ - @javax.annotation.Nullable - public Facets getFacets() { - return facets; - } - - public FacetOrdering setValues(Map values) { - this.values = values; - return this; - } - - public FacetOrdering putValues(String key, Value valuesItem) { - if (this.values == null) { - this.values = new HashMap<>(); - } - this.values.put(key, valuesItem); - return this; - } - - /** - * Ordering of facet values within an individual facet. - * - * @return values - */ - @javax.annotation.Nullable - public Map getValues() { - return values; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FacetOrdering facetOrdering = (FacetOrdering) o; - return Objects.equals(this.facets, facetOrdering.facets) && Objects.equals(this.values, facetOrdering.values); - } - - @Override - public int hashCode() { - return Objects.hash(facets, values); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FacetOrdering {\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Facets.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Facets.java deleted file mode 100644 index a10c4d5b7e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Facets.java +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Ordering of facets (widgets). */ -public class Facets { - - @JsonProperty("order") - private List order; - - public Facets setOrder(List order) { - this.order = order; - return this; - } - - public Facets addOrder(String orderItem) { - if (this.order == null) { - this.order = new ArrayList<>(); - } - this.order.add(orderItem); - return this; - } - - /** - * Pinned order of facet lists. - * - * @return order - */ - @javax.annotation.Nullable - public List getOrder() { - return order; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Facets facets = (Facets) o; - return Objects.equals(this.order, facets.order); - } - - @Override - public int hashCode() { - return Objects.hash(order); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Facets {\n"); - sb.append(" order: ").append(toIndentedString(order)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetsStats.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetsStats.java deleted file mode 100644 index 45ffb89d85..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/FacetsStats.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** FacetsStats */ -public class FacetsStats { - - @JsonProperty("min") - private Double min; - - @JsonProperty("max") - private Double max; - - @JsonProperty("avg") - private Double avg; - - @JsonProperty("sum") - private Double sum; - - public FacetsStats setMin(Double min) { - this.min = min; - return this; - } - - /** - * Minimum value in the results. - * - * @return min - */ - @javax.annotation.Nullable - public Double getMin() { - return min; - } - - public FacetsStats setMax(Double max) { - this.max = max; - return this; - } - - /** - * Maximum value in the results. - * - * @return max - */ - @javax.annotation.Nullable - public Double getMax() { - return max; - } - - public FacetsStats setAvg(Double avg) { - this.avg = avg; - return this; - } - - /** - * Average facet value in the results. - * - * @return avg - */ - @javax.annotation.Nullable - public Double getAvg() { - return avg; - } - - public FacetsStats setSum(Double sum) { - this.sum = sum; - return this; - } - - /** - * Sum of all values in the results. - * - * @return sum - */ - @javax.annotation.Nullable - public Double getSum() { - return sum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FacetsStats facetsStats = (FacetsStats) o; - return ( - Objects.equals(this.min, facetsStats.min) && - Objects.equals(this.max, facetsStats.max) && - Objects.equals(this.avg, facetsStats.avg) && - Objects.equals(this.sum, facetsStats.sum) - ); - } - - @Override - public int hashCode() { - return Objects.hash(min, max, avg, sum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FacetsStats {\n"); - sb.append(" min: ").append(toIndentedString(min)).append("\n"); - sb.append(" max: ").append(toIndentedString(max)).append("\n"); - sb.append(" avg: ").append(toIndentedString(avg)).append("\n"); - sb.append(" sum: ").append(toIndentedString(sum)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendTaskResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendTaskResponse.java deleted file mode 100644 index 500ada1f26..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendTaskResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetRecommendTaskResponse */ -public class GetRecommendTaskResponse { - - @JsonProperty("status") - private TaskStatus status; - - public GetRecommendTaskResponse setStatus(TaskStatus status) { - this.status = status; - return this; - } - - /** - * Get status - * - * @return status - */ - @javax.annotation.Nonnull - public TaskStatus getStatus() { - return status; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecommendTaskResponse getRecommendTaskResponse = (GetRecommendTaskResponse) o; - return Objects.equals(this.status, getRecommendTaskResponse.status); - } - - @Override - public int hashCode() { - return Objects.hash(status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetRecommendTaskResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendationsParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendationsParams.java deleted file mode 100644 index 43ccb7357b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendationsParams.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Recommend parameters. */ -public class GetRecommendationsParams { - - @JsonProperty("requests") - private List requests = new ArrayList<>(); - - public GetRecommendationsParams setRequests(List requests) { - this.requests = requests; - return this; - } - - public GetRecommendationsParams addRequests(RecommendationsRequest requestsItem) { - this.requests.add(requestsItem); - return this; - } - - /** - * Request parameters depend on the model (recommendations or trending). - * - * @return requests - */ - @javax.annotation.Nonnull - public List getRequests() { - return requests; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecommendationsParams getRecommendationsParams = (GetRecommendationsParams) o; - return Objects.equals(this.requests, getRecommendationsParams.requests); - } - - @Override - public int hashCode() { - return Objects.hash(requests); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetRecommendationsParams {\n"); - sb.append(" requests: ").append(toIndentedString(requests)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendationsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendationsResponse.java deleted file mode 100644 index 4ef0753d01..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/GetRecommendationsResponse.java +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetRecommendationsResponse */ -public class GetRecommendationsResponse { - - @JsonProperty("results") - private List results; - - public GetRecommendationsResponse setResults(List results) { - this.results = results; - return this; - } - - public GetRecommendationsResponse addResults(RecommendationsResponse resultsItem) { - if (this.results == null) { - this.results = new ArrayList<>(); - } - this.results.add(resultsItem); - return this; - } - - /** - * Get results - * - * @return results - */ - @javax.annotation.Nullable - public List getResults() { - return results; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetRecommendationsResponse getRecommendationsResponse = (GetRecommendationsResponse) o; - return Objects.equals(this.results, getRecommendationsResponse.results); - } - - @Override - public int hashCode() { - return Objects.hash(results); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetRecommendationsResponse {\n"); - sb.append(" results: ").append(toIndentedString(results)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/HighlightResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/HighlightResult.java deleted file mode 100644 index 2190e7ec76..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/HighlightResult.java +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** HighlightResult */ -@JsonDeserialize(using = HighlightResult.HighlightResultDeserializer.class) -@JsonSerialize(using = HighlightResult.HighlightResultSerializer.class) -public abstract class HighlightResult implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(HighlightResult.class.getName()); - - public static HighlightResult of(HighlightResultOption inside) { - return new HighlightResultHighlightResultOption(inside); - } - - public static HighlightResult of(List inside) { - return new HighlightResultListOfHighlightResultOption(inside); - } - - public static class HighlightResultSerializer extends StdSerializer { - - public HighlightResultSerializer(Class t) { - super(t); - } - - public HighlightResultSerializer() { - this(null); - } - - @Override - public void serialize(HighlightResult value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class HighlightResultDeserializer extends StdDeserializer { - - public HighlightResultDeserializer() { - this(HighlightResult.class); - } - - public HighlightResultDeserializer(Class vc) { - super(vc); - } - - @Override - public HighlightResult deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize HighlightResultOption - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - HighlightResultOption value = parser.readValueAs(new TypeReference() {}); - return HighlightResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf HighlightResultOption (error: " + e.getMessage() + ") (type: HighlightResultOption)"); - } - } - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return HighlightResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public HighlightResult getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "HighlightResult cannot be null"); - } - } -} - -class HighlightResultHighlightResultOption extends HighlightResult { - - private final HighlightResultOption insideValue; - - HighlightResultHighlightResultOption(HighlightResultOption insideValue) { - this.insideValue = insideValue; - } - - @Override - public HighlightResultOption getInsideValue() { - return insideValue; - } -} - -class HighlightResultListOfHighlightResultOption extends HighlightResult { - - private final List insideValue; - - HighlightResultListOfHighlightResultOption(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/HighlightResultOption.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/HighlightResultOption.java deleted file mode 100644 index f70eb8c346..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/HighlightResultOption.java +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Show highlighted section and words matched on a query. */ -public class HighlightResultOption { - - @JsonProperty("value") - private String value; - - @JsonProperty("matchLevel") - private MatchLevel matchLevel; - - @JsonProperty("matchedWords") - private List matchedWords = new ArrayList<>(); - - @JsonProperty("fullyHighlighted") - private Boolean fullyHighlighted; - - public HighlightResultOption setValue(String value) { - this.value = value; - return this; - } - - /** - * Markup text with `facetQuery` matches highlighted. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public HighlightResultOption setMatchLevel(MatchLevel matchLevel) { - this.matchLevel = matchLevel; - return this; - } - - /** - * Get matchLevel - * - * @return matchLevel - */ - @javax.annotation.Nonnull - public MatchLevel getMatchLevel() { - return matchLevel; - } - - public HighlightResultOption setMatchedWords(List matchedWords) { - this.matchedWords = matchedWords; - return this; - } - - public HighlightResultOption addMatchedWords(String matchedWordsItem) { - this.matchedWords.add(matchedWordsItem); - return this; - } - - /** - * List of words from the query that matched the object. - * - * @return matchedWords - */ - @javax.annotation.Nonnull - public List getMatchedWords() { - return matchedWords; - } - - public HighlightResultOption setFullyHighlighted(Boolean fullyHighlighted) { - this.fullyHighlighted = fullyHighlighted; - return this; - } - - /** - * Whether the entire attribute value is highlighted. - * - * @return fullyHighlighted - */ - @javax.annotation.Nullable - public Boolean getFullyHighlighted() { - return fullyHighlighted; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HighlightResultOption highlightResultOption = (HighlightResultOption) o; - return ( - Objects.equals(this.value, highlightResultOption.value) && - Objects.equals(this.matchLevel, highlightResultOption.matchLevel) && - Objects.equals(this.matchedWords, highlightResultOption.matchedWords) && - Objects.equals(this.fullyHighlighted, highlightResultOption.fullyHighlighted) - ); - } - - @Override - public int hashCode() { - return Objects.hash(value, matchLevel, matchedWords, fullyHighlighted); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HighlightResultOption {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" matchLevel: ").append(toIndentedString(matchLevel)).append("\n"); - sb.append(" matchedWords: ").append(toIndentedString(matchedWords)).append("\n"); - sb.append(" fullyHighlighted: ").append(toIndentedString(fullyHighlighted)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IgnorePlurals.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IgnorePlurals.java deleted file mode 100644 index a7687cef18..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IgnorePlurals.java +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is - * used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which - * ignoring plurals should be enabled. This list will override any values that you may have set in - * `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are - * considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals - * feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find - * \"feet\"). - */ -@JsonDeserialize(using = IgnorePlurals.IgnorePluralsDeserializer.class) -@JsonSerialize(using = IgnorePlurals.IgnorePluralsSerializer.class) -public abstract class IgnorePlurals implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(IgnorePlurals.class.getName()); - - public static IgnorePlurals of(Boolean inside) { - return new IgnorePluralsBoolean(inside); - } - - public static IgnorePlurals of(List inside) { - return new IgnorePluralsListOfString(inside); - } - - public static class IgnorePluralsSerializer extends StdSerializer { - - public IgnorePluralsSerializer(Class t) { - super(t); - } - - public IgnorePluralsSerializer() { - this(null); - } - - @Override - public void serialize(IgnorePlurals value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class IgnorePluralsDeserializer extends StdDeserializer { - - public IgnorePluralsDeserializer() { - this(IgnorePlurals.class); - } - - public IgnorePluralsDeserializer(Class vc) { - super(vc); - } - - @Override - public IgnorePlurals deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize Boolean - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Boolean value = parser.readValueAs(new TypeReference() {}); - return IgnorePlurals.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Boolean (error: " + e.getMessage() + ") (type: Boolean)"); - } - } - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return IgnorePlurals.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public IgnorePlurals getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "IgnorePlurals cannot be null"); - } - } -} - -class IgnorePluralsBoolean extends IgnorePlurals { - - private final Boolean insideValue; - - IgnorePluralsBoolean(Boolean insideValue) { - this.insideValue = insideValue; - } - - @Override - public Boolean getInsideValue() { - return insideValue; - } -} - -class IgnorePluralsListOfString extends IgnorePlurals { - - private final List insideValue; - - IgnorePluralsListOfString(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParams.java deleted file mode 100644 index cadacff7d6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParams.java +++ /dev/null @@ -1,1159 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** IndexSettingsAsSearchParams */ -public class IndexSettingsAsSearchParams { - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - public IndexSettingsAsSearchParams setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public IndexSettingsAsSearchParams addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public IndexSettingsAsSearchParams setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public IndexSettingsAsSearchParams addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public IndexSettingsAsSearchParams setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public IndexSettingsAsSearchParams addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public IndexSettingsAsSearchParams setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public IndexSettingsAsSearchParams addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public IndexSettingsAsSearchParams setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public IndexSettingsAsSearchParams addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public IndexSettingsAsSearchParams setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public IndexSettingsAsSearchParams setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public IndexSettingsAsSearchParams addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public IndexSettingsAsSearchParams setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public IndexSettingsAsSearchParams addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public IndexSettingsAsSearchParams setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public IndexSettingsAsSearchParams setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public IndexSettingsAsSearchParams setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public IndexSettingsAsSearchParams setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public IndexSettingsAsSearchParams setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public IndexSettingsAsSearchParams setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public IndexSettingsAsSearchParams setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public IndexSettingsAsSearchParams setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public IndexSettingsAsSearchParams setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public IndexSettingsAsSearchParams setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public IndexSettingsAsSearchParams addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public IndexSettingsAsSearchParams setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public IndexSettingsAsSearchParams setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public IndexSettingsAsSearchParams setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public IndexSettingsAsSearchParams setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public IndexSettingsAsSearchParams addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public IndexSettingsAsSearchParams setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public IndexSettingsAsSearchParams setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public IndexSettingsAsSearchParams setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public IndexSettingsAsSearchParams setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public IndexSettingsAsSearchParams setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public IndexSettingsAsSearchParams setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public IndexSettingsAsSearchParams setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public IndexSettingsAsSearchParams setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public IndexSettingsAsSearchParams setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public IndexSettingsAsSearchParams addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public IndexSettingsAsSearchParams setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public IndexSettingsAsSearchParams addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public IndexSettingsAsSearchParams setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public IndexSettingsAsSearchParams setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public IndexSettingsAsSearchParams addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public IndexSettingsAsSearchParams setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public IndexSettingsAsSearchParams addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public IndexSettingsAsSearchParams setExplain(List explain) { - this.explain = explain; - return this; - } - - public IndexSettingsAsSearchParams addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public IndexSettingsAsSearchParams setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public IndexSettingsAsSearchParams setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public IndexSettingsAsSearchParams setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public IndexSettingsAsSearchParams setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public IndexSettingsAsSearchParams setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public IndexSettingsAsSearchParams setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public IndexSettingsAsSearchParams addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public IndexSettingsAsSearchParams setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public IndexSettingsAsSearchParams setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public IndexSettingsAsSearchParams setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndexSettingsAsSearchParams indexSettingsAsSearchParams = (IndexSettingsAsSearchParams) o; - return ( - Objects.equals(this.attributesForFaceting, indexSettingsAsSearchParams.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, indexSettingsAsSearchParams.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, indexSettingsAsSearchParams.restrictSearchableAttributes) && - Objects.equals(this.ranking, indexSettingsAsSearchParams.ranking) && - Objects.equals(this.customRanking, indexSettingsAsSearchParams.customRanking) && - Objects.equals(this.relevancyStrictness, indexSettingsAsSearchParams.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, indexSettingsAsSearchParams.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, indexSettingsAsSearchParams.attributesToSnippet) && - Objects.equals(this.highlightPreTag, indexSettingsAsSearchParams.highlightPreTag) && - Objects.equals(this.highlightPostTag, indexSettingsAsSearchParams.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, indexSettingsAsSearchParams.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, indexSettingsAsSearchParams.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, indexSettingsAsSearchParams.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, indexSettingsAsSearchParams.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, indexSettingsAsSearchParams.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, indexSettingsAsSearchParams.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, indexSettingsAsSearchParams.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, indexSettingsAsSearchParams.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, indexSettingsAsSearchParams.ignorePlurals) && - Objects.equals(this.removeStopWords, indexSettingsAsSearchParams.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, indexSettingsAsSearchParams.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, indexSettingsAsSearchParams.queryLanguages) && - Objects.equals(this.decompoundQuery, indexSettingsAsSearchParams.decompoundQuery) && - Objects.equals(this.enableRules, indexSettingsAsSearchParams.enableRules) && - Objects.equals(this.enablePersonalization, indexSettingsAsSearchParams.enablePersonalization) && - Objects.equals(this.queryType, indexSettingsAsSearchParams.queryType) && - Objects.equals(this.removeWordsIfNoResults, indexSettingsAsSearchParams.removeWordsIfNoResults) && - Objects.equals(this.mode, indexSettingsAsSearchParams.mode) && - Objects.equals(this.semanticSearch, indexSettingsAsSearchParams.semanticSearch) && - Objects.equals(this.advancedSyntax, indexSettingsAsSearchParams.advancedSyntax) && - Objects.equals(this.optionalWords, indexSettingsAsSearchParams.optionalWords) && - Objects.equals(this.disableExactOnAttributes, indexSettingsAsSearchParams.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, indexSettingsAsSearchParams.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, indexSettingsAsSearchParams.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, indexSettingsAsSearchParams.advancedSyntaxFeatures) && - Objects.equals(this.explain, indexSettingsAsSearchParams.explain) && - Objects.equals(this.distinct, indexSettingsAsSearchParams.distinct) && - Objects.equals(this.attributeForDistinct, indexSettingsAsSearchParams.attributeForDistinct) && - Objects.equals(this.synonyms, indexSettingsAsSearchParams.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, indexSettingsAsSearchParams.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, indexSettingsAsSearchParams.minProximity) && - Objects.equals(this.responseFields, indexSettingsAsSearchParams.responseFields) && - Objects.equals(this.maxFacetHits, indexSettingsAsSearchParams.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, indexSettingsAsSearchParams.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, indexSettingsAsSearchParams.renderingContent) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndexSettingsAsSearchParams {\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParamsSemanticSearch.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParamsSemanticSearch.java deleted file mode 100644 index 59898d4dd0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/IndexSettingsAsSearchParamsSemanticSearch.java +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. - */ -public class IndexSettingsAsSearchParamsSemanticSearch { - - @JsonProperty("eventSources") - private List eventSources; - - public IndexSettingsAsSearchParamsSemanticSearch setEventSources(List eventSources) { - this.eventSources = eventSources; - return this; - } - - public IndexSettingsAsSearchParamsSemanticSearch addEventSources(String eventSourcesItem) { - if (this.eventSources == null) { - this.eventSources = new ArrayList<>(); - } - this.eventSources.add(eventSourcesItem); - return this; - } - - /** - * Indices from which to collect click and conversion events. If null, the current index and - * replica group will be used as the event source. - * - * @return eventSources - */ - @javax.annotation.Nullable - public List getEventSources() { - return eventSources; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndexSettingsAsSearchParamsSemanticSearch indexSettingsAsSearchParamsSemanticSearch = (IndexSettingsAsSearchParamsSemanticSearch) o; - return Objects.equals(this.eventSources, indexSettingsAsSearchParamsSemanticSearch.eventSources); - } - - @Override - public int hashCode() { - return Objects.hash(eventSources); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndexSettingsAsSearchParamsSemanticSearch {\n"); - sb.append(" eventSources: ").append(toIndentedString(eventSources)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MatchLevel.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MatchLevel.java deleted file mode 100644 index ae9c476919..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MatchLevel.java +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Indicates how well the attribute matched the search query. */ -public enum MatchLevel { - NONE("none"), - - PARTIAL("partial"), - - FULL("full"); - - private final String value; - - MatchLevel(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static MatchLevel fromValue(String value) { - for (MatchLevel b : MatchLevel.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MatchedGeoLocation.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MatchedGeoLocation.java deleted file mode 100644 index 514dda5649..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MatchedGeoLocation.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** MatchedGeoLocation */ -public class MatchedGeoLocation { - - @JsonProperty("lat") - private Double lat; - - @JsonProperty("lng") - private Double lng; - - @JsonProperty("distance") - private Integer distance; - - public MatchedGeoLocation setLat(Double lat) { - this.lat = lat; - return this; - } - - /** - * Latitude of the matched location. - * - * @return lat - */ - @javax.annotation.Nullable - public Double getLat() { - return lat; - } - - public MatchedGeoLocation setLng(Double lng) { - this.lng = lng; - return this; - } - - /** - * Longitude of the matched location. - * - * @return lng - */ - @javax.annotation.Nullable - public Double getLng() { - return lng; - } - - public MatchedGeoLocation setDistance(Integer distance) { - this.distance = distance; - return this; - } - - /** - * Distance between the matched location and the search location (in meters). - * - * @return distance - */ - @javax.annotation.Nullable - public Integer getDistance() { - return distance; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MatchedGeoLocation matchedGeoLocation = (MatchedGeoLocation) o; - return ( - Objects.equals(this.lat, matchedGeoLocation.lat) && - Objects.equals(this.lng, matchedGeoLocation.lng) && - Objects.equals(this.distance, matchedGeoLocation.distance) - ); - } - - @Override - public int hashCode() { - return Objects.hash(lat, lng, distance); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MatchedGeoLocation {\n"); - sb.append(" lat: ").append(toIndentedString(lat)).append("\n"); - sb.append(" lng: ").append(toIndentedString(lng)).append("\n"); - sb.append(" distance: ").append(toIndentedString(distance)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MixedSearchFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MixedSearchFilters.java deleted file mode 100644 index f126109230..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/MixedSearchFilters.java +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** MixedSearchFilters */ -@JsonDeserialize(using = MixedSearchFilters.MixedSearchFiltersDeserializer.class) -@JsonSerialize(using = MixedSearchFilters.MixedSearchFiltersSerializer.class) -public abstract class MixedSearchFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(MixedSearchFilters.class.getName()); - - public static MixedSearchFilters of(List inside) { - return new MixedSearchFiltersListOfString(inside); - } - - public static MixedSearchFilters of(String inside) { - return new MixedSearchFiltersString(inside); - } - - public static class MixedSearchFiltersSerializer extends StdSerializer { - - public MixedSearchFiltersSerializer(Class t) { - super(t); - } - - public MixedSearchFiltersSerializer() { - this(null); - } - - @Override - public void serialize(MixedSearchFilters value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class MixedSearchFiltersDeserializer extends StdDeserializer { - - public MixedSearchFiltersDeserializer() { - this(MixedSearchFilters.class); - } - - public MixedSearchFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public MixedSearchFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return MixedSearchFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return MixedSearchFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public MixedSearchFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "MixedSearchFilters cannot be null"); - } - } -} - -class MixedSearchFiltersListOfString extends MixedSearchFilters { - - private final List insideValue; - - MixedSearchFiltersListOfString(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class MixedSearchFiltersString extends MixedSearchFilters { - - private final String insideValue; - - MixedSearchFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Mode.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Mode.java deleted file mode 100644 index 25754baace..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Mode.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Search mode the index will use to query for results. */ -public enum Mode { - NEURAL_SEARCH("neuralSearch"), - - KEYWORD_SEARCH("keywordSearch"); - - private final String value; - - Mode(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Mode fromValue(String value) { - for (Mode b : Mode.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/NumericFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/NumericFilters.java deleted file mode 100644 index be8dc968e9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/NumericFilters.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * [Filter on numeric - * attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). - */ -@JsonDeserialize(using = NumericFilters.NumericFiltersDeserializer.class) -@JsonSerialize(using = NumericFilters.NumericFiltersSerializer.class) -public abstract class NumericFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(NumericFilters.class.getName()); - - public static NumericFilters of(List inside) { - return new NumericFiltersListOfMixedSearchFilters(inside); - } - - public static NumericFilters of(String inside) { - return new NumericFiltersString(inside); - } - - public static class NumericFiltersSerializer extends StdSerializer { - - public NumericFiltersSerializer(Class t) { - super(t); - } - - public NumericFiltersSerializer() { - this(null); - } - - @Override - public void serialize(NumericFilters value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class NumericFiltersDeserializer extends StdDeserializer { - - public NumericFiltersDeserializer() { - this(NumericFilters.class); - } - - public NumericFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public NumericFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return NumericFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return NumericFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public NumericFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "NumericFilters cannot be null"); - } - } -} - -class NumericFiltersListOfMixedSearchFilters extends NumericFilters { - - private final List insideValue; - - NumericFiltersListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class NumericFiltersString extends NumericFilters { - - private final String insideValue; - - NumericFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/OptionalFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/OptionalFilters.java deleted file mode 100644 index 48f2919777..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/OptionalFilters.java +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * Create filters to boost or demote records. Records that match the filter are ranked higher for - * positive and lower for negative optional filters. In contrast to regular filters, records that - * don't match the optional filter are still included in the results, only their ranking is - * affected. - */ -@JsonDeserialize(using = OptionalFilters.OptionalFiltersDeserializer.class) -@JsonSerialize(using = OptionalFilters.OptionalFiltersSerializer.class) -public abstract class OptionalFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(OptionalFilters.class.getName()); - - public static OptionalFilters of(List inside) { - return new OptionalFiltersListOfMixedSearchFilters(inside); - } - - public static OptionalFilters of(String inside) { - return new OptionalFiltersString(inside); - } - - public static class OptionalFiltersSerializer extends StdSerializer { - - public OptionalFiltersSerializer(Class t) { - super(t); - } - - public OptionalFiltersSerializer() { - this(null); - } - - @Override - public void serialize(OptionalFilters value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class OptionalFiltersDeserializer extends StdDeserializer { - - public OptionalFiltersDeserializer() { - this(OptionalFilters.class); - } - - public OptionalFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public OptionalFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return OptionalFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return OptionalFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public OptionalFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "OptionalFilters cannot be null"); - } - } -} - -class OptionalFiltersListOfMixedSearchFilters extends OptionalFilters { - - private final List insideValue; - - OptionalFiltersListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class OptionalFiltersString extends OptionalFilters { - - private final String insideValue; - - OptionalFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Params.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Params.java deleted file mode 100644 index ca8b85bb89..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Params.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Additional search parameters. */ -public class Params { - - @JsonProperty("query") - private ConsequenceQuery query; - - @JsonProperty("automaticFacetFilters") - private AutomaticFacetFilters automaticFacetFilters; - - @JsonProperty("automaticOptionalFacetFilters") - private AutomaticFacetFilters automaticOptionalFacetFilters; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - public Params setQuery(ConsequenceQuery query) { - this.query = query; - return this; - } - - /** - * Get query - * - * @return query - */ - @javax.annotation.Nullable - public ConsequenceQuery getQuery() { - return query; - } - - public Params setAutomaticFacetFilters(AutomaticFacetFilters automaticFacetFilters) { - this.automaticFacetFilters = automaticFacetFilters; - return this; - } - - /** - * Get automaticFacetFilters - * - * @return automaticFacetFilters - */ - @javax.annotation.Nullable - public AutomaticFacetFilters getAutomaticFacetFilters() { - return automaticFacetFilters; - } - - public Params setAutomaticOptionalFacetFilters(AutomaticFacetFilters automaticOptionalFacetFilters) { - this.automaticOptionalFacetFilters = automaticOptionalFacetFilters; - return this; - } - - /** - * Get automaticOptionalFacetFilters - * - * @return automaticOptionalFacetFilters - */ - @javax.annotation.Nullable - public AutomaticFacetFilters getAutomaticOptionalFacetFilters() { - return automaticOptionalFacetFilters; - } - - public Params setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Params params = (Params) o; - return ( - Objects.equals(this.query, params.query) && - Objects.equals(this.automaticFacetFilters, params.automaticFacetFilters) && - Objects.equals(this.automaticOptionalFacetFilters, params.automaticOptionalFacetFilters) && - Objects.equals(this.renderingContent, params.renderingContent) - ); - } - - @Override - public int hashCode() { - return Objects.hash(query, automaticFacetFilters, automaticOptionalFacetFilters, renderingContent); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Params {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" automaticFacetFilters: ").append(toIndentedString(automaticFacetFilters)).append("\n"); - sb.append(" automaticOptionalFacetFilters: ").append(toIndentedString(automaticOptionalFacetFilters)).append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Personalization.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Personalization.java deleted file mode 100644 index 408728268f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Personalization.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Personalization */ -public class Personalization { - - @JsonProperty("filtersScore") - private Integer filtersScore; - - @JsonProperty("rankingScore") - private Integer rankingScore; - - @JsonProperty("score") - private Integer score; - - public Personalization setFiltersScore(Integer filtersScore) { - this.filtersScore = filtersScore; - return this; - } - - /** - * The score of the filters. - * - * @return filtersScore - */ - @javax.annotation.Nullable - public Integer getFiltersScore() { - return filtersScore; - } - - public Personalization setRankingScore(Integer rankingScore) { - this.rankingScore = rankingScore; - return this; - } - - /** - * The score of the ranking. - * - * @return rankingScore - */ - @javax.annotation.Nullable - public Integer getRankingScore() { - return rankingScore; - } - - public Personalization setScore(Integer score) { - this.score = score; - return this; - } - - /** - * The score of the event. - * - * @return score - */ - @javax.annotation.Nullable - public Integer getScore() { - return score; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Personalization personalization = (Personalization) o; - return ( - Objects.equals(this.filtersScore, personalization.filtersScore) && - Objects.equals(this.rankingScore, personalization.rankingScore) && - Objects.equals(this.score, personalization.score) - ); - } - - @Override - public int hashCode() { - return Objects.hash(filtersScore, rankingScore, score); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Personalization {\n"); - sb.append(" filtersScore: ").append(toIndentedString(filtersScore)).append("\n"); - sb.append(" rankingScore: ").append(toIndentedString(rankingScore)).append("\n"); - sb.append(" score: ").append(toIndentedString(score)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Promote.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Promote.java deleted file mode 100644 index 7d0fc54097..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Promote.java +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** Promote */ -@JsonDeserialize(using = Promote.PromoteDeserializer.class) -@JsonSerialize(using = Promote.PromoteSerializer.class) -public abstract class Promote implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(Promote.class.getName()); - - public static Promote of(PromoteObjectID inside) { - return new PromotePromoteObjectID(inside); - } - - public static Promote of(PromoteObjectIDs inside) { - return new PromotePromoteObjectIDs(inside); - } - - public static class PromoteSerializer extends StdSerializer { - - public PromoteSerializer(Class t) { - super(t); - } - - public PromoteSerializer() { - this(null); - } - - @Override - public void serialize(Promote value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class PromoteDeserializer extends StdDeserializer { - - public PromoteDeserializer() { - this(Promote.class); - } - - public PromoteDeserializer(Class vc) { - super(vc); - } - - @Override - public Promote deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize PromoteObjectID - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - PromoteObjectID value = parser.readValueAs(new TypeReference() {}); - return Promote.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf PromoteObjectID (error: " + e.getMessage() + ") (type: PromoteObjectID)"); - } - } - - // deserialize PromoteObjectIDs - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - PromoteObjectIDs value = parser.readValueAs(new TypeReference() {}); - return Promote.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf PromoteObjectIDs (error: " + e.getMessage() + ") (type: PromoteObjectIDs)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public Promote getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "Promote cannot be null"); - } - } -} - -class PromotePromoteObjectID extends Promote { - - private final PromoteObjectID insideValue; - - PromotePromoteObjectID(PromoteObjectID insideValue) { - this.insideValue = insideValue; - } - - @Override - public PromoteObjectID getInsideValue() { - return insideValue; - } -} - -class PromotePromoteObjectIDs extends Promote { - - private final PromoteObjectIDs insideValue; - - PromotePromoteObjectIDs(PromoteObjectIDs insideValue) { - this.insideValue = insideValue; - } - - @Override - public PromoteObjectIDs getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/PromoteObjectID.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/PromoteObjectID.java deleted file mode 100644 index 5a7aab5ef1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/PromoteObjectID.java +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Record to promote. */ -public class PromoteObjectID { - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("position") - private Integer position; - - public PromoteObjectID setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique identifier of the record to promote. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public PromoteObjectID setPosition(Integer position) { - this.position = position; - return this; - } - - /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this - * position as a group. For example, if you pronmote four objectIDs to position 0, the records - * take the first four positions. - * - * @return position - */ - @javax.annotation.Nonnull - public Integer getPosition() { - return position; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PromoteObjectID promoteObjectID = (PromoteObjectID) o; - return Objects.equals(this.objectID, promoteObjectID.objectID) && Objects.equals(this.position, promoteObjectID.position); - } - - @Override - public int hashCode() { - return Objects.hash(objectID, position); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PromoteObjectID {\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" position: ").append(toIndentedString(position)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/PromoteObjectIDs.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/PromoteObjectIDs.java deleted file mode 100644 index 7d402b4663..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/PromoteObjectIDs.java +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Records to promote. */ -public class PromoteObjectIDs { - - @JsonProperty("objectIDs") - private List objectIDs = new ArrayList<>(); - - @JsonProperty("position") - private Integer position; - - public PromoteObjectIDs setObjectIDs(List objectIDs) { - this.objectIDs = objectIDs; - return this; - } - - public PromoteObjectIDs addObjectIDs(String objectIDsItem) { - this.objectIDs.add(objectIDsItem); - return this; - } - - /** - * Unique identifiers of the records to promote. - * - * @return objectIDs - */ - @javax.annotation.Nonnull - public List getObjectIDs() { - return objectIDs; - } - - public PromoteObjectIDs setPosition(Integer position) { - this.position = position; - return this; - } - - /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this - * position as a group. For example, if you pronmote four objectIDs to position 0, the records - * take the first four positions. - * - * @return position - */ - @javax.annotation.Nonnull - public Integer getPosition() { - return position; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PromoteObjectIDs promoteObjectIDs = (PromoteObjectIDs) o; - return Objects.equals(this.objectIDs, promoteObjectIDs.objectIDs) && Objects.equals(this.position, promoteObjectIDs.position); - } - - @Override - public int hashCode() { - return Objects.hash(objectIDs, position); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PromoteObjectIDs {\n"); - sb.append(" objectIDs: ").append(toIndentedString(objectIDs)).append("\n"); - sb.append(" position: ").append(toIndentedString(position)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/QueryType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/QueryType.java deleted file mode 100644 index 1c806dcca0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/QueryType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Determines how query words are [interpreted as - * prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). - */ -public enum QueryType { - PREFIX_LAST("prefixLast"), - - PREFIX_ALL("prefixAll"), - - PREFIX_NONE("prefixNone"); - - private final String value; - - QueryType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static QueryType fromValue(String value) { - for (QueryType b : QueryType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RankingInfo.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RankingInfo.java deleted file mode 100644 index 40c403f22a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RankingInfo.java +++ /dev/null @@ -1,323 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** RankingInfo */ -public class RankingInfo { - - @JsonProperty("filters") - private Integer filters; - - @JsonProperty("firstMatchedWord") - private Integer firstMatchedWord; - - @JsonProperty("geoDistance") - private Integer geoDistance; - - @JsonProperty("geoPrecision") - private Integer geoPrecision; - - @JsonProperty("matchedGeoLocation") - private MatchedGeoLocation matchedGeoLocation; - - @JsonProperty("personalization") - private Personalization personalization; - - @JsonProperty("nbExactWords") - private Integer nbExactWords; - - @JsonProperty("nbTypos") - private Integer nbTypos; - - @JsonProperty("promoted") - private Boolean promoted; - - @JsonProperty("proximityDistance") - private Integer proximityDistance; - - @JsonProperty("userScore") - private Integer userScore; - - @JsonProperty("words") - private Integer words; - - @JsonProperty("promotedByReRanking") - private Boolean promotedByReRanking; - - public RankingInfo setFilters(Integer filters) { - this.filters = filters; - return this; - } - - /** - * This field is reserved for advanced usage. - * - * @return filters - */ - @javax.annotation.Nonnull - public Integer getFilters() { - return filters; - } - - public RankingInfo setFirstMatchedWord(Integer firstMatchedWord) { - this.firstMatchedWord = firstMatchedWord; - return this; - } - - /** - * Position of the most important matched attribute in the attributes to index list. - * - * @return firstMatchedWord - */ - @javax.annotation.Nonnull - public Integer getFirstMatchedWord() { - return firstMatchedWord; - } - - public RankingInfo setGeoDistance(Integer geoDistance) { - this.geoDistance = geoDistance; - return this; - } - - /** - * Distance between the geo location in the search query and the best matching geo location in the - * record, divided by the geo precision (in meters). - * - * @return geoDistance - */ - @javax.annotation.Nonnull - public Integer getGeoDistance() { - return geoDistance; - } - - public RankingInfo setGeoPrecision(Integer geoPrecision) { - this.geoPrecision = geoPrecision; - return this; - } - - /** - * Precision used when computing the geo distance, in meters. - * - * @return geoPrecision - */ - @javax.annotation.Nullable - public Integer getGeoPrecision() { - return geoPrecision; - } - - public RankingInfo setMatchedGeoLocation(MatchedGeoLocation matchedGeoLocation) { - this.matchedGeoLocation = matchedGeoLocation; - return this; - } - - /** - * Get matchedGeoLocation - * - * @return matchedGeoLocation - */ - @javax.annotation.Nullable - public MatchedGeoLocation getMatchedGeoLocation() { - return matchedGeoLocation; - } - - public RankingInfo setPersonalization(Personalization personalization) { - this.personalization = personalization; - return this; - } - - /** - * Get personalization - * - * @return personalization - */ - @javax.annotation.Nullable - public Personalization getPersonalization() { - return personalization; - } - - public RankingInfo setNbExactWords(Integer nbExactWords) { - this.nbExactWords = nbExactWords; - return this; - } - - /** - * Number of exactly matched words. - * - * @return nbExactWords - */ - @javax.annotation.Nonnull - public Integer getNbExactWords() { - return nbExactWords; - } - - public RankingInfo setNbTypos(Integer nbTypos) { - this.nbTypos = nbTypos; - return this; - } - - /** - * Number of typos encountered when matching the record. - * - * @return nbTypos - */ - @javax.annotation.Nonnull - public Integer getNbTypos() { - return nbTypos; - } - - public RankingInfo setPromoted(Boolean promoted) { - this.promoted = promoted; - return this; - } - - /** - * Present and set to true if a Rule promoted the hit. - * - * @return promoted - */ - @javax.annotation.Nonnull - public Boolean getPromoted() { - return promoted; - } - - public RankingInfo setProximityDistance(Integer proximityDistance) { - this.proximityDistance = proximityDistance; - return this; - } - - /** - * When the query contains more than one word, the sum of the distances between matched words (in - * meters). - * - * @return proximityDistance - */ - @javax.annotation.Nullable - public Integer getProximityDistance() { - return proximityDistance; - } - - public RankingInfo setUserScore(Integer userScore) { - this.userScore = userScore; - return this; - } - - /** - * Custom ranking for the object, expressed as a single integer value. - * - * @return userScore - */ - @javax.annotation.Nonnull - public Integer getUserScore() { - return userScore; - } - - public RankingInfo setWords(Integer words) { - this.words = words; - return this; - } - - /** - * Number of matched words, including prefixes and typos. - * - * @return words - */ - @javax.annotation.Nonnull - public Integer getWords() { - return words; - } - - public RankingInfo setPromotedByReRanking(Boolean promotedByReRanking) { - this.promotedByReRanking = promotedByReRanking; - return this; - } - - /** - * Wether the record are promoted by the re-ranking strategy. - * - * @return promotedByReRanking - */ - @javax.annotation.Nullable - public Boolean getPromotedByReRanking() { - return promotedByReRanking; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RankingInfo rankingInfo = (RankingInfo) o; - return ( - Objects.equals(this.filters, rankingInfo.filters) && - Objects.equals(this.firstMatchedWord, rankingInfo.firstMatchedWord) && - Objects.equals(this.geoDistance, rankingInfo.geoDistance) && - Objects.equals(this.geoPrecision, rankingInfo.geoPrecision) && - Objects.equals(this.matchedGeoLocation, rankingInfo.matchedGeoLocation) && - Objects.equals(this.personalization, rankingInfo.personalization) && - Objects.equals(this.nbExactWords, rankingInfo.nbExactWords) && - Objects.equals(this.nbTypos, rankingInfo.nbTypos) && - Objects.equals(this.promoted, rankingInfo.promoted) && - Objects.equals(this.proximityDistance, rankingInfo.proximityDistance) && - Objects.equals(this.userScore, rankingInfo.userScore) && - Objects.equals(this.words, rankingInfo.words) && - Objects.equals(this.promotedByReRanking, rankingInfo.promotedByReRanking) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - filters, - firstMatchedWord, - geoDistance, - geoPrecision, - matchedGeoLocation, - personalization, - nbExactWords, - nbTypos, - promoted, - proximityDistance, - userScore, - words, - promotedByReRanking - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RankingInfo {\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" firstMatchedWord: ").append(toIndentedString(firstMatchedWord)).append("\n"); - sb.append(" geoDistance: ").append(toIndentedString(geoDistance)).append("\n"); - sb.append(" geoPrecision: ").append(toIndentedString(geoPrecision)).append("\n"); - sb.append(" matchedGeoLocation: ").append(toIndentedString(matchedGeoLocation)).append("\n"); - sb.append(" personalization: ").append(toIndentedString(personalization)).append("\n"); - sb.append(" nbExactWords: ").append(toIndentedString(nbExactWords)).append("\n"); - sb.append(" nbTypos: ").append(toIndentedString(nbTypos)).append("\n"); - sb.append(" promoted: ").append(toIndentedString(promoted)).append("\n"); - sb.append(" proximityDistance: ").append(toIndentedString(proximityDistance)).append("\n"); - sb.append(" userScore: ").append(toIndentedString(userScore)).append("\n"); - sb.append(" words: ").append(toIndentedString(words)).append("\n"); - sb.append(" promotedByReRanking: ").append(toIndentedString(promotedByReRanking)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ReRankingApplyFilter.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ReRankingApplyFilter.java deleted file mode 100644 index c6455f77fa..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/ReRankingApplyFilter.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, - * only records that match these filters will be affected by Dynamic Re-Ranking. - */ -@JsonDeserialize(using = ReRankingApplyFilter.ReRankingApplyFilterDeserializer.class) -@JsonSerialize(using = ReRankingApplyFilter.ReRankingApplyFilterSerializer.class) -public abstract class ReRankingApplyFilter implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(ReRankingApplyFilter.class.getName()); - - public static ReRankingApplyFilter of(List inside) { - return new ReRankingApplyFilterListOfMixedSearchFilters(inside); - } - - public static ReRankingApplyFilter of(String inside) { - return new ReRankingApplyFilterString(inside); - } - - public static class ReRankingApplyFilterSerializer extends StdSerializer { - - public ReRankingApplyFilterSerializer(Class t) { - super(t); - } - - public ReRankingApplyFilterSerializer() { - this(null); - } - - @Override - public void serialize(ReRankingApplyFilter value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class ReRankingApplyFilterDeserializer extends StdDeserializer { - - public ReRankingApplyFilterDeserializer() { - this(ReRankingApplyFilter.class); - } - - public ReRankingApplyFilterDeserializer(Class vc) { - super(vc); - } - - @Override - public ReRankingApplyFilter deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return ReRankingApplyFilter.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return ReRankingApplyFilter.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public ReRankingApplyFilter getNullValue(DeserializationContext ctxt) throws JsonMappingException { - return null; - } - } -} - -class ReRankingApplyFilterListOfMixedSearchFilters extends ReRankingApplyFilter { - - private final List insideValue; - - ReRankingApplyFilterListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class ReRankingApplyFilterString extends ReRankingApplyFilter { - - private final String insideValue; - - ReRankingApplyFilterString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendHit.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendHit.java deleted file mode 100644 index ab747cc780..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendHit.java +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Recommend hit. */ -public class RecommendHit { - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("_highlightResult") - private Map highlightResult; - - @JsonProperty("_snippetResult") - private Map snippetResult; - - @JsonProperty("_rankingInfo") - private RankingInfo rankingInfo; - - @JsonProperty("_distinctSeqID") - private Integer distinctSeqID; - - @JsonProperty("_score") - private Double score; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public RecommendHit setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public RecommendHit setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique object identifier. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public RecommendHit setHighlightResult(Map highlightResult) { - this.highlightResult = highlightResult; - return this; - } - - public RecommendHit putHighlightResult(String key, HighlightResult highlightResultItem) { - if (this.highlightResult == null) { - this.highlightResult = new HashMap<>(); - } - this.highlightResult.put(key, highlightResultItem); - return this; - } - - /** - * Show highlighted section and words matched on a query. - * - * @return highlightResult - */ - @javax.annotation.Nullable - public Map getHighlightResult() { - return highlightResult; - } - - public RecommendHit setSnippetResult(Map snippetResult) { - this.snippetResult = snippetResult; - return this; - } - - public RecommendHit putSnippetResult(String key, SnippetResult snippetResultItem) { - if (this.snippetResult == null) { - this.snippetResult = new HashMap<>(); - } - this.snippetResult.put(key, snippetResultItem); - return this; - } - - /** - * Snippeted attributes show parts of the matched attributes. Only returned when - * attributesToSnippet is non-empty. - * - * @return snippetResult - */ - @javax.annotation.Nullable - public Map getSnippetResult() { - return snippetResult; - } - - public RecommendHit setRankingInfo(RankingInfo rankingInfo) { - this.rankingInfo = rankingInfo; - return this; - } - - /** - * Get rankingInfo - * - * @return rankingInfo - */ - @javax.annotation.Nullable - public RankingInfo getRankingInfo() { - return rankingInfo; - } - - public RecommendHit setDistinctSeqID(Integer distinctSeqID) { - this.distinctSeqID = distinctSeqID; - return this; - } - - /** - * Get distinctSeqID - * - * @return distinctSeqID - */ - @javax.annotation.Nullable - public Integer getDistinctSeqID() { - return distinctSeqID; - } - - public RecommendHit setScore(Double score) { - this.score = score; - return this; - } - - /** - * Recommendation score. minimum: 0 maximum: 100 - * - * @return score - */ - @javax.annotation.Nonnull - public Double getScore() { - return score; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecommendHit recommendHit = (RecommendHit) o; - return ( - Objects.equals(this.objectID, recommendHit.objectID) && - Objects.equals(this.highlightResult, recommendHit.highlightResult) && - Objects.equals(this.snippetResult, recommendHit.snippetResult) && - Objects.equals(this.rankingInfo, recommendHit.rankingInfo) && - Objects.equals(this.distinctSeqID, recommendHit.distinctSeqID) && - Objects.equals(this.score, recommendHit.score) && - super.equals(o) - ); - } - - @Override - public int hashCode() { - return Objects.hash(objectID, highlightResult, snippetResult, rankingInfo, distinctSeqID, score, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecommendHit {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" highlightResult: ").append(toIndentedString(highlightResult)).append("\n"); - sb.append(" snippetResult: ").append(toIndentedString(snippetResult)).append("\n"); - sb.append(" rankingInfo: ").append(toIndentedString(rankingInfo)).append("\n"); - sb.append(" distinctSeqID: ").append(toIndentedString(distinctSeqID)).append("\n"); - sb.append(" score: ").append(toIndentedString(score)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendHits.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendHits.java deleted file mode 100644 index 5db1f02588..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendHits.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** RecommendHits */ -public class RecommendHits { - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - public RecommendHits setHits(List hits) { - this.hits = hits; - return this; - } - - public RecommendHits addHits(RecommendHit hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Get hits - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecommendHits recommendHits = (RecommendHits) o; - return Objects.equals(this.hits, recommendHits.hits); - } - - @Override - public int hashCode() { - return Objects.hash(hits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecommendHits {\n"); - sb.append(" hits: ").append(toIndentedString(hits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendModels.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendModels.java deleted file mode 100644 index f46e0d330a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendModels.java +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets recommendModels */ -public enum RecommendModels { - RELATED_PRODUCTS("related-products"), - - BOUGHT_TOGETHER("bought-together"), - - TRENDING_FACETS("trending-facets"), - - TRENDING_ITEMS("trending-items"); - - private final String value; - - RecommendModels(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static RecommendModels fromValue(String value) { - for (RecommendModels b : RecommendModels.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationModels.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationModels.java deleted file mode 100644 index 24f3cbb28f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationModels.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Recommendation model. */ -public enum RecommendationModels { - RELATED_PRODUCTS("related-products"), - - BOUGHT_TOGETHER("bought-together"); - - private final String value; - - RecommendationModels(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static RecommendationModels fromValue(String value) { - for (RecommendationModels b : RecommendationModels.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationRequest.java deleted file mode 100644 index a4f165c6e9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationRequest.java +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** RecommendationRequest */ -public class RecommendationRequest { - - @JsonProperty("model") - private RecommendationModels model; - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("threshold") - private Integer threshold; - - @JsonProperty("maxRecommendations") - private Integer maxRecommendations; - - @JsonProperty("queryParameters") - private SearchParamsObject queryParameters; - - @JsonProperty("fallbackParameters") - private SearchParamsObject fallbackParameters; - - public RecommendationRequest setModel(RecommendationModels model) { - this.model = model; - return this; - } - - /** - * Get model - * - * @return model - */ - @javax.annotation.Nonnull - public RecommendationModels getModel() { - return model; - } - - public RecommendationRequest setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique object identifier. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public RecommendationRequest setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Algolia index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public RecommendationRequest setThreshold(Integer threshold) { - this.threshold = threshold; - return this; - } - - /** - * Recommendations with a confidence score lower than `threshold` won't appear in results. > - * **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to - * 100, the more relevant the recommendations are. minimum: 0 maximum: 100 - * - * @return threshold - */ - @javax.annotation.Nonnull - public Integer getThreshold() { - return threshold; - } - - public RecommendationRequest setMaxRecommendations(Integer maxRecommendations) { - this.maxRecommendations = maxRecommendations; - return this; - } - - /** - * Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. - * - * @return maxRecommendations - */ - @javax.annotation.Nullable - public Integer getMaxRecommendations() { - return maxRecommendations; - } - - public RecommendationRequest setQueryParameters(SearchParamsObject queryParameters) { - this.queryParameters = queryParameters; - return this; - } - - /** - * Get queryParameters - * - * @return queryParameters - */ - @javax.annotation.Nullable - public SearchParamsObject getQueryParameters() { - return queryParameters; - } - - public RecommendationRequest setFallbackParameters(SearchParamsObject fallbackParameters) { - this.fallbackParameters = fallbackParameters; - return this; - } - - /** - * Get fallbackParameters - * - * @return fallbackParameters - */ - @javax.annotation.Nullable - public SearchParamsObject getFallbackParameters() { - return fallbackParameters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecommendationRequest recommendationRequest = (RecommendationRequest) o; - return ( - Objects.equals(this.model, recommendationRequest.model) && - Objects.equals(this.objectID, recommendationRequest.objectID) && - Objects.equals(this.indexName, recommendationRequest.indexName) && - Objects.equals(this.threshold, recommendationRequest.threshold) && - Objects.equals(this.maxRecommendations, recommendationRequest.maxRecommendations) && - Objects.equals(this.queryParameters, recommendationRequest.queryParameters) && - Objects.equals(this.fallbackParameters, recommendationRequest.fallbackParameters) - ); - } - - @Override - public int hashCode() { - return Objects.hash(model, objectID, indexName, threshold, maxRecommendations, queryParameters, fallbackParameters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecommendationRequest {\n"); - sb.append(" model: ").append(toIndentedString(model)).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" threshold: ").append(toIndentedString(threshold)).append("\n"); - sb.append(" maxRecommendations: ").append(toIndentedString(maxRecommendations)).append("\n"); - sb.append(" queryParameters: ").append(toIndentedString(queryParameters)).append("\n"); - sb.append(" fallbackParameters: ").append(toIndentedString(fallbackParameters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationsRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationsRequest.java deleted file mode 100644 index 7699bce43a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationsRequest.java +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** RecommendationsRequest */ -@JsonDeserialize(using = RecommendationsRequest.RecommendationsRequestDeserializer.class) -@JsonSerialize(using = RecommendationsRequest.RecommendationsRequestSerializer.class) -public abstract class RecommendationsRequest implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(RecommendationsRequest.class.getName()); - - public static RecommendationsRequest of(RecommendationRequest inside) { - return new RecommendationsRequestRecommendationRequest(inside); - } - - public static RecommendationsRequest of(TrendingRequest inside) { - return new RecommendationsRequestTrendingRequest(inside); - } - - public static class RecommendationsRequestSerializer extends StdSerializer { - - public RecommendationsRequestSerializer(Class t) { - super(t); - } - - public RecommendationsRequestSerializer() { - this(null); - } - - @Override - public void serialize(RecommendationsRequest value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class RecommendationsRequestDeserializer extends StdDeserializer { - - public RecommendationsRequestDeserializer() { - this(RecommendationsRequest.class); - } - - public RecommendationsRequestDeserializer(Class vc) { - super(vc); - } - - @Override - public RecommendationsRequest deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize RecommendationRequest - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - RecommendationRequest value = parser.readValueAs(new TypeReference() {}); - return RecommendationsRequest.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf RecommendationRequest (error: " + e.getMessage() + ") (type: RecommendationRequest)"); - } - } - - // deserialize TrendingRequest - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - TrendingRequest value = parser.readValueAs(new TypeReference() {}); - return RecommendationsRequest.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf TrendingRequest (error: " + e.getMessage() + ") (type: TrendingRequest)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public RecommendationsRequest getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "RecommendationsRequest cannot be null"); - } - } -} - -class RecommendationsRequestRecommendationRequest extends RecommendationsRequest { - - private final RecommendationRequest insideValue; - - RecommendationsRequestRecommendationRequest(RecommendationRequest insideValue) { - this.insideValue = insideValue; - } - - @Override - public RecommendationRequest getInsideValue() { - return insideValue; - } -} - -class RecommendationsRequestTrendingRequest extends RecommendationsRequest { - - private final TrendingRequest insideValue; - - RecommendationsRequestTrendingRequest(TrendingRequest insideValue) { - this.insideValue = insideValue; - } - - @Override - public TrendingRequest getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationsResponse.java deleted file mode 100644 index a82f084488..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RecommendationsResponse.java +++ /dev/null @@ -1,644 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** RecommendationsResponse */ -public class RecommendationsResponse { - - @JsonProperty("abTestID") - private Integer abTestID; - - @JsonProperty("abTestVariantID") - private Integer abTestVariantID; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("automaticRadius") - private String automaticRadius; - - @JsonProperty("exhaustiveFacetsCount") - private Boolean exhaustiveFacetsCount; - - @JsonProperty("exhaustiveNbHits") - private Boolean exhaustiveNbHits; - - @JsonProperty("exhaustiveTypo") - private Boolean exhaustiveTypo; - - @JsonProperty("facets") - private Map> facets; - - @JsonProperty("facets_stats") - private Map facetsStats; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("index") - private String index; - - @JsonProperty("indexUsed") - private String indexUsed; - - @JsonProperty("message") - private String message; - - @JsonProperty("nbHits") - private Integer nbHits; - - @JsonProperty("nbPages") - private Integer nbPages; - - @JsonProperty("nbSortedHits") - private Integer nbSortedHits; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("params") - private String params; - - @JsonProperty("redirect") - private BaseSearchResponseRedirect redirect; - - @JsonProperty("parsedQuery") - private String parsedQuery; - - @JsonProperty("processingTimeMS") - private Integer processingTimeMS; - - @JsonProperty("query") - private String query; - - @JsonProperty("queryAfterRemoval") - private String queryAfterRemoval; - - @JsonProperty("serverUsed") - private String serverUsed; - - @JsonProperty("userData") - private Object userData; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - public RecommendationsResponse setAbTestID(Integer abTestID) { - this.abTestID = abTestID; - return this; - } - - /** - * A/B test ID. This is only included in the response for indices that are part of an A/B test. - * - * @return abTestID - */ - @javax.annotation.Nullable - public Integer getAbTestID() { - return abTestID; - } - - public RecommendationsResponse setAbTestVariantID(Integer abTestVariantID) { - this.abTestVariantID = abTestVariantID; - return this; - } - - /** - * Variant ID. This is only included in the response for indices that are part of an A/B test. - * minimum: 1 - * - * @return abTestVariantID - */ - @javax.annotation.Nullable - public Integer getAbTestVariantID() { - return abTestVariantID; - } - - public RecommendationsResponse setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Computed geographical location. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public RecommendationsResponse setAutomaticRadius(String automaticRadius) { - this.automaticRadius = automaticRadius; - return this; - } - - /** - * Automatically-computed radius. - * - * @return automaticRadius - */ - @javax.annotation.Nullable - public String getAutomaticRadius() { - return automaticRadius; - } - - public RecommendationsResponse setExhaustiveFacetsCount(Boolean exhaustiveFacetsCount) { - this.exhaustiveFacetsCount = exhaustiveFacetsCount; - return this; - } - - /** - * Indicates whether the facet count is exhaustive (exact) or approximate. - * - * @return exhaustiveFacetsCount - */ - @javax.annotation.Nullable - public Boolean getExhaustiveFacetsCount() { - return exhaustiveFacetsCount; - } - - public RecommendationsResponse setExhaustiveNbHits(Boolean exhaustiveNbHits) { - this.exhaustiveNbHits = exhaustiveNbHits; - return this; - } - - /** - * Indicates whether the number of hits `nbHits` is exhaustive (exact) or approximate. - * - * @return exhaustiveNbHits - */ - @javax.annotation.Nonnull - public Boolean getExhaustiveNbHits() { - return exhaustiveNbHits; - } - - public RecommendationsResponse setExhaustiveTypo(Boolean exhaustiveTypo) { - this.exhaustiveTypo = exhaustiveTypo; - return this; - } - - /** - * Indicates whether the search for typos was exhaustive (exact) or approximate. - * - * @return exhaustiveTypo - */ - @javax.annotation.Nullable - public Boolean getExhaustiveTypo() { - return exhaustiveTypo; - } - - public RecommendationsResponse setFacets(Map> facets) { - this.facets = facets; - return this; - } - - public RecommendationsResponse putFacets(String key, Map facetsItem) { - if (this.facets == null) { - this.facets = new HashMap<>(); - } - this.facets.put(key, facetsItem); - return this; - } - - /** - * Mapping of each facet name to the corresponding facet counts. - * - * @return facets - */ - @javax.annotation.Nullable - public Map> getFacets() { - return facets; - } - - public RecommendationsResponse setFacetsStats(Map facetsStats) { - this.facetsStats = facetsStats; - return this; - } - - public RecommendationsResponse putFacetsStats(String key, FacetsStats facetsStatsItem) { - if (this.facetsStats == null) { - this.facetsStats = new HashMap<>(); - } - this.facetsStats.put(key, facetsStatsItem); - return this; - } - - /** - * Statistics for numerical facets. - * - * @return facetsStats - */ - @javax.annotation.Nullable - public Map getFacetsStats() { - return facetsStats; - } - - public RecommendationsResponse setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nonnull - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public RecommendationsResponse setIndex(String index) { - this.index = index; - return this; - } - - /** - * Index name used for the query. - * - * @return index - */ - @javax.annotation.Nullable - public String getIndex() { - return index; - } - - public RecommendationsResponse setIndexUsed(String indexUsed) { - this.indexUsed = indexUsed; - return this; - } - - /** - * Index name used for the query. During A/B testing, the targeted index isn't always the index - * used by the query. - * - * @return indexUsed - */ - @javax.annotation.Nullable - public String getIndexUsed() { - return indexUsed; - } - - public RecommendationsResponse setMessage(String message) { - this.message = message; - return this; - } - - /** - * Warnings about the query. - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public RecommendationsResponse setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - public RecommendationsResponse setNbPages(Integer nbPages) { - this.nbPages = nbPages; - return this; - } - - /** - * Number of pages of results for the current query. - * - * @return nbPages - */ - @javax.annotation.Nonnull - public Integer getNbPages() { - return nbPages; - } - - public RecommendationsResponse setNbSortedHits(Integer nbSortedHits) { - this.nbSortedHits = nbSortedHits; - return this; - } - - /** - * Number of hits selected and sorted by the relevant sort algorithm. - * - * @return nbSortedHits - */ - @javax.annotation.Nullable - public Integer getNbSortedHits() { - return nbSortedHits; - } - - public RecommendationsResponse setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nonnull - public Integer getPage() { - return page; - } - - public RecommendationsResponse setParams(String params) { - this.params = params; - return this; - } - - /** - * URL-encoded string of all search parameters. - * - * @return params - */ - @javax.annotation.Nonnull - public String getParams() { - return params; - } - - public RecommendationsResponse setRedirect(BaseSearchResponseRedirect redirect) { - this.redirect = redirect; - return this; - } - - /** - * Get redirect - * - * @return redirect - */ - @javax.annotation.Nullable - public BaseSearchResponseRedirect getRedirect() { - return redirect; - } - - public RecommendationsResponse setParsedQuery(String parsedQuery) { - this.parsedQuery = parsedQuery; - return this; - } - - /** - * Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) - * query string that will be searched. - * - * @return parsedQuery - */ - @javax.annotation.Nullable - public String getParsedQuery() { - return parsedQuery; - } - - public RecommendationsResponse setProcessingTimeMS(Integer processingTimeMS) { - this.processingTimeMS = processingTimeMS; - return this; - } - - /** - * Time the server took to process the request, in milliseconds. - * - * @return processingTimeMS - */ - @javax.annotation.Nonnull - public Integer getProcessingTimeMS() { - return processingTimeMS; - } - - public RecommendationsResponse setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } - - public RecommendationsResponse setQueryAfterRemoval(String queryAfterRemoval) { - this.queryAfterRemoval = queryAfterRemoval; - return this; - } - - /** - * Markup text indicating which parts of the original query have been removed to retrieve a - * non-empty result set. - * - * @return queryAfterRemoval - */ - @javax.annotation.Nullable - public String getQueryAfterRemoval() { - return queryAfterRemoval; - } - - public RecommendationsResponse setServerUsed(String serverUsed) { - this.serverUsed = serverUsed; - return this; - } - - /** - * Host name of the server that processed the request. - * - * @return serverUsed - */ - @javax.annotation.Nullable - public String getServerUsed() { - return serverUsed; - } - - public RecommendationsResponse setUserData(Object userData) { - this.userData = userData; - return this; - } - - /** - * Lets you store custom data in your indices. - * - * @return userData - */ - @javax.annotation.Nullable - public Object getUserData() { - return userData; - } - - public RecommendationsResponse setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - public RecommendationsResponse setHits(List hits) { - this.hits = hits; - return this; - } - - public RecommendationsResponse addHits(RecommendHit hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Get hits - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecommendationsResponse recommendationsResponse = (RecommendationsResponse) o; - return ( - Objects.equals(this.abTestID, recommendationsResponse.abTestID) && - Objects.equals(this.abTestVariantID, recommendationsResponse.abTestVariantID) && - Objects.equals(this.aroundLatLng, recommendationsResponse.aroundLatLng) && - Objects.equals(this.automaticRadius, recommendationsResponse.automaticRadius) && - Objects.equals(this.exhaustiveFacetsCount, recommendationsResponse.exhaustiveFacetsCount) && - Objects.equals(this.exhaustiveNbHits, recommendationsResponse.exhaustiveNbHits) && - Objects.equals(this.exhaustiveTypo, recommendationsResponse.exhaustiveTypo) && - Objects.equals(this.facets, recommendationsResponse.facets) && - Objects.equals(this.facetsStats, recommendationsResponse.facetsStats) && - Objects.equals(this.hitsPerPage, recommendationsResponse.hitsPerPage) && - Objects.equals(this.index, recommendationsResponse.index) && - Objects.equals(this.indexUsed, recommendationsResponse.indexUsed) && - Objects.equals(this.message, recommendationsResponse.message) && - Objects.equals(this.nbHits, recommendationsResponse.nbHits) && - Objects.equals(this.nbPages, recommendationsResponse.nbPages) && - Objects.equals(this.nbSortedHits, recommendationsResponse.nbSortedHits) && - Objects.equals(this.page, recommendationsResponse.page) && - Objects.equals(this.params, recommendationsResponse.params) && - Objects.equals(this.redirect, recommendationsResponse.redirect) && - Objects.equals(this.parsedQuery, recommendationsResponse.parsedQuery) && - Objects.equals(this.processingTimeMS, recommendationsResponse.processingTimeMS) && - Objects.equals(this.query, recommendationsResponse.query) && - Objects.equals(this.queryAfterRemoval, recommendationsResponse.queryAfterRemoval) && - Objects.equals(this.serverUsed, recommendationsResponse.serverUsed) && - Objects.equals(this.userData, recommendationsResponse.userData) && - Objects.equals(this.renderingContent, recommendationsResponse.renderingContent) && - Objects.equals(this.hits, recommendationsResponse.hits) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - abTestID, - abTestVariantID, - aroundLatLng, - automaticRadius, - exhaustiveFacetsCount, - exhaustiveNbHits, - exhaustiveTypo, - facets, - facetsStats, - hitsPerPage, - index, - indexUsed, - message, - nbHits, - nbPages, - nbSortedHits, - page, - params, - redirect, - parsedQuery, - processingTimeMS, - query, - queryAfterRemoval, - serverUsed, - userData, - renderingContent, - hits - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecommendationsResponse {\n"); - sb.append(" abTestID: ").append(toIndentedString(abTestID)).append("\n"); - sb.append(" abTestVariantID: ").append(toIndentedString(abTestVariantID)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" automaticRadius: ").append(toIndentedString(automaticRadius)).append("\n"); - sb.append(" exhaustiveFacetsCount: ").append(toIndentedString(exhaustiveFacetsCount)).append("\n"); - sb.append(" exhaustiveNbHits: ").append(toIndentedString(exhaustiveNbHits)).append("\n"); - sb.append(" exhaustiveTypo: ").append(toIndentedString(exhaustiveTypo)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" facetsStats: ").append(toIndentedString(facetsStats)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" indexUsed: ").append(toIndentedString(indexUsed)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).append("\n"); - sb.append(" nbPages: ").append(toIndentedString(nbPages)).append("\n"); - sb.append(" nbSortedHits: ").append(toIndentedString(nbSortedHits)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n"); - sb.append(" parsedQuery: ").append(toIndentedString(parsedQuery)).append("\n"); - sb.append(" processingTimeMS: ").append(toIndentedString(processingTimeMS)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" queryAfterRemoval: ").append(toIndentedString(queryAfterRemoval)).append("\n"); - sb.append(" serverUsed: ").append(toIndentedString(serverUsed)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).append("\n"); - sb.append(" hits: ").append(toIndentedString(hits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java deleted file mode 100644 index e4403ad498..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** RedirectRuleIndexMetadata */ -public class RedirectRuleIndexMetadata { - - @JsonProperty("source") - private String source; - - @JsonProperty("dest") - private String dest; - - @JsonProperty("reason") - private String reason; - - @JsonProperty("succeed") - private Boolean succeed; - - @JsonProperty("data") - private RedirectRuleIndexMetadataData data; - - public RedirectRuleIndexMetadata setSource(String source) { - this.source = source; - return this; - } - - /** - * Source index for the redirect rule. - * - * @return source - */ - @javax.annotation.Nonnull - public String getSource() { - return source; - } - - public RedirectRuleIndexMetadata setDest(String dest) { - this.dest = dest; - return this; - } - - /** - * Destination index for the redirect rule. - * - * @return dest - */ - @javax.annotation.Nonnull - public String getDest() { - return dest; - } - - public RedirectRuleIndexMetadata setReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Reason for the redirect rule. - * - * @return reason - */ - @javax.annotation.Nonnull - public String getReason() { - return reason; - } - - public RedirectRuleIndexMetadata setSucceed(Boolean succeed) { - this.succeed = succeed; - return this; - } - - /** - * Redirect rule status. - * - * @return succeed - */ - @javax.annotation.Nonnull - public Boolean getSucceed() { - return succeed; - } - - public RedirectRuleIndexMetadata setData(RedirectRuleIndexMetadataData data) { - this.data = data; - return this; - } - - /** - * Get data - * - * @return data - */ - @javax.annotation.Nonnull - public RedirectRuleIndexMetadataData getData() { - return data; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RedirectRuleIndexMetadata redirectRuleIndexMetadata = (RedirectRuleIndexMetadata) o; - return ( - Objects.equals(this.source, redirectRuleIndexMetadata.source) && - Objects.equals(this.dest, redirectRuleIndexMetadata.dest) && - Objects.equals(this.reason, redirectRuleIndexMetadata.reason) && - Objects.equals(this.succeed, redirectRuleIndexMetadata.succeed) && - Objects.equals(this.data, redirectRuleIndexMetadata.data) - ); - } - - @Override - public int hashCode() { - return Objects.hash(source, dest, reason, succeed, data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RedirectRuleIndexMetadata {\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" dest: ").append(toIndentedString(dest)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" succeed: ").append(toIndentedString(succeed)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java deleted file mode 100644 index fe720c058b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Redirect rule data. */ -public class RedirectRuleIndexMetadataData { - - @JsonProperty("ruleObjectID") - private String ruleObjectID; - - public RedirectRuleIndexMetadataData setRuleObjectID(String ruleObjectID) { - this.ruleObjectID = ruleObjectID; - return this; - } - - /** - * Get ruleObjectID - * - * @return ruleObjectID - */ - @javax.annotation.Nonnull - public String getRuleObjectID() { - return ruleObjectID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RedirectRuleIndexMetadataData redirectRuleIndexMetadataData = (RedirectRuleIndexMetadataData) o; - return Objects.equals(this.ruleObjectID, redirectRuleIndexMetadataData.ruleObjectID); - } - - @Override - public int hashCode() { - return Objects.hash(ruleObjectID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RedirectRuleIndexMetadataData {\n"); - sb.append(" ruleObjectID: ").append(toIndentedString(ruleObjectID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RemoveStopWords.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RemoveStopWords.java deleted file mode 100644 index 0840b4a02b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RemoveStopWords.java +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * Removes stop (common) words from the query before executing it. `removeStopWords` is used in - * conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words - * should be enabled. This list will override any values that you may have set in `queryLanguages`. - * _true_: enables the stop words feature, ensuring that stop words are removed from consideration - * in a search. The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words - * feature, allowing stop words to be taken into account in a search. - */ -@JsonDeserialize(using = RemoveStopWords.RemoveStopWordsDeserializer.class) -@JsonSerialize(using = RemoveStopWords.RemoveStopWordsSerializer.class) -public abstract class RemoveStopWords implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(RemoveStopWords.class.getName()); - - public static RemoveStopWords of(Boolean inside) { - return new RemoveStopWordsBoolean(inside); - } - - public static RemoveStopWords of(List inside) { - return new RemoveStopWordsListOfString(inside); - } - - public static class RemoveStopWordsSerializer extends StdSerializer { - - public RemoveStopWordsSerializer(Class t) { - super(t); - } - - public RemoveStopWordsSerializer() { - this(null); - } - - @Override - public void serialize(RemoveStopWords value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class RemoveStopWordsDeserializer extends StdDeserializer { - - public RemoveStopWordsDeserializer() { - this(RemoveStopWords.class); - } - - public RemoveStopWordsDeserializer(Class vc) { - super(vc); - } - - @Override - public RemoveStopWords deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize Boolean - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Boolean value = parser.readValueAs(new TypeReference() {}); - return RemoveStopWords.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Boolean (error: " + e.getMessage() + ") (type: Boolean)"); - } - } - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return RemoveStopWords.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public RemoveStopWords getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "RemoveStopWords cannot be null"); - } - } -} - -class RemoveStopWordsBoolean extends RemoveStopWords { - - private final Boolean insideValue; - - RemoveStopWordsBoolean(Boolean insideValue) { - this.insideValue = insideValue; - } - - @Override - public Boolean getInsideValue() { - return insideValue; - } -} - -class RemoveStopWordsListOfString extends RemoveStopWords { - - private final List insideValue; - - RemoveStopWordsListOfString(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RemoveWordsIfNoResults.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RemoveWordsIfNoResults.java deleted file mode 100644 index e84ab20aa4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RemoveWordsIfNoResults.java +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Strategy to [remove - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - * from the query when it doesn't match any hits. - */ -public enum RemoveWordsIfNoResults { - NONE("none"), - - LAST_WORDS("lastWords"), - - FIRST_WORDS("firstWords"), - - ALL_OPTIONAL("allOptional"); - - private final String value; - - RemoveWordsIfNoResults(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static RemoveWordsIfNoResults fromValue(String value) { - for (RemoveWordsIfNoResults b : RemoveWordsIfNoResults.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RenderingContent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RenderingContent.java deleted file mode 100644 index 6931d55798..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RenderingContent.java +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** - * Extra content for the search UI, for example, to control the [ordering and display of - * facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - * You can set a default value and dynamically override it with - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). - */ -public class RenderingContent { - - @JsonProperty("facetOrdering") - private FacetOrdering facetOrdering; - - public RenderingContent setFacetOrdering(FacetOrdering facetOrdering) { - this.facetOrdering = facetOrdering; - return this; - } - - /** - * Get facetOrdering - * - * @return facetOrdering - */ - @javax.annotation.Nullable - public FacetOrdering getFacetOrdering() { - return facetOrdering; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RenderingContent renderingContent = (RenderingContent) o; - return Objects.equals(this.facetOrdering, renderingContent.facetOrdering); - } - - @Override - public int hashCode() { - return Objects.hash(facetOrdering); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RenderingContent {\n"); - sb.append(" facetOrdering: ").append(toIndentedString(facetOrdering)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RuleResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RuleResponse.java deleted file mode 100644 index d2ac187520..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RuleResponse.java +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Rule object. */ -public class RuleResponse { - - @JsonProperty("_metadata") - private RuleResponseMetadata metadata; - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("conditions") - private List conditions; - - @JsonProperty("consequence") - private Consequence consequence; - - @JsonProperty("description") - private String description; - - @JsonProperty("enabled") - private Boolean enabled; - - public RuleResponse setMetadata(RuleResponseMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get metadata - * - * @return metadata - */ - @javax.annotation.Nullable - public RuleResponseMetadata getMetadata() { - return metadata; - } - - public RuleResponse setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique identifier for a rule object. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public RuleResponse setConditions(List conditions) { - this.conditions = conditions; - return this; - } - - public RuleResponse addConditions(Condition conditionsItem) { - if (this.conditions == null) { - this.conditions = new ArrayList<>(); - } - this.conditions.add(conditionsItem); - return this; - } - - /** - * [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) - * required to activate a rule. You can use up to 25 conditions per rule. - * - * @return conditions - */ - @javax.annotation.Nullable - public List getConditions() { - return conditions; - } - - public RuleResponse setConsequence(Consequence consequence) { - this.consequence = consequence; - return this; - } - - /** - * Get consequence - * - * @return consequence - */ - @javax.annotation.Nullable - public Consequence getConsequence() { - return consequence; - } - - public RuleResponse setDescription(String description) { - this.description = description; - return this; - } - - /** - * Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public RuleResponse setEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. - * - * @return enabled - */ - @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RuleResponse ruleResponse = (RuleResponse) o; - return ( - Objects.equals(this.metadata, ruleResponse.metadata) && - Objects.equals(this.objectID, ruleResponse.objectID) && - Objects.equals(this.conditions, ruleResponse.conditions) && - Objects.equals(this.consequence, ruleResponse.consequence) && - Objects.equals(this.description, ruleResponse.description) && - Objects.equals(this.enabled, ruleResponse.enabled) - ); - } - - @Override - public int hashCode() { - return Objects.hash(metadata, objectID, conditions, consequence, description, enabled); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RuleResponse {\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); - sb.append(" consequence: ").append(toIndentedString(consequence)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RuleResponseMetadata.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RuleResponseMetadata.java deleted file mode 100644 index 969e506f1e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/RuleResponseMetadata.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** RuleResponseMetadata */ -public class RuleResponseMetadata { - - @JsonProperty("lastUpdate") - private String lastUpdate; - - public RuleResponseMetadata setLastUpdate(String lastUpdate) { - this.lastUpdate = lastUpdate; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return lastUpdate - */ - @javax.annotation.Nullable - public String getLastUpdate() { - return lastUpdate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RuleResponseMetadata ruleResponseMetadata = (RuleResponseMetadata) o; - return Objects.equals(this.lastUpdate, ruleResponseMetadata.lastUpdate); - } - - @Override - public int hashCode() { - return Objects.hash(lastUpdate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RuleResponseMetadata {\n"); - sb.append(" lastUpdate: ").append(toIndentedString(lastUpdate)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchParamsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchParamsObject.java deleted file mode 100644 index 7d09cf6718..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchParamsObject.java +++ /dev/null @@ -1,1963 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchParamsObject */ -public class SearchParamsObject { - - @JsonProperty("query") - private String query; - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - public SearchParamsObject setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public SearchParamsObject setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public SearchParamsObject setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public SearchParamsObject setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public SearchParamsObject setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public SearchParamsObject setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public SearchParamsObject setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public SearchParamsObject setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public SearchParamsObject setFacets(List facets) { - this.facets = facets; - return this; - } - - public SearchParamsObject addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public SearchParamsObject setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public SearchParamsObject setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public SearchParamsObject setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public SearchParamsObject setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public SearchParamsObject setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public SearchParamsObject setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public SearchParamsObject setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public SearchParamsObject setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public SearchParamsObject setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public SearchParamsObject setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public SearchParamsObject setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public SearchParamsObject setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public SearchParamsObject addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public SearchParamsObject setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public SearchParamsObject addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public SearchParamsObject setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public SearchParamsObject addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public SearchParamsObject setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public SearchParamsObject addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public SearchParamsObject setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public SearchParamsObject setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public SearchParamsObject setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public SearchParamsObject setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public SearchParamsObject setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public SearchParamsObject setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public SearchParamsObject addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public SearchParamsObject setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public SearchParamsObject setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public SearchParamsObject setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public SearchParamsObject setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - public SearchParamsObject setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public SearchParamsObject addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public SearchParamsObject setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public SearchParamsObject addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public SearchParamsObject setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public SearchParamsObject addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public SearchParamsObject setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public SearchParamsObject addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public SearchParamsObject setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public SearchParamsObject addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public SearchParamsObject setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public SearchParamsObject setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public SearchParamsObject addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public SearchParamsObject setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public SearchParamsObject addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public SearchParamsObject setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public SearchParamsObject setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public SearchParamsObject setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public SearchParamsObject setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public SearchParamsObject setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public SearchParamsObject setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public SearchParamsObject setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public SearchParamsObject setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public SearchParamsObject setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public SearchParamsObject setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public SearchParamsObject addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public SearchParamsObject setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public SearchParamsObject setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public SearchParamsObject setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public SearchParamsObject setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public SearchParamsObject addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public SearchParamsObject setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public SearchParamsObject setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public SearchParamsObject setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public SearchParamsObject setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public SearchParamsObject setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public SearchParamsObject setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public SearchParamsObject setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public SearchParamsObject setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public SearchParamsObject setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public SearchParamsObject addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public SearchParamsObject setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public SearchParamsObject addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public SearchParamsObject setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public SearchParamsObject setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public SearchParamsObject addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public SearchParamsObject setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public SearchParamsObject addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public SearchParamsObject setExplain(List explain) { - this.explain = explain; - return this; - } - - public SearchParamsObject addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public SearchParamsObject setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public SearchParamsObject setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public SearchParamsObject setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public SearchParamsObject setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public SearchParamsObject setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public SearchParamsObject setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public SearchParamsObject addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public SearchParamsObject setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public SearchParamsObject setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public SearchParamsObject setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchParamsObject searchParamsObject = (SearchParamsObject) o; - return ( - Objects.equals(this.query, searchParamsObject.query) && - Objects.equals(this.similarQuery, searchParamsObject.similarQuery) && - Objects.equals(this.filters, searchParamsObject.filters) && - Objects.equals(this.facetFilters, searchParamsObject.facetFilters) && - Objects.equals(this.optionalFilters, searchParamsObject.optionalFilters) && - Objects.equals(this.numericFilters, searchParamsObject.numericFilters) && - Objects.equals(this.tagFilters, searchParamsObject.tagFilters) && - Objects.equals(this.sumOrFiltersScores, searchParamsObject.sumOrFiltersScores) && - Objects.equals(this.facets, searchParamsObject.facets) && - Objects.equals(this.maxValuesPerFacet, searchParamsObject.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, searchParamsObject.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, searchParamsObject.sortFacetValuesBy) && - Objects.equals(this.page, searchParamsObject.page) && - Objects.equals(this.offset, searchParamsObject.offset) && - Objects.equals(this.length, searchParamsObject.length) && - Objects.equals(this.aroundLatLng, searchParamsObject.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, searchParamsObject.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, searchParamsObject.aroundRadius) && - Objects.equals(this.aroundPrecision, searchParamsObject.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, searchParamsObject.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, searchParamsObject.insideBoundingBox) && - Objects.equals(this.insidePolygon, searchParamsObject.insidePolygon) && - Objects.equals(this.naturalLanguages, searchParamsObject.naturalLanguages) && - Objects.equals(this.ruleContexts, searchParamsObject.ruleContexts) && - Objects.equals(this.personalizationImpact, searchParamsObject.personalizationImpact) && - Objects.equals(this.userToken, searchParamsObject.userToken) && - Objects.equals(this.getRankingInfo, searchParamsObject.getRankingInfo) && - Objects.equals(this.clickAnalytics, searchParamsObject.clickAnalytics) && - Objects.equals(this.analytics, searchParamsObject.analytics) && - Objects.equals(this.analyticsTags, searchParamsObject.analyticsTags) && - Objects.equals(this.percentileComputation, searchParamsObject.percentileComputation) && - Objects.equals(this.enableABTest, searchParamsObject.enableABTest) && - Objects.equals(this.enableReRanking, searchParamsObject.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, searchParamsObject.reRankingApplyFilter) && - Objects.equals(this.attributesForFaceting, searchParamsObject.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, searchParamsObject.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, searchParamsObject.restrictSearchableAttributes) && - Objects.equals(this.ranking, searchParamsObject.ranking) && - Objects.equals(this.customRanking, searchParamsObject.customRanking) && - Objects.equals(this.relevancyStrictness, searchParamsObject.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, searchParamsObject.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, searchParamsObject.attributesToSnippet) && - Objects.equals(this.highlightPreTag, searchParamsObject.highlightPreTag) && - Objects.equals(this.highlightPostTag, searchParamsObject.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, searchParamsObject.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, searchParamsObject.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, searchParamsObject.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, searchParamsObject.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, searchParamsObject.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, searchParamsObject.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, searchParamsObject.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, searchParamsObject.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, searchParamsObject.ignorePlurals) && - Objects.equals(this.removeStopWords, searchParamsObject.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, searchParamsObject.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, searchParamsObject.queryLanguages) && - Objects.equals(this.decompoundQuery, searchParamsObject.decompoundQuery) && - Objects.equals(this.enableRules, searchParamsObject.enableRules) && - Objects.equals(this.enablePersonalization, searchParamsObject.enablePersonalization) && - Objects.equals(this.queryType, searchParamsObject.queryType) && - Objects.equals(this.removeWordsIfNoResults, searchParamsObject.removeWordsIfNoResults) && - Objects.equals(this.mode, searchParamsObject.mode) && - Objects.equals(this.semanticSearch, searchParamsObject.semanticSearch) && - Objects.equals(this.advancedSyntax, searchParamsObject.advancedSyntax) && - Objects.equals(this.optionalWords, searchParamsObject.optionalWords) && - Objects.equals(this.disableExactOnAttributes, searchParamsObject.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, searchParamsObject.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, searchParamsObject.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, searchParamsObject.advancedSyntaxFeatures) && - Objects.equals(this.explain, searchParamsObject.explain) && - Objects.equals(this.distinct, searchParamsObject.distinct) && - Objects.equals(this.attributeForDistinct, searchParamsObject.attributeForDistinct) && - Objects.equals(this.synonyms, searchParamsObject.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, searchParamsObject.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, searchParamsObject.minProximity) && - Objects.equals(this.responseFields, searchParamsObject.responseFields) && - Objects.equals(this.maxFacetHits, searchParamsObject.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, searchParamsObject.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, searchParamsObject.renderingContent) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - query, - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter, - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchParamsObject {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchParamsQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchParamsQuery.java deleted file mode 100644 index b47a0397a2..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchParamsQuery.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchParamsQuery */ -public class SearchParamsQuery { - - @JsonProperty("query") - private String query; - - public SearchParamsQuery setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchParamsQuery searchParamsQuery = (SearchParamsQuery) o; - return Objects.equals(this.query, searchParamsQuery.query); - } - - @Override - public int hashCode() { - return Objects.hash(query); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchParamsQuery {\n"); - sb.append(" query: ").append(toIndentedString(query)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchRecommendRulesParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchRecommendRulesParams.java deleted file mode 100644 index d7604b3e5c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchRecommendRulesParams.java +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Recommend rules search parameters. */ -public class SearchRecommendRulesParams { - - @JsonProperty("query") - private String query; - - @JsonProperty("context") - private String context; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("enabled") - private Boolean enabled; - - @JsonProperty("requestOptions") - private List requestOptions; - - public SearchRecommendRulesParams setQuery(String query) { - this.query = query; - return this; - } - - /** - * Full-text query. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public SearchRecommendRulesParams setContext(String context) { - this.context = context; - return this; - } - - /** - * Restricts responses to the specified [contextual - * rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). - * - * @return context - */ - @javax.annotation.Nullable - public String getContext() { - return context; - } - - public SearchRecommendRulesParams setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Requested page (the first page is page 0). minimum: 0 - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public SearchRecommendRulesParams setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Maximum number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public SearchRecommendRulesParams setEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Restricts responses to enabled rules. When absent (default), _all_ rules are retrieved. - * - * @return enabled - */ - @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; - } - - public SearchRecommendRulesParams setRequestOptions(List requestOptions) { - this.requestOptions = requestOptions; - return this; - } - - public SearchRecommendRulesParams addRequestOptions(Object requestOptionsItem) { - if (this.requestOptions == null) { - this.requestOptions = new ArrayList<>(); - } - this.requestOptions.add(requestOptionsItem); - return this; - } - - /** - * Request options to send with the API call. - * - * @return requestOptions - */ - @javax.annotation.Nullable - public List getRequestOptions() { - return requestOptions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchRecommendRulesParams searchRecommendRulesParams = (SearchRecommendRulesParams) o; - return ( - Objects.equals(this.query, searchRecommendRulesParams.query) && - Objects.equals(this.context, searchRecommendRulesParams.context) && - Objects.equals(this.page, searchRecommendRulesParams.page) && - Objects.equals(this.hitsPerPage, searchRecommendRulesParams.hitsPerPage) && - Objects.equals(this.enabled, searchRecommendRulesParams.enabled) && - Objects.equals(this.requestOptions, searchRecommendRulesParams.requestOptions) - ); - } - - @Override - public int hashCode() { - return Objects.hash(query, context, page, hitsPerPage, enabled, requestOptions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchRecommendRulesParams {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" context: ").append(toIndentedString(context)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" requestOptions: ").append(toIndentedString(requestOptions)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchRecommendRulesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchRecommendRulesResponse.java deleted file mode 100644 index e8233cb0fa..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SearchRecommendRulesResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchRecommendRulesResponse */ -public class SearchRecommendRulesResponse { - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - @JsonProperty("nbHits") - private Integer nbHits; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("nbPages") - private Integer nbPages; - - public SearchRecommendRulesResponse setHits(List hits) { - this.hits = hits; - return this; - } - - public SearchRecommendRulesResponse addHits(RuleResponse hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Fetched rules. - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - public SearchRecommendRulesResponse setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of fetched rules. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - public SearchRecommendRulesResponse setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Current page. - * - * @return page - */ - @javax.annotation.Nonnull - public Integer getPage() { - return page; - } - - public SearchRecommendRulesResponse setNbPages(Integer nbPages) { - this.nbPages = nbPages; - return this; - } - - /** - * Number of pages. - * - * @return nbPages - */ - @javax.annotation.Nonnull - public Integer getNbPages() { - return nbPages; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchRecommendRulesResponse searchRecommendRulesResponse = (SearchRecommendRulesResponse) o; - return ( - Objects.equals(this.hits, searchRecommendRulesResponse.hits) && - Objects.equals(this.nbHits, searchRecommendRulesResponse.nbHits) && - Objects.equals(this.page, searchRecommendRulesResponse.page) && - Objects.equals(this.nbPages, searchRecommendRulesResponse.nbPages) - ); - } - - @Override - public int hashCode() { - return Objects.hash(hits, nbHits, page, nbPages); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchRecommendRulesResponse {\n"); - sb.append(" hits: ").append(toIndentedString(hits)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" nbPages: ").append(toIndentedString(nbPages)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SnippetResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SnippetResult.java deleted file mode 100644 index 92dab6c711..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SnippetResult.java +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** SnippetResult */ -@JsonDeserialize(using = SnippetResult.SnippetResultDeserializer.class) -@JsonSerialize(using = SnippetResult.SnippetResultSerializer.class) -public abstract class SnippetResult implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(SnippetResult.class.getName()); - - public static SnippetResult of(List inside) { - return new SnippetResultListOfSnippetResultOption(inside); - } - - public static SnippetResult of(SnippetResultOption inside) { - return new SnippetResultSnippetResultOption(inside); - } - - public static class SnippetResultSerializer extends StdSerializer { - - public SnippetResultSerializer(Class t) { - super(t); - } - - public SnippetResultSerializer() { - this(null); - } - - @Override - public void serialize(SnippetResult value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class SnippetResultDeserializer extends StdDeserializer { - - public SnippetResultDeserializer() { - this(SnippetResult.class); - } - - public SnippetResultDeserializer(Class vc) { - super(vc); - } - - @Override - public SnippetResult deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return SnippetResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize SnippetResultOption - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - SnippetResultOption value = parser.readValueAs(new TypeReference() {}); - return SnippetResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf SnippetResultOption (error: " + e.getMessage() + ") (type: SnippetResultOption)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public SnippetResult getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "SnippetResult cannot be null"); - } - } -} - -class SnippetResultListOfSnippetResultOption extends SnippetResult { - - private final List insideValue; - - SnippetResultListOfSnippetResultOption(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class SnippetResultSnippetResultOption extends SnippetResult { - - private final SnippetResultOption insideValue; - - SnippetResultSnippetResultOption(SnippetResultOption insideValue) { - this.insideValue = insideValue; - } - - @Override - public SnippetResultOption getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SnippetResultOption.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SnippetResultOption.java deleted file mode 100644 index a246c9b805..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SnippetResultOption.java +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet - * is non-empty. - */ -public class SnippetResultOption { - - @JsonProperty("value") - private String value; - - @JsonProperty("matchLevel") - private MatchLevel matchLevel; - - public SnippetResultOption setValue(String value) { - this.value = value; - return this; - } - - /** - * Markup text with `facetQuery` matches highlighted. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public SnippetResultOption setMatchLevel(MatchLevel matchLevel) { - this.matchLevel = matchLevel; - return this; - } - - /** - * Get matchLevel - * - * @return matchLevel - */ - @javax.annotation.Nonnull - public MatchLevel getMatchLevel() { - return matchLevel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SnippetResultOption snippetResultOption = (SnippetResultOption) o; - return Objects.equals(this.value, snippetResultOption.value) && Objects.equals(this.matchLevel, snippetResultOption.matchLevel); - } - - @Override - public int hashCode() { - return Objects.hash(value, matchLevel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SnippetResultOption {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" matchLevel: ").append(toIndentedString(matchLevel)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SortRemainingBy.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SortRemainingBy.java deleted file mode 100644 index 35ba50eda6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/SortRemainingBy.java +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical - * (ascending). - `hidden`: show only pinned values. - */ -public enum SortRemainingBy { - COUNT("count"), - - ALPHA("alpha"), - - HIDDEN("hidden"); - - private final String value; - - SortRemainingBy(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SortRemainingBy fromValue(String value) { - for (SortRemainingBy b : SortRemainingBy.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TagFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TagFilters.java deleted file mode 100644 index 482fd69301..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TagFilters.java +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). */ -@JsonDeserialize(using = TagFilters.TagFiltersDeserializer.class) -@JsonSerialize(using = TagFilters.TagFiltersSerializer.class) -public abstract class TagFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(TagFilters.class.getName()); - - public static TagFilters of(List inside) { - return new TagFiltersListOfMixedSearchFilters(inside); - } - - public static TagFilters of(String inside) { - return new TagFiltersString(inside); - } - - public static class TagFiltersSerializer extends StdSerializer { - - public TagFiltersSerializer(Class t) { - super(t); - } - - public TagFiltersSerializer() { - this(null); - } - - @Override - public void serialize(TagFilters value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class TagFiltersDeserializer extends StdDeserializer { - - public TagFiltersDeserializer() { - this(TagFilters.class); - } - - public TagFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public TagFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return TagFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return TagFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public TagFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "TagFilters cannot be null"); - } - } -} - -class TagFiltersListOfMixedSearchFilters extends TagFilters { - - private final List insideValue; - - TagFiltersListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class TagFiltersString extends TagFilters { - - private final String insideValue; - - TagFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TaskStatus.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TaskStatus.java deleted file mode 100644 index 6f4668d2c5..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TaskStatus.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** _published_ if the task has been processed, _notPublished_ otherwise. */ -public enum TaskStatus { - PUBLISHED("published"), - - NOT_PUBLISHED("notPublished"); - - private final String value; - - TaskStatus(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TaskStatus fromValue(String value) { - for (TaskStatus b : TaskStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TrendingModels.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TrendingModels.java deleted file mode 100644 index 0a727b6603..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TrendingModels.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Trending model. */ -public enum TrendingModels { - FACETS("trending-facets"), - - ITEMS("trending-items"); - - private final String value; - - TrendingModels(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TrendingModels fromValue(String value) { - for (TrendingModels b : TrendingModels.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TrendingRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TrendingRequest.java deleted file mode 100644 index 0bf60b348f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TrendingRequest.java +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** TrendingRequest */ -public class TrendingRequest { - - @JsonProperty("model") - private TrendingModels model; - - @JsonProperty("facetName") - private String facetName; - - @JsonProperty("facetValue") - private String facetValue; - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("threshold") - private Integer threshold; - - @JsonProperty("maxRecommendations") - private Integer maxRecommendations; - - @JsonProperty("queryParameters") - private SearchParamsObject queryParameters; - - @JsonProperty("fallbackParameters") - private SearchParamsObject fallbackParameters; - - public TrendingRequest setModel(TrendingModels model) { - this.model = model; - return this; - } - - /** - * Get model - * - * @return model - */ - @javax.annotation.Nonnull - public TrendingModels getModel() { - return model; - } - - public TrendingRequest setFacetName(String facetName) { - this.facetName = facetName; - return this; - } - - /** - * Facet name for trending models. - * - * @return facetName - */ - @javax.annotation.Nullable - public String getFacetName() { - return facetName; - } - - public TrendingRequest setFacetValue(String facetValue) { - this.facetValue = facetValue; - return this; - } - - /** - * Facet value for trending models. - * - * @return facetValue - */ - @javax.annotation.Nullable - public String getFacetValue() { - return facetValue; - } - - public TrendingRequest setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Algolia index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public TrendingRequest setThreshold(Integer threshold) { - this.threshold = threshold; - return this; - } - - /** - * Recommendations with a confidence score lower than `threshold` won't appear in results. > - * **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to - * 100, the more relevant the recommendations are. minimum: 0 maximum: 100 - * - * @return threshold - */ - @javax.annotation.Nonnull - public Integer getThreshold() { - return threshold; - } - - public TrendingRequest setMaxRecommendations(Integer maxRecommendations) { - this.maxRecommendations = maxRecommendations; - return this; - } - - /** - * Maximum number of recommendations to retrieve. If 0, all recommendations will be returned. - * - * @return maxRecommendations - */ - @javax.annotation.Nullable - public Integer getMaxRecommendations() { - return maxRecommendations; - } - - public TrendingRequest setQueryParameters(SearchParamsObject queryParameters) { - this.queryParameters = queryParameters; - return this; - } - - /** - * Get queryParameters - * - * @return queryParameters - */ - @javax.annotation.Nullable - public SearchParamsObject getQueryParameters() { - return queryParameters; - } - - public TrendingRequest setFallbackParameters(SearchParamsObject fallbackParameters) { - this.fallbackParameters = fallbackParameters; - return this; - } - - /** - * Get fallbackParameters - * - * @return fallbackParameters - */ - @javax.annotation.Nullable - public SearchParamsObject getFallbackParameters() { - return fallbackParameters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrendingRequest trendingRequest = (TrendingRequest) o; - return ( - Objects.equals(this.model, trendingRequest.model) && - Objects.equals(this.facetName, trendingRequest.facetName) && - Objects.equals(this.facetValue, trendingRequest.facetValue) && - Objects.equals(this.indexName, trendingRequest.indexName) && - Objects.equals(this.threshold, trendingRequest.threshold) && - Objects.equals(this.maxRecommendations, trendingRequest.maxRecommendations) && - Objects.equals(this.queryParameters, trendingRequest.queryParameters) && - Objects.equals(this.fallbackParameters, trendingRequest.fallbackParameters) - ); - } - - @Override - public int hashCode() { - return Objects.hash(model, facetName, facetValue, indexName, threshold, maxRecommendations, queryParameters, fallbackParameters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrendingRequest {\n"); - sb.append(" model: ").append(toIndentedString(model)).append("\n"); - sb.append(" facetName: ").append(toIndentedString(facetName)).append("\n"); - sb.append(" facetValue: ").append(toIndentedString(facetValue)).append("\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" threshold: ").append(toIndentedString(threshold)).append("\n"); - sb.append(" maxRecommendations: ").append(toIndentedString(maxRecommendations)).append("\n"); - sb.append(" queryParameters: ").append(toIndentedString(queryParameters)).append("\n"); - sb.append(" fallbackParameters: ").append(toIndentedString(fallbackParameters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TypoTolerance.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TypoTolerance.java deleted file mode 100644 index 75ca6560b1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TypoTolerance.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** - * Controls whether [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) - * is enabled and how it is applied. - */ -@JsonDeserialize(using = TypoTolerance.TypoToleranceDeserializer.class) -@JsonSerialize(using = TypoTolerance.TypoToleranceSerializer.class) -public abstract class TypoTolerance implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(TypoTolerance.class.getName()); - - public static TypoTolerance of(Boolean inside) { - return new TypoToleranceBoolean(inside); - } - - public static TypoTolerance of(TypoToleranceEnum inside) { - return new TypoToleranceTypoToleranceEnum(inside); - } - - public static class TypoToleranceSerializer extends StdSerializer { - - public TypoToleranceSerializer(Class t) { - super(t); - } - - public TypoToleranceSerializer() { - this(null); - } - - @Override - public void serialize(TypoTolerance value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class TypoToleranceDeserializer extends StdDeserializer { - - public TypoToleranceDeserializer() { - this(TypoTolerance.class); - } - - public TypoToleranceDeserializer(Class vc) { - super(vc); - } - - @Override - public TypoTolerance deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize Boolean - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Boolean value = parser.readValueAs(new TypeReference() {}); - return TypoTolerance.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Boolean (error: " + e.getMessage() + ") (type: Boolean)"); - } - } - - // deserialize TypoToleranceEnum - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - TypoToleranceEnum value = parser.readValueAs(new TypeReference() {}); - return TypoTolerance.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf TypoToleranceEnum (error: " + e.getMessage() + ") (type: TypoToleranceEnum)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public TypoTolerance getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "TypoTolerance cannot be null"); - } - } -} - -class TypoToleranceBoolean extends TypoTolerance { - - private final Boolean insideValue; - - TypoToleranceBoolean(Boolean insideValue) { - this.insideValue = insideValue; - } - - @Override - public Boolean getInsideValue() { - return insideValue; - } -} - -class TypoToleranceTypoToleranceEnum extends TypoTolerance { - - private final TypoToleranceEnum insideValue; - - TypoToleranceTypoToleranceEnum(TypoToleranceEnum insideValue) { - this.insideValue = insideValue; - } - - @Override - public TypoToleranceEnum getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TypoToleranceEnum.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TypoToleranceEnum.java deleted file mode 100644 index 7939853337..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/TypoToleranceEnum.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets typoToleranceEnum */ -public enum TypoToleranceEnum { - MIN("min"), - - STRICT("strict"); - - private final String value; - - TypoToleranceEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypoToleranceEnum fromValue(String value) { - for (TypoToleranceEnum b : TypoToleranceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Value.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Value.java deleted file mode 100644 index bf4840b1fc..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/recommend/Value.java +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.recommend; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Value */ -public class Value { - - @JsonProperty("order") - private List order; - - @JsonProperty("sortRemainingBy") - private SortRemainingBy sortRemainingBy; - - public Value setOrder(List order) { - this.order = order; - return this; - } - - public Value addOrder(String orderItem) { - if (this.order == null) { - this.order = new ArrayList<>(); - } - this.order.add(orderItem); - return this; - } - - /** - * Pinned order of facet lists. - * - * @return order - */ - @javax.annotation.Nullable - public List getOrder() { - return order; - } - - public Value setSortRemainingBy(SortRemainingBy sortRemainingBy) { - this.sortRemainingBy = sortRemainingBy; - return this; - } - - /** - * Get sortRemainingBy - * - * @return sortRemainingBy - */ - @javax.annotation.Nullable - public SortRemainingBy getSortRemainingBy() { - return sortRemainingBy; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Value value = (Value) o; - return Objects.equals(this.order, value.order) && Objects.equals(this.sortRemainingBy, value.sortRemainingBy); - } - - @Override - public int hashCode() { - return Objects.hash(order, sortRemainingBy); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Value {\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append(" sortRemainingBy: ").append(toIndentedString(sortRemainingBy)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Acl.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Acl.java deleted file mode 100644 index 38e43f606a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Acl.java +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * API key permissions: `addObject`: required to add or update records, copy or move an index. - * `analytics`: required to access the Analytics API. `browse`: required to view records - * `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. - * `editSettings`: required to change index settings. `listIndexes`: required to list indices. - * `logs`: required to access logs of search and indexing operations. `recommendation`: required to - * access the Personalization and Recommend APIs. `search`: required to search records - * `seeUnretrievableAttributes`: required to retrieve - * [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) - * for all operations that return records. `settings`: required to examine index settings. - */ -public enum Acl { - ADD_OBJECT("addObject"), - - ANALYTICS("analytics"), - - BROWSE("browse"), - - DELETE_OBJECT("deleteObject"), - - DELETE_INDEX("deleteIndex"), - - EDIT_SETTINGS("editSettings"), - - LIST_INDEXES("listIndexes"), - - LOGS("logs"), - - PERSONALIZATION("personalization"), - - RECOMMENDATION("recommendation"), - - SEARCH("search"), - - SEE_UNRETRIEVABLE_ATTRIBUTES("seeUnretrievableAttributes"), - - SETTINGS("settings"), - - USAGE("usage"); - - private final String value; - - Acl(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Acl fromValue(String value) { - for (Acl b : Acl.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Action.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Action.java deleted file mode 100644 index f4d0513c58..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Action.java +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Type of batch operation. */ -public enum Action { - ADD_OBJECT("addObject"), - - UPDATE_OBJECT("updateObject"), - - PARTIAL_UPDATE_OBJECT("partialUpdateObject"), - - PARTIAL_UPDATE_OBJECT_NO_CREATE("partialUpdateObjectNoCreate"), - - DELETE_OBJECT("deleteObject"), - - DELETE("delete"), - - CLEAR("clear"); - - private final String value; - - Action(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Action fromValue(String value) { - for (Action b : Action.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AddApiKeyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AddApiKeyResponse.java deleted file mode 100644 index 7b1fc54322..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AddApiKeyResponse.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** AddApiKeyResponse */ -public class AddApiKeyResponse { - - @JsonProperty("key") - private String key; - - @JsonProperty("createdAt") - private String createdAt; - - public AddApiKeyResponse setKey(String key) { - this.key = key; - return this; - } - - /** - * API key. - * - * @return key - */ - @javax.annotation.Nonnull - public String getKey() { - return key; - } - - public AddApiKeyResponse setCreatedAt(String createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return createdAt - */ - @javax.annotation.Nonnull - public String getCreatedAt() { - return createdAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AddApiKeyResponse addApiKeyResponse = (AddApiKeyResponse) o; - return Objects.equals(this.key, addApiKeyResponse.key) && Objects.equals(this.createdAt, addApiKeyResponse.createdAt); - } - - @Override - public int hashCode() { - return Objects.hash(key, createdAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AddApiKeyResponse {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AdvancedSyntaxFeatures.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AdvancedSyntaxFeatures.java deleted file mode 100644 index 580d30e175..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AdvancedSyntaxFeatures.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets advancedSyntaxFeatures */ -public enum AdvancedSyntaxFeatures { - EXACT_PHRASE("exactPhrase"), - - EXCLUDE_WORDS("excludeWords"); - - private final String value; - - AdvancedSyntaxFeatures(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AdvancedSyntaxFeatures fromValue(String value) { - for (AdvancedSyntaxFeatures b : AdvancedSyntaxFeatures.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AlternativesAsExact.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AlternativesAsExact.java deleted file mode 100644 index ea0eca9b21..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AlternativesAsExact.java +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets alternativesAsExact */ -public enum AlternativesAsExact { - IGNORE_PLURALS("ignorePlurals"), - - SINGLE_WORD_SYNONYM("singleWordSynonym"), - - MULTI_WORDS_SYNONYM("multiWordsSynonym"); - - private final String value; - - AlternativesAsExact(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AlternativesAsExact fromValue(String value) { - for (AlternativesAsExact b : AlternativesAsExact.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Anchoring.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Anchoring.java deleted file mode 100644 index 4d814f67dd..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Anchoring.java +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the - * query string, is an exact match (`is`), or a partial match (`contains`). - */ -public enum Anchoring { - IS("is"), - - STARTS_WITH("startsWith"), - - ENDS_WITH("endsWith"), - - CONTAINS("contains"); - - private final String value; - - Anchoring(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Anchoring fromValue(String value) { - for (Anchoring b : Anchoring.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ApiKey.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ApiKey.java deleted file mode 100644 index 231b33e19d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ApiKey.java +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** API key object. */ -public class ApiKey { - - @JsonProperty("acl") - private List acl = null; - - @JsonProperty("description") - private String description; - - @JsonProperty("indexes") - private List indexes; - - @JsonProperty("maxHitsPerQuery") - private Integer maxHitsPerQuery; - - @JsonProperty("maxQueriesPerIPPerHour") - private Integer maxQueriesPerIPPerHour; - - @JsonProperty("queryParameters") - private String queryParameters; - - @JsonProperty("referers") - private List referers; - - @JsonProperty("validity") - private Integer validity; - - public ApiKey setAcl(List acl) { - this.acl = acl; - return this; - } - - public ApiKey addAcl(Acl aclItem) { - this.acl.add(aclItem); - return this; - } - - /** - * [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) - * associated with the key. - * - * @return acl - */ - @javax.annotation.Nonnull - public List getAcl() { - return acl; - } - - public ApiKey setDescription(String description) { - this.description = description; - return this; - } - - /** - * Description of an API key for you and your team members. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public ApiKey setIndexes(List indexes) { - this.indexes = indexes; - return this; - } - - public ApiKey addIndexes(String indexesItem) { - if (this.indexes == null) { - this.indexes = new ArrayList<>(); - } - this.indexes.add(indexesItem); - return this; - } - - /** - * Restricts this API key to a list of indices or index patterns. If the list is empty, all - * indices are allowed. Specify either an exact index name or a pattern with a leading or trailing - * wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - * - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices - * containing \"_products_\". - * - * @return indexes - */ - @javax.annotation.Nullable - public List getIndexes() { - return indexes; - } - - public ApiKey setMaxHitsPerQuery(Integer maxHitsPerQuery) { - this.maxHitsPerQuery = maxHitsPerQuery; - return this; - } - - /** - * Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > - * **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire - * content by massively querying the index. - * - * @return maxHitsPerQuery - */ - @javax.annotation.Nullable - public Integer getMaxHitsPerQuery() { - return maxHitsPerQuery; - } - - public ApiKey setMaxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour) { - this.maxQueriesPerIPPerHour = maxQueriesPerIPPerHour; - return this; - } - - /** - * Maximum number of API calls per hour allowed from a given IP address or [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API - * call is performed with this key, a check is performed. If there were more than the specified - * number of calls within the last hour, the API returns an error with the status code `429` (Too - * Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to - * retrieve your entire content by massively querying the index. - * - * @return maxQueriesPerIPPerHour - */ - @javax.annotation.Nullable - public Integer getMaxQueriesPerIPPerHour() { - return maxQueriesPerIPPerHour; - } - - public ApiKey setQueryParameters(String queryParameters) { - this.queryParameters = queryParameters; - return this; - } - - /** - * Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be - * applied for each query made with this API key. It's a URL-encoded query string. - * - * @return queryParameters - */ - @javax.annotation.Nullable - public String getQueryParameters() { - return queryParameters; - } - - public ApiKey setReferers(List referers) { - this.referers = referers; - return this; - } - - public ApiKey addReferers(String referersItem) { - if (this.referers == null) { - this.referers = new ArrayList<>(); - } - this.referers.add(referersItem); - return this; - } - - /** - * Restrict this API key to specific - * [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - * If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all - * referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending - * with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". - * - * @return referers - */ - @javax.annotation.Nullable - public List getReferers() { - return referers; - } - - public ApiKey setValidity(Integer validity) { - this.validity = validity; - return this; - } - - /** - * Validity duration of a key (in seconds). The key will automatically be removed after this time - * has expired. The default value of 0 never expires. Short-lived API keys are useful to grant - * temporary access to your data. For example, in mobile apps, you can't [control when users - * update your - * app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). - * So instead of encoding keys into your app as you would for a web app, you should dynamically - * fetch them from your mobile app's backend. - * - * @return validity - */ - @javax.annotation.Nullable - public Integer getValidity() { - return validity; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiKey apiKey = (ApiKey) o; - return ( - Objects.equals(this.acl, apiKey.acl) && - Objects.equals(this.description, apiKey.description) && - Objects.equals(this.indexes, apiKey.indexes) && - Objects.equals(this.maxHitsPerQuery, apiKey.maxHitsPerQuery) && - Objects.equals(this.maxQueriesPerIPPerHour, apiKey.maxQueriesPerIPPerHour) && - Objects.equals(this.queryParameters, apiKey.queryParameters) && - Objects.equals(this.referers, apiKey.referers) && - Objects.equals(this.validity, apiKey.validity) - ); - } - - @Override - public int hashCode() { - return Objects.hash(acl, description, indexes, maxHitsPerQuery, maxQueriesPerIPPerHour, queryParameters, referers, validity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiKey {\n"); - sb.append(" acl: ").append(toIndentedString(acl)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" indexes: ").append(toIndentedString(indexes)).append("\n"); - sb.append(" maxHitsPerQuery: ").append(toIndentedString(maxHitsPerQuery)).append("\n"); - sb.append(" maxQueriesPerIPPerHour: ").append(toIndentedString(maxQueriesPerIPPerHour)).append("\n"); - sb.append(" queryParameters: ").append(toIndentedString(queryParameters)).append("\n"); - sb.append(" referers: ").append(toIndentedString(referers)).append("\n"); - sb.append(" validity: ").append(toIndentedString(validity)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AroundRadius.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AroundRadius.java deleted file mode 100644 index 5828d58dfb..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AroundRadius.java +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** - * [Maximum - * radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) - * for a geographical search (in meters). - */ -@JsonDeserialize(using = AroundRadius.AroundRadiusDeserializer.class) -@JsonSerialize(using = AroundRadius.AroundRadiusSerializer.class) -public abstract class AroundRadius implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(AroundRadius.class.getName()); - - public static AroundRadius of(AroundRadiusAll inside) { - return new AroundRadiusAroundRadiusAll(inside); - } - - public static AroundRadius of(Integer inside) { - return new AroundRadiusInteger(inside); - } - - public static class AroundRadiusSerializer extends StdSerializer { - - public AroundRadiusSerializer(Class t) { - super(t); - } - - public AroundRadiusSerializer() { - this(null); - } - - @Override - public void serialize(AroundRadius value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class AroundRadiusDeserializer extends StdDeserializer { - - public AroundRadiusDeserializer() { - this(AroundRadius.class); - } - - public AroundRadiusDeserializer(Class vc) { - super(vc); - } - - @Override - public AroundRadius deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize AroundRadiusAll - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - AroundRadiusAll value = parser.readValueAs(new TypeReference() {}); - return AroundRadius.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf AroundRadiusAll (error: " + e.getMessage() + ") (type: AroundRadiusAll)"); - } - } - - // deserialize Integer - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Integer value = parser.readValueAs(new TypeReference() {}); - return AroundRadius.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Integer (error: " + e.getMessage() + ") (type: Integer)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public AroundRadius getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "AroundRadius cannot be null"); - } - } -} - -class AroundRadiusAroundRadiusAll extends AroundRadius { - - private final AroundRadiusAll insideValue; - - AroundRadiusAroundRadiusAll(AroundRadiusAll insideValue) { - this.insideValue = insideValue; - } - - @Override - public AroundRadiusAll getInsideValue() { - return insideValue; - } -} - -class AroundRadiusInteger extends AroundRadius { - - private final Integer insideValue; - - AroundRadiusInteger(Integer insideValue) { - this.insideValue = insideValue; - } - - @Override - public Integer getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AroundRadiusAll.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AroundRadiusAll.java deleted file mode 100644 index 54660da9c3..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AroundRadiusAll.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets aroundRadiusAll */ -public enum AroundRadiusAll { - ALL("all"); - - private final String value; - - AroundRadiusAll(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AroundRadiusAll fromValue(String value) { - for (AroundRadiusAll b : AroundRadiusAll.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AssignUserIdParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AssignUserIdParams.java deleted file mode 100644 index 50f8a76bc4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AssignUserIdParams.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Assign userID parameters. */ -public class AssignUserIdParams { - - @JsonProperty("cluster") - private String cluster; - - public AssignUserIdParams setCluster(String cluster) { - this.cluster = cluster; - return this; - } - - /** - * Cluster name. - * - * @return cluster - */ - @javax.annotation.Nonnull - public String getCluster() { - return cluster; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AssignUserIdParams assignUserIdParams = (AssignUserIdParams) o; - return Objects.equals(this.cluster, assignUserIdParams.cluster); - } - - @Override - public int hashCode() { - return Objects.hash(cluster); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AssignUserIdParams {\n"); - sb.append(" cluster: ").append(toIndentedString(cluster)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AttributeToUpdate.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AttributeToUpdate.java deleted file mode 100644 index 169a4fdac5..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AttributeToUpdate.java +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** AttributeToUpdate */ -@JsonDeserialize(using = AttributeToUpdate.AttributeToUpdateDeserializer.class) -@JsonSerialize(using = AttributeToUpdate.AttributeToUpdateSerializer.class) -public abstract class AttributeToUpdate implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(AttributeToUpdate.class.getName()); - - public static AttributeToUpdate of(BuiltInOperation inside) { - return new AttributeToUpdateBuiltInOperation(inside); - } - - public static AttributeToUpdate of(String inside) { - return new AttributeToUpdateString(inside); - } - - public static class AttributeToUpdateSerializer extends StdSerializer { - - public AttributeToUpdateSerializer(Class t) { - super(t); - } - - public AttributeToUpdateSerializer() { - this(null); - } - - @Override - public void serialize(AttributeToUpdate value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class AttributeToUpdateDeserializer extends StdDeserializer { - - public AttributeToUpdateDeserializer() { - this(AttributeToUpdate.class); - } - - public AttributeToUpdateDeserializer(Class vc) { - super(vc); - } - - @Override - public AttributeToUpdate deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize BuiltInOperation - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - BuiltInOperation value = parser.readValueAs(new TypeReference() {}); - return AttributeToUpdate.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf BuiltInOperation (error: " + e.getMessage() + ") (type: BuiltInOperation)"); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return AttributeToUpdate.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public AttributeToUpdate getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "AttributeToUpdate cannot be null"); - } - } -} - -class AttributeToUpdateBuiltInOperation extends AttributeToUpdate { - - private final BuiltInOperation insideValue; - - AttributeToUpdateBuiltInOperation(BuiltInOperation insideValue) { - this.insideValue = insideValue; - } - - @Override - public BuiltInOperation getInsideValue() { - return insideValue; - } -} - -class AttributeToUpdateString extends AttributeToUpdate { - - private final String insideValue; - - AttributeToUpdateString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AutomaticFacetFilter.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AutomaticFacetFilter.java deleted file mode 100644 index 6e4d1d6575..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AutomaticFacetFilter.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Automatic facet Filter. */ -public class AutomaticFacetFilter { - - @JsonProperty("facet") - private String facet; - - @JsonProperty("score") - private Integer score; - - @JsonProperty("disjunctive") - private Boolean disjunctive; - - public AutomaticFacetFilter setFacet(String facet) { - this.facet = facet; - return this; - } - - /** - * Attribute to filter on. This must match a facet placeholder in the Rule's pattern. - * - * @return facet - */ - @javax.annotation.Nonnull - public String getFacet() { - return facet; - } - - public AutomaticFacetFilter setScore(Integer score) { - this.score = score; - return this; - } - - /** - * Score for the filter. Typically used for optional or disjunctive filters. - * - * @return score - */ - @javax.annotation.Nullable - public Integer getScore() { - return score; - } - - public AutomaticFacetFilter setDisjunctive(Boolean disjunctive) { - this.disjunctive = disjunctive; - return this; - } - - /** - * Whether the filter is disjunctive (true) or conjunctive (false). - * - * @return disjunctive - */ - @javax.annotation.Nullable - public Boolean getDisjunctive() { - return disjunctive; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AutomaticFacetFilter automaticFacetFilter = (AutomaticFacetFilter) o; - return ( - Objects.equals(this.facet, automaticFacetFilter.facet) && - Objects.equals(this.score, automaticFacetFilter.score) && - Objects.equals(this.disjunctive, automaticFacetFilter.disjunctive) - ); - } - - @Override - public int hashCode() { - return Objects.hash(facet, score, disjunctive); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AutomaticFacetFilter {\n"); - sb.append(" facet: ").append(toIndentedString(facet)).append("\n"); - sb.append(" score: ").append(toIndentedString(score)).append("\n"); - sb.append(" disjunctive: ").append(toIndentedString(disjunctive)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AutomaticFacetFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AutomaticFacetFilters.java deleted file mode 100644 index 263aac56d4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/AutomaticFacetFilters.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * Names of facets to which automatic filtering must be applied; they must match the facet name of a - * facet value placeholder in the query pattern. - */ -@JsonDeserialize(using = AutomaticFacetFilters.AutomaticFacetFiltersDeserializer.class) -@JsonSerialize(using = AutomaticFacetFilters.AutomaticFacetFiltersSerializer.class) -public abstract class AutomaticFacetFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(AutomaticFacetFilters.class.getName()); - - public static AutomaticFacetFilters ofListOfAutomaticFacetFilter(List inside) { - return new AutomaticFacetFiltersListOfAutomaticFacetFilter(inside); - } - - public static AutomaticFacetFilters ofListOfString(List inside) { - return new AutomaticFacetFiltersListOfString(inside); - } - - public static class AutomaticFacetFiltersSerializer extends StdSerializer { - - public AutomaticFacetFiltersSerializer(Class t) { - super(t); - } - - public AutomaticFacetFiltersSerializer() { - this(null); - } - - @Override - public void serialize(AutomaticFacetFilters value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class AutomaticFacetFiltersDeserializer extends StdDeserializer { - - public AutomaticFacetFiltersDeserializer() { - this(AutomaticFacetFilters.class); - } - - public AutomaticFacetFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public AutomaticFacetFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return AutomaticFacetFilters.ofListOfAutomaticFacetFilter(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return AutomaticFacetFilters.ofListOfString(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public AutomaticFacetFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "AutomaticFacetFilters cannot be null"); - } - } -} - -class AutomaticFacetFiltersListOfAutomaticFacetFilter extends AutomaticFacetFilters { - - private final List insideValue; - - AutomaticFacetFiltersListOfAutomaticFacetFilter(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class AutomaticFacetFiltersListOfString extends AutomaticFacetFilters { - - private final List insideValue; - - AutomaticFacetFiltersListOfString(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseGetApiKeyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseGetApiKeyResponse.java deleted file mode 100644 index c1e6620d80..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseGetApiKeyResponse.java +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** BaseGetApiKeyResponse */ -public class BaseGetApiKeyResponse { - - @JsonProperty("value") - private String value; - - @JsonProperty("createdAt") - private Long createdAt; - - public BaseGetApiKeyResponse setValue(String value) { - this.value = value; - return this; - } - - /** - * API key. - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public BaseGetApiKeyResponse setCreatedAt(Long createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Timestamp of creation in milliseconds in [Unix epoch - * time](https://wikipedia.org/wiki/Unix_time). - * - * @return createdAt - */ - @javax.annotation.Nonnull - public Long getCreatedAt() { - return createdAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseGetApiKeyResponse baseGetApiKeyResponse = (BaseGetApiKeyResponse) o; - return Objects.equals(this.value, baseGetApiKeyResponse.value) && Objects.equals(this.createdAt, baseGetApiKeyResponse.createdAt); - } - - @Override - public int hashCode() { - return Objects.hash(value, createdAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseGetApiKeyResponse {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseIndexSettings.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseIndexSettings.java deleted file mode 100644 index cf62d79287..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseIndexSettings.java +++ /dev/null @@ -1,467 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** BaseIndexSettings */ -public class BaseIndexSettings { - - @JsonProperty("replicas") - private List replicas; - - @JsonProperty("paginationLimitedTo") - private Integer paginationLimitedTo; - - @JsonProperty("unretrievableAttributes") - private List unretrievableAttributes; - - @JsonProperty("disableTypoToleranceOnWords") - private List disableTypoToleranceOnWords; - - @JsonProperty("attributesToTransliterate") - private List attributesToTransliterate; - - @JsonProperty("camelCaseAttributes") - private List camelCaseAttributes; - - @JsonProperty("decompoundedAttributes") - private Object decompoundedAttributes; - - @JsonProperty("indexLanguages") - private List indexLanguages; - - @JsonProperty("disablePrefixOnAttributes") - private List disablePrefixOnAttributes; - - @JsonProperty("allowCompressionOfIntegerArray") - private Boolean allowCompressionOfIntegerArray; - - @JsonProperty("numericAttributesForFiltering") - private List numericAttributesForFiltering; - - @JsonProperty("separatorsToIndex") - private String separatorsToIndex; - - @JsonProperty("searchableAttributes") - private List searchableAttributes; - - @JsonProperty("userData") - private Object userData; - - @JsonProperty("customNormalization") - private Map> customNormalization; - - public BaseIndexSettings setReplicas(List replicas) { - this.replicas = replicas; - return this; - } - - public BaseIndexSettings addReplicas(String replicasItem) { - if (this.replicas == null) { - this.replicas = new ArrayList<>(); - } - this.replicas.add(replicasItem); - return this; - } - - /** - * Creates - * [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), - * which are copies of a primary index with the same records but different settings. - * - * @return replicas - */ - @javax.annotation.Nullable - public List getReplicas() { - return replicas; - } - - public BaseIndexSettings setPaginationLimitedTo(Integer paginationLimitedTo) { - this.paginationLimitedTo = paginationLimitedTo; - return this; - } - - /** - * Maximum number of hits accessible through pagination. - * - * @return paginationLimitedTo - */ - @javax.annotation.Nullable - public Integer getPaginationLimitedTo() { - return paginationLimitedTo; - } - - public BaseIndexSettings setUnretrievableAttributes(List unretrievableAttributes) { - this.unretrievableAttributes = unretrievableAttributes; - return this; - } - - public BaseIndexSettings addUnretrievableAttributes(String unretrievableAttributesItem) { - if (this.unretrievableAttributes == null) { - this.unretrievableAttributes = new ArrayList<>(); - } - this.unretrievableAttributes.add(unretrievableAttributesItem); - return this; - } - - /** - * Attributes that can't be retrieved at query time. - * - * @return unretrievableAttributes - */ - @javax.annotation.Nullable - public List getUnretrievableAttributes() { - return unretrievableAttributes; - } - - public BaseIndexSettings setDisableTypoToleranceOnWords(List disableTypoToleranceOnWords) { - this.disableTypoToleranceOnWords = disableTypoToleranceOnWords; - return this; - } - - public BaseIndexSettings addDisableTypoToleranceOnWords(String disableTypoToleranceOnWordsItem) { - if (this.disableTypoToleranceOnWords == null) { - this.disableTypoToleranceOnWords = new ArrayList<>(); - } - this.disableTypoToleranceOnWords.add(disableTypoToleranceOnWordsItem); - return this; - } - - /** - * Words for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnWords - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnWords() { - return disableTypoToleranceOnWords; - } - - public BaseIndexSettings setAttributesToTransliterate(List attributesToTransliterate) { - this.attributesToTransliterate = attributesToTransliterate; - return this; - } - - public BaseIndexSettings addAttributesToTransliterate(String attributesToTransliterateItem) { - if (this.attributesToTransliterate == null) { - this.attributesToTransliterate = new ArrayList<>(); - } - this.attributesToTransliterate.add(attributesToTransliterateItem); - return this; - } - - /** - * Attributes in your index to which [Japanese - * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - * applies. This will ensure that words indexed in Katakana or Kanji can also be searched in - * Hiragana. - * - * @return attributesToTransliterate - */ - @javax.annotation.Nullable - public List getAttributesToTransliterate() { - return attributesToTransliterate; - } - - public BaseIndexSettings setCamelCaseAttributes(List camelCaseAttributes) { - this.camelCaseAttributes = camelCaseAttributes; - return this; - } - - public BaseIndexSettings addCamelCaseAttributes(String camelCaseAttributesItem) { - if (this.camelCaseAttributes == null) { - this.camelCaseAttributes = new ArrayList<>(); - } - this.camelCaseAttributes.add(camelCaseAttributesItem); - return this; - } - - /** - * Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. - * - * @return camelCaseAttributes - */ - @javax.annotation.Nullable - public List getCamelCaseAttributes() { - return camelCaseAttributes; - } - - public BaseIndexSettings setDecompoundedAttributes(Object decompoundedAttributes) { - this.decompoundedAttributes = decompoundedAttributes; - return this; - } - - /** - * Attributes in your index to which [word - * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * (decompounding) applies. - * - * @return decompoundedAttributes - */ - @javax.annotation.Nullable - public Object getDecompoundedAttributes() { - return decompoundedAttributes; - } - - public BaseIndexSettings setIndexLanguages(List indexLanguages) { - this.indexLanguages = indexLanguages; - return this; - } - - public BaseIndexSettings addIndexLanguages(String indexLanguagesItem) { - if (this.indexLanguages == null) { - this.indexLanguages = new ArrayList<>(); - } - this.indexLanguages.add(indexLanguagesItem); - return this; - } - - /** - * Set the languages of your index, for language-specific processing steps such as - * [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - * and - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return indexLanguages - */ - @javax.annotation.Nullable - public List getIndexLanguages() { - return indexLanguages; - } - - public BaseIndexSettings setDisablePrefixOnAttributes(List disablePrefixOnAttributes) { - this.disablePrefixOnAttributes = disablePrefixOnAttributes; - return this; - } - - public BaseIndexSettings addDisablePrefixOnAttributes(String disablePrefixOnAttributesItem) { - if (this.disablePrefixOnAttributes == null) { - this.disablePrefixOnAttributes = new ArrayList<>(); - } - this.disablePrefixOnAttributes.add(disablePrefixOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [prefix - * matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). - * - * @return disablePrefixOnAttributes - */ - @javax.annotation.Nullable - public List getDisablePrefixOnAttributes() { - return disablePrefixOnAttributes; - } - - public BaseIndexSettings setAllowCompressionOfIntegerArray(Boolean allowCompressionOfIntegerArray) { - this.allowCompressionOfIntegerArray = allowCompressionOfIntegerArray; - return this; - } - - /** - * Incidates whether the engine compresses arrays with exclusively non-negative integers. When - * enabled, the compressed arrays may be reordered. - * - * @return allowCompressionOfIntegerArray - */ - @javax.annotation.Nullable - public Boolean getAllowCompressionOfIntegerArray() { - return allowCompressionOfIntegerArray; - } - - public BaseIndexSettings setNumericAttributesForFiltering(List numericAttributesForFiltering) { - this.numericAttributesForFiltering = numericAttributesForFiltering; - return this; - } - - public BaseIndexSettings addNumericAttributesForFiltering(String numericAttributesForFilteringItem) { - if (this.numericAttributesForFiltering == null) { - this.numericAttributesForFiltering = new ArrayList<>(); - } - this.numericAttributesForFiltering.add(numericAttributesForFilteringItem); - return this; - } - - /** - * Numeric attributes that can be used as [numerical - * filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). - * - * @return numericAttributesForFiltering - */ - @javax.annotation.Nullable - public List getNumericAttributesForFiltering() { - return numericAttributesForFiltering; - } - - public BaseIndexSettings setSeparatorsToIndex(String separatorsToIndex) { - this.separatorsToIndex = separatorsToIndex; - return this; - } - - /** - * Controls which separators are added to an Algolia index as part of - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). - * Separators are all non-letter characters except spaces and currency characters, such as $€£¥. - * - * @return separatorsToIndex - */ - @javax.annotation.Nullable - public String getSeparatorsToIndex() { - return separatorsToIndex; - } - - public BaseIndexSettings setSearchableAttributes(List searchableAttributes) { - this.searchableAttributes = searchableAttributes; - return this; - } - - public BaseIndexSettings addSearchableAttributes(String searchableAttributesItem) { - if (this.searchableAttributes == null) { - this.searchableAttributes = new ArrayList<>(); - } - this.searchableAttributes.add(searchableAttributesItem); - return this; - } - - /** - * [Attributes used for - * searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), - * including determining [if matches at the beginning of a word are important (ordered) or not - * (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). - * - * @return searchableAttributes - */ - @javax.annotation.Nullable - public List getSearchableAttributes() { - return searchableAttributes; - } - - public BaseIndexSettings setUserData(Object userData) { - this.userData = userData; - return this; - } - - /** - * Lets you store custom data in your indices. - * - * @return userData - */ - @javax.annotation.Nullable - public Object getUserData() { - return userData; - } - - public BaseIndexSettings setCustomNormalization(Map> customNormalization) { - this.customNormalization = customNormalization; - return this; - } - - public BaseIndexSettings putCustomNormalization(String key, Map customNormalizationItem) { - if (this.customNormalization == null) { - this.customNormalization = new HashMap<>(); - } - this.customNormalization.put(key, customNormalizationItem); - return this; - } - - /** - * A list of characters and their normalized replacements to override Algolia's default - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return customNormalization - */ - @javax.annotation.Nullable - public Map> getCustomNormalization() { - return customNormalization; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseIndexSettings baseIndexSettings = (BaseIndexSettings) o; - return ( - Objects.equals(this.replicas, baseIndexSettings.replicas) && - Objects.equals(this.paginationLimitedTo, baseIndexSettings.paginationLimitedTo) && - Objects.equals(this.unretrievableAttributes, baseIndexSettings.unretrievableAttributes) && - Objects.equals(this.disableTypoToleranceOnWords, baseIndexSettings.disableTypoToleranceOnWords) && - Objects.equals(this.attributesToTransliterate, baseIndexSettings.attributesToTransliterate) && - Objects.equals(this.camelCaseAttributes, baseIndexSettings.camelCaseAttributes) && - Objects.equals(this.decompoundedAttributes, baseIndexSettings.decompoundedAttributes) && - Objects.equals(this.indexLanguages, baseIndexSettings.indexLanguages) && - Objects.equals(this.disablePrefixOnAttributes, baseIndexSettings.disablePrefixOnAttributes) && - Objects.equals(this.allowCompressionOfIntegerArray, baseIndexSettings.allowCompressionOfIntegerArray) && - Objects.equals(this.numericAttributesForFiltering, baseIndexSettings.numericAttributesForFiltering) && - Objects.equals(this.separatorsToIndex, baseIndexSettings.separatorsToIndex) && - Objects.equals(this.searchableAttributes, baseIndexSettings.searchableAttributes) && - Objects.equals(this.userData, baseIndexSettings.userData) && - Objects.equals(this.customNormalization, baseIndexSettings.customNormalization) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - replicas, - paginationLimitedTo, - unretrievableAttributes, - disableTypoToleranceOnWords, - attributesToTransliterate, - camelCaseAttributes, - decompoundedAttributes, - indexLanguages, - disablePrefixOnAttributes, - allowCompressionOfIntegerArray, - numericAttributesForFiltering, - separatorsToIndex, - searchableAttributes, - userData, - customNormalization - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseIndexSettings {\n"); - sb.append(" replicas: ").append(toIndentedString(replicas)).append("\n"); - sb.append(" paginationLimitedTo: ").append(toIndentedString(paginationLimitedTo)).append("\n"); - sb.append(" unretrievableAttributes: ").append(toIndentedString(unretrievableAttributes)).append("\n"); - sb.append(" disableTypoToleranceOnWords: ").append(toIndentedString(disableTypoToleranceOnWords)).append("\n"); - sb.append(" attributesToTransliterate: ").append(toIndentedString(attributesToTransliterate)).append("\n"); - sb.append(" camelCaseAttributes: ").append(toIndentedString(camelCaseAttributes)).append("\n"); - sb.append(" decompoundedAttributes: ").append(toIndentedString(decompoundedAttributes)).append("\n"); - sb.append(" indexLanguages: ").append(toIndentedString(indexLanguages)).append("\n"); - sb.append(" disablePrefixOnAttributes: ").append(toIndentedString(disablePrefixOnAttributes)).append("\n"); - sb.append(" allowCompressionOfIntegerArray: ").append(toIndentedString(allowCompressionOfIntegerArray)).append("\n"); - sb.append(" numericAttributesForFiltering: ").append(toIndentedString(numericAttributesForFiltering)).append("\n"); - sb.append(" separatorsToIndex: ").append(toIndentedString(separatorsToIndex)).append("\n"); - sb.append(" searchableAttributes: ").append(toIndentedString(searchableAttributes)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" customNormalization: ").append(toIndentedString(customNormalization)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchParams.java deleted file mode 100644 index 016344c8ac..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchParams.java +++ /dev/null @@ -1,854 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** BaseSearchParams */ -public class BaseSearchParams { - - @JsonProperty("query") - private String query; - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - public BaseSearchParams setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public BaseSearchParams setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public BaseSearchParams setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public BaseSearchParams setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public BaseSearchParams setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public BaseSearchParams setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public BaseSearchParams setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public BaseSearchParams setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public BaseSearchParams setFacets(List facets) { - this.facets = facets; - return this; - } - - public BaseSearchParams addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public BaseSearchParams setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public BaseSearchParams setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public BaseSearchParams setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public BaseSearchParams setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public BaseSearchParams setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public BaseSearchParams setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public BaseSearchParams setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public BaseSearchParams setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public BaseSearchParams setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public BaseSearchParams setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public BaseSearchParams setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public BaseSearchParams setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public BaseSearchParams addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public BaseSearchParams setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public BaseSearchParams addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public BaseSearchParams setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public BaseSearchParams addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public BaseSearchParams setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public BaseSearchParams addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public BaseSearchParams setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public BaseSearchParams setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public BaseSearchParams setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public BaseSearchParams setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public BaseSearchParams setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public BaseSearchParams setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public BaseSearchParams addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public BaseSearchParams setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public BaseSearchParams setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public BaseSearchParams setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public BaseSearchParams setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseSearchParams baseSearchParams = (BaseSearchParams) o; - return ( - Objects.equals(this.query, baseSearchParams.query) && - Objects.equals(this.similarQuery, baseSearchParams.similarQuery) && - Objects.equals(this.filters, baseSearchParams.filters) && - Objects.equals(this.facetFilters, baseSearchParams.facetFilters) && - Objects.equals(this.optionalFilters, baseSearchParams.optionalFilters) && - Objects.equals(this.numericFilters, baseSearchParams.numericFilters) && - Objects.equals(this.tagFilters, baseSearchParams.tagFilters) && - Objects.equals(this.sumOrFiltersScores, baseSearchParams.sumOrFiltersScores) && - Objects.equals(this.facets, baseSearchParams.facets) && - Objects.equals(this.maxValuesPerFacet, baseSearchParams.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, baseSearchParams.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, baseSearchParams.sortFacetValuesBy) && - Objects.equals(this.page, baseSearchParams.page) && - Objects.equals(this.offset, baseSearchParams.offset) && - Objects.equals(this.length, baseSearchParams.length) && - Objects.equals(this.aroundLatLng, baseSearchParams.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, baseSearchParams.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, baseSearchParams.aroundRadius) && - Objects.equals(this.aroundPrecision, baseSearchParams.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, baseSearchParams.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, baseSearchParams.insideBoundingBox) && - Objects.equals(this.insidePolygon, baseSearchParams.insidePolygon) && - Objects.equals(this.naturalLanguages, baseSearchParams.naturalLanguages) && - Objects.equals(this.ruleContexts, baseSearchParams.ruleContexts) && - Objects.equals(this.personalizationImpact, baseSearchParams.personalizationImpact) && - Objects.equals(this.userToken, baseSearchParams.userToken) && - Objects.equals(this.getRankingInfo, baseSearchParams.getRankingInfo) && - Objects.equals(this.clickAnalytics, baseSearchParams.clickAnalytics) && - Objects.equals(this.analytics, baseSearchParams.analytics) && - Objects.equals(this.analyticsTags, baseSearchParams.analyticsTags) && - Objects.equals(this.percentileComputation, baseSearchParams.percentileComputation) && - Objects.equals(this.enableABTest, baseSearchParams.enableABTest) && - Objects.equals(this.enableReRanking, baseSearchParams.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, baseSearchParams.reRankingApplyFilter) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - query, - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseSearchParams {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchParamsWithoutQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchParamsWithoutQuery.java deleted file mode 100644 index eee9e60ed0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchParamsWithoutQuery.java +++ /dev/null @@ -1,833 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** BaseSearchParamsWithoutQuery */ -public class BaseSearchParamsWithoutQuery { - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - public BaseSearchParamsWithoutQuery setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public BaseSearchParamsWithoutQuery setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public BaseSearchParamsWithoutQuery setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public BaseSearchParamsWithoutQuery setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public BaseSearchParamsWithoutQuery setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public BaseSearchParamsWithoutQuery setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public BaseSearchParamsWithoutQuery setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public BaseSearchParamsWithoutQuery setFacets(List facets) { - this.facets = facets; - return this; - } - - public BaseSearchParamsWithoutQuery addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public BaseSearchParamsWithoutQuery setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public BaseSearchParamsWithoutQuery setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public BaseSearchParamsWithoutQuery setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public BaseSearchParamsWithoutQuery setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public BaseSearchParamsWithoutQuery setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public BaseSearchParamsWithoutQuery setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public BaseSearchParamsWithoutQuery setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public BaseSearchParamsWithoutQuery setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public BaseSearchParamsWithoutQuery setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public BaseSearchParamsWithoutQuery setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public BaseSearchParamsWithoutQuery setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public BaseSearchParamsWithoutQuery setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public BaseSearchParamsWithoutQuery addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public BaseSearchParamsWithoutQuery setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public BaseSearchParamsWithoutQuery addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public BaseSearchParamsWithoutQuery setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public BaseSearchParamsWithoutQuery addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public BaseSearchParamsWithoutQuery setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public BaseSearchParamsWithoutQuery addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public BaseSearchParamsWithoutQuery setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public BaseSearchParamsWithoutQuery setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public BaseSearchParamsWithoutQuery setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public BaseSearchParamsWithoutQuery setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public BaseSearchParamsWithoutQuery setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public BaseSearchParamsWithoutQuery setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public BaseSearchParamsWithoutQuery addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public BaseSearchParamsWithoutQuery setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public BaseSearchParamsWithoutQuery setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public BaseSearchParamsWithoutQuery setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public BaseSearchParamsWithoutQuery setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseSearchParamsWithoutQuery baseSearchParamsWithoutQuery = (BaseSearchParamsWithoutQuery) o; - return ( - Objects.equals(this.similarQuery, baseSearchParamsWithoutQuery.similarQuery) && - Objects.equals(this.filters, baseSearchParamsWithoutQuery.filters) && - Objects.equals(this.facetFilters, baseSearchParamsWithoutQuery.facetFilters) && - Objects.equals(this.optionalFilters, baseSearchParamsWithoutQuery.optionalFilters) && - Objects.equals(this.numericFilters, baseSearchParamsWithoutQuery.numericFilters) && - Objects.equals(this.tagFilters, baseSearchParamsWithoutQuery.tagFilters) && - Objects.equals(this.sumOrFiltersScores, baseSearchParamsWithoutQuery.sumOrFiltersScores) && - Objects.equals(this.facets, baseSearchParamsWithoutQuery.facets) && - Objects.equals(this.maxValuesPerFacet, baseSearchParamsWithoutQuery.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, baseSearchParamsWithoutQuery.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, baseSearchParamsWithoutQuery.sortFacetValuesBy) && - Objects.equals(this.page, baseSearchParamsWithoutQuery.page) && - Objects.equals(this.offset, baseSearchParamsWithoutQuery.offset) && - Objects.equals(this.length, baseSearchParamsWithoutQuery.length) && - Objects.equals(this.aroundLatLng, baseSearchParamsWithoutQuery.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, baseSearchParamsWithoutQuery.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, baseSearchParamsWithoutQuery.aroundRadius) && - Objects.equals(this.aroundPrecision, baseSearchParamsWithoutQuery.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, baseSearchParamsWithoutQuery.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, baseSearchParamsWithoutQuery.insideBoundingBox) && - Objects.equals(this.insidePolygon, baseSearchParamsWithoutQuery.insidePolygon) && - Objects.equals(this.naturalLanguages, baseSearchParamsWithoutQuery.naturalLanguages) && - Objects.equals(this.ruleContexts, baseSearchParamsWithoutQuery.ruleContexts) && - Objects.equals(this.personalizationImpact, baseSearchParamsWithoutQuery.personalizationImpact) && - Objects.equals(this.userToken, baseSearchParamsWithoutQuery.userToken) && - Objects.equals(this.getRankingInfo, baseSearchParamsWithoutQuery.getRankingInfo) && - Objects.equals(this.clickAnalytics, baseSearchParamsWithoutQuery.clickAnalytics) && - Objects.equals(this.analytics, baseSearchParamsWithoutQuery.analytics) && - Objects.equals(this.analyticsTags, baseSearchParamsWithoutQuery.analyticsTags) && - Objects.equals(this.percentileComputation, baseSearchParamsWithoutQuery.percentileComputation) && - Objects.equals(this.enableABTest, baseSearchParamsWithoutQuery.enableABTest) && - Objects.equals(this.enableReRanking, baseSearchParamsWithoutQuery.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, baseSearchParamsWithoutQuery.reRankingApplyFilter) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseSearchParamsWithoutQuery {\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchResponse.java deleted file mode 100644 index cfa34dab50..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchResponse.java +++ /dev/null @@ -1,616 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** BaseSearchResponse */ -public class BaseSearchResponse { - - @JsonProperty("abTestID") - private Integer abTestID; - - @JsonProperty("abTestVariantID") - private Integer abTestVariantID; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("automaticRadius") - private String automaticRadius; - - @JsonProperty("exhaustiveFacetsCount") - private Boolean exhaustiveFacetsCount; - - @JsonProperty("exhaustiveNbHits") - private Boolean exhaustiveNbHits; - - @JsonProperty("exhaustiveTypo") - private Boolean exhaustiveTypo; - - @JsonProperty("facets") - private Map> facets; - - @JsonProperty("facets_stats") - private Map facetsStats; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("index") - private String index; - - @JsonProperty("indexUsed") - private String indexUsed; - - @JsonProperty("message") - private String message; - - @JsonProperty("nbHits") - private Integer nbHits; - - @JsonProperty("nbPages") - private Integer nbPages; - - @JsonProperty("nbSortedHits") - private Integer nbSortedHits; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("params") - private String params; - - @JsonProperty("redirect") - private BaseSearchResponseRedirect redirect; - - @JsonProperty("parsedQuery") - private String parsedQuery; - - @JsonProperty("processingTimeMS") - private Integer processingTimeMS; - - @JsonProperty("query") - private String query; - - @JsonProperty("queryAfterRemoval") - private String queryAfterRemoval; - - @JsonProperty("serverUsed") - private String serverUsed; - - @JsonProperty("userData") - private Object userData; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - public BaseSearchResponse setAbTestID(Integer abTestID) { - this.abTestID = abTestID; - return this; - } - - /** - * A/B test ID. This is only included in the response for indices that are part of an A/B test. - * - * @return abTestID - */ - @javax.annotation.Nullable - public Integer getAbTestID() { - return abTestID; - } - - public BaseSearchResponse setAbTestVariantID(Integer abTestVariantID) { - this.abTestVariantID = abTestVariantID; - return this; - } - - /** - * Variant ID. This is only included in the response for indices that are part of an A/B test. - * minimum: 1 - * - * @return abTestVariantID - */ - @javax.annotation.Nullable - public Integer getAbTestVariantID() { - return abTestVariantID; - } - - public BaseSearchResponse setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Computed geographical location. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public BaseSearchResponse setAutomaticRadius(String automaticRadius) { - this.automaticRadius = automaticRadius; - return this; - } - - /** - * Automatically-computed radius. - * - * @return automaticRadius - */ - @javax.annotation.Nullable - public String getAutomaticRadius() { - return automaticRadius; - } - - public BaseSearchResponse setExhaustiveFacetsCount(Boolean exhaustiveFacetsCount) { - this.exhaustiveFacetsCount = exhaustiveFacetsCount; - return this; - } - - /** - * Indicates whether the facet count is exhaustive (exact) or approximate. - * - * @return exhaustiveFacetsCount - */ - @javax.annotation.Nullable - public Boolean getExhaustiveFacetsCount() { - return exhaustiveFacetsCount; - } - - public BaseSearchResponse setExhaustiveNbHits(Boolean exhaustiveNbHits) { - this.exhaustiveNbHits = exhaustiveNbHits; - return this; - } - - /** - * Indicates whether the number of hits `nbHits` is exhaustive (exact) or approximate. - * - * @return exhaustiveNbHits - */ - @javax.annotation.Nonnull - public Boolean getExhaustiveNbHits() { - return exhaustiveNbHits; - } - - public BaseSearchResponse setExhaustiveTypo(Boolean exhaustiveTypo) { - this.exhaustiveTypo = exhaustiveTypo; - return this; - } - - /** - * Indicates whether the search for typos was exhaustive (exact) or approximate. - * - * @return exhaustiveTypo - */ - @javax.annotation.Nullable - public Boolean getExhaustiveTypo() { - return exhaustiveTypo; - } - - public BaseSearchResponse setFacets(Map> facets) { - this.facets = facets; - return this; - } - - public BaseSearchResponse putFacets(String key, Map facetsItem) { - if (this.facets == null) { - this.facets = new HashMap<>(); - } - this.facets.put(key, facetsItem); - return this; - } - - /** - * Mapping of each facet name to the corresponding facet counts. - * - * @return facets - */ - @javax.annotation.Nullable - public Map> getFacets() { - return facets; - } - - public BaseSearchResponse setFacetsStats(Map facetsStats) { - this.facetsStats = facetsStats; - return this; - } - - public BaseSearchResponse putFacetsStats(String key, FacetsStats facetsStatsItem) { - if (this.facetsStats == null) { - this.facetsStats = new HashMap<>(); - } - this.facetsStats.put(key, facetsStatsItem); - return this; - } - - /** - * Statistics for numerical facets. - * - * @return facetsStats - */ - @javax.annotation.Nullable - public Map getFacetsStats() { - return facetsStats; - } - - public BaseSearchResponse setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nonnull - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public BaseSearchResponse setIndex(String index) { - this.index = index; - return this; - } - - /** - * Index name used for the query. - * - * @return index - */ - @javax.annotation.Nullable - public String getIndex() { - return index; - } - - public BaseSearchResponse setIndexUsed(String indexUsed) { - this.indexUsed = indexUsed; - return this; - } - - /** - * Index name used for the query. During A/B testing, the targeted index isn't always the index - * used by the query. - * - * @return indexUsed - */ - @javax.annotation.Nullable - public String getIndexUsed() { - return indexUsed; - } - - public BaseSearchResponse setMessage(String message) { - this.message = message; - return this; - } - - /** - * Warnings about the query. - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public BaseSearchResponse setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - public BaseSearchResponse setNbPages(Integer nbPages) { - this.nbPages = nbPages; - return this; - } - - /** - * Number of pages of results for the current query. - * - * @return nbPages - */ - @javax.annotation.Nonnull - public Integer getNbPages() { - return nbPages; - } - - public BaseSearchResponse setNbSortedHits(Integer nbSortedHits) { - this.nbSortedHits = nbSortedHits; - return this; - } - - /** - * Number of hits selected and sorted by the relevant sort algorithm. - * - * @return nbSortedHits - */ - @javax.annotation.Nullable - public Integer getNbSortedHits() { - return nbSortedHits; - } - - public BaseSearchResponse setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nonnull - public Integer getPage() { - return page; - } - - public BaseSearchResponse setParams(String params) { - this.params = params; - return this; - } - - /** - * URL-encoded string of all search parameters. - * - * @return params - */ - @javax.annotation.Nonnull - public String getParams() { - return params; - } - - public BaseSearchResponse setRedirect(BaseSearchResponseRedirect redirect) { - this.redirect = redirect; - return this; - } - - /** - * Get redirect - * - * @return redirect - */ - @javax.annotation.Nullable - public BaseSearchResponseRedirect getRedirect() { - return redirect; - } - - public BaseSearchResponse setParsedQuery(String parsedQuery) { - this.parsedQuery = parsedQuery; - return this; - } - - /** - * Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) - * query string that will be searched. - * - * @return parsedQuery - */ - @javax.annotation.Nullable - public String getParsedQuery() { - return parsedQuery; - } - - public BaseSearchResponse setProcessingTimeMS(Integer processingTimeMS) { - this.processingTimeMS = processingTimeMS; - return this; - } - - /** - * Time the server took to process the request, in milliseconds. - * - * @return processingTimeMS - */ - @javax.annotation.Nonnull - public Integer getProcessingTimeMS() { - return processingTimeMS; - } - - public BaseSearchResponse setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } - - public BaseSearchResponse setQueryAfterRemoval(String queryAfterRemoval) { - this.queryAfterRemoval = queryAfterRemoval; - return this; - } - - /** - * Markup text indicating which parts of the original query have been removed to retrieve a - * non-empty result set. - * - * @return queryAfterRemoval - */ - @javax.annotation.Nullable - public String getQueryAfterRemoval() { - return queryAfterRemoval; - } - - public BaseSearchResponse setServerUsed(String serverUsed) { - this.serverUsed = serverUsed; - return this; - } - - /** - * Host name of the server that processed the request. - * - * @return serverUsed - */ - @javax.annotation.Nullable - public String getServerUsed() { - return serverUsed; - } - - public BaseSearchResponse setUserData(Object userData) { - this.userData = userData; - return this; - } - - /** - * Lets you store custom data in your indices. - * - * @return userData - */ - @javax.annotation.Nullable - public Object getUserData() { - return userData; - } - - public BaseSearchResponse setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseSearchResponse baseSearchResponse = (BaseSearchResponse) o; - return ( - Objects.equals(this.abTestID, baseSearchResponse.abTestID) && - Objects.equals(this.abTestVariantID, baseSearchResponse.abTestVariantID) && - Objects.equals(this.aroundLatLng, baseSearchResponse.aroundLatLng) && - Objects.equals(this.automaticRadius, baseSearchResponse.automaticRadius) && - Objects.equals(this.exhaustiveFacetsCount, baseSearchResponse.exhaustiveFacetsCount) && - Objects.equals(this.exhaustiveNbHits, baseSearchResponse.exhaustiveNbHits) && - Objects.equals(this.exhaustiveTypo, baseSearchResponse.exhaustiveTypo) && - Objects.equals(this.facets, baseSearchResponse.facets) && - Objects.equals(this.facetsStats, baseSearchResponse.facetsStats) && - Objects.equals(this.hitsPerPage, baseSearchResponse.hitsPerPage) && - Objects.equals(this.index, baseSearchResponse.index) && - Objects.equals(this.indexUsed, baseSearchResponse.indexUsed) && - Objects.equals(this.message, baseSearchResponse.message) && - Objects.equals(this.nbHits, baseSearchResponse.nbHits) && - Objects.equals(this.nbPages, baseSearchResponse.nbPages) && - Objects.equals(this.nbSortedHits, baseSearchResponse.nbSortedHits) && - Objects.equals(this.page, baseSearchResponse.page) && - Objects.equals(this.params, baseSearchResponse.params) && - Objects.equals(this.redirect, baseSearchResponse.redirect) && - Objects.equals(this.parsedQuery, baseSearchResponse.parsedQuery) && - Objects.equals(this.processingTimeMS, baseSearchResponse.processingTimeMS) && - Objects.equals(this.query, baseSearchResponse.query) && - Objects.equals(this.queryAfterRemoval, baseSearchResponse.queryAfterRemoval) && - Objects.equals(this.serverUsed, baseSearchResponse.serverUsed) && - Objects.equals(this.userData, baseSearchResponse.userData) && - Objects.equals(this.renderingContent, baseSearchResponse.renderingContent) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - abTestID, - abTestVariantID, - aroundLatLng, - automaticRadius, - exhaustiveFacetsCount, - exhaustiveNbHits, - exhaustiveTypo, - facets, - facetsStats, - hitsPerPage, - index, - indexUsed, - message, - nbHits, - nbPages, - nbSortedHits, - page, - params, - redirect, - parsedQuery, - processingTimeMS, - query, - queryAfterRemoval, - serverUsed, - userData, - renderingContent - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseSearchResponse {\n"); - sb.append(" abTestID: ").append(toIndentedString(abTestID)).append("\n"); - sb.append(" abTestVariantID: ").append(toIndentedString(abTestVariantID)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" automaticRadius: ").append(toIndentedString(automaticRadius)).append("\n"); - sb.append(" exhaustiveFacetsCount: ").append(toIndentedString(exhaustiveFacetsCount)).append("\n"); - sb.append(" exhaustiveNbHits: ").append(toIndentedString(exhaustiveNbHits)).append("\n"); - sb.append(" exhaustiveTypo: ").append(toIndentedString(exhaustiveTypo)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" facetsStats: ").append(toIndentedString(facetsStats)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" indexUsed: ").append(toIndentedString(indexUsed)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).append("\n"); - sb.append(" nbPages: ").append(toIndentedString(nbPages)).append("\n"); - sb.append(" nbSortedHits: ").append(toIndentedString(nbSortedHits)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n"); - sb.append(" parsedQuery: ").append(toIndentedString(parsedQuery)).append("\n"); - sb.append(" processingTimeMS: ").append(toIndentedString(processingTimeMS)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" queryAfterRemoval: ").append(toIndentedString(queryAfterRemoval)).append("\n"); - sb.append(" serverUsed: ").append(toIndentedString(serverUsed)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchResponseRedirect.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchResponseRedirect.java deleted file mode 100644 index d16c96b9c4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BaseSearchResponseRedirect.java +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * [Redirect results to a - * URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/). - */ -public class BaseSearchResponseRedirect { - - @JsonProperty("index") - private List index; - - public BaseSearchResponseRedirect setIndex(List index) { - this.index = index; - return this; - } - - public BaseSearchResponseRedirect addIndex(RedirectRuleIndexMetadata indexItem) { - if (this.index == null) { - this.index = new ArrayList<>(); - } - this.index.add(indexItem); - return this; - } - - /** - * Get index - * - * @return index - */ - @javax.annotation.Nullable - public List getIndex() { - return index; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseSearchResponseRedirect baseSearchResponseRedirect = (BaseSearchResponseRedirect) o; - return Objects.equals(this.index, baseSearchResponseRedirect.index); - } - - @Override - public int hashCode() { - return Objects.hash(index); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseSearchResponseRedirect {\n"); - sb.append(" index: ").append(toIndentedString(index)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchAssignUserIdsParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchAssignUserIdsParams.java deleted file mode 100644 index 187e67064e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchAssignUserIdsParams.java +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Assign userID parameters. */ -public class BatchAssignUserIdsParams { - - @JsonProperty("cluster") - private String cluster; - - @JsonProperty("users") - private List users = new ArrayList<>(); - - public BatchAssignUserIdsParams setCluster(String cluster) { - this.cluster = cluster; - return this; - } - - /** - * Cluster name. - * - * @return cluster - */ - @javax.annotation.Nonnull - public String getCluster() { - return cluster; - } - - public BatchAssignUserIdsParams setUsers(List users) { - this.users = users; - return this; - } - - public BatchAssignUserIdsParams addUsers(String usersItem) { - this.users.add(usersItem); - return this; - } - - /** - * User IDs to assign. - * - * @return users - */ - @javax.annotation.Nonnull - public List getUsers() { - return users; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchAssignUserIdsParams batchAssignUserIdsParams = (BatchAssignUserIdsParams) o; - return Objects.equals(this.cluster, batchAssignUserIdsParams.cluster) && Objects.equals(this.users, batchAssignUserIdsParams.users); - } - - @Override - public int hashCode() { - return Objects.hash(cluster, users); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchAssignUserIdsParams {\n"); - sb.append(" cluster: ").append(toIndentedString(cluster)).append("\n"); - sb.append(" users: ").append(toIndentedString(users)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchDictionaryEntriesParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchDictionaryEntriesParams.java deleted file mode 100644 index ef4302e96a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchDictionaryEntriesParams.java +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** `batchDictionaryEntries` parameters. */ -public class BatchDictionaryEntriesParams { - - @JsonProperty("clearExistingDictionaryEntries") - private Boolean clearExistingDictionaryEntries; - - @JsonProperty("requests") - private List requests = new ArrayList<>(); - - public BatchDictionaryEntriesParams setClearExistingDictionaryEntries(Boolean clearExistingDictionaryEntries) { - this.clearExistingDictionaryEntries = clearExistingDictionaryEntries; - return this; - } - - /** - * Incidates whether to replace all custom entries in the dictionary with the ones sent with this - * request. - * - * @return clearExistingDictionaryEntries - */ - @javax.annotation.Nullable - public Boolean getClearExistingDictionaryEntries() { - return clearExistingDictionaryEntries; - } - - public BatchDictionaryEntriesParams setRequests(List requests) { - this.requests = requests; - return this; - } - - public BatchDictionaryEntriesParams addRequests(BatchDictionaryEntriesRequest requestsItem) { - this.requests.add(requestsItem); - return this; - } - - /** - * Operations to batch. - * - * @return requests - */ - @javax.annotation.Nonnull - public List getRequests() { - return requests; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchDictionaryEntriesParams batchDictionaryEntriesParams = (BatchDictionaryEntriesParams) o; - return ( - Objects.equals(this.clearExistingDictionaryEntries, batchDictionaryEntriesParams.clearExistingDictionaryEntries) && - Objects.equals(this.requests, batchDictionaryEntriesParams.requests) - ); - } - - @Override - public int hashCode() { - return Objects.hash(clearExistingDictionaryEntries, requests); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchDictionaryEntriesParams {\n"); - sb.append(" clearExistingDictionaryEntries: ").append(toIndentedString(clearExistingDictionaryEntries)).append("\n"); - sb.append(" requests: ").append(toIndentedString(requests)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchDictionaryEntriesRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchDictionaryEntriesRequest.java deleted file mode 100644 index d71599bf4b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchDictionaryEntriesRequest.java +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** BatchDictionaryEntriesRequest */ -public class BatchDictionaryEntriesRequest { - - @JsonProperty("action") - private DictionaryAction action; - - @JsonProperty("body") - private DictionaryEntry body; - - public BatchDictionaryEntriesRequest setAction(DictionaryAction action) { - this.action = action; - return this; - } - - /** - * Get action - * - * @return action - */ - @javax.annotation.Nonnull - public DictionaryAction getAction() { - return action; - } - - public BatchDictionaryEntriesRequest setBody(DictionaryEntry body) { - this.body = body; - return this; - } - - /** - * Get body - * - * @return body - */ - @javax.annotation.Nonnull - public DictionaryEntry getBody() { - return body; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchDictionaryEntriesRequest batchDictionaryEntriesRequest = (BatchDictionaryEntriesRequest) o; - return ( - Objects.equals(this.action, batchDictionaryEntriesRequest.action) && Objects.equals(this.body, batchDictionaryEntriesRequest.body) - ); - } - - @Override - public int hashCode() { - return Objects.hash(action, body); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchDictionaryEntriesRequest {\n"); - sb.append(" action: ").append(toIndentedString(action)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchParams.java deleted file mode 100644 index aecdbf567e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchParams.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Batch parameters. */ -public class BatchParams { - - @JsonProperty("requests") - private List requests = new ArrayList<>(); - - public BatchParams setRequests(List requests) { - this.requests = requests; - return this; - } - - public BatchParams addRequests(MultipleBatchRequest requestsItem) { - this.requests.add(requestsItem); - return this; - } - - /** - * Get requests - * - * @return requests - */ - @javax.annotation.Nonnull - public List getRequests() { - return requests; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchParams batchParams = (BatchParams) o; - return Objects.equals(this.requests, batchParams.requests); - } - - @Override - public int hashCode() { - return Objects.hash(requests); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchParams {\n"); - sb.append(" requests: ").append(toIndentedString(requests)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchRequest.java deleted file mode 100644 index 9382aaf6b7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchRequest.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** BatchRequest */ -public class BatchRequest { - - @JsonProperty("action") - private Action action; - - @JsonProperty("body") - private Object body; - - public BatchRequest setAction(Action action) { - this.action = action; - return this; - } - - /** - * Get action - * - * @return action - */ - @javax.annotation.Nonnull - public Action getAction() { - return action; - } - - public BatchRequest setBody(Object body) { - this.body = body; - return this; - } - - /** - * Operation arguments (varies with specified `action`). - * - * @return body - */ - @javax.annotation.Nonnull - public Object getBody() { - return body; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchRequest batchRequest = (BatchRequest) o; - return Objects.equals(this.action, batchRequest.action) && Objects.equals(this.body, batchRequest.body); - } - - @Override - public int hashCode() { - return Objects.hash(action, body); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchRequest {\n"); - sb.append(" action: ").append(toIndentedString(action)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchResponse.java deleted file mode 100644 index e85518e07d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchResponse.java +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** BatchResponse */ -public class BatchResponse { - - @JsonProperty("taskID") - private Long taskID; - - @JsonProperty("objectIDs") - private List objectIDs = new ArrayList<>(); - - public BatchResponse setTaskID(Long taskID) { - this.taskID = taskID; - return this; - } - - /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. - * - * @return taskID - */ - @javax.annotation.Nonnull - public Long getTaskID() { - return taskID; - } - - public BatchResponse setObjectIDs(List objectIDs) { - this.objectIDs = objectIDs; - return this; - } - - public BatchResponse addObjectIDs(String objectIDsItem) { - this.objectIDs.add(objectIDsItem); - return this; - } - - /** - * Unique object (record) identifiers. - * - * @return objectIDs - */ - @javax.annotation.Nonnull - public List getObjectIDs() { - return objectIDs; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchResponse batchResponse = (BatchResponse) o; - return Objects.equals(this.taskID, batchResponse.taskID) && Objects.equals(this.objectIDs, batchResponse.objectIDs); - } - - @Override - public int hashCode() { - return Objects.hash(taskID, objectIDs); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchResponse {\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).append("\n"); - sb.append(" objectIDs: ").append(toIndentedString(objectIDs)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchWriteParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchWriteParams.java deleted file mode 100644 index 4f456c64ca..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BatchWriteParams.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Batch parameters. */ -public class BatchWriteParams { - - @JsonProperty("requests") - private List requests = new ArrayList<>(); - - public BatchWriteParams setRequests(List requests) { - this.requests = requests; - return this; - } - - public BatchWriteParams addRequests(BatchRequest requestsItem) { - this.requests.add(requestsItem); - return this; - } - - /** - * Get requests - * - * @return requests - */ - @javax.annotation.Nonnull - public List getRequests() { - return requests; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchWriteParams batchWriteParams = (BatchWriteParams) o; - return Objects.equals(this.requests, batchWriteParams.requests); - } - - @Override - public int hashCode() { - return Objects.hash(requests); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchWriteParams {\n"); - sb.append(" requests: ").append(toIndentedString(requests)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseParams.java deleted file mode 100644 index 17b07e358d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseParams.java +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** BrowseParams */ -@JsonDeserialize(using = BrowseParams.BrowseParamsDeserializer.class) -@JsonSerialize(using = BrowseParams.BrowseParamsSerializer.class) -public abstract class BrowseParams implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(BrowseParams.class.getName()); - - public static BrowseParams of(BrowseParamsObject inside) { - return new BrowseParamsBrowseParamsObject(inside); - } - - public static BrowseParams of(SearchParamsString inside) { - return new BrowseParamsSearchParamsString(inside); - } - - public static class BrowseParamsSerializer extends StdSerializer { - - public BrowseParamsSerializer(Class t) { - super(t); - } - - public BrowseParamsSerializer() { - this(null); - } - - @Override - public void serialize(BrowseParams value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class BrowseParamsDeserializer extends StdDeserializer { - - public BrowseParamsDeserializer() { - this(BrowseParams.class); - } - - public BrowseParamsDeserializer(Class vc) { - super(vc); - } - - @Override - public BrowseParams deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize BrowseParamsObject - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - BrowseParamsObject value = parser.readValueAs(new TypeReference() {}); - return BrowseParams.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf BrowseParamsObject (error: " + e.getMessage() + ") (type: BrowseParamsObject)"); - } - } - - // deserialize SearchParamsString - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - SearchParamsString value = parser.readValueAs(new TypeReference() {}); - return BrowseParams.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf SearchParamsString (error: " + e.getMessage() + ") (type: SearchParamsString)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public BrowseParams getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "BrowseParams cannot be null"); - } - } -} - -class BrowseParamsBrowseParamsObject extends BrowseParams { - - private final BrowseParamsObject insideValue; - - BrowseParamsBrowseParamsObject(BrowseParamsObject insideValue) { - this.insideValue = insideValue; - } - - @Override - public BrowseParamsObject getInsideValue() { - return insideValue; - } -} - -class BrowseParamsSearchParamsString extends BrowseParams { - - private final SearchParamsString insideValue; - - BrowseParamsSearchParamsString(SearchParamsString insideValue) { - this.insideValue = insideValue; - } - - @Override - public SearchParamsString getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseParamsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseParamsObject.java deleted file mode 100644 index 0a3b20f249..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseParamsObject.java +++ /dev/null @@ -1,1986 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** BrowseParamsObject */ -public class BrowseParamsObject { - - @JsonProperty("query") - private String query; - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - @JsonProperty("cursor") - private String cursor; - - public BrowseParamsObject setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public BrowseParamsObject setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public BrowseParamsObject setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public BrowseParamsObject setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public BrowseParamsObject setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public BrowseParamsObject setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public BrowseParamsObject setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public BrowseParamsObject setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public BrowseParamsObject setFacets(List facets) { - this.facets = facets; - return this; - } - - public BrowseParamsObject addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public BrowseParamsObject setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public BrowseParamsObject setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public BrowseParamsObject setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public BrowseParamsObject setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public BrowseParamsObject setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public BrowseParamsObject setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public BrowseParamsObject setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public BrowseParamsObject setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public BrowseParamsObject setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public BrowseParamsObject setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public BrowseParamsObject setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public BrowseParamsObject setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public BrowseParamsObject addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public BrowseParamsObject setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public BrowseParamsObject addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public BrowseParamsObject setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public BrowseParamsObject addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public BrowseParamsObject setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public BrowseParamsObject addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public BrowseParamsObject setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public BrowseParamsObject setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public BrowseParamsObject setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public BrowseParamsObject setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public BrowseParamsObject setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public BrowseParamsObject setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public BrowseParamsObject addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public BrowseParamsObject setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public BrowseParamsObject setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public BrowseParamsObject setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public BrowseParamsObject setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - public BrowseParamsObject setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public BrowseParamsObject addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public BrowseParamsObject setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public BrowseParamsObject addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public BrowseParamsObject setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public BrowseParamsObject addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public BrowseParamsObject setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public BrowseParamsObject addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public BrowseParamsObject setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public BrowseParamsObject addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public BrowseParamsObject setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public BrowseParamsObject setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public BrowseParamsObject addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public BrowseParamsObject setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public BrowseParamsObject addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public BrowseParamsObject setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public BrowseParamsObject setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public BrowseParamsObject setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public BrowseParamsObject setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public BrowseParamsObject setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public BrowseParamsObject setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public BrowseParamsObject setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public BrowseParamsObject setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public BrowseParamsObject setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public BrowseParamsObject setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public BrowseParamsObject addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public BrowseParamsObject setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public BrowseParamsObject setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public BrowseParamsObject setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public BrowseParamsObject setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public BrowseParamsObject addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public BrowseParamsObject setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public BrowseParamsObject setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public BrowseParamsObject setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public BrowseParamsObject setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public BrowseParamsObject setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public BrowseParamsObject setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public BrowseParamsObject setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public BrowseParamsObject setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public BrowseParamsObject setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public BrowseParamsObject addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public BrowseParamsObject setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public BrowseParamsObject addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public BrowseParamsObject setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public BrowseParamsObject setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public BrowseParamsObject addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public BrowseParamsObject setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public BrowseParamsObject addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public BrowseParamsObject setExplain(List explain) { - this.explain = explain; - return this; - } - - public BrowseParamsObject addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public BrowseParamsObject setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public BrowseParamsObject setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public BrowseParamsObject setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public BrowseParamsObject setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public BrowseParamsObject setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public BrowseParamsObject setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public BrowseParamsObject addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public BrowseParamsObject setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public BrowseParamsObject setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public BrowseParamsObject setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - public BrowseParamsObject setCursor(String cursor) { - this.cursor = cursor; - return this; - } - - /** - * Cursor indicating the location to resume browsing from. Must match the value returned by the - * previous call. Pass this value to the subsequent browse call to get the next page of results. - * When the end of the index has been reached, `cursor` is absent from the response. - * - * @return cursor - */ - @javax.annotation.Nullable - public String getCursor() { - return cursor; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrowseParamsObject browseParamsObject = (BrowseParamsObject) o; - return ( - Objects.equals(this.query, browseParamsObject.query) && - Objects.equals(this.similarQuery, browseParamsObject.similarQuery) && - Objects.equals(this.filters, browseParamsObject.filters) && - Objects.equals(this.facetFilters, browseParamsObject.facetFilters) && - Objects.equals(this.optionalFilters, browseParamsObject.optionalFilters) && - Objects.equals(this.numericFilters, browseParamsObject.numericFilters) && - Objects.equals(this.tagFilters, browseParamsObject.tagFilters) && - Objects.equals(this.sumOrFiltersScores, browseParamsObject.sumOrFiltersScores) && - Objects.equals(this.facets, browseParamsObject.facets) && - Objects.equals(this.maxValuesPerFacet, browseParamsObject.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, browseParamsObject.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, browseParamsObject.sortFacetValuesBy) && - Objects.equals(this.page, browseParamsObject.page) && - Objects.equals(this.offset, browseParamsObject.offset) && - Objects.equals(this.length, browseParamsObject.length) && - Objects.equals(this.aroundLatLng, browseParamsObject.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, browseParamsObject.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, browseParamsObject.aroundRadius) && - Objects.equals(this.aroundPrecision, browseParamsObject.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, browseParamsObject.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, browseParamsObject.insideBoundingBox) && - Objects.equals(this.insidePolygon, browseParamsObject.insidePolygon) && - Objects.equals(this.naturalLanguages, browseParamsObject.naturalLanguages) && - Objects.equals(this.ruleContexts, browseParamsObject.ruleContexts) && - Objects.equals(this.personalizationImpact, browseParamsObject.personalizationImpact) && - Objects.equals(this.userToken, browseParamsObject.userToken) && - Objects.equals(this.getRankingInfo, browseParamsObject.getRankingInfo) && - Objects.equals(this.clickAnalytics, browseParamsObject.clickAnalytics) && - Objects.equals(this.analytics, browseParamsObject.analytics) && - Objects.equals(this.analyticsTags, browseParamsObject.analyticsTags) && - Objects.equals(this.percentileComputation, browseParamsObject.percentileComputation) && - Objects.equals(this.enableABTest, browseParamsObject.enableABTest) && - Objects.equals(this.enableReRanking, browseParamsObject.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, browseParamsObject.reRankingApplyFilter) && - Objects.equals(this.attributesForFaceting, browseParamsObject.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, browseParamsObject.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, browseParamsObject.restrictSearchableAttributes) && - Objects.equals(this.ranking, browseParamsObject.ranking) && - Objects.equals(this.customRanking, browseParamsObject.customRanking) && - Objects.equals(this.relevancyStrictness, browseParamsObject.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, browseParamsObject.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, browseParamsObject.attributesToSnippet) && - Objects.equals(this.highlightPreTag, browseParamsObject.highlightPreTag) && - Objects.equals(this.highlightPostTag, browseParamsObject.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, browseParamsObject.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, browseParamsObject.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, browseParamsObject.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, browseParamsObject.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, browseParamsObject.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, browseParamsObject.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, browseParamsObject.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, browseParamsObject.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, browseParamsObject.ignorePlurals) && - Objects.equals(this.removeStopWords, browseParamsObject.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, browseParamsObject.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, browseParamsObject.queryLanguages) && - Objects.equals(this.decompoundQuery, browseParamsObject.decompoundQuery) && - Objects.equals(this.enableRules, browseParamsObject.enableRules) && - Objects.equals(this.enablePersonalization, browseParamsObject.enablePersonalization) && - Objects.equals(this.queryType, browseParamsObject.queryType) && - Objects.equals(this.removeWordsIfNoResults, browseParamsObject.removeWordsIfNoResults) && - Objects.equals(this.mode, browseParamsObject.mode) && - Objects.equals(this.semanticSearch, browseParamsObject.semanticSearch) && - Objects.equals(this.advancedSyntax, browseParamsObject.advancedSyntax) && - Objects.equals(this.optionalWords, browseParamsObject.optionalWords) && - Objects.equals(this.disableExactOnAttributes, browseParamsObject.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, browseParamsObject.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, browseParamsObject.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, browseParamsObject.advancedSyntaxFeatures) && - Objects.equals(this.explain, browseParamsObject.explain) && - Objects.equals(this.distinct, browseParamsObject.distinct) && - Objects.equals(this.attributeForDistinct, browseParamsObject.attributeForDistinct) && - Objects.equals(this.synonyms, browseParamsObject.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, browseParamsObject.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, browseParamsObject.minProximity) && - Objects.equals(this.responseFields, browseParamsObject.responseFields) && - Objects.equals(this.maxFacetHits, browseParamsObject.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, browseParamsObject.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, browseParamsObject.renderingContent) && - Objects.equals(this.cursor, browseParamsObject.cursor) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - query, - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter, - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent, - cursor - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BrowseParamsObject {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).append("\n"); - sb.append(" cursor: ").append(toIndentedString(cursor)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseResponse.java deleted file mode 100644 index 3381c23de4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BrowseResponse.java +++ /dev/null @@ -1,667 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** BrowseResponse */ -public class BrowseResponse { - - @JsonProperty("abTestID") - private Integer abTestID; - - @JsonProperty("abTestVariantID") - private Integer abTestVariantID; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("automaticRadius") - private String automaticRadius; - - @JsonProperty("exhaustiveFacetsCount") - private Boolean exhaustiveFacetsCount; - - @JsonProperty("exhaustiveNbHits") - private Boolean exhaustiveNbHits; - - @JsonProperty("exhaustiveTypo") - private Boolean exhaustiveTypo; - - @JsonProperty("facets") - private Map> facets; - - @JsonProperty("facets_stats") - private Map facetsStats; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("index") - private String index; - - @JsonProperty("indexUsed") - private String indexUsed; - - @JsonProperty("message") - private String message; - - @JsonProperty("nbHits") - private Integer nbHits; - - @JsonProperty("nbPages") - private Integer nbPages; - - @JsonProperty("nbSortedHits") - private Integer nbSortedHits; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("params") - private String params; - - @JsonProperty("redirect") - private BaseSearchResponseRedirect redirect; - - @JsonProperty("parsedQuery") - private String parsedQuery; - - @JsonProperty("processingTimeMS") - private Integer processingTimeMS; - - @JsonProperty("query") - private String query; - - @JsonProperty("queryAfterRemoval") - private String queryAfterRemoval; - - @JsonProperty("serverUsed") - private String serverUsed; - - @JsonProperty("userData") - private Object userData; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - @JsonProperty("cursor") - private String cursor; - - public BrowseResponse setAbTestID(Integer abTestID) { - this.abTestID = abTestID; - return this; - } - - /** - * A/B test ID. This is only included in the response for indices that are part of an A/B test. - * - * @return abTestID - */ - @javax.annotation.Nullable - public Integer getAbTestID() { - return abTestID; - } - - public BrowseResponse setAbTestVariantID(Integer abTestVariantID) { - this.abTestVariantID = abTestVariantID; - return this; - } - - /** - * Variant ID. This is only included in the response for indices that are part of an A/B test. - * minimum: 1 - * - * @return abTestVariantID - */ - @javax.annotation.Nullable - public Integer getAbTestVariantID() { - return abTestVariantID; - } - - public BrowseResponse setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Computed geographical location. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public BrowseResponse setAutomaticRadius(String automaticRadius) { - this.automaticRadius = automaticRadius; - return this; - } - - /** - * Automatically-computed radius. - * - * @return automaticRadius - */ - @javax.annotation.Nullable - public String getAutomaticRadius() { - return automaticRadius; - } - - public BrowseResponse setExhaustiveFacetsCount(Boolean exhaustiveFacetsCount) { - this.exhaustiveFacetsCount = exhaustiveFacetsCount; - return this; - } - - /** - * Indicates whether the facet count is exhaustive (exact) or approximate. - * - * @return exhaustiveFacetsCount - */ - @javax.annotation.Nullable - public Boolean getExhaustiveFacetsCount() { - return exhaustiveFacetsCount; - } - - public BrowseResponse setExhaustiveNbHits(Boolean exhaustiveNbHits) { - this.exhaustiveNbHits = exhaustiveNbHits; - return this; - } - - /** - * Indicates whether the number of hits `nbHits` is exhaustive (exact) or approximate. - * - * @return exhaustiveNbHits - */ - @javax.annotation.Nonnull - public Boolean getExhaustiveNbHits() { - return exhaustiveNbHits; - } - - public BrowseResponse setExhaustiveTypo(Boolean exhaustiveTypo) { - this.exhaustiveTypo = exhaustiveTypo; - return this; - } - - /** - * Indicates whether the search for typos was exhaustive (exact) or approximate. - * - * @return exhaustiveTypo - */ - @javax.annotation.Nullable - public Boolean getExhaustiveTypo() { - return exhaustiveTypo; - } - - public BrowseResponse setFacets(Map> facets) { - this.facets = facets; - return this; - } - - public BrowseResponse putFacets(String key, Map facetsItem) { - if (this.facets == null) { - this.facets = new HashMap<>(); - } - this.facets.put(key, facetsItem); - return this; - } - - /** - * Mapping of each facet name to the corresponding facet counts. - * - * @return facets - */ - @javax.annotation.Nullable - public Map> getFacets() { - return facets; - } - - public BrowseResponse setFacetsStats(Map facetsStats) { - this.facetsStats = facetsStats; - return this; - } - - public BrowseResponse putFacetsStats(String key, FacetsStats facetsStatsItem) { - if (this.facetsStats == null) { - this.facetsStats = new HashMap<>(); - } - this.facetsStats.put(key, facetsStatsItem); - return this; - } - - /** - * Statistics for numerical facets. - * - * @return facetsStats - */ - @javax.annotation.Nullable - public Map getFacetsStats() { - return facetsStats; - } - - public BrowseResponse setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nonnull - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public BrowseResponse setIndex(String index) { - this.index = index; - return this; - } - - /** - * Index name used for the query. - * - * @return index - */ - @javax.annotation.Nullable - public String getIndex() { - return index; - } - - public BrowseResponse setIndexUsed(String indexUsed) { - this.indexUsed = indexUsed; - return this; - } - - /** - * Index name used for the query. During A/B testing, the targeted index isn't always the index - * used by the query. - * - * @return indexUsed - */ - @javax.annotation.Nullable - public String getIndexUsed() { - return indexUsed; - } - - public BrowseResponse setMessage(String message) { - this.message = message; - return this; - } - - /** - * Warnings about the query. - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public BrowseResponse setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - public BrowseResponse setNbPages(Integer nbPages) { - this.nbPages = nbPages; - return this; - } - - /** - * Number of pages of results for the current query. - * - * @return nbPages - */ - @javax.annotation.Nonnull - public Integer getNbPages() { - return nbPages; - } - - public BrowseResponse setNbSortedHits(Integer nbSortedHits) { - this.nbSortedHits = nbSortedHits; - return this; - } - - /** - * Number of hits selected and sorted by the relevant sort algorithm. - * - * @return nbSortedHits - */ - @javax.annotation.Nullable - public Integer getNbSortedHits() { - return nbSortedHits; - } - - public BrowseResponse setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nonnull - public Integer getPage() { - return page; - } - - public BrowseResponse setParams(String params) { - this.params = params; - return this; - } - - /** - * URL-encoded string of all search parameters. - * - * @return params - */ - @javax.annotation.Nonnull - public String getParams() { - return params; - } - - public BrowseResponse setRedirect(BaseSearchResponseRedirect redirect) { - this.redirect = redirect; - return this; - } - - /** - * Get redirect - * - * @return redirect - */ - @javax.annotation.Nullable - public BaseSearchResponseRedirect getRedirect() { - return redirect; - } - - public BrowseResponse setParsedQuery(String parsedQuery) { - this.parsedQuery = parsedQuery; - return this; - } - - /** - * Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) - * query string that will be searched. - * - * @return parsedQuery - */ - @javax.annotation.Nullable - public String getParsedQuery() { - return parsedQuery; - } - - public BrowseResponse setProcessingTimeMS(Integer processingTimeMS) { - this.processingTimeMS = processingTimeMS; - return this; - } - - /** - * Time the server took to process the request, in milliseconds. - * - * @return processingTimeMS - */ - @javax.annotation.Nonnull - public Integer getProcessingTimeMS() { - return processingTimeMS; - } - - public BrowseResponse setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } - - public BrowseResponse setQueryAfterRemoval(String queryAfterRemoval) { - this.queryAfterRemoval = queryAfterRemoval; - return this; - } - - /** - * Markup text indicating which parts of the original query have been removed to retrieve a - * non-empty result set. - * - * @return queryAfterRemoval - */ - @javax.annotation.Nullable - public String getQueryAfterRemoval() { - return queryAfterRemoval; - } - - public BrowseResponse setServerUsed(String serverUsed) { - this.serverUsed = serverUsed; - return this; - } - - /** - * Host name of the server that processed the request. - * - * @return serverUsed - */ - @javax.annotation.Nullable - public String getServerUsed() { - return serverUsed; - } - - public BrowseResponse setUserData(Object userData) { - this.userData = userData; - return this; - } - - /** - * Lets you store custom data in your indices. - * - * @return userData - */ - @javax.annotation.Nullable - public Object getUserData() { - return userData; - } - - public BrowseResponse setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - public BrowseResponse setHits(List hits) { - this.hits = hits; - return this; - } - - public BrowseResponse addHits(T hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Get hits - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - public BrowseResponse setCursor(String cursor) { - this.cursor = cursor; - return this; - } - - /** - * Cursor indicating the location to resume browsing from. Must match the value returned by the - * previous call. Pass this value to the subsequent browse call to get the next page of results. - * When the end of the index has been reached, `cursor` is absent from the response. - * - * @return cursor - */ - @javax.annotation.Nullable - public String getCursor() { - return cursor; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BrowseResponse browseResponse = (BrowseResponse) o; - return ( - Objects.equals(this.abTestID, browseResponse.abTestID) && - Objects.equals(this.abTestVariantID, browseResponse.abTestVariantID) && - Objects.equals(this.aroundLatLng, browseResponse.aroundLatLng) && - Objects.equals(this.automaticRadius, browseResponse.automaticRadius) && - Objects.equals(this.exhaustiveFacetsCount, browseResponse.exhaustiveFacetsCount) && - Objects.equals(this.exhaustiveNbHits, browseResponse.exhaustiveNbHits) && - Objects.equals(this.exhaustiveTypo, browseResponse.exhaustiveTypo) && - Objects.equals(this.facets, browseResponse.facets) && - Objects.equals(this.facetsStats, browseResponse.facetsStats) && - Objects.equals(this.hitsPerPage, browseResponse.hitsPerPage) && - Objects.equals(this.index, browseResponse.index) && - Objects.equals(this.indexUsed, browseResponse.indexUsed) && - Objects.equals(this.message, browseResponse.message) && - Objects.equals(this.nbHits, browseResponse.nbHits) && - Objects.equals(this.nbPages, browseResponse.nbPages) && - Objects.equals(this.nbSortedHits, browseResponse.nbSortedHits) && - Objects.equals(this.page, browseResponse.page) && - Objects.equals(this.params, browseResponse.params) && - Objects.equals(this.redirect, browseResponse.redirect) && - Objects.equals(this.parsedQuery, browseResponse.parsedQuery) && - Objects.equals(this.processingTimeMS, browseResponse.processingTimeMS) && - Objects.equals(this.query, browseResponse.query) && - Objects.equals(this.queryAfterRemoval, browseResponse.queryAfterRemoval) && - Objects.equals(this.serverUsed, browseResponse.serverUsed) && - Objects.equals(this.userData, browseResponse.userData) && - Objects.equals(this.renderingContent, browseResponse.renderingContent) && - Objects.equals(this.hits, browseResponse.hits) && - Objects.equals(this.cursor, browseResponse.cursor) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - abTestID, - abTestVariantID, - aroundLatLng, - automaticRadius, - exhaustiveFacetsCount, - exhaustiveNbHits, - exhaustiveTypo, - facets, - facetsStats, - hitsPerPage, - index, - indexUsed, - message, - nbHits, - nbPages, - nbSortedHits, - page, - params, - redirect, - parsedQuery, - processingTimeMS, - query, - queryAfterRemoval, - serverUsed, - userData, - renderingContent, - hits, - cursor - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BrowseResponse {\n"); - sb.append(" abTestID: ").append(toIndentedString(abTestID)).append("\n"); - sb.append(" abTestVariantID: ").append(toIndentedString(abTestVariantID)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" automaticRadius: ").append(toIndentedString(automaticRadius)).append("\n"); - sb.append(" exhaustiveFacetsCount: ").append(toIndentedString(exhaustiveFacetsCount)).append("\n"); - sb.append(" exhaustiveNbHits: ").append(toIndentedString(exhaustiveNbHits)).append("\n"); - sb.append(" exhaustiveTypo: ").append(toIndentedString(exhaustiveTypo)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" facetsStats: ").append(toIndentedString(facetsStats)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" indexUsed: ").append(toIndentedString(indexUsed)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).append("\n"); - sb.append(" nbPages: ").append(toIndentedString(nbPages)).append("\n"); - sb.append(" nbSortedHits: ").append(toIndentedString(nbSortedHits)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n"); - sb.append(" parsedQuery: ").append(toIndentedString(parsedQuery)).append("\n"); - sb.append(" processingTimeMS: ").append(toIndentedString(processingTimeMS)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" queryAfterRemoval: ").append(toIndentedString(queryAfterRemoval)).append("\n"); - sb.append(" serverUsed: ").append(toIndentedString(serverUsed)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).append("\n"); - sb.append(" hits: ").append(toIndentedString(hits)).append("\n"); - sb.append(" cursor: ").append(toIndentedString(cursor)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BuiltInOperation.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BuiltInOperation.java deleted file mode 100644 index 4ae02312f9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BuiltInOperation.java +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** - * To update an attribute without pushing the entire record, you can use these built-in operations. - */ -public class BuiltInOperation { - - @JsonProperty("_operation") - private BuiltInOperationType operation; - - @JsonProperty("value") - private String value; - - public BuiltInOperation setOperation(BuiltInOperationType operation) { - this.operation = operation; - return this; - } - - /** - * Get operation - * - * @return operation - */ - @javax.annotation.Nonnull - public BuiltInOperationType getOperation() { - return operation; - } - - public BuiltInOperation setValue(String value) { - this.value = value; - return this; - } - - /** - * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` - * or `Remove` value. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BuiltInOperation builtInOperation = (BuiltInOperation) o; - return Objects.equals(this.operation, builtInOperation.operation) && Objects.equals(this.value, builtInOperation.value); - } - - @Override - public int hashCode() { - return Objects.hash(operation, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BuiltInOperation {\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BuiltInOperationType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BuiltInOperationType.java deleted file mode 100644 index 2d8d6bccd5..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/BuiltInOperationType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Operation to apply to the attribute. */ -public enum BuiltInOperationType { - INCREMENT("Increment"), - - DECREMENT("Decrement"), - - ADD("Add"), - - REMOVE("Remove"), - - ADD_UNIQUE("AddUnique"), - - INCREMENT_FROM("IncrementFrom"), - - INCREMENT_SET("IncrementSet"); - - private final String value; - - BuiltInOperationType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static BuiltInOperationType fromValue(String value) { - for (BuiltInOperationType b : BuiltInOperationType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Condition.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Condition.java deleted file mode 100644 index e591069a62..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Condition.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Condition */ -public class Condition { - - @JsonProperty("pattern") - private String pattern; - - @JsonProperty("anchoring") - private Anchoring anchoring; - - @JsonProperty("alternatives") - private Boolean alternatives; - - @JsonProperty("context") - private String context; - - public Condition setPattern(String pattern) { - this.pattern = pattern; - return this; - } - - /** - * Query pattern syntax. - * - * @return pattern - */ - @javax.annotation.Nullable - public String getPattern() { - return pattern; - } - - public Condition setAnchoring(Anchoring anchoring) { - this.anchoring = anchoring; - return this; - } - - /** - * Get anchoring - * - * @return anchoring - */ - @javax.annotation.Nullable - public Anchoring getAnchoring() { - return anchoring; - } - - public Condition setAlternatives(Boolean alternatives) { - this.alternatives = alternatives; - return this; - } - - /** - * Whether the pattern matches on plurals, synonyms, and typos. - * - * @return alternatives - */ - @javax.annotation.Nullable - public Boolean getAlternatives() { - return alternatives; - } - - public Condition setContext(String context) { - this.context = context; - return this; - } - - /** - * Rule context format: [A-Za-z0-9_-]+). - * - * @return context - */ - @javax.annotation.Nullable - public String getContext() { - return context; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Condition condition = (Condition) o; - return ( - Objects.equals(this.pattern, condition.pattern) && - Objects.equals(this.anchoring, condition.anchoring) && - Objects.equals(this.alternatives, condition.alternatives) && - Objects.equals(this.context, condition.context) - ); - } - - @Override - public int hashCode() { - return Objects.hash(pattern, anchoring, alternatives, context); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Condition {\n"); - sb.append(" pattern: ").append(toIndentedString(pattern)).append("\n"); - sb.append(" anchoring: ").append(toIndentedString(anchoring)).append("\n"); - sb.append(" alternatives: ").append(toIndentedString(alternatives)).append("\n"); - sb.append(" context: ").append(toIndentedString(context)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Consequence.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Consequence.java deleted file mode 100644 index a8df7deefd..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Consequence.java +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) - * of a rule. - */ -public class Consequence { - - @JsonProperty("params") - private ConsequenceParams params; - - @JsonProperty("promote") - private List promote; - - @JsonProperty("filterPromotes") - private Boolean filterPromotes; - - @JsonProperty("hide") - private List hide; - - @JsonProperty("userData") - private Object userData; - - public Consequence setParams(ConsequenceParams params) { - this.params = params; - return this; - } - - /** - * Get params - * - * @return params - */ - @javax.annotation.Nullable - public ConsequenceParams getParams() { - return params; - } - - public Consequence setPromote(List promote) { - this.promote = promote; - return this; - } - - public Consequence addPromote(Promote promoteItem) { - if (this.promote == null) { - this.promote = new ArrayList<>(); - } - this.promote.add(promoteItem); - return this; - } - - /** - * Records to promote. - * - * @return promote - */ - @javax.annotation.Nullable - public List getPromote() { - return promote; - } - - public Consequence setFilterPromotes(Boolean filterPromotes) { - this.filterPromotes = filterPromotes; - return this; - } - - /** - * Only use in combination with the `promote` consequence. When `true`, promoted results will be - * restricted to match the filters of the current search. When `false`, the promoted results will - * show up regardless of the filters. - * - * @return filterPromotes - */ - @javax.annotation.Nullable - public Boolean getFilterPromotes() { - return filterPromotes; - } - - public Consequence setHide(List hide) { - this.hide = hide; - return this; - } - - public Consequence addHide(ConsequenceHide hideItem) { - if (this.hide == null) { - this.hide = new ArrayList<>(); - } - this.hide.add(hideItem); - return this; - } - - /** - * Records to hide. By default, you can hide up to 50 records per rule. - * - * @return hide - */ - @javax.annotation.Nullable - public List getHide() { - return hide; - } - - public Consequence setUserData(Object userData) { - this.userData = userData; - return this; - } - - /** - * Custom JSON object that will be appended to the userData array in the response. This object - * isn't interpreted by the API. It's limited to 1kB of minified JSON. - * - * @return userData - */ - @javax.annotation.Nullable - public Object getUserData() { - return userData; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Consequence consequence = (Consequence) o; - return ( - Objects.equals(this.params, consequence.params) && - Objects.equals(this.promote, consequence.promote) && - Objects.equals(this.filterPromotes, consequence.filterPromotes) && - Objects.equals(this.hide, consequence.hide) && - Objects.equals(this.userData, consequence.userData) - ); - } - - @Override - public int hashCode() { - return Objects.hash(params, promote, filterPromotes, hide, userData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Consequence {\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" promote: ").append(toIndentedString(promote)).append("\n"); - sb.append(" filterPromotes: ").append(toIndentedString(filterPromotes)).append("\n"); - sb.append(" hide: ").append(toIndentedString(hide)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceHide.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceHide.java deleted file mode 100644 index d20213ce13..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceHide.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Unique identifier of the record to hide. */ -public class ConsequenceHide { - - @JsonProperty("objectID") - private String objectID; - - public ConsequenceHide setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique object identifier. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConsequenceHide consequenceHide = (ConsequenceHide) o; - return Objects.equals(this.objectID, consequenceHide.objectID); - } - - @Override - public int hashCode() { - return Objects.hash(objectID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConsequenceHide {\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceParams.java deleted file mode 100644 index 25ab96d545..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceParams.java +++ /dev/null @@ -1,2005 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ConsequenceParams */ -public class ConsequenceParams { - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - @JsonProperty("query") - private ConsequenceQuery query; - - @JsonProperty("automaticFacetFilters") - private AutomaticFacetFilters automaticFacetFilters; - - @JsonProperty("automaticOptionalFacetFilters") - private AutomaticFacetFilters automaticOptionalFacetFilters; - - public ConsequenceParams setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public ConsequenceParams setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public ConsequenceParams setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public ConsequenceParams setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public ConsequenceParams setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public ConsequenceParams setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public ConsequenceParams setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public ConsequenceParams setFacets(List facets) { - this.facets = facets; - return this; - } - - public ConsequenceParams addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public ConsequenceParams setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public ConsequenceParams setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public ConsequenceParams setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public ConsequenceParams setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public ConsequenceParams setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public ConsequenceParams setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public ConsequenceParams setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public ConsequenceParams setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public ConsequenceParams setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public ConsequenceParams setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public ConsequenceParams setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public ConsequenceParams setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public ConsequenceParams addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public ConsequenceParams setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public ConsequenceParams addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public ConsequenceParams setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public ConsequenceParams addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public ConsequenceParams setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public ConsequenceParams addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public ConsequenceParams setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public ConsequenceParams setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public ConsequenceParams setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public ConsequenceParams setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public ConsequenceParams setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public ConsequenceParams setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public ConsequenceParams addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public ConsequenceParams setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public ConsequenceParams setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public ConsequenceParams setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public ConsequenceParams setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - public ConsequenceParams setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public ConsequenceParams addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public ConsequenceParams setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public ConsequenceParams addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public ConsequenceParams setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public ConsequenceParams addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public ConsequenceParams setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public ConsequenceParams addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public ConsequenceParams setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public ConsequenceParams addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public ConsequenceParams setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public ConsequenceParams setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public ConsequenceParams addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public ConsequenceParams setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public ConsequenceParams addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public ConsequenceParams setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public ConsequenceParams setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public ConsequenceParams setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public ConsequenceParams setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public ConsequenceParams setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public ConsequenceParams setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public ConsequenceParams setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public ConsequenceParams setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public ConsequenceParams setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public ConsequenceParams setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public ConsequenceParams addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public ConsequenceParams setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public ConsequenceParams setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public ConsequenceParams setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public ConsequenceParams setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public ConsequenceParams addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public ConsequenceParams setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public ConsequenceParams setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public ConsequenceParams setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public ConsequenceParams setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public ConsequenceParams setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public ConsequenceParams setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public ConsequenceParams setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public ConsequenceParams setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public ConsequenceParams setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public ConsequenceParams addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public ConsequenceParams setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public ConsequenceParams addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public ConsequenceParams setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public ConsequenceParams setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public ConsequenceParams addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public ConsequenceParams setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public ConsequenceParams addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public ConsequenceParams setExplain(List explain) { - this.explain = explain; - return this; - } - - public ConsequenceParams addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public ConsequenceParams setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public ConsequenceParams setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public ConsequenceParams setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public ConsequenceParams setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public ConsequenceParams setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public ConsequenceParams setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public ConsequenceParams addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public ConsequenceParams setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public ConsequenceParams setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public ConsequenceParams setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - public ConsequenceParams setQuery(ConsequenceQuery query) { - this.query = query; - return this; - } - - /** - * Get query - * - * @return query - */ - @javax.annotation.Nullable - public ConsequenceQuery getQuery() { - return query; - } - - public ConsequenceParams setAutomaticFacetFilters(AutomaticFacetFilters automaticFacetFilters) { - this.automaticFacetFilters = automaticFacetFilters; - return this; - } - - /** - * Get automaticFacetFilters - * - * @return automaticFacetFilters - */ - @javax.annotation.Nullable - public AutomaticFacetFilters getAutomaticFacetFilters() { - return automaticFacetFilters; - } - - public ConsequenceParams setAutomaticOptionalFacetFilters(AutomaticFacetFilters automaticOptionalFacetFilters) { - this.automaticOptionalFacetFilters = automaticOptionalFacetFilters; - return this; - } - - /** - * Get automaticOptionalFacetFilters - * - * @return automaticOptionalFacetFilters - */ - @javax.annotation.Nullable - public AutomaticFacetFilters getAutomaticOptionalFacetFilters() { - return automaticOptionalFacetFilters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConsequenceParams consequenceParams = (ConsequenceParams) o; - return ( - Objects.equals(this.similarQuery, consequenceParams.similarQuery) && - Objects.equals(this.filters, consequenceParams.filters) && - Objects.equals(this.facetFilters, consequenceParams.facetFilters) && - Objects.equals(this.optionalFilters, consequenceParams.optionalFilters) && - Objects.equals(this.numericFilters, consequenceParams.numericFilters) && - Objects.equals(this.tagFilters, consequenceParams.tagFilters) && - Objects.equals(this.sumOrFiltersScores, consequenceParams.sumOrFiltersScores) && - Objects.equals(this.facets, consequenceParams.facets) && - Objects.equals(this.maxValuesPerFacet, consequenceParams.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, consequenceParams.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, consequenceParams.sortFacetValuesBy) && - Objects.equals(this.page, consequenceParams.page) && - Objects.equals(this.offset, consequenceParams.offset) && - Objects.equals(this.length, consequenceParams.length) && - Objects.equals(this.aroundLatLng, consequenceParams.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, consequenceParams.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, consequenceParams.aroundRadius) && - Objects.equals(this.aroundPrecision, consequenceParams.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, consequenceParams.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, consequenceParams.insideBoundingBox) && - Objects.equals(this.insidePolygon, consequenceParams.insidePolygon) && - Objects.equals(this.naturalLanguages, consequenceParams.naturalLanguages) && - Objects.equals(this.ruleContexts, consequenceParams.ruleContexts) && - Objects.equals(this.personalizationImpact, consequenceParams.personalizationImpact) && - Objects.equals(this.userToken, consequenceParams.userToken) && - Objects.equals(this.getRankingInfo, consequenceParams.getRankingInfo) && - Objects.equals(this.clickAnalytics, consequenceParams.clickAnalytics) && - Objects.equals(this.analytics, consequenceParams.analytics) && - Objects.equals(this.analyticsTags, consequenceParams.analyticsTags) && - Objects.equals(this.percentileComputation, consequenceParams.percentileComputation) && - Objects.equals(this.enableABTest, consequenceParams.enableABTest) && - Objects.equals(this.enableReRanking, consequenceParams.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, consequenceParams.reRankingApplyFilter) && - Objects.equals(this.attributesForFaceting, consequenceParams.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, consequenceParams.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, consequenceParams.restrictSearchableAttributes) && - Objects.equals(this.ranking, consequenceParams.ranking) && - Objects.equals(this.customRanking, consequenceParams.customRanking) && - Objects.equals(this.relevancyStrictness, consequenceParams.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, consequenceParams.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, consequenceParams.attributesToSnippet) && - Objects.equals(this.highlightPreTag, consequenceParams.highlightPreTag) && - Objects.equals(this.highlightPostTag, consequenceParams.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, consequenceParams.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, consequenceParams.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, consequenceParams.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, consequenceParams.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, consequenceParams.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, consequenceParams.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, consequenceParams.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, consequenceParams.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, consequenceParams.ignorePlurals) && - Objects.equals(this.removeStopWords, consequenceParams.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, consequenceParams.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, consequenceParams.queryLanguages) && - Objects.equals(this.decompoundQuery, consequenceParams.decompoundQuery) && - Objects.equals(this.enableRules, consequenceParams.enableRules) && - Objects.equals(this.enablePersonalization, consequenceParams.enablePersonalization) && - Objects.equals(this.queryType, consequenceParams.queryType) && - Objects.equals(this.removeWordsIfNoResults, consequenceParams.removeWordsIfNoResults) && - Objects.equals(this.mode, consequenceParams.mode) && - Objects.equals(this.semanticSearch, consequenceParams.semanticSearch) && - Objects.equals(this.advancedSyntax, consequenceParams.advancedSyntax) && - Objects.equals(this.optionalWords, consequenceParams.optionalWords) && - Objects.equals(this.disableExactOnAttributes, consequenceParams.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, consequenceParams.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, consequenceParams.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, consequenceParams.advancedSyntaxFeatures) && - Objects.equals(this.explain, consequenceParams.explain) && - Objects.equals(this.distinct, consequenceParams.distinct) && - Objects.equals(this.attributeForDistinct, consequenceParams.attributeForDistinct) && - Objects.equals(this.synonyms, consequenceParams.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, consequenceParams.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, consequenceParams.minProximity) && - Objects.equals(this.responseFields, consequenceParams.responseFields) && - Objects.equals(this.maxFacetHits, consequenceParams.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, consequenceParams.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, consequenceParams.renderingContent) && - Objects.equals(this.query, consequenceParams.query) && - Objects.equals(this.automaticFacetFilters, consequenceParams.automaticFacetFilters) && - Objects.equals(this.automaticOptionalFacetFilters, consequenceParams.automaticOptionalFacetFilters) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter, - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent, - query, - automaticFacetFilters, - automaticOptionalFacetFilters - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConsequenceParams {\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" automaticFacetFilters: ").append(toIndentedString(automaticFacetFilters)).append("\n"); - sb.append(" automaticOptionalFacetFilters: ").append(toIndentedString(automaticOptionalFacetFilters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceQuery.java deleted file mode 100644 index c9e2f8ad96..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceQuery.java +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** - * When providing a string, it replaces the entire query string. When providing an object, it - * describes incremental edits to be made to the query string (but you can't do both). - */ -@JsonDeserialize(using = ConsequenceQuery.ConsequenceQueryDeserializer.class) -@JsonSerialize(using = ConsequenceQuery.ConsequenceQuerySerializer.class) -public abstract class ConsequenceQuery implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(ConsequenceQuery.class.getName()); - - public static ConsequenceQuery of(ConsequenceQueryObject inside) { - return new ConsequenceQueryConsequenceQueryObject(inside); - } - - public static ConsequenceQuery of(String inside) { - return new ConsequenceQueryString(inside); - } - - public static class ConsequenceQuerySerializer extends StdSerializer { - - public ConsequenceQuerySerializer(Class t) { - super(t); - } - - public ConsequenceQuerySerializer() { - this(null); - } - - @Override - public void serialize(ConsequenceQuery value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class ConsequenceQueryDeserializer extends StdDeserializer { - - public ConsequenceQueryDeserializer() { - this(ConsequenceQuery.class); - } - - public ConsequenceQueryDeserializer(Class vc) { - super(vc); - } - - @Override - public ConsequenceQuery deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize ConsequenceQueryObject - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - ConsequenceQueryObject value = parser.readValueAs(new TypeReference() {}); - return ConsequenceQuery.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf ConsequenceQueryObject (error: " + e.getMessage() + ") (type: ConsequenceQueryObject)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return ConsequenceQuery.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public ConsequenceQuery getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "ConsequenceQuery cannot be null"); - } - } -} - -class ConsequenceQueryConsequenceQueryObject extends ConsequenceQuery { - - private final ConsequenceQueryObject insideValue; - - ConsequenceQueryConsequenceQueryObject(ConsequenceQueryObject insideValue) { - this.insideValue = insideValue; - } - - @Override - public ConsequenceQueryObject getInsideValue() { - return insideValue; - } -} - -class ConsequenceQueryString extends ConsequenceQuery { - - private final String insideValue; - - ConsequenceQueryString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceQueryObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceQueryObject.java deleted file mode 100644 index 1bd8bc6601..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ConsequenceQueryObject.java +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ConsequenceQueryObject */ -public class ConsequenceQueryObject { - - @JsonProperty("remove") - private List remove; - - @JsonProperty("edits") - private List edits; - - public ConsequenceQueryObject setRemove(List remove) { - this.remove = remove; - return this; - } - - public ConsequenceQueryObject addRemove(String removeItem) { - if (this.remove == null) { - this.remove = new ArrayList<>(); - } - this.remove.add(removeItem); - return this; - } - - /** - * Words to remove. - * - * @return remove - */ - @javax.annotation.Nullable - public List getRemove() { - return remove; - } - - public ConsequenceQueryObject setEdits(List edits) { - this.edits = edits; - return this; - } - - public ConsequenceQueryObject addEdits(Edit editsItem) { - if (this.edits == null) { - this.edits = new ArrayList<>(); - } - this.edits.add(editsItem); - return this; - } - - /** - * Edits to apply. - * - * @return edits - */ - @javax.annotation.Nullable - public List getEdits() { - return edits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConsequenceQueryObject consequenceQueryObject = (ConsequenceQueryObject) o; - return Objects.equals(this.remove, consequenceQueryObject.remove) && Objects.equals(this.edits, consequenceQueryObject.edits); - } - - @Override - public int hashCode() { - return Objects.hash(remove, edits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConsequenceQueryObject {\n"); - sb.append(" remove: ").append(toIndentedString(remove)).append("\n"); - sb.append(" edits: ").append(toIndentedString(edits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/CreatedAtResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/CreatedAtResponse.java deleted file mode 100644 index b532c29102..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/CreatedAtResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Response and creation timestamp. */ -public class CreatedAtResponse { - - @JsonProperty("createdAt") - private String createdAt; - - public CreatedAtResponse setCreatedAt(String createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Timestamp of creation in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return createdAt - */ - @javax.annotation.Nonnull - public String getCreatedAt() { - return createdAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreatedAtResponse createdAtResponse = (CreatedAtResponse) o; - return Objects.equals(this.createdAt, createdAtResponse.createdAt); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreatedAtResponse {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Cursor.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Cursor.java deleted file mode 100644 index 4515d75a72..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Cursor.java +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Cursor */ -public class Cursor { - - @JsonProperty("cursor") - private String cursor; - - public Cursor setCursor(String cursor) { - this.cursor = cursor; - return this; - } - - /** - * Cursor indicating the location to resume browsing from. Must match the value returned by the - * previous call. Pass this value to the subsequent browse call to get the next page of results. - * When the end of the index has been reached, `cursor` is absent from the response. - * - * @return cursor - */ - @javax.annotation.Nullable - public String getCursor() { - return cursor; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cursor cursor = (Cursor) o; - return Objects.equals(this.cursor, cursor.cursor); - } - - @Override - public int hashCode() { - return Objects.hash(cursor); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cursor {\n"); - sb.append(" cursor: ").append(toIndentedString(cursor)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteApiKeyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteApiKeyResponse.java deleted file mode 100644 index d5cd70d353..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteApiKeyResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** DeleteApiKeyResponse */ -public class DeleteApiKeyResponse { - - @JsonProperty("deletedAt") - private String deletedAt; - - public DeleteApiKeyResponse setDeletedAt(String deletedAt) { - this.deletedAt = deletedAt; - return this; - } - - /** - * Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return deletedAt - */ - @javax.annotation.Nonnull - public String getDeletedAt() { - return deletedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteApiKeyResponse deleteApiKeyResponse = (DeleteApiKeyResponse) o; - return Objects.equals(this.deletedAt, deleteApiKeyResponse.deletedAt); - } - - @Override - public int hashCode() { - return Objects.hash(deletedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteApiKeyResponse {\n"); - sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteByParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteByParams.java deleted file mode 100644 index 9e789562b1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteByParams.java +++ /dev/null @@ -1,232 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** DeleteByParams */ -public class DeleteByParams { - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - public DeleteByParams setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public DeleteByParams setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public DeleteByParams setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public DeleteByParams setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public DeleteByParams setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public DeleteByParams setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public DeleteByParams setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public DeleteByParams addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public DeleteByParams setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public DeleteByParams addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteByParams deleteByParams = (DeleteByParams) o; - return ( - Objects.equals(this.facetFilters, deleteByParams.facetFilters) && - Objects.equals(this.filters, deleteByParams.filters) && - Objects.equals(this.numericFilters, deleteByParams.numericFilters) && - Objects.equals(this.tagFilters, deleteByParams.tagFilters) && - Objects.equals(this.aroundLatLng, deleteByParams.aroundLatLng) && - Objects.equals(this.aroundRadius, deleteByParams.aroundRadius) && - Objects.equals(this.insideBoundingBox, deleteByParams.insideBoundingBox) && - Objects.equals(this.insidePolygon, deleteByParams.insidePolygon) - ); - } - - @Override - public int hashCode() { - return Objects.hash(facetFilters, filters, numericFilters, tagFilters, aroundLatLng, aroundRadius, insideBoundingBox, insidePolygon); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteByParams {\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteSourceResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteSourceResponse.java deleted file mode 100644 index 85bf55edf2..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeleteSourceResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** DeleteSourceResponse */ -public class DeleteSourceResponse { - - @JsonProperty("deletedAt") - private String deletedAt; - - public DeleteSourceResponse setDeletedAt(String deletedAt) { - this.deletedAt = deletedAt; - return this; - } - - /** - * Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return deletedAt - */ - @javax.annotation.Nonnull - public String getDeletedAt() { - return deletedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteSourceResponse deleteSourceResponse = (DeleteSourceResponse) o; - return Objects.equals(this.deletedAt, deleteSourceResponse.deletedAt); - } - - @Override - public int hashCode() { - return Objects.hash(deletedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteSourceResponse {\n"); - sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeletedAtResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeletedAtResponse.java deleted file mode 100644 index 4ea39f43ad..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DeletedAtResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Response, taskID, and deletion timestamp. */ -public class DeletedAtResponse { - - @JsonProperty("taskID") - private Long taskID; - - @JsonProperty("deletedAt") - private String deletedAt; - - public DeletedAtResponse setTaskID(Long taskID) { - this.taskID = taskID; - return this; - } - - /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. - * - * @return taskID - */ - @javax.annotation.Nonnull - public Long getTaskID() { - return taskID; - } - - public DeletedAtResponse setDeletedAt(String deletedAt) { - this.deletedAt = deletedAt; - return this; - } - - /** - * Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return deletedAt - */ - @javax.annotation.Nonnull - public String getDeletedAt() { - return deletedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeletedAtResponse deletedAtResponse = (DeletedAtResponse) o; - return Objects.equals(this.taskID, deletedAtResponse.taskID) && Objects.equals(this.deletedAt, deletedAtResponse.deletedAt); - } - - @Override - public int hashCode() { - return Objects.hash(taskID, deletedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeletedAtResponse {\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).append("\n"); - sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryAction.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryAction.java deleted file mode 100644 index 8c6fbd4a25..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryAction.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Actions to perform. */ -public enum DictionaryAction { - ADD_ENTRY("addEntry"), - - DELETE_ENTRY("deleteEntry"); - - private final String value; - - DictionaryAction(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static DictionaryAction fromValue(String value) { - for (DictionaryAction b : DictionaryAction.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryEntry.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryEntry.java deleted file mode 100644 index b4a250a491..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryEntry.java +++ /dev/null @@ -1,213 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Dictionary entry. */ -public class DictionaryEntry { - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("language") - private String language; - - @JsonProperty("word") - private String word; - - @JsonProperty("words") - private List words; - - @JsonProperty("decomposition") - private List decomposition; - - @JsonProperty("state") - private DictionaryEntryState state; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public DictionaryEntry setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public DictionaryEntry setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique identifier for a dictionary object. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public DictionaryEntry setLanguage(String language) { - this.language = language; - return this; - } - - /** - * [Supported language ISO - * code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). - * - * @return language - */ - @javax.annotation.Nonnull - public String getLanguage() { - return language; - } - - public DictionaryEntry setWord(String word) { - this.word = word; - return this; - } - - /** - * Dictionary entry word. Usage depends on the type of dictionary entry. **`stopwordEntry`** The - * stop word you want to add or update. If the entry already exists in Algolia's standard - * dictionary, you can override its behavior by adding it to the custom dictionary and setting its - * `state` to `disabled`. **`compoundEntry`** When `decomposition` is empty: adds `word` as a - * compound atom. For example, atom “kino” decomposes the query “kopfkino” into \"kopf\" and - * \"kino\". When `decomposition` isn't empty: creates a decomposition exception. For example, - * when decomposition is set to the [\"hund\", \"hutte\"] exception, \"hundehutte\" decomposes - * into “hund” and “hutte”, discarding the linking \"e\". - * - * @return word - */ - @javax.annotation.Nullable - public String getWord() { - return word; - } - - public DictionaryEntry setWords(List words) { - this.words = words; - return this; - } - - public DictionaryEntry addWords(String wordsItem) { - if (this.words == null) { - this.words = new ArrayList<>(); - } - this.words.add(wordsItem); - return this; - } - - /** - * Compound dictionary [word - * declensions](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/). - * If the entry already exists in Algolia's standard dictionary, you can override its behavior by - * adding it to the custom dictionary and setting its `state` to `disabled`. - * - * @return words - */ - @javax.annotation.Nullable - public List getWords() { - return words; - } - - public DictionaryEntry setDecomposition(List decomposition) { - this.decomposition = decomposition; - return this; - } - - public DictionaryEntry addDecomposition(String decompositionItem) { - if (this.decomposition == null) { - this.decomposition = new ArrayList<>(); - } - this.decomposition.add(decompositionItem); - return this; - } - - /** - * For compound entries, governs the behavior of the `word` parameter. - * - * @return decomposition - */ - @javax.annotation.Nullable - public List getDecomposition() { - return decomposition; - } - - public DictionaryEntry setState(DictionaryEntryState state) { - this.state = state; - return this; - } - - /** - * Get state - * - * @return state - */ - @javax.annotation.Nullable - public DictionaryEntryState getState() { - return state; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DictionaryEntry dictionaryEntry = (DictionaryEntry) o; - return ( - Objects.equals(this.objectID, dictionaryEntry.objectID) && - Objects.equals(this.language, dictionaryEntry.language) && - Objects.equals(this.word, dictionaryEntry.word) && - Objects.equals(this.words, dictionaryEntry.words) && - Objects.equals(this.decomposition, dictionaryEntry.decomposition) && - Objects.equals(this.state, dictionaryEntry.state) && - super.equals(o) - ); - } - - @Override - public int hashCode() { - return Objects.hash(objectID, language, word, words, decomposition, state, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DictionaryEntry {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" language: ").append(toIndentedString(language)).append("\n"); - sb.append(" word: ").append(toIndentedString(word)).append("\n"); - sb.append(" words: ").append(toIndentedString(words)).append("\n"); - sb.append(" decomposition: ").append(toIndentedString(decomposition)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryEntryState.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryEntryState.java deleted file mode 100644 index 31149cf405..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryEntryState.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Indicates whether a dictionary entry is active (`enabled`) or inactive (`disabled`). */ -public enum DictionaryEntryState { - ENABLED("enabled"), - - DISABLED("disabled"); - - private final String value; - - DictionaryEntryState(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static DictionaryEntryState fromValue(String value) { - for (DictionaryEntryState b : DictionaryEntryState.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryLanguage.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryLanguage.java deleted file mode 100644 index 69fa913d8a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Custom entries for a dictionary. */ -public class DictionaryLanguage { - - @JsonProperty("nbCustomEntries") - private Integer nbCustomEntries; - - public DictionaryLanguage setNbCustomEntries(Integer nbCustomEntries) { - this.nbCustomEntries = nbCustomEntries; - return this; - } - - /** - * If `0`, the dictionary hasn't been customized and only contains standard entries provided by - * Algolia. If `null`, that feature isn't available or isn't supported for that language. - * - * @return nbCustomEntries - */ - @javax.annotation.Nullable - public Integer getNbCustomEntries() { - return nbCustomEntries; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DictionaryLanguage dictionaryLanguage = (DictionaryLanguage) o; - return Objects.equals(this.nbCustomEntries, dictionaryLanguage.nbCustomEntries); - } - - @Override - public int hashCode() { - return Objects.hash(nbCustomEntries); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DictionaryLanguage {\n"); - sb.append(" nbCustomEntries: ").append(toIndentedString(nbCustomEntries)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionarySettingsParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionarySettingsParams.java deleted file mode 100644 index 21e75c7094..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionarySettingsParams.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Enable or turn off the built-in Algolia stop words for a specific language. */ -public class DictionarySettingsParams { - - @JsonProperty("disableStandardEntries") - private StandardEntries disableStandardEntries; - - public DictionarySettingsParams setDisableStandardEntries(StandardEntries disableStandardEntries) { - this.disableStandardEntries = disableStandardEntries; - return this; - } - - /** - * Get disableStandardEntries - * - * @return disableStandardEntries - */ - @javax.annotation.Nonnull - public StandardEntries getDisableStandardEntries() { - return disableStandardEntries; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DictionarySettingsParams dictionarySettingsParams = (DictionarySettingsParams) o; - return Objects.equals(this.disableStandardEntries, dictionarySettingsParams.disableStandardEntries); - } - - @Override - public int hashCode() { - return Objects.hash(disableStandardEntries); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DictionarySettingsParams {\n"); - sb.append(" disableStandardEntries: ").append(toIndentedString(disableStandardEntries)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryType.java deleted file mode 100644 index a49f2cc7d7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/DictionaryType.java +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets dictionaryType */ -public enum DictionaryType { - PLURALS("plurals"), - - STOPWORDS("stopwords"), - - COMPOUNDS("compounds"); - - private final String value; - - DictionaryType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static DictionaryType fromValue(String value) { - for (DictionaryType b : DictionaryType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Distinct.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Distinct.java deleted file mode 100644 index aea17c1b41..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Distinct.java +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** - * Enables [deduplication or grouping of results (Algolia's _distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)). - */ -@JsonDeserialize(using = Distinct.DistinctDeserializer.class) -@JsonSerialize(using = Distinct.DistinctSerializer.class) -public abstract class Distinct implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(Distinct.class.getName()); - - public static Distinct of(Boolean inside) { - return new DistinctBoolean(inside); - } - - public static Distinct of(Integer inside) { - return new DistinctInteger(inside); - } - - public static class DistinctSerializer extends StdSerializer { - - public DistinctSerializer(Class t) { - super(t); - } - - public DistinctSerializer() { - this(null); - } - - @Override - public void serialize(Distinct value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class DistinctDeserializer extends StdDeserializer { - - public DistinctDeserializer() { - this(Distinct.class); - } - - public DistinctDeserializer(Class vc) { - super(vc); - } - - @Override - public Distinct deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize Boolean - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Boolean value = parser.readValueAs(new TypeReference() {}); - return Distinct.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Boolean (error: " + e.getMessage() + ") (type: Boolean)"); - } - } - - // deserialize Integer - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Integer value = parser.readValueAs(new TypeReference() {}); - return Distinct.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Integer (error: " + e.getMessage() + ") (type: Integer)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public Distinct getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "Distinct cannot be null"); - } - } -} - -class DistinctBoolean extends Distinct { - - private final Boolean insideValue; - - DistinctBoolean(Boolean insideValue) { - this.insideValue = insideValue; - } - - @Override - public Boolean getInsideValue() { - return insideValue; - } -} - -class DistinctInteger extends Distinct { - - private final Integer insideValue; - - DistinctInteger(Integer insideValue) { - this.insideValue = insideValue; - } - - @Override - public Integer getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Edit.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Edit.java deleted file mode 100644 index e94dd5f705..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Edit.java +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Edit */ -public class Edit { - - @JsonProperty("type") - private EditType type; - - @JsonProperty("delete") - private String delete; - - @JsonProperty("insert") - private String insert; - - public Edit setType(EditType type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nullable - public EditType getType() { - return type; - } - - public Edit setDelete(String delete) { - this.delete = delete; - return this; - } - - /** - * Text or patterns to remove from the query string. - * - * @return delete - */ - @javax.annotation.Nullable - public String getDelete() { - return delete; - } - - public Edit setInsert(String insert) { - this.insert = insert; - return this; - } - - /** - * Text that should be inserted in place of the removed text inside the query string. - * - * @return insert - */ - @javax.annotation.Nullable - public String getInsert() { - return insert; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Edit edit = (Edit) o; - return Objects.equals(this.type, edit.type) && Objects.equals(this.delete, edit.delete) && Objects.equals(this.insert, edit.insert); - } - - @Override - public int hashCode() { - return Objects.hash(type, delete, insert); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Edit {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" delete: ").append(toIndentedString(delete)).append("\n"); - sb.append(" insert: ").append(toIndentedString(insert)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/EditType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/EditType.java deleted file mode 100644 index 354a311cf6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/EditType.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Type of edit. */ -public enum EditType { - REMOVE("remove"), - - REPLACE("replace"); - - private final String value; - - EditType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EditType fromValue(String value) { - for (EditType b : EditType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ErrorBase.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ErrorBase.java deleted file mode 100644 index 8d2d81c841..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ErrorBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Error. */ -public class ErrorBase { - - @JsonProperty("message") - private String message; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public ErrorBase setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public ErrorBase setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get message - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorBase errorBase = (ErrorBase) o; - return Objects.equals(this.message, errorBase.message) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(message, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorBase {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ExactOnSingleWordQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ExactOnSingleWordQuery.java deleted file mode 100644 index 456078208d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ExactOnSingleWordQuery.java +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Determines how the [Exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) - * is computed when the query contains only one word. - */ -public enum ExactOnSingleWordQuery { - ATTRIBUTE("attribute"), - - NONE("none"), - - WORD("word"); - - private final String value; - - ExactOnSingleWordQuery(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ExactOnSingleWordQuery fromValue(String value) { - for (ExactOnSingleWordQuery b : ExactOnSingleWordQuery.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetFilters.java deleted file mode 100644 index cbb9bd2f6f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetFilters.java +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * [Filter hits by facet - * value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/). - */ -@JsonDeserialize(using = FacetFilters.FacetFiltersDeserializer.class) -@JsonSerialize(using = FacetFilters.FacetFiltersSerializer.class) -public abstract class FacetFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(FacetFilters.class.getName()); - - public static FacetFilters of(List inside) { - return new FacetFiltersListOfMixedSearchFilters(inside); - } - - public static FacetFilters of(String inside) { - return new FacetFiltersString(inside); - } - - public static class FacetFiltersSerializer extends StdSerializer { - - public FacetFiltersSerializer(Class t) { - super(t); - } - - public FacetFiltersSerializer() { - this(null); - } - - @Override - public void serialize(FacetFilters value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class FacetFiltersDeserializer extends StdDeserializer { - - public FacetFiltersDeserializer() { - this(FacetFilters.class); - } - - public FacetFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public FacetFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return FacetFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return FacetFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public FacetFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "FacetFilters cannot be null"); - } - } -} - -class FacetFiltersListOfMixedSearchFilters extends FacetFilters { - - private final List insideValue; - - FacetFiltersListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class FacetFiltersString extends FacetFilters { - - private final String insideValue; - - FacetFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetHits.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetHits.java deleted file mode 100644 index fdea744a65..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetHits.java +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** FacetHits */ -public class FacetHits { - - @JsonProperty("value") - private String value; - - @JsonProperty("highlighted") - private String highlighted; - - @JsonProperty("count") - private Integer count; - - public FacetHits setValue(String value) { - this.value = value; - return this; - } - - /** - * Facet value. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public FacetHits setHighlighted(String highlighted) { - this.highlighted = highlighted; - return this; - } - - /** - * Markup text with `facetQuery` matches highlighted. - * - * @return highlighted - */ - @javax.annotation.Nonnull - public String getHighlighted() { - return highlighted; - } - - public FacetHits setCount(Integer count) { - this.count = count; - return this; - } - - /** - * Number of records containing this facet value. This takes into account the extra search - * parameters specified in the query. Like for a regular search query, the [counts may not be - * exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). - * - * @return count - */ - @javax.annotation.Nonnull - public Integer getCount() { - return count; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FacetHits facetHits = (FacetHits) o; - return ( - Objects.equals(this.value, facetHits.value) && - Objects.equals(this.highlighted, facetHits.highlighted) && - Objects.equals(this.count, facetHits.count) - ); - } - - @Override - public int hashCode() { - return Objects.hash(value, highlighted, count); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FacetHits {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" highlighted: ").append(toIndentedString(highlighted)).append("\n"); - sb.append(" count: ").append(toIndentedString(count)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetOrdering.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetOrdering.java deleted file mode 100644 index e422257868..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetOrdering.java +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Defines the ordering of facets (widgets). */ -public class FacetOrdering { - - @JsonProperty("facets") - private Facets facets; - - @JsonProperty("values") - private Map values; - - public FacetOrdering setFacets(Facets facets) { - this.facets = facets; - return this; - } - - /** - * Get facets - * - * @return facets - */ - @javax.annotation.Nullable - public Facets getFacets() { - return facets; - } - - public FacetOrdering setValues(Map values) { - this.values = values; - return this; - } - - public FacetOrdering putValues(String key, Value valuesItem) { - if (this.values == null) { - this.values = new HashMap<>(); - } - this.values.put(key, valuesItem); - return this; - } - - /** - * Ordering of facet values within an individual facet. - * - * @return values - */ - @javax.annotation.Nullable - public Map getValues() { - return values; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FacetOrdering facetOrdering = (FacetOrdering) o; - return Objects.equals(this.facets, facetOrdering.facets) && Objects.equals(this.values, facetOrdering.values); - } - - @Override - public int hashCode() { - return Objects.hash(facets, values); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FacetOrdering {\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Facets.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Facets.java deleted file mode 100644 index b31f0aeb30..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Facets.java +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Ordering of facets (widgets). */ -public class Facets { - - @JsonProperty("order") - private List order; - - public Facets setOrder(List order) { - this.order = order; - return this; - } - - public Facets addOrder(String orderItem) { - if (this.order == null) { - this.order = new ArrayList<>(); - } - this.order.add(orderItem); - return this; - } - - /** - * Pinned order of facet lists. - * - * @return order - */ - @javax.annotation.Nullable - public List getOrder() { - return order; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Facets facets = (Facets) o; - return Objects.equals(this.order, facets.order); - } - - @Override - public int hashCode() { - return Objects.hash(order); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Facets {\n"); - sb.append(" order: ").append(toIndentedString(order)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetsStats.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetsStats.java deleted file mode 100644 index 0198b6dae0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FacetsStats.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** FacetsStats */ -public class FacetsStats { - - @JsonProperty("min") - private Double min; - - @JsonProperty("max") - private Double max; - - @JsonProperty("avg") - private Double avg; - - @JsonProperty("sum") - private Double sum; - - public FacetsStats setMin(Double min) { - this.min = min; - return this; - } - - /** - * Minimum value in the results. - * - * @return min - */ - @javax.annotation.Nullable - public Double getMin() { - return min; - } - - public FacetsStats setMax(Double max) { - this.max = max; - return this; - } - - /** - * Maximum value in the results. - * - * @return max - */ - @javax.annotation.Nullable - public Double getMax() { - return max; - } - - public FacetsStats setAvg(Double avg) { - this.avg = avg; - return this; - } - - /** - * Average facet value in the results. - * - * @return avg - */ - @javax.annotation.Nullable - public Double getAvg() { - return avg; - } - - public FacetsStats setSum(Double sum) { - this.sum = sum; - return this; - } - - /** - * Sum of all values in the results. - * - * @return sum - */ - @javax.annotation.Nullable - public Double getSum() { - return sum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FacetsStats facetsStats = (FacetsStats) o; - return ( - Objects.equals(this.min, facetsStats.min) && - Objects.equals(this.max, facetsStats.max) && - Objects.equals(this.avg, facetsStats.avg) && - Objects.equals(this.sum, facetsStats.sum) - ); - } - - @Override - public int hashCode() { - return Objects.hash(min, max, avg, sum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FacetsStats {\n"); - sb.append(" min: ").append(toIndentedString(min)).append("\n"); - sb.append(" max: ").append(toIndentedString(max)).append("\n"); - sb.append(" avg: ").append(toIndentedString(avg)).append("\n"); - sb.append(" sum: ").append(toIndentedString(sum)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FetchedIndex.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FetchedIndex.java deleted file mode 100644 index 26ff7f0bfb..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/FetchedIndex.java +++ /dev/null @@ -1,291 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** FetchedIndex */ -public class FetchedIndex { - - @JsonProperty("name") - private String name; - - @JsonProperty("createdAt") - private String createdAt; - - @JsonProperty("updatedAt") - private String updatedAt; - - @JsonProperty("entries") - private Integer entries; - - @JsonProperty("dataSize") - private Integer dataSize; - - @JsonProperty("fileSize") - private Integer fileSize; - - @JsonProperty("lastBuildTimeS") - private Integer lastBuildTimeS; - - @JsonProperty("numberOfPendingTasks") - private Integer numberOfPendingTasks; - - @JsonProperty("pendingTask") - private Boolean pendingTask; - - @JsonProperty("primary") - private String primary; - - @JsonProperty("replicas") - private List replicas; - - public FetchedIndex setName(String name) { - this.name = name; - return this; - } - - /** - * Index name. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public FetchedIndex setCreatedAt(String createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Index creation date. An empty string means that the index has no records. - * - * @return createdAt - */ - @javax.annotation.Nonnull - public String getCreatedAt() { - return createdAt; - } - - public FetchedIndex setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - public FetchedIndex setEntries(Integer entries) { - this.entries = entries; - return this; - } - - /** - * Number of records contained in the index. - * - * @return entries - */ - @javax.annotation.Nonnull - public Integer getEntries() { - return entries; - } - - public FetchedIndex setDataSize(Integer dataSize) { - this.dataSize = dataSize; - return this; - } - - /** - * Number of bytes of the index in minified format. - * - * @return dataSize - */ - @javax.annotation.Nonnull - public Integer getDataSize() { - return dataSize; - } - - public FetchedIndex setFileSize(Integer fileSize) { - this.fileSize = fileSize; - return this; - } - - /** - * Number of bytes of the index binary file. - * - * @return fileSize - */ - @javax.annotation.Nonnull - public Integer getFileSize() { - return fileSize; - } - - public FetchedIndex setLastBuildTimeS(Integer lastBuildTimeS) { - this.lastBuildTimeS = lastBuildTimeS; - return this; - } - - /** - * Last build time. - * - * @return lastBuildTimeS - */ - @javax.annotation.Nonnull - public Integer getLastBuildTimeS() { - return lastBuildTimeS; - } - - public FetchedIndex setNumberOfPendingTasks(Integer numberOfPendingTasks) { - this.numberOfPendingTasks = numberOfPendingTasks; - return this; - } - - /** - * Number of pending indexing operations. This value is deprecated and should not be used. - * - * @return numberOfPendingTasks - */ - @javax.annotation.Nonnull - public Integer getNumberOfPendingTasks() { - return numberOfPendingTasks; - } - - public FetchedIndex setPendingTask(Boolean pendingTask) { - this.pendingTask = pendingTask; - return this; - } - - /** - * A boolean which says whether the index has pending tasks. This value is deprecated and should - * not be used. - * - * @return pendingTask - */ - @javax.annotation.Nonnull - public Boolean getPendingTask() { - return pendingTask; - } - - public FetchedIndex setPrimary(String primary) { - this.primary = primary; - return this; - } - - /** - * Only present if the index is a replica. Contains the name of the related primary index. - * - * @return primary - */ - @javax.annotation.Nullable - public String getPrimary() { - return primary; - } - - public FetchedIndex setReplicas(List replicas) { - this.replicas = replicas; - return this; - } - - public FetchedIndex addReplicas(String replicasItem) { - if (this.replicas == null) { - this.replicas = new ArrayList<>(); - } - this.replicas.add(replicasItem); - return this; - } - - /** - * Only present if the index is a primary index with replicas. Contains the names of all linked - * replicas. - * - * @return replicas - */ - @javax.annotation.Nullable - public List getReplicas() { - return replicas; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchedIndex fetchedIndex = (FetchedIndex) o; - return ( - Objects.equals(this.name, fetchedIndex.name) && - Objects.equals(this.createdAt, fetchedIndex.createdAt) && - Objects.equals(this.updatedAt, fetchedIndex.updatedAt) && - Objects.equals(this.entries, fetchedIndex.entries) && - Objects.equals(this.dataSize, fetchedIndex.dataSize) && - Objects.equals(this.fileSize, fetchedIndex.fileSize) && - Objects.equals(this.lastBuildTimeS, fetchedIndex.lastBuildTimeS) && - Objects.equals(this.numberOfPendingTasks, fetchedIndex.numberOfPendingTasks) && - Objects.equals(this.pendingTask, fetchedIndex.pendingTask) && - Objects.equals(this.primary, fetchedIndex.primary) && - Objects.equals(this.replicas, fetchedIndex.replicas) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - name, - createdAt, - updatedAt, - entries, - dataSize, - fileSize, - lastBuildTimeS, - numberOfPendingTasks, - pendingTask, - primary, - replicas - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FetchedIndex {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" entries: ").append(toIndentedString(entries)).append("\n"); - sb.append(" dataSize: ").append(toIndentedString(dataSize)).append("\n"); - sb.append(" fileSize: ").append(toIndentedString(fileSize)).append("\n"); - sb.append(" lastBuildTimeS: ").append(toIndentedString(lastBuildTimeS)).append("\n"); - sb.append(" numberOfPendingTasks: ").append(toIndentedString(numberOfPendingTasks)).append("\n"); - sb.append(" pendingTask: ").append(toIndentedString(pendingTask)).append("\n"); - sb.append(" primary: ").append(toIndentedString(primary)).append("\n"); - sb.append(" replicas: ").append(toIndentedString(replicas)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetApiKeyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetApiKeyResponse.java deleted file mode 100644 index f90038b9fd..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetApiKeyResponse.java +++ /dev/null @@ -1,305 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetApiKeyResponse */ -public class GetApiKeyResponse { - - @JsonProperty("value") - private String value; - - @JsonProperty("createdAt") - private Long createdAt; - - @JsonProperty("acl") - private List acl = null; - - @JsonProperty("description") - private String description; - - @JsonProperty("indexes") - private List indexes; - - @JsonProperty("maxHitsPerQuery") - private Integer maxHitsPerQuery; - - @JsonProperty("maxQueriesPerIPPerHour") - private Integer maxQueriesPerIPPerHour; - - @JsonProperty("queryParameters") - private String queryParameters; - - @JsonProperty("referers") - private List referers; - - @JsonProperty("validity") - private Integer validity; - - public GetApiKeyResponse setValue(String value) { - this.value = value; - return this; - } - - /** - * API key. - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public GetApiKeyResponse setCreatedAt(Long createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Timestamp of creation in milliseconds in [Unix epoch - * time](https://wikipedia.org/wiki/Unix_time). - * - * @return createdAt - */ - @javax.annotation.Nonnull - public Long getCreatedAt() { - return createdAt; - } - - public GetApiKeyResponse setAcl(List acl) { - this.acl = acl; - return this; - } - - public GetApiKeyResponse addAcl(Acl aclItem) { - this.acl.add(aclItem); - return this; - } - - /** - * [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) - * associated with the key. - * - * @return acl - */ - @javax.annotation.Nonnull - public List getAcl() { - return acl; - } - - public GetApiKeyResponse setDescription(String description) { - this.description = description; - return this; - } - - /** - * Description of an API key for you and your team members. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public GetApiKeyResponse setIndexes(List indexes) { - this.indexes = indexes; - return this; - } - - public GetApiKeyResponse addIndexes(String indexesItem) { - if (this.indexes == null) { - this.indexes = new ArrayList<>(); - } - this.indexes.add(indexesItem); - return this; - } - - /** - * Restricts this API key to a list of indices or index patterns. If the list is empty, all - * indices are allowed. Specify either an exact index name or a pattern with a leading or trailing - * wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - * - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices - * containing \"_products_\". - * - * @return indexes - */ - @javax.annotation.Nullable - public List getIndexes() { - return indexes; - } - - public GetApiKeyResponse setMaxHitsPerQuery(Integer maxHitsPerQuery) { - this.maxHitsPerQuery = maxHitsPerQuery; - return this; - } - - /** - * Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > - * **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire - * content by massively querying the index. - * - * @return maxHitsPerQuery - */ - @javax.annotation.Nullable - public Integer getMaxHitsPerQuery() { - return maxHitsPerQuery; - } - - public GetApiKeyResponse setMaxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour) { - this.maxQueriesPerIPPerHour = maxQueriesPerIPPerHour; - return this; - } - - /** - * Maximum number of API calls per hour allowed from a given IP address or [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API - * call is performed with this key, a check is performed. If there were more than the specified - * number of calls within the last hour, the API returns an error with the status code `429` (Too - * Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to - * retrieve your entire content by massively querying the index. - * - * @return maxQueriesPerIPPerHour - */ - @javax.annotation.Nullable - public Integer getMaxQueriesPerIPPerHour() { - return maxQueriesPerIPPerHour; - } - - public GetApiKeyResponse setQueryParameters(String queryParameters) { - this.queryParameters = queryParameters; - return this; - } - - /** - * Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be - * applied for each query made with this API key. It's a URL-encoded query string. - * - * @return queryParameters - */ - @javax.annotation.Nullable - public String getQueryParameters() { - return queryParameters; - } - - public GetApiKeyResponse setReferers(List referers) { - this.referers = referers; - return this; - } - - public GetApiKeyResponse addReferers(String referersItem) { - if (this.referers == null) { - this.referers = new ArrayList<>(); - } - this.referers.add(referersItem); - return this; - } - - /** - * Restrict this API key to specific - * [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). - * If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all - * referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending - * with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". - * - * @return referers - */ - @javax.annotation.Nullable - public List getReferers() { - return referers; - } - - public GetApiKeyResponse setValidity(Integer validity) { - this.validity = validity; - return this; - } - - /** - * Validity duration of a key (in seconds). The key will automatically be removed after this time - * has expired. The default value of 0 never expires. Short-lived API keys are useful to grant - * temporary access to your data. For example, in mobile apps, you can't [control when users - * update your - * app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). - * So instead of encoding keys into your app as you would for a web app, you should dynamically - * fetch them from your mobile app's backend. - * - * @return validity - */ - @javax.annotation.Nullable - public Integer getValidity() { - return validity; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetApiKeyResponse getApiKeyResponse = (GetApiKeyResponse) o; - return ( - Objects.equals(this.value, getApiKeyResponse.value) && - Objects.equals(this.createdAt, getApiKeyResponse.createdAt) && - Objects.equals(this.acl, getApiKeyResponse.acl) && - Objects.equals(this.description, getApiKeyResponse.description) && - Objects.equals(this.indexes, getApiKeyResponse.indexes) && - Objects.equals(this.maxHitsPerQuery, getApiKeyResponse.maxHitsPerQuery) && - Objects.equals(this.maxQueriesPerIPPerHour, getApiKeyResponse.maxQueriesPerIPPerHour) && - Objects.equals(this.queryParameters, getApiKeyResponse.queryParameters) && - Objects.equals(this.referers, getApiKeyResponse.referers) && - Objects.equals(this.validity, getApiKeyResponse.validity) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - value, - createdAt, - acl, - description, - indexes, - maxHitsPerQuery, - maxQueriesPerIPPerHour, - queryParameters, - referers, - validity - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetApiKeyResponse {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" acl: ").append(toIndentedString(acl)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" indexes: ").append(toIndentedString(indexes)).append("\n"); - sb.append(" maxHitsPerQuery: ").append(toIndentedString(maxHitsPerQuery)).append("\n"); - sb.append(" maxQueriesPerIPPerHour: ").append(toIndentedString(maxQueriesPerIPPerHour)).append("\n"); - sb.append(" queryParameters: ").append(toIndentedString(queryParameters)).append("\n"); - sb.append(" referers: ").append(toIndentedString(referers)).append("\n"); - sb.append(" validity: ").append(toIndentedString(validity)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetDictionarySettingsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetDictionarySettingsResponse.java deleted file mode 100644 index fd4847ba51..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetDictionarySettingsResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetDictionarySettingsResponse */ -public class GetDictionarySettingsResponse { - - @JsonProperty("disableStandardEntries") - private StandardEntries disableStandardEntries; - - public GetDictionarySettingsResponse setDisableStandardEntries(StandardEntries disableStandardEntries) { - this.disableStandardEntries = disableStandardEntries; - return this; - } - - /** - * Get disableStandardEntries - * - * @return disableStandardEntries - */ - @javax.annotation.Nonnull - public StandardEntries getDisableStandardEntries() { - return disableStandardEntries; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetDictionarySettingsResponse getDictionarySettingsResponse = (GetDictionarySettingsResponse) o; - return Objects.equals(this.disableStandardEntries, getDictionarySettingsResponse.disableStandardEntries); - } - - @Override - public int hashCode() { - return Objects.hash(disableStandardEntries); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetDictionarySettingsResponse {\n"); - sb.append(" disableStandardEntries: ").append(toIndentedString(disableStandardEntries)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetLogsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetLogsResponse.java deleted file mode 100644 index bc8065fae0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetLogsResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetLogsResponse */ -public class GetLogsResponse { - - @JsonProperty("logs") - private List logs = new ArrayList<>(); - - public GetLogsResponse setLogs(List logs) { - this.logs = logs; - return this; - } - - public GetLogsResponse addLogs(Log logsItem) { - this.logs.add(logsItem); - return this; - } - - /** - * Get logs - * - * @return logs - */ - @javax.annotation.Nonnull - public List getLogs() { - return logs; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetLogsResponse getLogsResponse = (GetLogsResponse) o; - return Objects.equals(this.logs, getLogsResponse.logs); - } - - @Override - public int hashCode() { - return Objects.hash(logs); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetLogsResponse {\n"); - sb.append(" logs: ").append(toIndentedString(logs)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsParams.java deleted file mode 100644 index edb138647d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsParams.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Request parameters. */ -public class GetObjectsParams { - - @JsonProperty("requests") - private List requests = new ArrayList<>(); - - public GetObjectsParams setRequests(List requests) { - this.requests = requests; - return this; - } - - public GetObjectsParams addRequests(GetObjectsRequest requestsItem) { - this.requests.add(requestsItem); - return this; - } - - /** - * Get requests - * - * @return requests - */ - @javax.annotation.Nonnull - public List getRequests() { - return requests; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetObjectsParams getObjectsParams = (GetObjectsParams) o; - return Objects.equals(this.requests, getObjectsParams.requests); - } - - @Override - public int hashCode() { - return Objects.hash(requests); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetObjectsParams {\n"); - sb.append(" requests: ").append(toIndentedString(requests)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsRequest.java deleted file mode 100644 index affe47bfd4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsRequest.java +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Record retrieval operation. */ -public class GetObjectsRequest { - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("indexName") - private String indexName; - - public GetObjectsRequest setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public GetObjectsRequest addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to retrieve. If not specified, all retrievable attributes are returned. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public GetObjectsRequest setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Record's objectID. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public GetObjectsRequest setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Name of the index containing the required records. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetObjectsRequest getObjectsRequest = (GetObjectsRequest) o; - return ( - Objects.equals(this.attributesToRetrieve, getObjectsRequest.attributesToRetrieve) && - Objects.equals(this.objectID, getObjectsRequest.objectID) && - Objects.equals(this.indexName, getObjectsRequest.indexName) - ); - } - - @Override - public int hashCode() { - return Objects.hash(attributesToRetrieve, objectID, indexName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetObjectsRequest {\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsResponse.java deleted file mode 100644 index c154be1c26..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetObjectsResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** GetObjectsResponse */ -public class GetObjectsResponse { - - @JsonProperty("results") - private List results = new ArrayList<>(); - - public GetObjectsResponse setResults(List results) { - this.results = results; - return this; - } - - public GetObjectsResponse addResults(T resultsItem) { - this.results.add(resultsItem); - return this; - } - - /** - * Retrieved results. - * - * @return results - */ - @javax.annotation.Nonnull - public List getResults() { - return results; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetObjectsResponse getObjectsResponse = (GetObjectsResponse) o; - return Objects.equals(this.results, getObjectsResponse.results); - } - - @Override - public int hashCode() { - return Objects.hash(results); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetObjectsResponse {\n"); - sb.append(" results: ").append(toIndentedString(results)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetTaskResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetTaskResponse.java deleted file mode 100644 index 2c114c1aba..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetTaskResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** GetTaskResponse */ -public class GetTaskResponse { - - @JsonProperty("status") - private TaskStatus status; - - public GetTaskResponse setStatus(TaskStatus status) { - this.status = status; - return this; - } - - /** - * Get status - * - * @return status - */ - @javax.annotation.Nonnull - public TaskStatus getStatus() { - return status; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTaskResponse getTaskResponse = (GetTaskResponse) o; - return Objects.equals(this.status, getTaskResponse.status); - } - - @Override - public int hashCode() { - return Objects.hash(status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTaskResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetTopUserIdsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetTopUserIdsResponse.java deleted file mode 100644 index 2404157e55..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/GetTopUserIdsResponse.java +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** User IDs and clusters. */ -public class GetTopUserIdsResponse { - - @JsonProperty("topUsers") - private List>> topUsers = new ArrayList<>(); - - public GetTopUserIdsResponse setTopUsers(List>> topUsers) { - this.topUsers = topUsers; - return this; - } - - public GetTopUserIdsResponse addTopUsers(Map> topUsersItem) { - this.topUsers.add(topUsersItem); - return this; - } - - /** - * Key-value pairs with cluster names as keys and lists of users with the highest number of - * records per cluster as values. - * - * @return topUsers - */ - @javax.annotation.Nonnull - public List>> getTopUsers() { - return topUsers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetTopUserIdsResponse getTopUserIdsResponse = (GetTopUserIdsResponse) o; - return Objects.equals(this.topUsers, getTopUserIdsResponse.topUsers); - } - - @Override - public int hashCode() { - return Objects.hash(topUsers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetTopUserIdsResponse {\n"); - sb.append(" topUsers: ").append(toIndentedString(topUsers)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HasPendingMappingsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HasPendingMappingsResponse.java deleted file mode 100644 index 707fb3b9de..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HasPendingMappingsResponse.java +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** HasPendingMappingsResponse */ -public class HasPendingMappingsResponse { - - @JsonProperty("pending") - private Boolean pending; - - @JsonProperty("clusters") - private Map> clusters; - - public HasPendingMappingsResponse setPending(Boolean pending) { - this.pending = pending; - return this; - } - - /** - * Indicates whether there are clusters undergoing migration, creation, or deletion. - * - * @return pending - */ - @javax.annotation.Nonnull - public Boolean getPending() { - return pending; - } - - public HasPendingMappingsResponse setClusters(Map> clusters) { - this.clusters = clusters; - return this; - } - - public HasPendingMappingsResponse putClusters(String key, List clustersItem) { - if (this.clusters == null) { - this.clusters = new HashMap<>(); - } - this.clusters.put(key, clustersItem); - return this; - } - - /** - * Cluster pending mapping state: migrating, creating, deleting. - * - * @return clusters - */ - @javax.annotation.Nullable - public Map> getClusters() { - return clusters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasPendingMappingsResponse hasPendingMappingsResponse = (HasPendingMappingsResponse) o; - return ( - Objects.equals(this.pending, hasPendingMappingsResponse.pending) && Objects.equals(this.clusters, hasPendingMappingsResponse.clusters) - ); - } - - @Override - public int hashCode() { - return Objects.hash(pending, clusters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasPendingMappingsResponse {\n"); - sb.append(" pending: ").append(toIndentedString(pending)).append("\n"); - sb.append(" clusters: ").append(toIndentedString(clusters)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HighlightResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HighlightResult.java deleted file mode 100644 index 3d934d6cde..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HighlightResult.java +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** HighlightResult */ -@JsonDeserialize(using = HighlightResult.HighlightResultDeserializer.class) -@JsonSerialize(using = HighlightResult.HighlightResultSerializer.class) -public abstract class HighlightResult implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(HighlightResult.class.getName()); - - public static HighlightResult of(HighlightResultOption inside) { - return new HighlightResultHighlightResultOption(inside); - } - - public static HighlightResult of(List inside) { - return new HighlightResultListOfHighlightResultOption(inside); - } - - public static class HighlightResultSerializer extends StdSerializer { - - public HighlightResultSerializer(Class t) { - super(t); - } - - public HighlightResultSerializer() { - this(null); - } - - @Override - public void serialize(HighlightResult value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class HighlightResultDeserializer extends StdDeserializer { - - public HighlightResultDeserializer() { - this(HighlightResult.class); - } - - public HighlightResultDeserializer(Class vc) { - super(vc); - } - - @Override - public HighlightResult deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize HighlightResultOption - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - HighlightResultOption value = parser.readValueAs(new TypeReference() {}); - return HighlightResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf HighlightResultOption (error: " + e.getMessage() + ") (type: HighlightResultOption)"); - } - } - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return HighlightResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public HighlightResult getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "HighlightResult cannot be null"); - } - } -} - -class HighlightResultHighlightResultOption extends HighlightResult { - - private final HighlightResultOption insideValue; - - HighlightResultHighlightResultOption(HighlightResultOption insideValue) { - this.insideValue = insideValue; - } - - @Override - public HighlightResultOption getInsideValue() { - return insideValue; - } -} - -class HighlightResultListOfHighlightResultOption extends HighlightResult { - - private final List insideValue; - - HighlightResultListOfHighlightResultOption(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HighlightResultOption.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HighlightResultOption.java deleted file mode 100644 index 64316545c9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/HighlightResultOption.java +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Show highlighted section and words matched on a query. */ -public class HighlightResultOption { - - @JsonProperty("value") - private String value; - - @JsonProperty("matchLevel") - private MatchLevel matchLevel; - - @JsonProperty("matchedWords") - private List matchedWords = new ArrayList<>(); - - @JsonProperty("fullyHighlighted") - private Boolean fullyHighlighted; - - public HighlightResultOption setValue(String value) { - this.value = value; - return this; - } - - /** - * Markup text with `facetQuery` matches highlighted. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public HighlightResultOption setMatchLevel(MatchLevel matchLevel) { - this.matchLevel = matchLevel; - return this; - } - - /** - * Get matchLevel - * - * @return matchLevel - */ - @javax.annotation.Nonnull - public MatchLevel getMatchLevel() { - return matchLevel; - } - - public HighlightResultOption setMatchedWords(List matchedWords) { - this.matchedWords = matchedWords; - return this; - } - - public HighlightResultOption addMatchedWords(String matchedWordsItem) { - this.matchedWords.add(matchedWordsItem); - return this; - } - - /** - * List of words from the query that matched the object. - * - * @return matchedWords - */ - @javax.annotation.Nonnull - public List getMatchedWords() { - return matchedWords; - } - - public HighlightResultOption setFullyHighlighted(Boolean fullyHighlighted) { - this.fullyHighlighted = fullyHighlighted; - return this; - } - - /** - * Whether the entire attribute value is highlighted. - * - * @return fullyHighlighted - */ - @javax.annotation.Nullable - public Boolean getFullyHighlighted() { - return fullyHighlighted; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HighlightResultOption highlightResultOption = (HighlightResultOption) o; - return ( - Objects.equals(this.value, highlightResultOption.value) && - Objects.equals(this.matchLevel, highlightResultOption.matchLevel) && - Objects.equals(this.matchedWords, highlightResultOption.matchedWords) && - Objects.equals(this.fullyHighlighted, highlightResultOption.fullyHighlighted) - ); - } - - @Override - public int hashCode() { - return Objects.hash(value, matchLevel, matchedWords, fullyHighlighted); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HighlightResultOption {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" matchLevel: ").append(toIndentedString(matchLevel)).append("\n"); - sb.append(" matchedWords: ").append(toIndentedString(matchedWords)).append("\n"); - sb.append(" fullyHighlighted: ").append(toIndentedString(fullyHighlighted)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Hit.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Hit.java deleted file mode 100644 index 51b41cbf10..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Hit.java +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** A single hit. */ -public class Hit { - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("_highlightResult") - private Map highlightResult; - - @JsonProperty("_snippetResult") - private Map snippetResult; - - @JsonProperty("_rankingInfo") - private RankingInfo rankingInfo; - - @JsonProperty("_distinctSeqID") - private Integer distinctSeqID; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public Hit setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public Hit setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique object identifier. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public Hit setHighlightResult(Map highlightResult) { - this.highlightResult = highlightResult; - return this; - } - - public Hit putHighlightResult(String key, HighlightResult highlightResultItem) { - if (this.highlightResult == null) { - this.highlightResult = new HashMap<>(); - } - this.highlightResult.put(key, highlightResultItem); - return this; - } - - /** - * Show highlighted section and words matched on a query. - * - * @return highlightResult - */ - @javax.annotation.Nullable - public Map getHighlightResult() { - return highlightResult; - } - - public Hit setSnippetResult(Map snippetResult) { - this.snippetResult = snippetResult; - return this; - } - - public Hit putSnippetResult(String key, SnippetResult snippetResultItem) { - if (this.snippetResult == null) { - this.snippetResult = new HashMap<>(); - } - this.snippetResult.put(key, snippetResultItem); - return this; - } - - /** - * Snippeted attributes show parts of the matched attributes. Only returned when - * attributesToSnippet is non-empty. - * - * @return snippetResult - */ - @javax.annotation.Nullable - public Map getSnippetResult() { - return snippetResult; - } - - public Hit setRankingInfo(RankingInfo rankingInfo) { - this.rankingInfo = rankingInfo; - return this; - } - - /** - * Get rankingInfo - * - * @return rankingInfo - */ - @javax.annotation.Nullable - public RankingInfo getRankingInfo() { - return rankingInfo; - } - - public Hit setDistinctSeqID(Integer distinctSeqID) { - this.distinctSeqID = distinctSeqID; - return this; - } - - /** - * Get distinctSeqID - * - * @return distinctSeqID - */ - @javax.annotation.Nullable - public Integer getDistinctSeqID() { - return distinctSeqID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Hit hit = (Hit) o; - return ( - Objects.equals(this.objectID, hit.objectID) && - Objects.equals(this.highlightResult, hit.highlightResult) && - Objects.equals(this.snippetResult, hit.snippetResult) && - Objects.equals(this.rankingInfo, hit.rankingInfo) && - Objects.equals(this.distinctSeqID, hit.distinctSeqID) && - super.equals(o) - ); - } - - @Override - public int hashCode() { - return Objects.hash(objectID, highlightResult, snippetResult, rankingInfo, distinctSeqID, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Hit {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" highlightResult: ").append(toIndentedString(highlightResult)).append("\n"); - sb.append(" snippetResult: ").append(toIndentedString(snippetResult)).append("\n"); - sb.append(" rankingInfo: ").append(toIndentedString(rankingInfo)).append("\n"); - sb.append(" distinctSeqID: ").append(toIndentedString(distinctSeqID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IgnorePlurals.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IgnorePlurals.java deleted file mode 100644 index 89456b877f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IgnorePlurals.java +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * Treats singular, plurals, and other forms of declensions as matching terms. `ignorePlurals` is - * used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which - * ignoring plurals should be enabled. This list will override any values that you may have set in - * `queryLanguages`. _true_: enables the ignore plurals feature, where singulars and plurals are - * considered equivalent (\"foot\" = \"feet\"). The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the ignore plurals - * feature, so that singulars and plurals aren't considered to be the same (\"foot\" will not find - * \"feet\"). - */ -@JsonDeserialize(using = IgnorePlurals.IgnorePluralsDeserializer.class) -@JsonSerialize(using = IgnorePlurals.IgnorePluralsSerializer.class) -public abstract class IgnorePlurals implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(IgnorePlurals.class.getName()); - - public static IgnorePlurals of(Boolean inside) { - return new IgnorePluralsBoolean(inside); - } - - public static IgnorePlurals of(List inside) { - return new IgnorePluralsListOfString(inside); - } - - public static class IgnorePluralsSerializer extends StdSerializer { - - public IgnorePluralsSerializer(Class t) { - super(t); - } - - public IgnorePluralsSerializer() { - this(null); - } - - @Override - public void serialize(IgnorePlurals value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class IgnorePluralsDeserializer extends StdDeserializer { - - public IgnorePluralsDeserializer() { - this(IgnorePlurals.class); - } - - public IgnorePluralsDeserializer(Class vc) { - super(vc); - } - - @Override - public IgnorePlurals deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize Boolean - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Boolean value = parser.readValueAs(new TypeReference() {}); - return IgnorePlurals.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Boolean (error: " + e.getMessage() + ") (type: Boolean)"); - } - } - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return IgnorePlurals.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public IgnorePlurals getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "IgnorePlurals cannot be null"); - } - } -} - -class IgnorePluralsBoolean extends IgnorePlurals { - - private final Boolean insideValue; - - IgnorePluralsBoolean(Boolean insideValue) { - this.insideValue = insideValue; - } - - @Override - public Boolean getInsideValue() { - return insideValue; - } -} - -class IgnorePluralsListOfString extends IgnorePlurals { - - private final List insideValue; - - IgnorePluralsListOfString(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettings.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettings.java deleted file mode 100644 index c29e5d7d20..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettings.java +++ /dev/null @@ -1,1576 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Algolia index settings. */ -public class IndexSettings { - - @JsonProperty("replicas") - private List replicas; - - @JsonProperty("paginationLimitedTo") - private Integer paginationLimitedTo; - - @JsonProperty("unretrievableAttributes") - private List unretrievableAttributes; - - @JsonProperty("disableTypoToleranceOnWords") - private List disableTypoToleranceOnWords; - - @JsonProperty("attributesToTransliterate") - private List attributesToTransliterate; - - @JsonProperty("camelCaseAttributes") - private List camelCaseAttributes; - - @JsonProperty("decompoundedAttributes") - private Object decompoundedAttributes; - - @JsonProperty("indexLanguages") - private List indexLanguages; - - @JsonProperty("disablePrefixOnAttributes") - private List disablePrefixOnAttributes; - - @JsonProperty("allowCompressionOfIntegerArray") - private Boolean allowCompressionOfIntegerArray; - - @JsonProperty("numericAttributesForFiltering") - private List numericAttributesForFiltering; - - @JsonProperty("separatorsToIndex") - private String separatorsToIndex; - - @JsonProperty("searchableAttributes") - private List searchableAttributes; - - @JsonProperty("userData") - private Object userData; - - @JsonProperty("customNormalization") - private Map> customNormalization; - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - public IndexSettings setReplicas(List replicas) { - this.replicas = replicas; - return this; - } - - public IndexSettings addReplicas(String replicasItem) { - if (this.replicas == null) { - this.replicas = new ArrayList<>(); - } - this.replicas.add(replicasItem); - return this; - } - - /** - * Creates - * [replicas](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/), - * which are copies of a primary index with the same records but different settings. - * - * @return replicas - */ - @javax.annotation.Nullable - public List getReplicas() { - return replicas; - } - - public IndexSettings setPaginationLimitedTo(Integer paginationLimitedTo) { - this.paginationLimitedTo = paginationLimitedTo; - return this; - } - - /** - * Maximum number of hits accessible through pagination. - * - * @return paginationLimitedTo - */ - @javax.annotation.Nullable - public Integer getPaginationLimitedTo() { - return paginationLimitedTo; - } - - public IndexSettings setUnretrievableAttributes(List unretrievableAttributes) { - this.unretrievableAttributes = unretrievableAttributes; - return this; - } - - public IndexSettings addUnretrievableAttributes(String unretrievableAttributesItem) { - if (this.unretrievableAttributes == null) { - this.unretrievableAttributes = new ArrayList<>(); - } - this.unretrievableAttributes.add(unretrievableAttributesItem); - return this; - } - - /** - * Attributes that can't be retrieved at query time. - * - * @return unretrievableAttributes - */ - @javax.annotation.Nullable - public List getUnretrievableAttributes() { - return unretrievableAttributes; - } - - public IndexSettings setDisableTypoToleranceOnWords(List disableTypoToleranceOnWords) { - this.disableTypoToleranceOnWords = disableTypoToleranceOnWords; - return this; - } - - public IndexSettings addDisableTypoToleranceOnWords(String disableTypoToleranceOnWordsItem) { - if (this.disableTypoToleranceOnWords == null) { - this.disableTypoToleranceOnWords = new ArrayList<>(); - } - this.disableTypoToleranceOnWords.add(disableTypoToleranceOnWordsItem); - return this; - } - - /** - * Words for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnWords - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnWords() { - return disableTypoToleranceOnWords; - } - - public IndexSettings setAttributesToTransliterate(List attributesToTransliterate) { - this.attributesToTransliterate = attributesToTransliterate; - return this; - } - - public IndexSettings addAttributesToTransliterate(String attributesToTransliterateItem) { - if (this.attributesToTransliterate == null) { - this.attributesToTransliterate = new ArrayList<>(); - } - this.attributesToTransliterate.add(attributesToTransliterateItem); - return this; - } - - /** - * Attributes in your index to which [Japanese - * transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead) - * applies. This will ensure that words indexed in Katakana or Kanji can also be searched in - * Hiragana. - * - * @return attributesToTransliterate - */ - @javax.annotation.Nullable - public List getAttributesToTransliterate() { - return attributesToTransliterate; - } - - public IndexSettings setCamelCaseAttributes(List camelCaseAttributes) { - this.camelCaseAttributes = camelCaseAttributes; - return this; - } - - public IndexSettings addCamelCaseAttributes(String camelCaseAttributesItem) { - if (this.camelCaseAttributes == null) { - this.camelCaseAttributes = new ArrayList<>(); - } - this.camelCaseAttributes.add(camelCaseAttributesItem); - return this; - } - - /** - * Attributes on which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. - * - * @return camelCaseAttributes - */ - @javax.annotation.Nullable - public List getCamelCaseAttributes() { - return camelCaseAttributes; - } - - public IndexSettings setDecompoundedAttributes(Object decompoundedAttributes) { - this.decompoundedAttributes = decompoundedAttributes; - return this; - } - - /** - * Attributes in your index to which [word - * segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) - * (decompounding) applies. - * - * @return decompoundedAttributes - */ - @javax.annotation.Nullable - public Object getDecompoundedAttributes() { - return decompoundedAttributes; - } - - public IndexSettings setIndexLanguages(List indexLanguages) { - this.indexLanguages = indexLanguages; - return this; - } - - public IndexSettings addIndexLanguages(String indexLanguagesItem) { - if (this.indexLanguages == null) { - this.indexLanguages = new ArrayList<>(); - } - this.indexLanguages.add(indexLanguagesItem); - return this; - } - - /** - * Set the languages of your index, for language-specific processing steps such as - * [tokenization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/tokenization/) - * and - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return indexLanguages - */ - @javax.annotation.Nullable - public List getIndexLanguages() { - return indexLanguages; - } - - public IndexSettings setDisablePrefixOnAttributes(List disablePrefixOnAttributes) { - this.disablePrefixOnAttributes = disablePrefixOnAttributes; - return this; - } - - public IndexSettings addDisablePrefixOnAttributes(String disablePrefixOnAttributesItem) { - if (this.disablePrefixOnAttributes == null) { - this.disablePrefixOnAttributes = new ArrayList<>(); - } - this.disablePrefixOnAttributes.add(disablePrefixOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [prefix - * matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). - * - * @return disablePrefixOnAttributes - */ - @javax.annotation.Nullable - public List getDisablePrefixOnAttributes() { - return disablePrefixOnAttributes; - } - - public IndexSettings setAllowCompressionOfIntegerArray(Boolean allowCompressionOfIntegerArray) { - this.allowCompressionOfIntegerArray = allowCompressionOfIntegerArray; - return this; - } - - /** - * Incidates whether the engine compresses arrays with exclusively non-negative integers. When - * enabled, the compressed arrays may be reordered. - * - * @return allowCompressionOfIntegerArray - */ - @javax.annotation.Nullable - public Boolean getAllowCompressionOfIntegerArray() { - return allowCompressionOfIntegerArray; - } - - public IndexSettings setNumericAttributesForFiltering(List numericAttributesForFiltering) { - this.numericAttributesForFiltering = numericAttributesForFiltering; - return this; - } - - public IndexSettings addNumericAttributesForFiltering(String numericAttributesForFilteringItem) { - if (this.numericAttributesForFiltering == null) { - this.numericAttributesForFiltering = new ArrayList<>(); - } - this.numericAttributesForFiltering.add(numericAttributesForFilteringItem); - return this; - } - - /** - * Numeric attributes that can be used as [numerical - * filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). - * - * @return numericAttributesForFiltering - */ - @javax.annotation.Nullable - public List getNumericAttributesForFiltering() { - return numericAttributesForFiltering; - } - - public IndexSettings setSeparatorsToIndex(String separatorsToIndex) { - this.separatorsToIndex = separatorsToIndex; - return this; - } - - /** - * Controls which separators are added to an Algolia index as part of - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean). - * Separators are all non-letter characters except spaces and currency characters, such as $€£¥. - * - * @return separatorsToIndex - */ - @javax.annotation.Nullable - public String getSeparatorsToIndex() { - return separatorsToIndex; - } - - public IndexSettings setSearchableAttributes(List searchableAttributes) { - this.searchableAttributes = searchableAttributes; - return this; - } - - public IndexSettings addSearchableAttributes(String searchableAttributesItem) { - if (this.searchableAttributes == null) { - this.searchableAttributes = new ArrayList<>(); - } - this.searchableAttributes.add(searchableAttributesItem); - return this; - } - - /** - * [Attributes used for - * searching](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/), - * including determining [if matches at the beginning of a word are important (ordered) or not - * (unordered)](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/how-to/configuring-searchable-attributes-the-right-way/#understanding-word-position). - * - * @return searchableAttributes - */ - @javax.annotation.Nullable - public List getSearchableAttributes() { - return searchableAttributes; - } - - public IndexSettings setUserData(Object userData) { - this.userData = userData; - return this; - } - - /** - * Lets you store custom data in your indices. - * - * @return userData - */ - @javax.annotation.Nullable - public Object getUserData() { - return userData; - } - - public IndexSettings setCustomNormalization(Map> customNormalization) { - this.customNormalization = customNormalization; - return this; - } - - public IndexSettings putCustomNormalization(String key, Map customNormalizationItem) { - if (this.customNormalization == null) { - this.customNormalization = new HashMap<>(); - } - this.customNormalization.put(key, customNormalizationItem); - return this; - } - - /** - * A list of characters and their normalized replacements to override Algolia's default - * [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return customNormalization - */ - @javax.annotation.Nullable - public Map> getCustomNormalization() { - return customNormalization; - } - - public IndexSettings setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public IndexSettings addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public IndexSettings setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public IndexSettings addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public IndexSettings setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public IndexSettings addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public IndexSettings setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public IndexSettings addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public IndexSettings setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public IndexSettings addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public IndexSettings setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public IndexSettings setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public IndexSettings addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public IndexSettings setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public IndexSettings addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public IndexSettings setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public IndexSettings setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public IndexSettings setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public IndexSettings setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public IndexSettings setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public IndexSettings setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public IndexSettings setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public IndexSettings setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public IndexSettings setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public IndexSettings setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public IndexSettings addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public IndexSettings setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public IndexSettings setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public IndexSettings setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public IndexSettings setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public IndexSettings addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public IndexSettings setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public IndexSettings setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public IndexSettings setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public IndexSettings setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public IndexSettings setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public IndexSettings setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public IndexSettings setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public IndexSettings setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public IndexSettings setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public IndexSettings addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public IndexSettings setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public IndexSettings addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public IndexSettings setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public IndexSettings setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public IndexSettings addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public IndexSettings setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public IndexSettings addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public IndexSettings setExplain(List explain) { - this.explain = explain; - return this; - } - - public IndexSettings addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public IndexSettings setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public IndexSettings setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public IndexSettings setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public IndexSettings setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public IndexSettings setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public IndexSettings setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public IndexSettings addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public IndexSettings setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public IndexSettings setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public IndexSettings setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndexSettings indexSettings = (IndexSettings) o; - return ( - Objects.equals(this.replicas, indexSettings.replicas) && - Objects.equals(this.paginationLimitedTo, indexSettings.paginationLimitedTo) && - Objects.equals(this.unretrievableAttributes, indexSettings.unretrievableAttributes) && - Objects.equals(this.disableTypoToleranceOnWords, indexSettings.disableTypoToleranceOnWords) && - Objects.equals(this.attributesToTransliterate, indexSettings.attributesToTransliterate) && - Objects.equals(this.camelCaseAttributes, indexSettings.camelCaseAttributes) && - Objects.equals(this.decompoundedAttributes, indexSettings.decompoundedAttributes) && - Objects.equals(this.indexLanguages, indexSettings.indexLanguages) && - Objects.equals(this.disablePrefixOnAttributes, indexSettings.disablePrefixOnAttributes) && - Objects.equals(this.allowCompressionOfIntegerArray, indexSettings.allowCompressionOfIntegerArray) && - Objects.equals(this.numericAttributesForFiltering, indexSettings.numericAttributesForFiltering) && - Objects.equals(this.separatorsToIndex, indexSettings.separatorsToIndex) && - Objects.equals(this.searchableAttributes, indexSettings.searchableAttributes) && - Objects.equals(this.userData, indexSettings.userData) && - Objects.equals(this.customNormalization, indexSettings.customNormalization) && - Objects.equals(this.attributesForFaceting, indexSettings.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, indexSettings.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, indexSettings.restrictSearchableAttributes) && - Objects.equals(this.ranking, indexSettings.ranking) && - Objects.equals(this.customRanking, indexSettings.customRanking) && - Objects.equals(this.relevancyStrictness, indexSettings.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, indexSettings.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, indexSettings.attributesToSnippet) && - Objects.equals(this.highlightPreTag, indexSettings.highlightPreTag) && - Objects.equals(this.highlightPostTag, indexSettings.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, indexSettings.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, indexSettings.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, indexSettings.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, indexSettings.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, indexSettings.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, indexSettings.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, indexSettings.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, indexSettings.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, indexSettings.ignorePlurals) && - Objects.equals(this.removeStopWords, indexSettings.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, indexSettings.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, indexSettings.queryLanguages) && - Objects.equals(this.decompoundQuery, indexSettings.decompoundQuery) && - Objects.equals(this.enableRules, indexSettings.enableRules) && - Objects.equals(this.enablePersonalization, indexSettings.enablePersonalization) && - Objects.equals(this.queryType, indexSettings.queryType) && - Objects.equals(this.removeWordsIfNoResults, indexSettings.removeWordsIfNoResults) && - Objects.equals(this.mode, indexSettings.mode) && - Objects.equals(this.semanticSearch, indexSettings.semanticSearch) && - Objects.equals(this.advancedSyntax, indexSettings.advancedSyntax) && - Objects.equals(this.optionalWords, indexSettings.optionalWords) && - Objects.equals(this.disableExactOnAttributes, indexSettings.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, indexSettings.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, indexSettings.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, indexSettings.advancedSyntaxFeatures) && - Objects.equals(this.explain, indexSettings.explain) && - Objects.equals(this.distinct, indexSettings.distinct) && - Objects.equals(this.attributeForDistinct, indexSettings.attributeForDistinct) && - Objects.equals(this.synonyms, indexSettings.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, indexSettings.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, indexSettings.minProximity) && - Objects.equals(this.responseFields, indexSettings.responseFields) && - Objects.equals(this.maxFacetHits, indexSettings.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, indexSettings.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, indexSettings.renderingContent) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - replicas, - paginationLimitedTo, - unretrievableAttributes, - disableTypoToleranceOnWords, - attributesToTransliterate, - camelCaseAttributes, - decompoundedAttributes, - indexLanguages, - disablePrefixOnAttributes, - allowCompressionOfIntegerArray, - numericAttributesForFiltering, - separatorsToIndex, - searchableAttributes, - userData, - customNormalization, - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndexSettings {\n"); - sb.append(" replicas: ").append(toIndentedString(replicas)).append("\n"); - sb.append(" paginationLimitedTo: ").append(toIndentedString(paginationLimitedTo)).append("\n"); - sb.append(" unretrievableAttributes: ").append(toIndentedString(unretrievableAttributes)).append("\n"); - sb.append(" disableTypoToleranceOnWords: ").append(toIndentedString(disableTypoToleranceOnWords)).append("\n"); - sb.append(" attributesToTransliterate: ").append(toIndentedString(attributesToTransliterate)).append("\n"); - sb.append(" camelCaseAttributes: ").append(toIndentedString(camelCaseAttributes)).append("\n"); - sb.append(" decompoundedAttributes: ").append(toIndentedString(decompoundedAttributes)).append("\n"); - sb.append(" indexLanguages: ").append(toIndentedString(indexLanguages)).append("\n"); - sb.append(" disablePrefixOnAttributes: ").append(toIndentedString(disablePrefixOnAttributes)).append("\n"); - sb.append(" allowCompressionOfIntegerArray: ").append(toIndentedString(allowCompressionOfIntegerArray)).append("\n"); - sb.append(" numericAttributesForFiltering: ").append(toIndentedString(numericAttributesForFiltering)).append("\n"); - sb.append(" separatorsToIndex: ").append(toIndentedString(separatorsToIndex)).append("\n"); - sb.append(" searchableAttributes: ").append(toIndentedString(searchableAttributes)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" customNormalization: ").append(toIndentedString(customNormalization)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParams.java deleted file mode 100644 index 21d2247427..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParams.java +++ /dev/null @@ -1,1159 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** IndexSettingsAsSearchParams */ -public class IndexSettingsAsSearchParams { - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - public IndexSettingsAsSearchParams setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public IndexSettingsAsSearchParams addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public IndexSettingsAsSearchParams setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public IndexSettingsAsSearchParams addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public IndexSettingsAsSearchParams setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public IndexSettingsAsSearchParams addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public IndexSettingsAsSearchParams setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public IndexSettingsAsSearchParams addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public IndexSettingsAsSearchParams setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public IndexSettingsAsSearchParams addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public IndexSettingsAsSearchParams setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public IndexSettingsAsSearchParams setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public IndexSettingsAsSearchParams addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public IndexSettingsAsSearchParams setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public IndexSettingsAsSearchParams addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public IndexSettingsAsSearchParams setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public IndexSettingsAsSearchParams setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public IndexSettingsAsSearchParams setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public IndexSettingsAsSearchParams setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public IndexSettingsAsSearchParams setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public IndexSettingsAsSearchParams setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public IndexSettingsAsSearchParams setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public IndexSettingsAsSearchParams setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public IndexSettingsAsSearchParams setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public IndexSettingsAsSearchParams setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public IndexSettingsAsSearchParams addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public IndexSettingsAsSearchParams setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public IndexSettingsAsSearchParams setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public IndexSettingsAsSearchParams setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public IndexSettingsAsSearchParams setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public IndexSettingsAsSearchParams addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public IndexSettingsAsSearchParams setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public IndexSettingsAsSearchParams setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public IndexSettingsAsSearchParams setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public IndexSettingsAsSearchParams setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public IndexSettingsAsSearchParams setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public IndexSettingsAsSearchParams setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public IndexSettingsAsSearchParams setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public IndexSettingsAsSearchParams setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public IndexSettingsAsSearchParams setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public IndexSettingsAsSearchParams addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public IndexSettingsAsSearchParams setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public IndexSettingsAsSearchParams addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public IndexSettingsAsSearchParams setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public IndexSettingsAsSearchParams setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public IndexSettingsAsSearchParams addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public IndexSettingsAsSearchParams setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public IndexSettingsAsSearchParams addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public IndexSettingsAsSearchParams setExplain(List explain) { - this.explain = explain; - return this; - } - - public IndexSettingsAsSearchParams addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public IndexSettingsAsSearchParams setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public IndexSettingsAsSearchParams setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public IndexSettingsAsSearchParams setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public IndexSettingsAsSearchParams setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public IndexSettingsAsSearchParams setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public IndexSettingsAsSearchParams setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public IndexSettingsAsSearchParams addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public IndexSettingsAsSearchParams setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public IndexSettingsAsSearchParams setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public IndexSettingsAsSearchParams setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndexSettingsAsSearchParams indexSettingsAsSearchParams = (IndexSettingsAsSearchParams) o; - return ( - Objects.equals(this.attributesForFaceting, indexSettingsAsSearchParams.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, indexSettingsAsSearchParams.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, indexSettingsAsSearchParams.restrictSearchableAttributes) && - Objects.equals(this.ranking, indexSettingsAsSearchParams.ranking) && - Objects.equals(this.customRanking, indexSettingsAsSearchParams.customRanking) && - Objects.equals(this.relevancyStrictness, indexSettingsAsSearchParams.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, indexSettingsAsSearchParams.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, indexSettingsAsSearchParams.attributesToSnippet) && - Objects.equals(this.highlightPreTag, indexSettingsAsSearchParams.highlightPreTag) && - Objects.equals(this.highlightPostTag, indexSettingsAsSearchParams.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, indexSettingsAsSearchParams.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, indexSettingsAsSearchParams.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, indexSettingsAsSearchParams.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, indexSettingsAsSearchParams.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, indexSettingsAsSearchParams.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, indexSettingsAsSearchParams.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, indexSettingsAsSearchParams.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, indexSettingsAsSearchParams.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, indexSettingsAsSearchParams.ignorePlurals) && - Objects.equals(this.removeStopWords, indexSettingsAsSearchParams.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, indexSettingsAsSearchParams.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, indexSettingsAsSearchParams.queryLanguages) && - Objects.equals(this.decompoundQuery, indexSettingsAsSearchParams.decompoundQuery) && - Objects.equals(this.enableRules, indexSettingsAsSearchParams.enableRules) && - Objects.equals(this.enablePersonalization, indexSettingsAsSearchParams.enablePersonalization) && - Objects.equals(this.queryType, indexSettingsAsSearchParams.queryType) && - Objects.equals(this.removeWordsIfNoResults, indexSettingsAsSearchParams.removeWordsIfNoResults) && - Objects.equals(this.mode, indexSettingsAsSearchParams.mode) && - Objects.equals(this.semanticSearch, indexSettingsAsSearchParams.semanticSearch) && - Objects.equals(this.advancedSyntax, indexSettingsAsSearchParams.advancedSyntax) && - Objects.equals(this.optionalWords, indexSettingsAsSearchParams.optionalWords) && - Objects.equals(this.disableExactOnAttributes, indexSettingsAsSearchParams.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, indexSettingsAsSearchParams.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, indexSettingsAsSearchParams.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, indexSettingsAsSearchParams.advancedSyntaxFeatures) && - Objects.equals(this.explain, indexSettingsAsSearchParams.explain) && - Objects.equals(this.distinct, indexSettingsAsSearchParams.distinct) && - Objects.equals(this.attributeForDistinct, indexSettingsAsSearchParams.attributeForDistinct) && - Objects.equals(this.synonyms, indexSettingsAsSearchParams.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, indexSettingsAsSearchParams.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, indexSettingsAsSearchParams.minProximity) && - Objects.equals(this.responseFields, indexSettingsAsSearchParams.responseFields) && - Objects.equals(this.maxFacetHits, indexSettingsAsSearchParams.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, indexSettingsAsSearchParams.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, indexSettingsAsSearchParams.renderingContent) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndexSettingsAsSearchParams {\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParamsSemanticSearch.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParamsSemanticSearch.java deleted file mode 100644 index 0d121de8b8..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/IndexSettingsAsSearchParamsSemanticSearch.java +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_. - */ -public class IndexSettingsAsSearchParamsSemanticSearch { - - @JsonProperty("eventSources") - private List eventSources; - - public IndexSettingsAsSearchParamsSemanticSearch setEventSources(List eventSources) { - this.eventSources = eventSources; - return this; - } - - public IndexSettingsAsSearchParamsSemanticSearch addEventSources(String eventSourcesItem) { - if (this.eventSources == null) { - this.eventSources = new ArrayList<>(); - } - this.eventSources.add(eventSourcesItem); - return this; - } - - /** - * Indices from which to collect click and conversion events. If null, the current index and - * replica group will be used as the event source. - * - * @return eventSources - */ - @javax.annotation.Nullable - public List getEventSources() { - return eventSources; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IndexSettingsAsSearchParamsSemanticSearch indexSettingsAsSearchParamsSemanticSearch = (IndexSettingsAsSearchParamsSemanticSearch) o; - return Objects.equals(this.eventSources, indexSettingsAsSearchParamsSemanticSearch.eventSources); - } - - @Override - public int hashCode() { - return Objects.hash(eventSources); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IndexSettingsAsSearchParamsSemanticSearch {\n"); - sb.append(" eventSources: ").append(toIndentedString(eventSources)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Languages.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Languages.java deleted file mode 100644 index 452650f364..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Languages.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Dictionary language. */ -public class Languages { - - @JsonProperty("plurals") - private DictionaryLanguage plurals; - - @JsonProperty("stopwords") - private DictionaryLanguage stopwords; - - @JsonProperty("compounds") - private DictionaryLanguage compounds; - - public Languages setPlurals(DictionaryLanguage plurals) { - this.plurals = plurals; - return this; - } - - /** - * Get plurals - * - * @return plurals - */ - @javax.annotation.Nullable - public DictionaryLanguage getPlurals() { - return plurals; - } - - public Languages setStopwords(DictionaryLanguage stopwords) { - this.stopwords = stopwords; - return this; - } - - /** - * Get stopwords - * - * @return stopwords - */ - @javax.annotation.Nullable - public DictionaryLanguage getStopwords() { - return stopwords; - } - - public Languages setCompounds(DictionaryLanguage compounds) { - this.compounds = compounds; - return this; - } - - /** - * Get compounds - * - * @return compounds - */ - @javax.annotation.Nullable - public DictionaryLanguage getCompounds() { - return compounds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Languages languages = (Languages) o; - return ( - Objects.equals(this.plurals, languages.plurals) && - Objects.equals(this.stopwords, languages.stopwords) && - Objects.equals(this.compounds, languages.compounds) - ); - } - - @Override - public int hashCode() { - return Objects.hash(plurals, stopwords, compounds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Languages {\n"); - sb.append(" plurals: ").append(toIndentedString(plurals)).append("\n"); - sb.append(" stopwords: ").append(toIndentedString(stopwords)).append("\n"); - sb.append(" compounds: ").append(toIndentedString(compounds)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListApiKeysResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListApiKeysResponse.java deleted file mode 100644 index f7980ee643..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListApiKeysResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ListApiKeysResponse */ -public class ListApiKeysResponse { - - @JsonProperty("keys") - private List keys = new ArrayList<>(); - - public ListApiKeysResponse setKeys(List keys) { - this.keys = keys; - return this; - } - - public ListApiKeysResponse addKeys(GetApiKeyResponse keysItem) { - this.keys.add(keysItem); - return this; - } - - /** - * API keys. - * - * @return keys - */ - @javax.annotation.Nonnull - public List getKeys() { - return keys; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListApiKeysResponse listApiKeysResponse = (ListApiKeysResponse) o; - return Objects.equals(this.keys, listApiKeysResponse.keys); - } - - @Override - public int hashCode() { - return Objects.hash(keys); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListApiKeysResponse {\n"); - sb.append(" keys: ").append(toIndentedString(keys)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListClustersResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListClustersResponse.java deleted file mode 100644 index 1f07f37b35..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListClustersResponse.java +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Clusters. */ -public class ListClustersResponse { - - @JsonProperty("topUsers") - private List topUsers = new ArrayList<>(); - - public ListClustersResponse setTopUsers(List topUsers) { - this.topUsers = topUsers; - return this; - } - - public ListClustersResponse addTopUsers(String topUsersItem) { - this.topUsers.add(topUsersItem); - return this; - } - - /** - * Key-value pairs with cluster names as keys and lists of users with the highest number of - * records per cluster as values. - * - * @return topUsers - */ - @javax.annotation.Nonnull - public List getTopUsers() { - return topUsers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListClustersResponse listClustersResponse = (ListClustersResponse) o; - return Objects.equals(this.topUsers, listClustersResponse.topUsers); - } - - @Override - public int hashCode() { - return Objects.hash(topUsers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListClustersResponse {\n"); - sb.append(" topUsers: ").append(toIndentedString(topUsers)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListIndicesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListIndicesResponse.java deleted file mode 100644 index 48b06a40d1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListIndicesResponse.java +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** ListIndicesResponse */ -public class ListIndicesResponse { - - @JsonProperty("items") - private List items = new ArrayList<>(); - - @JsonProperty("nbPages") - private Integer nbPages; - - public ListIndicesResponse setItems(List items) { - this.items = items; - return this; - } - - public ListIndicesResponse addItems(FetchedIndex itemsItem) { - this.items.add(itemsItem); - return this; - } - - /** - * All indices in your Algolia application. - * - * @return items - */ - @javax.annotation.Nonnull - public List getItems() { - return items; - } - - public ListIndicesResponse setNbPages(Integer nbPages) { - this.nbPages = nbPages; - return this; - } - - /** - * Number of pages. - * - * @return nbPages - */ - @javax.annotation.Nullable - public Integer getNbPages() { - return nbPages; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListIndicesResponse listIndicesResponse = (ListIndicesResponse) o; - return Objects.equals(this.items, listIndicesResponse.items) && Objects.equals(this.nbPages, listIndicesResponse.nbPages); - } - - @Override - public int hashCode() { - return Objects.hash(items, nbPages); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListIndicesResponse {\n"); - sb.append(" items: ").append(toIndentedString(items)).append("\n"); - sb.append(" nbPages: ").append(toIndentedString(nbPages)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListUserIdsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListUserIdsResponse.java deleted file mode 100644 index 2cc6319fa0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ListUserIdsResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** User ID data. */ -public class ListUserIdsResponse { - - @JsonProperty("userIDs") - private List userIDs = new ArrayList<>(); - - public ListUserIdsResponse setUserIDs(List userIDs) { - this.userIDs = userIDs; - return this; - } - - public ListUserIdsResponse addUserIDs(UserId userIDsItem) { - this.userIDs.add(userIDsItem); - return this; - } - - /** - * User IDs. - * - * @return userIDs - */ - @javax.annotation.Nonnull - public List getUserIDs() { - return userIDs; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListUserIdsResponse listUserIdsResponse = (ListUserIdsResponse) o; - return Objects.equals(this.userIDs, listUserIdsResponse.userIDs); - } - - @Override - public int hashCode() { - return Objects.hash(userIDs); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListUserIdsResponse {\n"); - sb.append(" userIDs: ").append(toIndentedString(userIDs)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Log.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Log.java deleted file mode 100644 index 8b66b84c70..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Log.java +++ /dev/null @@ -1,373 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Log */ -public class Log { - - @JsonProperty("timestamp") - private String timestamp; - - @JsonProperty("method") - private String method; - - @JsonProperty("answer_code") - private String answerCode; - - @JsonProperty("query_body") - private String queryBody; - - @JsonProperty("answer") - private String answer; - - @JsonProperty("url") - private String url; - - @JsonProperty("ip") - private String ip; - - @JsonProperty("query_headers") - private String queryHeaders; - - @JsonProperty("sha1") - private String sha1; - - @JsonProperty("nb_api_calls") - private String nbApiCalls; - - @JsonProperty("processing_time_ms") - private String processingTimeMs; - - @JsonProperty("index") - private String index; - - @JsonProperty("query_params") - private String queryParams; - - @JsonProperty("query_nb_hits") - private String queryNbHits; - - @JsonProperty("inner_queries") - private List innerQueries; - - public Log setTimestamp(String timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Timestamp in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return timestamp - */ - @javax.annotation.Nonnull - public String getTimestamp() { - return timestamp; - } - - public Log setMethod(String method) { - this.method = method; - return this; - } - - /** - * HTTP method of the performed request. - * - * @return method - */ - @javax.annotation.Nonnull - public String getMethod() { - return method; - } - - public Log setAnswerCode(String answerCode) { - this.answerCode = answerCode; - return this; - } - - /** - * HTTP response code. - * - * @return answerCode - */ - @javax.annotation.Nonnull - public String getAnswerCode() { - return answerCode; - } - - public Log setQueryBody(String queryBody) { - this.queryBody = queryBody; - return this; - } - - /** - * Request body. Truncated after 1,000 characters. - * - * @return queryBody - */ - @javax.annotation.Nonnull - public String getQueryBody() { - return queryBody; - } - - public Log setAnswer(String answer) { - this.answer = answer; - return this; - } - - /** - * Answer body. Truncated after 1,000 characters. - * - * @return answer - */ - @javax.annotation.Nonnull - public String getAnswer() { - return answer; - } - - public Log setUrl(String url) { - this.url = url; - return this; - } - - /** - * Request URL. - * - * @return url - */ - @javax.annotation.Nonnull - public String getUrl() { - return url; - } - - public Log setIp(String ip) { - this.ip = ip; - return this; - } - - /** - * IP address of the client that performed the request. - * - * @return ip - */ - @javax.annotation.Nonnull - public String getIp() { - return ip; - } - - public Log setQueryHeaders(String queryHeaders) { - this.queryHeaders = queryHeaders; - return this; - } - - /** - * Request headers (API key is obfuscated). - * - * @return queryHeaders - */ - @javax.annotation.Nonnull - public String getQueryHeaders() { - return queryHeaders; - } - - public Log setSha1(String sha1) { - this.sha1 = sha1; - return this; - } - - /** - * SHA1 signature of the log entry. - * - * @return sha1 - */ - @javax.annotation.Nonnull - public String getSha1() { - return sha1; - } - - public Log setNbApiCalls(String nbApiCalls) { - this.nbApiCalls = nbApiCalls; - return this; - } - - /** - * Number of API calls. - * - * @return nbApiCalls - */ - @javax.annotation.Nonnull - public String getNbApiCalls() { - return nbApiCalls; - } - - public Log setProcessingTimeMs(String processingTimeMs) { - this.processingTimeMs = processingTimeMs; - return this; - } - - /** - * Processing time for the query. Doesn't include network time. - * - * @return processingTimeMs - */ - @javax.annotation.Nonnull - public String getProcessingTimeMs() { - return processingTimeMs; - } - - public Log setIndex(String index) { - this.index = index; - return this; - } - - /** - * Index targeted by the query. - * - * @return index - */ - @javax.annotation.Nullable - public String getIndex() { - return index; - } - - public Log setQueryParams(String queryParams) { - this.queryParams = queryParams; - return this; - } - - /** - * Query parameters sent with the request. - * - * @return queryParams - */ - @javax.annotation.Nullable - public String getQueryParams() { - return queryParams; - } - - public Log setQueryNbHits(String queryNbHits) { - this.queryNbHits = queryNbHits; - return this; - } - - /** - * Number of hits returned for the query. - * - * @return queryNbHits - */ - @javax.annotation.Nullable - public String getQueryNbHits() { - return queryNbHits; - } - - public Log setInnerQueries(List innerQueries) { - this.innerQueries = innerQueries; - return this; - } - - public Log addInnerQueries(LogQuery innerQueriesItem) { - if (this.innerQueries == null) { - this.innerQueries = new ArrayList<>(); - } - this.innerQueries.add(innerQueriesItem); - return this; - } - - /** - * Performed queries for the given request. - * - * @return innerQueries - */ - @javax.annotation.Nullable - public List getInnerQueries() { - return innerQueries; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Log log = (Log) o; - return ( - Objects.equals(this.timestamp, log.timestamp) && - Objects.equals(this.method, log.method) && - Objects.equals(this.answerCode, log.answerCode) && - Objects.equals(this.queryBody, log.queryBody) && - Objects.equals(this.answer, log.answer) && - Objects.equals(this.url, log.url) && - Objects.equals(this.ip, log.ip) && - Objects.equals(this.queryHeaders, log.queryHeaders) && - Objects.equals(this.sha1, log.sha1) && - Objects.equals(this.nbApiCalls, log.nbApiCalls) && - Objects.equals(this.processingTimeMs, log.processingTimeMs) && - Objects.equals(this.index, log.index) && - Objects.equals(this.queryParams, log.queryParams) && - Objects.equals(this.queryNbHits, log.queryNbHits) && - Objects.equals(this.innerQueries, log.innerQueries) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - timestamp, - method, - answerCode, - queryBody, - answer, - url, - ip, - queryHeaders, - sha1, - nbApiCalls, - processingTimeMs, - index, - queryParams, - queryNbHits, - innerQueries - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Log {\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append(" method: ").append(toIndentedString(method)).append("\n"); - sb.append(" answerCode: ").append(toIndentedString(answerCode)).append("\n"); - sb.append(" queryBody: ").append(toIndentedString(queryBody)).append("\n"); - sb.append(" answer: ").append(toIndentedString(answer)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" queryHeaders: ").append(toIndentedString(queryHeaders)).append("\n"); - sb.append(" sha1: ").append(toIndentedString(sha1)).append("\n"); - sb.append(" nbApiCalls: ").append(toIndentedString(nbApiCalls)).append("\n"); - sb.append(" processingTimeMs: ").append(toIndentedString(processingTimeMs)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" queryParams: ").append(toIndentedString(queryParams)).append("\n"); - sb.append(" queryNbHits: ").append(toIndentedString(queryNbHits)).append("\n"); - sb.append(" innerQueries: ").append(toIndentedString(innerQueries)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/LogQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/LogQuery.java deleted file mode 100644 index 23fc166b6a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/LogQuery.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** LogQuery */ -public class LogQuery { - - @JsonProperty("index_name") - private String indexName; - - @JsonProperty("user_token") - private String userToken; - - @JsonProperty("query_id") - private String queryId; - - public LogQuery setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Index targeted by the query. - * - * @return indexName - */ - @javax.annotation.Nullable - public String getIndexName() { - return indexName; - } - - public LogQuery setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * User identifier. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public LogQuery setQueryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Unique query identifier. - * - * @return queryId - */ - @javax.annotation.Nullable - public String getQueryId() { - return queryId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogQuery logQuery = (LogQuery) o; - return ( - Objects.equals(this.indexName, logQuery.indexName) && - Objects.equals(this.userToken, logQuery.userToken) && - Objects.equals(this.queryId, logQuery.queryId) - ); - } - - @Override - public int hashCode() { - return Objects.hash(indexName, userToken, queryId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LogQuery {\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" queryId: ").append(toIndentedString(queryId)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/LogType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/LogType.java deleted file mode 100644 index 6fcea87437..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/LogType.java +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets logType */ -public enum LogType { - ALL("all"), - - QUERY("query"), - - BUILD("build"), - - ERROR("error"); - - private final String value; - - LogType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static LogType fromValue(String value) { - for (LogType b : LogType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MatchLevel.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MatchLevel.java deleted file mode 100644 index 85875316c7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MatchLevel.java +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Indicates how well the attribute matched the search query. */ -public enum MatchLevel { - NONE("none"), - - PARTIAL("partial"), - - FULL("full"); - - private final String value; - - MatchLevel(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static MatchLevel fromValue(String value) { - for (MatchLevel b : MatchLevel.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MatchedGeoLocation.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MatchedGeoLocation.java deleted file mode 100644 index 889c1b6074..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MatchedGeoLocation.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** MatchedGeoLocation */ -public class MatchedGeoLocation { - - @JsonProperty("lat") - private Double lat; - - @JsonProperty("lng") - private Double lng; - - @JsonProperty("distance") - private Integer distance; - - public MatchedGeoLocation setLat(Double lat) { - this.lat = lat; - return this; - } - - /** - * Latitude of the matched location. - * - * @return lat - */ - @javax.annotation.Nullable - public Double getLat() { - return lat; - } - - public MatchedGeoLocation setLng(Double lng) { - this.lng = lng; - return this; - } - - /** - * Longitude of the matched location. - * - * @return lng - */ - @javax.annotation.Nullable - public Double getLng() { - return lng; - } - - public MatchedGeoLocation setDistance(Integer distance) { - this.distance = distance; - return this; - } - - /** - * Distance between the matched location and the search location (in meters). - * - * @return distance - */ - @javax.annotation.Nullable - public Integer getDistance() { - return distance; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MatchedGeoLocation matchedGeoLocation = (MatchedGeoLocation) o; - return ( - Objects.equals(this.lat, matchedGeoLocation.lat) && - Objects.equals(this.lng, matchedGeoLocation.lng) && - Objects.equals(this.distance, matchedGeoLocation.distance) - ); - } - - @Override - public int hashCode() { - return Objects.hash(lat, lng, distance); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MatchedGeoLocation {\n"); - sb.append(" lat: ").append(toIndentedString(lat)).append("\n"); - sb.append(" lng: ").append(toIndentedString(lng)).append("\n"); - sb.append(" distance: ").append(toIndentedString(distance)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MixedSearchFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MixedSearchFilters.java deleted file mode 100644 index ccaa8320e6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MixedSearchFilters.java +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** MixedSearchFilters */ -@JsonDeserialize(using = MixedSearchFilters.MixedSearchFiltersDeserializer.class) -@JsonSerialize(using = MixedSearchFilters.MixedSearchFiltersSerializer.class) -public abstract class MixedSearchFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(MixedSearchFilters.class.getName()); - - public static MixedSearchFilters of(List inside) { - return new MixedSearchFiltersListOfString(inside); - } - - public static MixedSearchFilters of(String inside) { - return new MixedSearchFiltersString(inside); - } - - public static class MixedSearchFiltersSerializer extends StdSerializer { - - public MixedSearchFiltersSerializer(Class t) { - super(t); - } - - public MixedSearchFiltersSerializer() { - this(null); - } - - @Override - public void serialize(MixedSearchFilters value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class MixedSearchFiltersDeserializer extends StdDeserializer { - - public MixedSearchFiltersDeserializer() { - this(MixedSearchFilters.class); - } - - public MixedSearchFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public MixedSearchFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return MixedSearchFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return MixedSearchFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public MixedSearchFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "MixedSearchFilters cannot be null"); - } - } -} - -class MixedSearchFiltersListOfString extends MixedSearchFilters { - - private final List insideValue; - - MixedSearchFiltersListOfString(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class MixedSearchFiltersString extends MixedSearchFilters { - - private final String insideValue; - - MixedSearchFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Mode.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Mode.java deleted file mode 100644 index 1ccd9ef67c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Mode.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Search mode the index will use to query for results. */ -public enum Mode { - NEURAL_SEARCH("neuralSearch"), - - KEYWORD_SEARCH("keywordSearch"); - - private final String value; - - Mode(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Mode fromValue(String value) { - for (Mode b : Mode.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MultipleBatchRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MultipleBatchRequest.java deleted file mode 100644 index 377c34823d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MultipleBatchRequest.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** MultipleBatchRequest */ -public class MultipleBatchRequest { - - @JsonProperty("action") - private Action action; - - @JsonProperty("body") - private Object body; - - @JsonProperty("indexName") - private String indexName; - - public MultipleBatchRequest setAction(Action action) { - this.action = action; - return this; - } - - /** - * Get action - * - * @return action - */ - @javax.annotation.Nonnull - public Action getAction() { - return action; - } - - public MultipleBatchRequest setBody(Object body) { - this.body = body; - return this; - } - - /** - * Operation arguments (varies with specified `action`). - * - * @return body - */ - @javax.annotation.Nonnull - public Object getBody() { - return body; - } - - public MultipleBatchRequest setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Index to target for this operation. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultipleBatchRequest multipleBatchRequest = (MultipleBatchRequest) o; - return ( - Objects.equals(this.action, multipleBatchRequest.action) && - Objects.equals(this.body, multipleBatchRequest.body) && - Objects.equals(this.indexName, multipleBatchRequest.indexName) - ); - } - - @Override - public int hashCode() { - return Objects.hash(action, body, indexName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultipleBatchRequest {\n"); - sb.append(" action: ").append(toIndentedString(action)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MultipleBatchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MultipleBatchResponse.java deleted file mode 100644 index 8d21317d6d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/MultipleBatchResponse.java +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** MultipleBatchResponse */ -public class MultipleBatchResponse { - - @JsonProperty("taskID") - private Map taskID = new HashMap<>(); - - @JsonProperty("objectIDs") - private List objectIDs = new ArrayList<>(); - - public MultipleBatchResponse setTaskID(Map taskID) { - this.taskID = taskID; - return this; - } - - public MultipleBatchResponse putTaskID(String key, Long taskIDItem) { - this.taskID.put(key, taskIDItem); - return this; - } - - /** - * TaskIDs per index. - * - * @return taskID - */ - @javax.annotation.Nonnull - public Map getTaskID() { - return taskID; - } - - public MultipleBatchResponse setObjectIDs(List objectIDs) { - this.objectIDs = objectIDs; - return this; - } - - public MultipleBatchResponse addObjectIDs(String objectIDsItem) { - this.objectIDs.add(objectIDsItem); - return this; - } - - /** - * Unique object (record) identifiers. - * - * @return objectIDs - */ - @javax.annotation.Nonnull - public List getObjectIDs() { - return objectIDs; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultipleBatchResponse multipleBatchResponse = (MultipleBatchResponse) o; - return Objects.equals(this.taskID, multipleBatchResponse.taskID) && Objects.equals(this.objectIDs, multipleBatchResponse.objectIDs); - } - - @Override - public int hashCode() { - return Objects.hash(taskID, objectIDs); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultipleBatchResponse {\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).append("\n"); - sb.append(" objectIDs: ").append(toIndentedString(objectIDs)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/NumericFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/NumericFilters.java deleted file mode 100644 index 620d7699be..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/NumericFilters.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * [Filter on numeric - * attributes](https://www.algolia.com/doc/api-reference/api-parameters/numericFilters/). - */ -@JsonDeserialize(using = NumericFilters.NumericFiltersDeserializer.class) -@JsonSerialize(using = NumericFilters.NumericFiltersSerializer.class) -public abstract class NumericFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(NumericFilters.class.getName()); - - public static NumericFilters of(List inside) { - return new NumericFiltersListOfMixedSearchFilters(inside); - } - - public static NumericFilters of(String inside) { - return new NumericFiltersString(inside); - } - - public static class NumericFiltersSerializer extends StdSerializer { - - public NumericFiltersSerializer(Class t) { - super(t); - } - - public NumericFiltersSerializer() { - this(null); - } - - @Override - public void serialize(NumericFilters value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class NumericFiltersDeserializer extends StdDeserializer { - - public NumericFiltersDeserializer() { - this(NumericFilters.class); - } - - public NumericFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public NumericFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return NumericFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return NumericFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public NumericFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "NumericFilters cannot be null"); - } - } -} - -class NumericFiltersListOfMixedSearchFilters extends NumericFilters { - - private final List insideValue; - - NumericFiltersListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class NumericFiltersString extends NumericFilters { - - private final String insideValue; - - NumericFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OperationIndexParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OperationIndexParams.java deleted file mode 100644 index 6c32864b55..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OperationIndexParams.java +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** OperationIndexParams */ -public class OperationIndexParams { - - @JsonProperty("operation") - private OperationType operation; - - @JsonProperty("destination") - private String destination; - - @JsonProperty("scope") - private List scope; - - public OperationIndexParams setOperation(OperationType operation) { - this.operation = operation; - return this; - } - - /** - * Get operation - * - * @return operation - */ - @javax.annotation.Nonnull - public OperationType getOperation() { - return operation; - } - - public OperationIndexParams setDestination(String destination) { - this.destination = destination; - return this; - } - - /** - * Algolia index name. - * - * @return destination - */ - @javax.annotation.Nonnull - public String getDestination() { - return destination; - } - - public OperationIndexParams setScope(List scope) { - this.scope = scope; - return this; - } - - public OperationIndexParams addScope(ScopeType scopeItem) { - if (this.scope == null) { - this.scope = new ArrayList<>(); - } - this.scope.add(scopeItem); - return this; - } - - /** - * **This only applies to the _copy_ operation.** If you omit `scope`, the copy command copies all - * records, settings, synonyms, and rules. If you specify `scope`, only the specified scopes are - * copied. - * - * @return scope - */ - @javax.annotation.Nullable - public List getScope() { - return scope; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OperationIndexParams operationIndexParams = (OperationIndexParams) o; - return ( - Objects.equals(this.operation, operationIndexParams.operation) && - Objects.equals(this.destination, operationIndexParams.destination) && - Objects.equals(this.scope, operationIndexParams.scope) - ); - } - - @Override - public int hashCode() { - return Objects.hash(operation, destination, scope); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OperationIndexParams {\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); - sb.append(" scope: ").append(toIndentedString(scope)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OperationType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OperationType.java deleted file mode 100644 index 57d9ec95e0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OperationType.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Operation to perform (_move_ or _copy_). */ -public enum OperationType { - MOVE("move"), - - COPY("copy"); - - private final String value; - - OperationType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OperationType fromValue(String value) { - for (OperationType b : OperationType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OptionalFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OptionalFilters.java deleted file mode 100644 index 549ffe2998..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/OptionalFilters.java +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * Create filters to boost or demote records. Records that match the filter are ranked higher for - * positive and lower for negative optional filters. In contrast to regular filters, records that - * don't match the optional filter are still included in the results, only their ranking is - * affected. - */ -@JsonDeserialize(using = OptionalFilters.OptionalFiltersDeserializer.class) -@JsonSerialize(using = OptionalFilters.OptionalFiltersSerializer.class) -public abstract class OptionalFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(OptionalFilters.class.getName()); - - public static OptionalFilters of(List inside) { - return new OptionalFiltersListOfMixedSearchFilters(inside); - } - - public static OptionalFilters of(String inside) { - return new OptionalFiltersString(inside); - } - - public static class OptionalFiltersSerializer extends StdSerializer { - - public OptionalFiltersSerializer(Class t) { - super(t); - } - - public OptionalFiltersSerializer() { - this(null); - } - - @Override - public void serialize(OptionalFilters value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class OptionalFiltersDeserializer extends StdDeserializer { - - public OptionalFiltersDeserializer() { - this(OptionalFilters.class); - } - - public OptionalFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public OptionalFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return OptionalFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return OptionalFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public OptionalFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "OptionalFilters cannot be null"); - } - } -} - -class OptionalFiltersListOfMixedSearchFilters extends OptionalFilters { - - private final List insideValue; - - OptionalFiltersListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class OptionalFiltersString extends OptionalFilters { - - private final String insideValue; - - OptionalFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Params.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Params.java deleted file mode 100644 index 04c8808c75..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Params.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Additional search parameters. */ -public class Params { - - @JsonProperty("query") - private ConsequenceQuery query; - - @JsonProperty("automaticFacetFilters") - private AutomaticFacetFilters automaticFacetFilters; - - @JsonProperty("automaticOptionalFacetFilters") - private AutomaticFacetFilters automaticOptionalFacetFilters; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - public Params setQuery(ConsequenceQuery query) { - this.query = query; - return this; - } - - /** - * Get query - * - * @return query - */ - @javax.annotation.Nullable - public ConsequenceQuery getQuery() { - return query; - } - - public Params setAutomaticFacetFilters(AutomaticFacetFilters automaticFacetFilters) { - this.automaticFacetFilters = automaticFacetFilters; - return this; - } - - /** - * Get automaticFacetFilters - * - * @return automaticFacetFilters - */ - @javax.annotation.Nullable - public AutomaticFacetFilters getAutomaticFacetFilters() { - return automaticFacetFilters; - } - - public Params setAutomaticOptionalFacetFilters(AutomaticFacetFilters automaticOptionalFacetFilters) { - this.automaticOptionalFacetFilters = automaticOptionalFacetFilters; - return this; - } - - /** - * Get automaticOptionalFacetFilters - * - * @return automaticOptionalFacetFilters - */ - @javax.annotation.Nullable - public AutomaticFacetFilters getAutomaticOptionalFacetFilters() { - return automaticOptionalFacetFilters; - } - - public Params setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Params params = (Params) o; - return ( - Objects.equals(this.query, params.query) && - Objects.equals(this.automaticFacetFilters, params.automaticFacetFilters) && - Objects.equals(this.automaticOptionalFacetFilters, params.automaticOptionalFacetFilters) && - Objects.equals(this.renderingContent, params.renderingContent) - ); - } - - @Override - public int hashCode() { - return Objects.hash(query, automaticFacetFilters, automaticOptionalFacetFilters, renderingContent); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Params {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" automaticFacetFilters: ").append(toIndentedString(automaticFacetFilters)).append("\n"); - sb.append(" automaticOptionalFacetFilters: ").append(toIndentedString(automaticOptionalFacetFilters)).append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Personalization.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Personalization.java deleted file mode 100644 index 2c48ff881b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Personalization.java +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Personalization */ -public class Personalization { - - @JsonProperty("filtersScore") - private Integer filtersScore; - - @JsonProperty("rankingScore") - private Integer rankingScore; - - @JsonProperty("score") - private Integer score; - - public Personalization setFiltersScore(Integer filtersScore) { - this.filtersScore = filtersScore; - return this; - } - - /** - * The score of the filters. - * - * @return filtersScore - */ - @javax.annotation.Nullable - public Integer getFiltersScore() { - return filtersScore; - } - - public Personalization setRankingScore(Integer rankingScore) { - this.rankingScore = rankingScore; - return this; - } - - /** - * The score of the ranking. - * - * @return rankingScore - */ - @javax.annotation.Nullable - public Integer getRankingScore() { - return rankingScore; - } - - public Personalization setScore(Integer score) { - this.score = score; - return this; - } - - /** - * The score of the event. - * - * @return score - */ - @javax.annotation.Nullable - public Integer getScore() { - return score; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Personalization personalization = (Personalization) o; - return ( - Objects.equals(this.filtersScore, personalization.filtersScore) && - Objects.equals(this.rankingScore, personalization.rankingScore) && - Objects.equals(this.score, personalization.score) - ); - } - - @Override - public int hashCode() { - return Objects.hash(filtersScore, rankingScore, score); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Personalization {\n"); - sb.append(" filtersScore: ").append(toIndentedString(filtersScore)).append("\n"); - sb.append(" rankingScore: ").append(toIndentedString(rankingScore)).append("\n"); - sb.append(" score: ").append(toIndentedString(score)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Promote.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Promote.java deleted file mode 100644 index 4ee9372b32..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Promote.java +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** Promote */ -@JsonDeserialize(using = Promote.PromoteDeserializer.class) -@JsonSerialize(using = Promote.PromoteSerializer.class) -public abstract class Promote implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(Promote.class.getName()); - - public static Promote of(PromoteObjectID inside) { - return new PromotePromoteObjectID(inside); - } - - public static Promote of(PromoteObjectIDs inside) { - return new PromotePromoteObjectIDs(inside); - } - - public static class PromoteSerializer extends StdSerializer { - - public PromoteSerializer(Class t) { - super(t); - } - - public PromoteSerializer() { - this(null); - } - - @Override - public void serialize(Promote value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class PromoteDeserializer extends StdDeserializer { - - public PromoteDeserializer() { - this(Promote.class); - } - - public PromoteDeserializer(Class vc) { - super(vc); - } - - @Override - public Promote deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize PromoteObjectID - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - PromoteObjectID value = parser.readValueAs(new TypeReference() {}); - return Promote.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf PromoteObjectID (error: " + e.getMessage() + ") (type: PromoteObjectID)"); - } - } - - // deserialize PromoteObjectIDs - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - PromoteObjectIDs value = parser.readValueAs(new TypeReference() {}); - return Promote.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf PromoteObjectIDs (error: " + e.getMessage() + ") (type: PromoteObjectIDs)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public Promote getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "Promote cannot be null"); - } - } -} - -class PromotePromoteObjectID extends Promote { - - private final PromoteObjectID insideValue; - - PromotePromoteObjectID(PromoteObjectID insideValue) { - this.insideValue = insideValue; - } - - @Override - public PromoteObjectID getInsideValue() { - return insideValue; - } -} - -class PromotePromoteObjectIDs extends Promote { - - private final PromoteObjectIDs insideValue; - - PromotePromoteObjectIDs(PromoteObjectIDs insideValue) { - this.insideValue = insideValue; - } - - @Override - public PromoteObjectIDs getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/PromoteObjectID.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/PromoteObjectID.java deleted file mode 100644 index 915d00d48e..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/PromoteObjectID.java +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Record to promote. */ -public class PromoteObjectID { - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("position") - private Integer position; - - public PromoteObjectID setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique identifier of the record to promote. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public PromoteObjectID setPosition(Integer position) { - this.position = position; - return this; - } - - /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this - * position as a group. For example, if you pronmote four objectIDs to position 0, the records - * take the first four positions. - * - * @return position - */ - @javax.annotation.Nonnull - public Integer getPosition() { - return position; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PromoteObjectID promoteObjectID = (PromoteObjectID) o; - return Objects.equals(this.objectID, promoteObjectID.objectID) && Objects.equals(this.position, promoteObjectID.position); - } - - @Override - public int hashCode() { - return Objects.hash(objectID, position); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PromoteObjectID {\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" position: ").append(toIndentedString(position)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/PromoteObjectIDs.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/PromoteObjectIDs.java deleted file mode 100644 index 32b7bbf4e8..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/PromoteObjectIDs.java +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Records to promote. */ -public class PromoteObjectIDs { - - @JsonProperty("objectIDs") - private List objectIDs = new ArrayList<>(); - - @JsonProperty("position") - private Integer position; - - public PromoteObjectIDs setObjectIDs(List objectIDs) { - this.objectIDs = objectIDs; - return this; - } - - public PromoteObjectIDs addObjectIDs(String objectIDsItem) { - this.objectIDs.add(objectIDsItem); - return this; - } - - /** - * Unique identifiers of the records to promote. - * - * @return objectIDs - */ - @javax.annotation.Nonnull - public List getObjectIDs() { - return objectIDs; - } - - public PromoteObjectIDs setPosition(Integer position) { - this.position = position; - return this; - } - - /** - * The position to promote the records to. If you pass objectIDs, the records are placed at this - * position as a group. For example, if you pronmote four objectIDs to position 0, the records - * take the first four positions. - * - * @return position - */ - @javax.annotation.Nonnull - public Integer getPosition() { - return position; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PromoteObjectIDs promoteObjectIDs = (PromoteObjectIDs) o; - return Objects.equals(this.objectIDs, promoteObjectIDs.objectIDs) && Objects.equals(this.position, promoteObjectIDs.position); - } - - @Override - public int hashCode() { - return Objects.hash(objectIDs, position); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PromoteObjectIDs {\n"); - sb.append(" objectIDs: ").append(toIndentedString(objectIDs)).append("\n"); - sb.append(" position: ").append(toIndentedString(position)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/QueryType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/QueryType.java deleted file mode 100644 index b03f71ae4f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/QueryType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Determines how query words are [interpreted as - * prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/). - */ -public enum QueryType { - PREFIX_LAST("prefixLast"), - - PREFIX_ALL("prefixAll"), - - PREFIX_NONE("prefixNone"); - - private final String value; - - QueryType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static QueryType fromValue(String value) { - for (QueryType b : QueryType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RankingInfo.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RankingInfo.java deleted file mode 100644 index be6af88a8b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RankingInfo.java +++ /dev/null @@ -1,323 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** RankingInfo */ -public class RankingInfo { - - @JsonProperty("filters") - private Integer filters; - - @JsonProperty("firstMatchedWord") - private Integer firstMatchedWord; - - @JsonProperty("geoDistance") - private Integer geoDistance; - - @JsonProperty("geoPrecision") - private Integer geoPrecision; - - @JsonProperty("matchedGeoLocation") - private MatchedGeoLocation matchedGeoLocation; - - @JsonProperty("personalization") - private Personalization personalization; - - @JsonProperty("nbExactWords") - private Integer nbExactWords; - - @JsonProperty("nbTypos") - private Integer nbTypos; - - @JsonProperty("promoted") - private Boolean promoted; - - @JsonProperty("proximityDistance") - private Integer proximityDistance; - - @JsonProperty("userScore") - private Integer userScore; - - @JsonProperty("words") - private Integer words; - - @JsonProperty("promotedByReRanking") - private Boolean promotedByReRanking; - - public RankingInfo setFilters(Integer filters) { - this.filters = filters; - return this; - } - - /** - * This field is reserved for advanced usage. - * - * @return filters - */ - @javax.annotation.Nonnull - public Integer getFilters() { - return filters; - } - - public RankingInfo setFirstMatchedWord(Integer firstMatchedWord) { - this.firstMatchedWord = firstMatchedWord; - return this; - } - - /** - * Position of the most important matched attribute in the attributes to index list. - * - * @return firstMatchedWord - */ - @javax.annotation.Nonnull - public Integer getFirstMatchedWord() { - return firstMatchedWord; - } - - public RankingInfo setGeoDistance(Integer geoDistance) { - this.geoDistance = geoDistance; - return this; - } - - /** - * Distance between the geo location in the search query and the best matching geo location in the - * record, divided by the geo precision (in meters). - * - * @return geoDistance - */ - @javax.annotation.Nonnull - public Integer getGeoDistance() { - return geoDistance; - } - - public RankingInfo setGeoPrecision(Integer geoPrecision) { - this.geoPrecision = geoPrecision; - return this; - } - - /** - * Precision used when computing the geo distance, in meters. - * - * @return geoPrecision - */ - @javax.annotation.Nullable - public Integer getGeoPrecision() { - return geoPrecision; - } - - public RankingInfo setMatchedGeoLocation(MatchedGeoLocation matchedGeoLocation) { - this.matchedGeoLocation = matchedGeoLocation; - return this; - } - - /** - * Get matchedGeoLocation - * - * @return matchedGeoLocation - */ - @javax.annotation.Nullable - public MatchedGeoLocation getMatchedGeoLocation() { - return matchedGeoLocation; - } - - public RankingInfo setPersonalization(Personalization personalization) { - this.personalization = personalization; - return this; - } - - /** - * Get personalization - * - * @return personalization - */ - @javax.annotation.Nullable - public Personalization getPersonalization() { - return personalization; - } - - public RankingInfo setNbExactWords(Integer nbExactWords) { - this.nbExactWords = nbExactWords; - return this; - } - - /** - * Number of exactly matched words. - * - * @return nbExactWords - */ - @javax.annotation.Nonnull - public Integer getNbExactWords() { - return nbExactWords; - } - - public RankingInfo setNbTypos(Integer nbTypos) { - this.nbTypos = nbTypos; - return this; - } - - /** - * Number of typos encountered when matching the record. - * - * @return nbTypos - */ - @javax.annotation.Nonnull - public Integer getNbTypos() { - return nbTypos; - } - - public RankingInfo setPromoted(Boolean promoted) { - this.promoted = promoted; - return this; - } - - /** - * Present and set to true if a Rule promoted the hit. - * - * @return promoted - */ - @javax.annotation.Nonnull - public Boolean getPromoted() { - return promoted; - } - - public RankingInfo setProximityDistance(Integer proximityDistance) { - this.proximityDistance = proximityDistance; - return this; - } - - /** - * When the query contains more than one word, the sum of the distances between matched words (in - * meters). - * - * @return proximityDistance - */ - @javax.annotation.Nullable - public Integer getProximityDistance() { - return proximityDistance; - } - - public RankingInfo setUserScore(Integer userScore) { - this.userScore = userScore; - return this; - } - - /** - * Custom ranking for the object, expressed as a single integer value. - * - * @return userScore - */ - @javax.annotation.Nonnull - public Integer getUserScore() { - return userScore; - } - - public RankingInfo setWords(Integer words) { - this.words = words; - return this; - } - - /** - * Number of matched words, including prefixes and typos. - * - * @return words - */ - @javax.annotation.Nonnull - public Integer getWords() { - return words; - } - - public RankingInfo setPromotedByReRanking(Boolean promotedByReRanking) { - this.promotedByReRanking = promotedByReRanking; - return this; - } - - /** - * Wether the record are promoted by the re-ranking strategy. - * - * @return promotedByReRanking - */ - @javax.annotation.Nullable - public Boolean getPromotedByReRanking() { - return promotedByReRanking; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RankingInfo rankingInfo = (RankingInfo) o; - return ( - Objects.equals(this.filters, rankingInfo.filters) && - Objects.equals(this.firstMatchedWord, rankingInfo.firstMatchedWord) && - Objects.equals(this.geoDistance, rankingInfo.geoDistance) && - Objects.equals(this.geoPrecision, rankingInfo.geoPrecision) && - Objects.equals(this.matchedGeoLocation, rankingInfo.matchedGeoLocation) && - Objects.equals(this.personalization, rankingInfo.personalization) && - Objects.equals(this.nbExactWords, rankingInfo.nbExactWords) && - Objects.equals(this.nbTypos, rankingInfo.nbTypos) && - Objects.equals(this.promoted, rankingInfo.promoted) && - Objects.equals(this.proximityDistance, rankingInfo.proximityDistance) && - Objects.equals(this.userScore, rankingInfo.userScore) && - Objects.equals(this.words, rankingInfo.words) && - Objects.equals(this.promotedByReRanking, rankingInfo.promotedByReRanking) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - filters, - firstMatchedWord, - geoDistance, - geoPrecision, - matchedGeoLocation, - personalization, - nbExactWords, - nbTypos, - promoted, - proximityDistance, - userScore, - words, - promotedByReRanking - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RankingInfo {\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" firstMatchedWord: ").append(toIndentedString(firstMatchedWord)).append("\n"); - sb.append(" geoDistance: ").append(toIndentedString(geoDistance)).append("\n"); - sb.append(" geoPrecision: ").append(toIndentedString(geoPrecision)).append("\n"); - sb.append(" matchedGeoLocation: ").append(toIndentedString(matchedGeoLocation)).append("\n"); - sb.append(" personalization: ").append(toIndentedString(personalization)).append("\n"); - sb.append(" nbExactWords: ").append(toIndentedString(nbExactWords)).append("\n"); - sb.append(" nbTypos: ").append(toIndentedString(nbTypos)).append("\n"); - sb.append(" promoted: ").append(toIndentedString(promoted)).append("\n"); - sb.append(" proximityDistance: ").append(toIndentedString(proximityDistance)).append("\n"); - sb.append(" userScore: ").append(toIndentedString(userScore)).append("\n"); - sb.append(" words: ").append(toIndentedString(words)).append("\n"); - sb.append(" promotedByReRanking: ").append(toIndentedString(promotedByReRanking)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ReRankingApplyFilter.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ReRankingApplyFilter.java deleted file mode 100644 index ff78110953..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ReRankingApplyFilter.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, - * only records that match these filters will be affected by Dynamic Re-Ranking. - */ -@JsonDeserialize(using = ReRankingApplyFilter.ReRankingApplyFilterDeserializer.class) -@JsonSerialize(using = ReRankingApplyFilter.ReRankingApplyFilterSerializer.class) -public abstract class ReRankingApplyFilter implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(ReRankingApplyFilter.class.getName()); - - public static ReRankingApplyFilter of(List inside) { - return new ReRankingApplyFilterListOfMixedSearchFilters(inside); - } - - public static ReRankingApplyFilter of(String inside) { - return new ReRankingApplyFilterString(inside); - } - - public static class ReRankingApplyFilterSerializer extends StdSerializer { - - public ReRankingApplyFilterSerializer(Class t) { - super(t); - } - - public ReRankingApplyFilterSerializer() { - this(null); - } - - @Override - public void serialize(ReRankingApplyFilter value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class ReRankingApplyFilterDeserializer extends StdDeserializer { - - public ReRankingApplyFilterDeserializer() { - this(ReRankingApplyFilter.class); - } - - public ReRankingApplyFilterDeserializer(Class vc) { - super(vc); - } - - @Override - public ReRankingApplyFilter deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return ReRankingApplyFilter.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return ReRankingApplyFilter.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public ReRankingApplyFilter getNullValue(DeserializationContext ctxt) throws JsonMappingException { - return null; - } - } -} - -class ReRankingApplyFilterListOfMixedSearchFilters extends ReRankingApplyFilter { - - private final List insideValue; - - ReRankingApplyFilterListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class ReRankingApplyFilterString extends ReRankingApplyFilter { - - private final String insideValue; - - ReRankingApplyFilterString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java deleted file mode 100644 index a01f5350e1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** RedirectRuleIndexMetadata */ -public class RedirectRuleIndexMetadata { - - @JsonProperty("source") - private String source; - - @JsonProperty("dest") - private String dest; - - @JsonProperty("reason") - private String reason; - - @JsonProperty("succeed") - private Boolean succeed; - - @JsonProperty("data") - private RedirectRuleIndexMetadataData data; - - public RedirectRuleIndexMetadata setSource(String source) { - this.source = source; - return this; - } - - /** - * Source index for the redirect rule. - * - * @return source - */ - @javax.annotation.Nonnull - public String getSource() { - return source; - } - - public RedirectRuleIndexMetadata setDest(String dest) { - this.dest = dest; - return this; - } - - /** - * Destination index for the redirect rule. - * - * @return dest - */ - @javax.annotation.Nonnull - public String getDest() { - return dest; - } - - public RedirectRuleIndexMetadata setReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Reason for the redirect rule. - * - * @return reason - */ - @javax.annotation.Nonnull - public String getReason() { - return reason; - } - - public RedirectRuleIndexMetadata setSucceed(Boolean succeed) { - this.succeed = succeed; - return this; - } - - /** - * Redirect rule status. - * - * @return succeed - */ - @javax.annotation.Nonnull - public Boolean getSucceed() { - return succeed; - } - - public RedirectRuleIndexMetadata setData(RedirectRuleIndexMetadataData data) { - this.data = data; - return this; - } - - /** - * Get data - * - * @return data - */ - @javax.annotation.Nonnull - public RedirectRuleIndexMetadataData getData() { - return data; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RedirectRuleIndexMetadata redirectRuleIndexMetadata = (RedirectRuleIndexMetadata) o; - return ( - Objects.equals(this.source, redirectRuleIndexMetadata.source) && - Objects.equals(this.dest, redirectRuleIndexMetadata.dest) && - Objects.equals(this.reason, redirectRuleIndexMetadata.reason) && - Objects.equals(this.succeed, redirectRuleIndexMetadata.succeed) && - Objects.equals(this.data, redirectRuleIndexMetadata.data) - ); - } - - @Override - public int hashCode() { - return Objects.hash(source, dest, reason, succeed, data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RedirectRuleIndexMetadata {\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" dest: ").append(toIndentedString(dest)).append("\n"); - sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); - sb.append(" succeed: ").append(toIndentedString(succeed)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java deleted file mode 100644 index 3f92182e80..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Redirect rule data. */ -public class RedirectRuleIndexMetadataData { - - @JsonProperty("ruleObjectID") - private String ruleObjectID; - - public RedirectRuleIndexMetadataData setRuleObjectID(String ruleObjectID) { - this.ruleObjectID = ruleObjectID; - return this; - } - - /** - * Get ruleObjectID - * - * @return ruleObjectID - */ - @javax.annotation.Nonnull - public String getRuleObjectID() { - return ruleObjectID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RedirectRuleIndexMetadataData redirectRuleIndexMetadataData = (RedirectRuleIndexMetadataData) o; - return Objects.equals(this.ruleObjectID, redirectRuleIndexMetadataData.ruleObjectID); - } - - @Override - public int hashCode() { - return Objects.hash(ruleObjectID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RedirectRuleIndexMetadataData {\n"); - sb.append(" ruleObjectID: ").append(toIndentedString(ruleObjectID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveStopWords.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveStopWords.java deleted file mode 100644 index d8c54d3e67..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveStopWords.java +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** - * Removes stop (common) words from the query before executing it. `removeStopWords` is used in - * conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words - * should be enabled. This list will override any values that you may have set in `queryLanguages`. - * _true_: enables the stop words feature, ensuring that stop words are removed from consideration - * in a search. The languages supported here are either [every - * language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words - * feature, allowing stop words to be taken into account in a search. - */ -@JsonDeserialize(using = RemoveStopWords.RemoveStopWordsDeserializer.class) -@JsonSerialize(using = RemoveStopWords.RemoveStopWordsSerializer.class) -public abstract class RemoveStopWords implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(RemoveStopWords.class.getName()); - - public static RemoveStopWords of(Boolean inside) { - return new RemoveStopWordsBoolean(inside); - } - - public static RemoveStopWords of(List inside) { - return new RemoveStopWordsListOfString(inside); - } - - public static class RemoveStopWordsSerializer extends StdSerializer { - - public RemoveStopWordsSerializer(Class t) { - super(t); - } - - public RemoveStopWordsSerializer() { - this(null); - } - - @Override - public void serialize(RemoveStopWords value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class RemoveStopWordsDeserializer extends StdDeserializer { - - public RemoveStopWordsDeserializer() { - this(RemoveStopWords.class); - } - - public RemoveStopWordsDeserializer(Class vc) { - super(vc); - } - - @Override - public RemoveStopWords deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize Boolean - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Boolean value = parser.readValueAs(new TypeReference() {}); - return RemoveStopWords.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Boolean (error: " + e.getMessage() + ") (type: Boolean)"); - } - } - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return RemoveStopWords.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public RemoveStopWords getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "RemoveStopWords cannot be null"); - } - } -} - -class RemoveStopWordsBoolean extends RemoveStopWords { - - private final Boolean insideValue; - - RemoveStopWordsBoolean(Boolean insideValue) { - this.insideValue = insideValue; - } - - @Override - public Boolean getInsideValue() { - return insideValue; - } -} - -class RemoveStopWordsListOfString extends RemoveStopWords { - - private final List insideValue; - - RemoveStopWordsListOfString(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveUserIdResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveUserIdResponse.java deleted file mode 100644 index eaa62e2d74..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveUserIdResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** RemoveUserIdResponse */ -public class RemoveUserIdResponse { - - @JsonProperty("deletedAt") - private String deletedAt; - - public RemoveUserIdResponse setDeletedAt(String deletedAt) { - this.deletedAt = deletedAt; - return this; - } - - /** - * Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return deletedAt - */ - @javax.annotation.Nonnull - public String getDeletedAt() { - return deletedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RemoveUserIdResponse removeUserIdResponse = (RemoveUserIdResponse) o; - return Objects.equals(this.deletedAt, removeUserIdResponse.deletedAt); - } - - @Override - public int hashCode() { - return Objects.hash(deletedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RemoveUserIdResponse {\n"); - sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveWordsIfNoResults.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveWordsIfNoResults.java deleted file mode 100644 index 97d42dbdf6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RemoveWordsIfNoResults.java +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Strategy to [remove - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) - * from the query when it doesn't match any hits. - */ -public enum RemoveWordsIfNoResults { - NONE("none"), - - LAST_WORDS("lastWords"), - - FIRST_WORDS("firstWords"), - - ALL_OPTIONAL("allOptional"); - - private final String value; - - RemoveWordsIfNoResults(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static RemoveWordsIfNoResults fromValue(String value) { - for (RemoveWordsIfNoResults b : RemoveWordsIfNoResults.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RenderingContent.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RenderingContent.java deleted file mode 100644 index 635a2f79de..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/RenderingContent.java +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** - * Extra content for the search UI, for example, to control the [ordering and display of - * facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). - * You can set a default value and dynamically override it with - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/). - */ -public class RenderingContent { - - @JsonProperty("facetOrdering") - private FacetOrdering facetOrdering; - - public RenderingContent setFacetOrdering(FacetOrdering facetOrdering) { - this.facetOrdering = facetOrdering; - return this; - } - - /** - * Get facetOrdering - * - * @return facetOrdering - */ - @javax.annotation.Nullable - public FacetOrdering getFacetOrdering() { - return facetOrdering; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RenderingContent renderingContent = (RenderingContent) o; - return Objects.equals(this.facetOrdering, renderingContent.facetOrdering); - } - - @Override - public int hashCode() { - return Objects.hash(facetOrdering); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RenderingContent {\n"); - sb.append(" facetOrdering: ").append(toIndentedString(facetOrdering)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ReplaceSourceResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ReplaceSourceResponse.java deleted file mode 100644 index 821ea031c3..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ReplaceSourceResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** ReplaceSourceResponse */ -public class ReplaceSourceResponse { - - @JsonProperty("updatedAt") - private String updatedAt; - - public ReplaceSourceResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReplaceSourceResponse replaceSourceResponse = (ReplaceSourceResponse) o; - return Objects.equals(this.updatedAt, replaceSourceResponse.updatedAt); - } - - @Override - public int hashCode() { - return Objects.hash(updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReplaceSourceResponse {\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Rule.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Rule.java deleted file mode 100644 index 5703450552..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Rule.java +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Rule object. */ -public class Rule { - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("conditions") - private List conditions; - - @JsonProperty("consequence") - private Consequence consequence; - - @JsonProperty("description") - private String description; - - @JsonProperty("enabled") - private Boolean enabled; - - @JsonProperty("validity") - private List validity; - - public Rule setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique identifier for a rule object. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public Rule setConditions(List conditions) { - this.conditions = conditions; - return this; - } - - public Rule addConditions(Condition conditionsItem) { - if (this.conditions == null) { - this.conditions = new ArrayList<>(); - } - this.conditions.add(conditionsItem); - return this; - } - - /** - * [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions) - * required to activate a rule. You can use up to 25 conditions per rule. - * - * @return conditions - */ - @javax.annotation.Nullable - public List getConditions() { - return conditions; - } - - public Rule setConsequence(Consequence consequence) { - this.consequence = consequence; - return this; - } - - /** - * Get consequence - * - * @return consequence - */ - @javax.annotation.Nullable - public Consequence getConsequence() { - return consequence; - } - - public Rule setDescription(String description) { - this.description = description; - return this; - } - - /** - * Description of the rule's purpose. This can be helpful for display in the Algolia dashboard. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - public Rule setEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. - * - * @return enabled - */ - @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; - } - - public Rule setValidity(List validity) { - this.validity = validity; - return this; - } - - public Rule addValidity(TimeRange validityItem) { - if (this.validity == null) { - this.validity = new ArrayList<>(); - } - this.validity.add(validityItem); - return this; - } - - /** - * If you specify a validity period, the rule _only_ applies only during that period. If - * specified, the array must not be empty. - * - * @return validity - */ - @javax.annotation.Nullable - public List getValidity() { - return validity; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Rule rule = (Rule) o; - return ( - Objects.equals(this.objectID, rule.objectID) && - Objects.equals(this.conditions, rule.conditions) && - Objects.equals(this.consequence, rule.consequence) && - Objects.equals(this.description, rule.description) && - Objects.equals(this.enabled, rule.enabled) && - Objects.equals(this.validity, rule.validity) - ); - } - - @Override - public int hashCode() { - return Objects.hash(objectID, conditions, consequence, description, enabled, validity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Rule {\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); - sb.append(" consequence: ").append(toIndentedString(consequence)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" validity: ").append(toIndentedString(validity)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveObjectResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveObjectResponse.java deleted file mode 100644 index 98829026bc..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveObjectResponse.java +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SaveObjectResponse */ -public class SaveObjectResponse { - - @JsonProperty("createdAt") - private String createdAt; - - @JsonProperty("taskID") - private Long taskID; - - @JsonProperty("objectID") - private String objectID; - - public SaveObjectResponse setCreatedAt(String createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Date of creation (ISO-8601 format). - * - * @return createdAt - */ - @javax.annotation.Nonnull - public String getCreatedAt() { - return createdAt; - } - - public SaveObjectResponse setTaskID(Long taskID) { - this.taskID = taskID; - return this; - } - - /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. - * - * @return taskID - */ - @javax.annotation.Nonnull - public Long getTaskID() { - return taskID; - } - - public SaveObjectResponse setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique object identifier. - * - * @return objectID - */ - @javax.annotation.Nullable - public String getObjectID() { - return objectID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SaveObjectResponse saveObjectResponse = (SaveObjectResponse) o; - return ( - Objects.equals(this.createdAt, saveObjectResponse.createdAt) && - Objects.equals(this.taskID, saveObjectResponse.taskID) && - Objects.equals(this.objectID, saveObjectResponse.objectID) - ); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, taskID, objectID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaveObjectResponse {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveSynonymResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveSynonymResponse.java deleted file mode 100644 index 53ec3a35ce..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SaveSynonymResponse.java +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SaveSynonymResponse */ -public class SaveSynonymResponse { - - @JsonProperty("taskID") - private Long taskID; - - @JsonProperty("updatedAt") - private String updatedAt; - - @JsonProperty("id") - private String id; - - public SaveSynonymResponse setTaskID(Long taskID) { - this.taskID = taskID; - return this; - } - - /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. - * - * @return taskID - */ - @javax.annotation.Nonnull - public Long getTaskID() { - return taskID; - } - - public SaveSynonymResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - public SaveSynonymResponse setId(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of a synonym object. - * - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SaveSynonymResponse saveSynonymResponse = (SaveSynonymResponse) o; - return ( - Objects.equals(this.taskID, saveSynonymResponse.taskID) && - Objects.equals(this.updatedAt, saveSynonymResponse.updatedAt) && - Objects.equals(this.id, saveSynonymResponse.id) - ); - } - - @Override - public int hashCode() { - return Objects.hash(taskID, updatedAt, id); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SaveSynonymResponse {\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ScopeType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ScopeType.java deleted file mode 100644 index 81730fbe70..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/ScopeType.java +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets scopeType */ -public enum ScopeType { - SETTINGS("settings"), - - SYNONYMS("synonyms"), - - RULES("rules"); - - private final String value; - - ScopeType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ScopeType fromValue(String value) { - for (ScopeType b : ScopeType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchDictionaryEntriesParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchDictionaryEntriesParams.java deleted file mode 100644 index 5339a2be76..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchDictionaryEntriesParams.java +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** `searchDictionaryEntries` parameters. */ -public class SearchDictionaryEntriesParams { - - @JsonProperty("query") - private String query; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("language") - private String language; - - public SearchDictionaryEntriesParams setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } - - public SearchDictionaryEntriesParams setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public SearchDictionaryEntriesParams setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public SearchDictionaryEntriesParams setLanguage(String language) { - this.language = language; - return this; - } - - /** - * [Supported language ISO - * code](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/). - * - * @return language - */ - @javax.annotation.Nullable - public String getLanguage() { - return language; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchDictionaryEntriesParams searchDictionaryEntriesParams = (SearchDictionaryEntriesParams) o; - return ( - Objects.equals(this.query, searchDictionaryEntriesParams.query) && - Objects.equals(this.page, searchDictionaryEntriesParams.page) && - Objects.equals(this.hitsPerPage, searchDictionaryEntriesParams.hitsPerPage) && - Objects.equals(this.language, searchDictionaryEntriesParams.language) - ); - } - - @Override - public int hashCode() { - return Objects.hash(query, page, hitsPerPage, language); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchDictionaryEntriesParams {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" language: ").append(toIndentedString(language)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetValuesRequest.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetValuesRequest.java deleted file mode 100644 index 63ca9fe309..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetValuesRequest.java +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchForFacetValuesRequest */ -public class SearchForFacetValuesRequest { - - @JsonProperty("params") - private String params; - - @JsonProperty("facetQuery") - private String facetQuery; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - public SearchForFacetValuesRequest setParams(String params) { - this.params = params; - return this; - } - - /** - * Search parameters as a URL-encoded query string. - * - * @return params - */ - @javax.annotation.Nullable - public String getParams() { - return params; - } - - public SearchForFacetValuesRequest setFacetQuery(String facetQuery) { - this.facetQuery = facetQuery; - return this; - } - - /** - * Text to search inside the facet's values. - * - * @return facetQuery - */ - @javax.annotation.Nullable - public String getFacetQuery() { - return facetQuery; - } - - public SearchForFacetValuesRequest setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchForFacetValuesRequest searchForFacetValuesRequest = (SearchForFacetValuesRequest) o; - return ( - Objects.equals(this.params, searchForFacetValuesRequest.params) && - Objects.equals(this.facetQuery, searchForFacetValuesRequest.facetQuery) && - Objects.equals(this.maxFacetHits, searchForFacetValuesRequest.maxFacetHits) - ); - } - - @Override - public int hashCode() { - return Objects.hash(params, facetQuery, maxFacetHits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchForFacetValuesRequest {\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" facetQuery: ").append(toIndentedString(facetQuery)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetValuesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetValuesResponse.java deleted file mode 100644 index 417bf3935b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetValuesResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchForFacetValuesResponse */ -public class SearchForFacetValuesResponse { - - @JsonProperty("facetHits") - private List facetHits = new ArrayList<>(); - - public SearchForFacetValuesResponse setFacetHits(List facetHits) { - this.facetHits = facetHits; - return this; - } - - public SearchForFacetValuesResponse addFacetHits(FacetHits facetHitsItem) { - this.facetHits.add(facetHitsItem); - return this; - } - - /** - * Get facetHits - * - * @return facetHits - */ - @javax.annotation.Nonnull - public List getFacetHits() { - return facetHits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchForFacetValuesResponse searchForFacetValuesResponse = (SearchForFacetValuesResponse) o; - return Objects.equals(this.facetHits, searchForFacetValuesResponse.facetHits); - } - - @Override - public int hashCode() { - return Objects.hash(facetHits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchForFacetValuesResponse {\n"); - sb.append(" facetHits: ").append(toIndentedString(facetHits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacets.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacets.java deleted file mode 100644 index b88f832c62..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacets.java +++ /dev/null @@ -1,2068 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchForFacets */ -public class SearchForFacets { - - @JsonProperty("params") - private String params; - - @JsonProperty("query") - private String query; - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - @JsonProperty("facet") - private String facet; - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("facetQuery") - private String facetQuery; - - @JsonProperty("type") - private SearchTypeFacet type; - - public SearchForFacets setParams(String params) { - this.params = params; - return this; - } - - /** - * Search parameters as a URL-encoded query string. - * - * @return params - */ - @javax.annotation.Nullable - public String getParams() { - return params; - } - - public SearchForFacets setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public SearchForFacets setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public SearchForFacets setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public SearchForFacets setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public SearchForFacets setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public SearchForFacets setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public SearchForFacets setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public SearchForFacets setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public SearchForFacets setFacets(List facets) { - this.facets = facets; - return this; - } - - public SearchForFacets addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public SearchForFacets setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public SearchForFacets setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public SearchForFacets setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public SearchForFacets setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public SearchForFacets setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public SearchForFacets setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public SearchForFacets setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public SearchForFacets setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public SearchForFacets setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public SearchForFacets setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public SearchForFacets setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public SearchForFacets setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public SearchForFacets addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public SearchForFacets setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public SearchForFacets addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public SearchForFacets setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public SearchForFacets addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public SearchForFacets setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public SearchForFacets addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public SearchForFacets setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public SearchForFacets setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public SearchForFacets setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public SearchForFacets setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public SearchForFacets setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public SearchForFacets setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public SearchForFacets addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public SearchForFacets setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public SearchForFacets setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public SearchForFacets setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public SearchForFacets setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - public SearchForFacets setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public SearchForFacets addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public SearchForFacets setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public SearchForFacets addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public SearchForFacets setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public SearchForFacets addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public SearchForFacets setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public SearchForFacets addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public SearchForFacets setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public SearchForFacets addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public SearchForFacets setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public SearchForFacets setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public SearchForFacets addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public SearchForFacets setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public SearchForFacets addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public SearchForFacets setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public SearchForFacets setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public SearchForFacets setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public SearchForFacets setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public SearchForFacets setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public SearchForFacets setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public SearchForFacets setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public SearchForFacets setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public SearchForFacets setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public SearchForFacets setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public SearchForFacets addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public SearchForFacets setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public SearchForFacets setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public SearchForFacets setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public SearchForFacets setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public SearchForFacets addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public SearchForFacets setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public SearchForFacets setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public SearchForFacets setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public SearchForFacets setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public SearchForFacets setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public SearchForFacets setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public SearchForFacets setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public SearchForFacets setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public SearchForFacets setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public SearchForFacets addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public SearchForFacets setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public SearchForFacets addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public SearchForFacets setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public SearchForFacets setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public SearchForFacets addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public SearchForFacets setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public SearchForFacets addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public SearchForFacets setExplain(List explain) { - this.explain = explain; - return this; - } - - public SearchForFacets addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public SearchForFacets setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public SearchForFacets setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public SearchForFacets setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public SearchForFacets setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public SearchForFacets setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public SearchForFacets setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public SearchForFacets addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public SearchForFacets setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public SearchForFacets setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public SearchForFacets setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - public SearchForFacets setFacet(String facet) { - this.facet = facet; - return this; - } - - /** - * Facet name. - * - * @return facet - */ - @javax.annotation.Nonnull - public String getFacet() { - return facet; - } - - public SearchForFacets setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Algolia index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public SearchForFacets setFacetQuery(String facetQuery) { - this.facetQuery = facetQuery; - return this; - } - - /** - * Text to search inside the facet's values. - * - * @return facetQuery - */ - @javax.annotation.Nullable - public String getFacetQuery() { - return facetQuery; - } - - public SearchForFacets setType(SearchTypeFacet type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - public SearchTypeFacet getType() { - return type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchForFacets searchForFacets = (SearchForFacets) o; - return ( - Objects.equals(this.params, searchForFacets.params) && - Objects.equals(this.query, searchForFacets.query) && - Objects.equals(this.similarQuery, searchForFacets.similarQuery) && - Objects.equals(this.filters, searchForFacets.filters) && - Objects.equals(this.facetFilters, searchForFacets.facetFilters) && - Objects.equals(this.optionalFilters, searchForFacets.optionalFilters) && - Objects.equals(this.numericFilters, searchForFacets.numericFilters) && - Objects.equals(this.tagFilters, searchForFacets.tagFilters) && - Objects.equals(this.sumOrFiltersScores, searchForFacets.sumOrFiltersScores) && - Objects.equals(this.facets, searchForFacets.facets) && - Objects.equals(this.maxValuesPerFacet, searchForFacets.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, searchForFacets.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, searchForFacets.sortFacetValuesBy) && - Objects.equals(this.page, searchForFacets.page) && - Objects.equals(this.offset, searchForFacets.offset) && - Objects.equals(this.length, searchForFacets.length) && - Objects.equals(this.aroundLatLng, searchForFacets.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, searchForFacets.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, searchForFacets.aroundRadius) && - Objects.equals(this.aroundPrecision, searchForFacets.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, searchForFacets.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, searchForFacets.insideBoundingBox) && - Objects.equals(this.insidePolygon, searchForFacets.insidePolygon) && - Objects.equals(this.naturalLanguages, searchForFacets.naturalLanguages) && - Objects.equals(this.ruleContexts, searchForFacets.ruleContexts) && - Objects.equals(this.personalizationImpact, searchForFacets.personalizationImpact) && - Objects.equals(this.userToken, searchForFacets.userToken) && - Objects.equals(this.getRankingInfo, searchForFacets.getRankingInfo) && - Objects.equals(this.clickAnalytics, searchForFacets.clickAnalytics) && - Objects.equals(this.analytics, searchForFacets.analytics) && - Objects.equals(this.analyticsTags, searchForFacets.analyticsTags) && - Objects.equals(this.percentileComputation, searchForFacets.percentileComputation) && - Objects.equals(this.enableABTest, searchForFacets.enableABTest) && - Objects.equals(this.enableReRanking, searchForFacets.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, searchForFacets.reRankingApplyFilter) && - Objects.equals(this.attributesForFaceting, searchForFacets.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, searchForFacets.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, searchForFacets.restrictSearchableAttributes) && - Objects.equals(this.ranking, searchForFacets.ranking) && - Objects.equals(this.customRanking, searchForFacets.customRanking) && - Objects.equals(this.relevancyStrictness, searchForFacets.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, searchForFacets.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, searchForFacets.attributesToSnippet) && - Objects.equals(this.highlightPreTag, searchForFacets.highlightPreTag) && - Objects.equals(this.highlightPostTag, searchForFacets.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, searchForFacets.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, searchForFacets.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, searchForFacets.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, searchForFacets.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, searchForFacets.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, searchForFacets.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, searchForFacets.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, searchForFacets.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, searchForFacets.ignorePlurals) && - Objects.equals(this.removeStopWords, searchForFacets.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, searchForFacets.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, searchForFacets.queryLanguages) && - Objects.equals(this.decompoundQuery, searchForFacets.decompoundQuery) && - Objects.equals(this.enableRules, searchForFacets.enableRules) && - Objects.equals(this.enablePersonalization, searchForFacets.enablePersonalization) && - Objects.equals(this.queryType, searchForFacets.queryType) && - Objects.equals(this.removeWordsIfNoResults, searchForFacets.removeWordsIfNoResults) && - Objects.equals(this.mode, searchForFacets.mode) && - Objects.equals(this.semanticSearch, searchForFacets.semanticSearch) && - Objects.equals(this.advancedSyntax, searchForFacets.advancedSyntax) && - Objects.equals(this.optionalWords, searchForFacets.optionalWords) && - Objects.equals(this.disableExactOnAttributes, searchForFacets.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, searchForFacets.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, searchForFacets.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, searchForFacets.advancedSyntaxFeatures) && - Objects.equals(this.explain, searchForFacets.explain) && - Objects.equals(this.distinct, searchForFacets.distinct) && - Objects.equals(this.attributeForDistinct, searchForFacets.attributeForDistinct) && - Objects.equals(this.synonyms, searchForFacets.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, searchForFacets.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, searchForFacets.minProximity) && - Objects.equals(this.responseFields, searchForFacets.responseFields) && - Objects.equals(this.maxFacetHits, searchForFacets.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, searchForFacets.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, searchForFacets.renderingContent) && - Objects.equals(this.facet, searchForFacets.facet) && - Objects.equals(this.indexName, searchForFacets.indexName) && - Objects.equals(this.facetQuery, searchForFacets.facetQuery) && - Objects.equals(this.type, searchForFacets.type) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - params, - query, - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter, - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent, - facet, - indexName, - facetQuery, - type - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchForFacets {\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).append("\n"); - sb.append(" facet: ").append(toIndentedString(facet)).append("\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" facetQuery: ").append(toIndentedString(facetQuery)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetsOptions.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetsOptions.java deleted file mode 100644 index 6d15e1becc..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForFacetsOptions.java +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchForFacetsOptions */ -public class SearchForFacetsOptions { - - @JsonProperty("facet") - private String facet; - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("facetQuery") - private String facetQuery; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("type") - private SearchTypeFacet type; - - public SearchForFacetsOptions setFacet(String facet) { - this.facet = facet; - return this; - } - - /** - * Facet name. - * - * @return facet - */ - @javax.annotation.Nonnull - public String getFacet() { - return facet; - } - - public SearchForFacetsOptions setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Algolia index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public SearchForFacetsOptions setFacetQuery(String facetQuery) { - this.facetQuery = facetQuery; - return this; - } - - /** - * Text to search inside the facet's values. - * - * @return facetQuery - */ - @javax.annotation.Nullable - public String getFacetQuery() { - return facetQuery; - } - - public SearchForFacetsOptions setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public SearchForFacetsOptions setType(SearchTypeFacet type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - public SearchTypeFacet getType() { - return type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchForFacetsOptions searchForFacetsOptions = (SearchForFacetsOptions) o; - return ( - Objects.equals(this.facet, searchForFacetsOptions.facet) && - Objects.equals(this.indexName, searchForFacetsOptions.indexName) && - Objects.equals(this.facetQuery, searchForFacetsOptions.facetQuery) && - Objects.equals(this.maxFacetHits, searchForFacetsOptions.maxFacetHits) && - Objects.equals(this.type, searchForFacetsOptions.type) - ); - } - - @Override - public int hashCode() { - return Objects.hash(facet, indexName, facetQuery, maxFacetHits, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchForFacetsOptions {\n"); - sb.append(" facet: ").append(toIndentedString(facet)).append("\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" facetQuery: ").append(toIndentedString(facetQuery)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForHits.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForHits.java deleted file mode 100644 index b24aaddb42..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForHits.java +++ /dev/null @@ -1,2026 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchForHits */ -public class SearchForHits { - - @JsonProperty("params") - private String params; - - @JsonProperty("query") - private String query; - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("type") - private SearchTypeDefault type; - - public SearchForHits setParams(String params) { - this.params = params; - return this; - } - - /** - * Search parameters as a URL-encoded query string. - * - * @return params - */ - @javax.annotation.Nullable - public String getParams() { - return params; - } - - public SearchForHits setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public SearchForHits setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public SearchForHits setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public SearchForHits setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public SearchForHits setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public SearchForHits setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public SearchForHits setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public SearchForHits setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public SearchForHits setFacets(List facets) { - this.facets = facets; - return this; - } - - public SearchForHits addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public SearchForHits setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public SearchForHits setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public SearchForHits setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public SearchForHits setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public SearchForHits setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public SearchForHits setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public SearchForHits setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public SearchForHits setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public SearchForHits setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public SearchForHits setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public SearchForHits setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public SearchForHits setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public SearchForHits addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public SearchForHits setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public SearchForHits addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public SearchForHits setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public SearchForHits addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public SearchForHits setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public SearchForHits addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public SearchForHits setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public SearchForHits setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public SearchForHits setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public SearchForHits setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public SearchForHits setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public SearchForHits setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public SearchForHits addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public SearchForHits setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public SearchForHits setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public SearchForHits setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public SearchForHits setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - public SearchForHits setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public SearchForHits addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public SearchForHits setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public SearchForHits addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public SearchForHits setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public SearchForHits addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public SearchForHits setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public SearchForHits addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public SearchForHits setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public SearchForHits addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public SearchForHits setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public SearchForHits setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public SearchForHits addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public SearchForHits setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public SearchForHits addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public SearchForHits setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public SearchForHits setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public SearchForHits setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public SearchForHits setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public SearchForHits setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public SearchForHits setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public SearchForHits setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public SearchForHits setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public SearchForHits setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public SearchForHits setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public SearchForHits addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public SearchForHits setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public SearchForHits setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public SearchForHits setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public SearchForHits setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public SearchForHits addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public SearchForHits setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public SearchForHits setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public SearchForHits setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public SearchForHits setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public SearchForHits setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public SearchForHits setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public SearchForHits setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public SearchForHits setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public SearchForHits setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public SearchForHits addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public SearchForHits setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public SearchForHits addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public SearchForHits setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public SearchForHits setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public SearchForHits addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public SearchForHits setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public SearchForHits addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public SearchForHits setExplain(List explain) { - this.explain = explain; - return this; - } - - public SearchForHits addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public SearchForHits setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public SearchForHits setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public SearchForHits setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public SearchForHits setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public SearchForHits setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public SearchForHits setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public SearchForHits addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public SearchForHits setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public SearchForHits setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public SearchForHits setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - public SearchForHits setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Algolia index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public SearchForHits setType(SearchTypeDefault type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nullable - public SearchTypeDefault getType() { - return type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchForHits searchForHits = (SearchForHits) o; - return ( - Objects.equals(this.params, searchForHits.params) && - Objects.equals(this.query, searchForHits.query) && - Objects.equals(this.similarQuery, searchForHits.similarQuery) && - Objects.equals(this.filters, searchForHits.filters) && - Objects.equals(this.facetFilters, searchForHits.facetFilters) && - Objects.equals(this.optionalFilters, searchForHits.optionalFilters) && - Objects.equals(this.numericFilters, searchForHits.numericFilters) && - Objects.equals(this.tagFilters, searchForHits.tagFilters) && - Objects.equals(this.sumOrFiltersScores, searchForHits.sumOrFiltersScores) && - Objects.equals(this.facets, searchForHits.facets) && - Objects.equals(this.maxValuesPerFacet, searchForHits.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, searchForHits.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, searchForHits.sortFacetValuesBy) && - Objects.equals(this.page, searchForHits.page) && - Objects.equals(this.offset, searchForHits.offset) && - Objects.equals(this.length, searchForHits.length) && - Objects.equals(this.aroundLatLng, searchForHits.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, searchForHits.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, searchForHits.aroundRadius) && - Objects.equals(this.aroundPrecision, searchForHits.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, searchForHits.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, searchForHits.insideBoundingBox) && - Objects.equals(this.insidePolygon, searchForHits.insidePolygon) && - Objects.equals(this.naturalLanguages, searchForHits.naturalLanguages) && - Objects.equals(this.ruleContexts, searchForHits.ruleContexts) && - Objects.equals(this.personalizationImpact, searchForHits.personalizationImpact) && - Objects.equals(this.userToken, searchForHits.userToken) && - Objects.equals(this.getRankingInfo, searchForHits.getRankingInfo) && - Objects.equals(this.clickAnalytics, searchForHits.clickAnalytics) && - Objects.equals(this.analytics, searchForHits.analytics) && - Objects.equals(this.analyticsTags, searchForHits.analyticsTags) && - Objects.equals(this.percentileComputation, searchForHits.percentileComputation) && - Objects.equals(this.enableABTest, searchForHits.enableABTest) && - Objects.equals(this.enableReRanking, searchForHits.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, searchForHits.reRankingApplyFilter) && - Objects.equals(this.attributesForFaceting, searchForHits.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, searchForHits.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, searchForHits.restrictSearchableAttributes) && - Objects.equals(this.ranking, searchForHits.ranking) && - Objects.equals(this.customRanking, searchForHits.customRanking) && - Objects.equals(this.relevancyStrictness, searchForHits.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, searchForHits.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, searchForHits.attributesToSnippet) && - Objects.equals(this.highlightPreTag, searchForHits.highlightPreTag) && - Objects.equals(this.highlightPostTag, searchForHits.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, searchForHits.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, searchForHits.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, searchForHits.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, searchForHits.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, searchForHits.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, searchForHits.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, searchForHits.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, searchForHits.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, searchForHits.ignorePlurals) && - Objects.equals(this.removeStopWords, searchForHits.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, searchForHits.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, searchForHits.queryLanguages) && - Objects.equals(this.decompoundQuery, searchForHits.decompoundQuery) && - Objects.equals(this.enableRules, searchForHits.enableRules) && - Objects.equals(this.enablePersonalization, searchForHits.enablePersonalization) && - Objects.equals(this.queryType, searchForHits.queryType) && - Objects.equals(this.removeWordsIfNoResults, searchForHits.removeWordsIfNoResults) && - Objects.equals(this.mode, searchForHits.mode) && - Objects.equals(this.semanticSearch, searchForHits.semanticSearch) && - Objects.equals(this.advancedSyntax, searchForHits.advancedSyntax) && - Objects.equals(this.optionalWords, searchForHits.optionalWords) && - Objects.equals(this.disableExactOnAttributes, searchForHits.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, searchForHits.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, searchForHits.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, searchForHits.advancedSyntaxFeatures) && - Objects.equals(this.explain, searchForHits.explain) && - Objects.equals(this.distinct, searchForHits.distinct) && - Objects.equals(this.attributeForDistinct, searchForHits.attributeForDistinct) && - Objects.equals(this.synonyms, searchForHits.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, searchForHits.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, searchForHits.minProximity) && - Objects.equals(this.responseFields, searchForHits.responseFields) && - Objects.equals(this.maxFacetHits, searchForHits.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, searchForHits.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, searchForHits.renderingContent) && - Objects.equals(this.indexName, searchForHits.indexName) && - Objects.equals(this.type, searchForHits.type) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - params, - query, - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter, - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent, - indexName, - type - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchForHits {\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).append("\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForHitsOptions.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForHitsOptions.java deleted file mode 100644 index 9e769d8381..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchForHitsOptions.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchForHitsOptions */ -public class SearchForHitsOptions { - - @JsonProperty("indexName") - private String indexName; - - @JsonProperty("type") - private SearchTypeDefault type; - - public SearchForHitsOptions setIndexName(String indexName) { - this.indexName = indexName; - return this; - } - - /** - * Algolia index name. - * - * @return indexName - */ - @javax.annotation.Nonnull - public String getIndexName() { - return indexName; - } - - public SearchForHitsOptions setType(SearchTypeDefault type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nullable - public SearchTypeDefault getType() { - return type; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchForHitsOptions searchForHitsOptions = (SearchForHitsOptions) o; - return Objects.equals(this.indexName, searchForHitsOptions.indexName) && Objects.equals(this.type, searchForHitsOptions.type); - } - - @Override - public int hashCode() { - return Objects.hash(indexName, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchForHitsOptions {\n"); - sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchHits.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchHits.java deleted file mode 100644 index c2ac6b9a80..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchHits.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchHits */ -public class SearchHits { - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - public SearchHits setHits(List hits) { - this.hits = hits; - return this; - } - - public SearchHits addHits(T hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Get hits - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchHits searchHits = (SearchHits) o; - return Objects.equals(this.hits, searchHits.hits); - } - - @Override - public int hashCode() { - return Objects.hash(hits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchHits {\n"); - sb.append(" hits: ").append(toIndentedString(hits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchMethodParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchMethodParams.java deleted file mode 100644 index c27e07a75c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchMethodParams.java +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchMethodParams */ -public class SearchMethodParams { - - @JsonProperty("requests") - private List requests = new ArrayList<>(); - - @JsonProperty("strategy") - private SearchStrategy strategy; - - public SearchMethodParams setRequests(List requests) { - this.requests = requests; - return this; - } - - public SearchMethodParams addRequests(SearchQuery requestsItem) { - this.requests.add(requestsItem); - return this; - } - - /** - * Get requests - * - * @return requests - */ - @javax.annotation.Nonnull - public List getRequests() { - return requests; - } - - public SearchMethodParams setStrategy(SearchStrategy strategy) { - this.strategy = strategy; - return this; - } - - /** - * Get strategy - * - * @return strategy - */ - @javax.annotation.Nullable - public SearchStrategy getStrategy() { - return strategy; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchMethodParams searchMethodParams = (SearchMethodParams) o; - return Objects.equals(this.requests, searchMethodParams.requests) && Objects.equals(this.strategy, searchMethodParams.strategy); - } - - @Override - public int hashCode() { - return Objects.hash(requests, strategy); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchMethodParams {\n"); - sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); - sb.append(" strategy: ").append(toIndentedString(strategy)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParams.java deleted file mode 100644 index 1ee3b9b700..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParams.java +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** SearchParams */ -@JsonDeserialize(using = SearchParams.SearchParamsDeserializer.class) -@JsonSerialize(using = SearchParams.SearchParamsSerializer.class) -public abstract class SearchParams implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(SearchParams.class.getName()); - - public static SearchParams of(SearchParamsObject inside) { - return new SearchParamsSearchParamsObject(inside); - } - - public static SearchParams of(SearchParamsString inside) { - return new SearchParamsSearchParamsString(inside); - } - - public static class SearchParamsSerializer extends StdSerializer { - - public SearchParamsSerializer(Class t) { - super(t); - } - - public SearchParamsSerializer() { - this(null); - } - - @Override - public void serialize(SearchParams value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class SearchParamsDeserializer extends StdDeserializer { - - public SearchParamsDeserializer() { - this(SearchParams.class); - } - - public SearchParamsDeserializer(Class vc) { - super(vc); - } - - @Override - public SearchParams deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize SearchParamsObject - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - SearchParamsObject value = parser.readValueAs(new TypeReference() {}); - return SearchParams.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf SearchParamsObject (error: " + e.getMessage() + ") (type: SearchParamsObject)"); - } - } - - // deserialize SearchParamsString - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - SearchParamsString value = parser.readValueAs(new TypeReference() {}); - return SearchParams.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf SearchParamsString (error: " + e.getMessage() + ") (type: SearchParamsString)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public SearchParams getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "SearchParams cannot be null"); - } - } -} - -class SearchParamsSearchParamsObject extends SearchParams { - - private final SearchParamsObject insideValue; - - SearchParamsSearchParamsObject(SearchParamsObject insideValue) { - this.insideValue = insideValue; - } - - @Override - public SearchParamsObject getInsideValue() { - return insideValue; - } -} - -class SearchParamsSearchParamsString extends SearchParams { - - private final SearchParamsString insideValue; - - SearchParamsSearchParamsString(SearchParamsString insideValue) { - this.insideValue = insideValue; - } - - @Override - public SearchParamsString getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsObject.java deleted file mode 100644 index 69fd8ad28a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsObject.java +++ /dev/null @@ -1,1963 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchParamsObject */ -public class SearchParamsObject { - - @JsonProperty("query") - private String query; - - @JsonProperty("similarQuery") - private String similarQuery; - - @JsonProperty("filters") - private String filters; - - @JsonProperty("facetFilters") - private FacetFilters facetFilters; - - @JsonProperty("optionalFilters") - private OptionalFilters optionalFilters; - - @JsonProperty("numericFilters") - private NumericFilters numericFilters; - - @JsonProperty("tagFilters") - private TagFilters tagFilters; - - @JsonProperty("sumOrFiltersScores") - private Boolean sumOrFiltersScores; - - @JsonProperty("facets") - private List facets; - - @JsonProperty("maxValuesPerFacet") - private Integer maxValuesPerFacet; - - @JsonProperty("facetingAfterDistinct") - private Boolean facetingAfterDistinct; - - @JsonProperty("sortFacetValuesBy") - private String sortFacetValuesBy; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("length") - private Integer length; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("aroundLatLngViaIP") - private Boolean aroundLatLngViaIP; - - @JsonProperty("aroundRadius") - private AroundRadius aroundRadius; - - @JsonProperty("aroundPrecision") - private Integer aroundPrecision; - - @JsonProperty("minimumAroundRadius") - private Integer minimumAroundRadius; - - @JsonProperty("insideBoundingBox") - private List insideBoundingBox; - - @JsonProperty("insidePolygon") - private List insidePolygon; - - @JsonProperty("naturalLanguages") - private List naturalLanguages; - - @JsonProperty("ruleContexts") - private List ruleContexts; - - @JsonProperty("personalizationImpact") - private Integer personalizationImpact; - - @JsonProperty("userToken") - private String userToken; - - @JsonProperty("getRankingInfo") - private Boolean getRankingInfo; - - @JsonProperty("clickAnalytics") - private Boolean clickAnalytics; - - @JsonProperty("analytics") - private Boolean analytics; - - @JsonProperty("analyticsTags") - private List analyticsTags; - - @JsonProperty("percentileComputation") - private Boolean percentileComputation; - - @JsonProperty("enableABTest") - private Boolean enableABTest; - - @JsonProperty("enableReRanking") - private Boolean enableReRanking; - - @JsonProperty("reRankingApplyFilter") - private ReRankingApplyFilter reRankingApplyFilter; - - @JsonProperty("attributesForFaceting") - private List attributesForFaceting; - - @JsonProperty("attributesToRetrieve") - private List attributesToRetrieve; - - @JsonProperty("restrictSearchableAttributes") - private List restrictSearchableAttributes; - - @JsonProperty("ranking") - private List ranking; - - @JsonProperty("customRanking") - private List customRanking; - - @JsonProperty("relevancyStrictness") - private Integer relevancyStrictness; - - @JsonProperty("attributesToHighlight") - private List attributesToHighlight; - - @JsonProperty("attributesToSnippet") - private List attributesToSnippet; - - @JsonProperty("highlightPreTag") - private String highlightPreTag; - - @JsonProperty("highlightPostTag") - private String highlightPostTag; - - @JsonProperty("snippetEllipsisText") - private String snippetEllipsisText; - - @JsonProperty("restrictHighlightAndSnippetArrays") - private Boolean restrictHighlightAndSnippetArrays; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("minWordSizefor1Typo") - private Integer minWordSizefor1Typo; - - @JsonProperty("minWordSizefor2Typos") - private Integer minWordSizefor2Typos; - - @JsonProperty("typoTolerance") - private TypoTolerance typoTolerance; - - @JsonProperty("allowTyposOnNumericTokens") - private Boolean allowTyposOnNumericTokens; - - @JsonProperty("disableTypoToleranceOnAttributes") - private List disableTypoToleranceOnAttributes; - - @JsonProperty("ignorePlurals") - private IgnorePlurals ignorePlurals; - - @JsonProperty("removeStopWords") - private RemoveStopWords removeStopWords; - - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - - @JsonProperty("queryLanguages") - private List queryLanguages; - - @JsonProperty("decompoundQuery") - private Boolean decompoundQuery; - - @JsonProperty("enableRules") - private Boolean enableRules; - - @JsonProperty("enablePersonalization") - private Boolean enablePersonalization; - - @JsonProperty("queryType") - private QueryType queryType; - - @JsonProperty("removeWordsIfNoResults") - private RemoveWordsIfNoResults removeWordsIfNoResults; - - @JsonProperty("mode") - private Mode mode; - - @JsonProperty("semanticSearch") - private IndexSettingsAsSearchParamsSemanticSearch semanticSearch; - - @JsonProperty("advancedSyntax") - private Boolean advancedSyntax; - - @JsonProperty("optionalWords") - private List optionalWords; - - @JsonProperty("disableExactOnAttributes") - private List disableExactOnAttributes; - - @JsonProperty("exactOnSingleWordQuery") - private ExactOnSingleWordQuery exactOnSingleWordQuery; - - @JsonProperty("alternativesAsExact") - private List alternativesAsExact; - - @JsonProperty("advancedSyntaxFeatures") - private List advancedSyntaxFeatures; - - @JsonProperty("explain") - private List explain; - - @JsonProperty("distinct") - private Distinct distinct; - - @JsonProperty("attributeForDistinct") - private String attributeForDistinct; - - @JsonProperty("synonyms") - private Boolean synonyms; - - @JsonProperty("replaceSynonymsInHighlight") - private Boolean replaceSynonymsInHighlight; - - @JsonProperty("minProximity") - private Integer minProximity; - - @JsonProperty("responseFields") - private List responseFields; - - @JsonProperty("maxFacetHits") - private Integer maxFacetHits; - - @JsonProperty("attributeCriteriaComputedByMinProximity") - private Boolean attributeCriteriaComputedByMinProximity; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - public SearchParamsObject setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public SearchParamsObject setSimilarQuery(String similarQuery) { - this.similarQuery = similarQuery; - return this; - } - - /** - * Overrides the query parameter and performs a more generic search. - * - * @return similarQuery - */ - @javax.annotation.Nullable - public String getSimilarQuery() { - return similarQuery; - } - - public SearchParamsObject setFilters(String filters) { - this.filters = filters; - return this; - } - - /** - * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the - * query with numeric, facet, or tag filters. - * - * @return filters - */ - @javax.annotation.Nullable - public String getFilters() { - return filters; - } - - public SearchParamsObject setFacetFilters(FacetFilters facetFilters) { - this.facetFilters = facetFilters; - return this; - } - - /** - * Get facetFilters - * - * @return facetFilters - */ - @javax.annotation.Nullable - public FacetFilters getFacetFilters() { - return facetFilters; - } - - public SearchParamsObject setOptionalFilters(OptionalFilters optionalFilters) { - this.optionalFilters = optionalFilters; - return this; - } - - /** - * Get optionalFilters - * - * @return optionalFilters - */ - @javax.annotation.Nullable - public OptionalFilters getOptionalFilters() { - return optionalFilters; - } - - public SearchParamsObject setNumericFilters(NumericFilters numericFilters) { - this.numericFilters = numericFilters; - return this; - } - - /** - * Get numericFilters - * - * @return numericFilters - */ - @javax.annotation.Nullable - public NumericFilters getNumericFilters() { - return numericFilters; - } - - public SearchParamsObject setTagFilters(TagFilters tagFilters) { - this.tagFilters = tagFilters; - return this; - } - - /** - * Get tagFilters - * - * @return tagFilters - */ - @javax.annotation.Nullable - public TagFilters getTagFilters() { - return tagFilters; - } - - public SearchParamsObject setSumOrFiltersScores(Boolean sumOrFiltersScores) { - this.sumOrFiltersScores = sumOrFiltersScores; - return this; - } - - /** - * Determines how to calculate [filter - * scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). - * If `false`, maximum score is kept. If `true`, score is summed. - * - * @return sumOrFiltersScores - */ - @javax.annotation.Nullable - public Boolean getSumOrFiltersScores() { - return sumOrFiltersScores; - } - - public SearchParamsObject setFacets(List facets) { - this.facets = facets; - return this; - } - - public SearchParamsObject addFacets(String facetsItem) { - if (this.facets == null) { - this.facets = new ArrayList<>(); - } - this.facets.add(facetsItem); - return this; - } - - /** - * Returns - * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), - * their facet values, and the number of matching facet values. - * - * @return facets - */ - @javax.annotation.Nullable - public List getFacets() { - return facets; - } - - public SearchParamsObject setMaxValuesPerFacet(Integer maxValuesPerFacet) { - this.maxValuesPerFacet = maxValuesPerFacet; - return this; - } - - /** - * Maximum number of facet values to return for each facet. - * - * @return maxValuesPerFacet - */ - @javax.annotation.Nullable - public Integer getMaxValuesPerFacet() { - return maxValuesPerFacet; - } - - public SearchParamsObject setFacetingAfterDistinct(Boolean facetingAfterDistinct) { - this.facetingAfterDistinct = facetingAfterDistinct; - return this; - } - - /** - * Forces faceting to be applied after - * [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) - * (with the distinct feature). Alternatively, the `afterDistinct` - * [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * of `attributesForFaceting` allows for more granular control. - * - * @return facetingAfterDistinct - */ - @javax.annotation.Nullable - public Boolean getFacetingAfterDistinct() { - return facetingAfterDistinct; - } - - public SearchParamsObject setSortFacetValuesBy(String sortFacetValuesBy) { - this.sortFacetValuesBy = sortFacetValuesBy; - return this; - } - - /** - * Controls how facet values are fetched. - * - * @return sortFacetValuesBy - */ - @javax.annotation.Nullable - public String getSortFacetValuesBy() { - return sortFacetValuesBy; - } - - public SearchParamsObject setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public SearchParamsObject setOffset(Integer offset) { - this.offset = offset; - return this; - } - - /** - * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is - * the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * - * @return offset - */ - @javax.annotation.Nullable - public Integer getOffset() { - return offset; - } - - public SearchParamsObject setLength(Integer length) { - this.length = length; - return this; - } - - /** - * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and - * `hitsPerPage` is the recommended method for [paging - * results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). - * However, you can use `offset` and `length` to implement [an alternative approach to - * paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length). - * minimum: 1 maximum: 1000 - * - * @return length - */ - @javax.annotation.Nullable - public Integer getLength() { - return length; - } - - public SearchParamsObject setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Search for entries [around a central - * location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), - * enabling a geographical search within a circular area. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public SearchParamsObject setAroundLatLngViaIP(Boolean aroundLatLngViaIP) { - this.aroundLatLngViaIP = aroundLatLngViaIP; - return this; - } - - /** - * Search for entries around a location. The location is automatically computed from the - * requester's IP address. - * - * @return aroundLatLngViaIP - */ - @javax.annotation.Nullable - public Boolean getAroundLatLngViaIP() { - return aroundLatLngViaIP; - } - - public SearchParamsObject setAroundRadius(AroundRadius aroundRadius) { - this.aroundRadius = aroundRadius; - return this; - } - - /** - * Get aroundRadius - * - * @return aroundRadius - */ - @javax.annotation.Nullable - public AroundRadius getAroundRadius() { - return aroundRadius; - } - - public SearchParamsObject setAroundPrecision(Integer aroundPrecision) { - this.aroundPrecision = aroundPrecision; - return this; - } - - /** - * Precision of a geographical search (in meters), to [group results that are more or less the - * same distance from a central - * point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/). - * - * @return aroundPrecision - */ - @javax.annotation.Nullable - public Integer getAroundPrecision() { - return aroundPrecision; - } - - public SearchParamsObject setMinimumAroundRadius(Integer minimumAroundRadius) { - this.minimumAroundRadius = minimumAroundRadius; - return this; - } - - /** - * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set. - * minimum: 1 - * - * @return minimumAroundRadius - */ - @javax.annotation.Nullable - public Integer getMinimumAroundRadius() { - return minimumAroundRadius; - } - - public SearchParamsObject setInsideBoundingBox(List insideBoundingBox) { - this.insideBoundingBox = insideBoundingBox; - return this; - } - - public SearchParamsObject addInsideBoundingBox(Double insideBoundingBoxItem) { - if (this.insideBoundingBox == null) { - this.insideBoundingBox = new ArrayList<>(); - } - this.insideBoundingBox.add(insideBoundingBoxItem); - return this; - } - - /** - * Search inside a [rectangular - * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insideBoundingBox - */ - @javax.annotation.Nullable - public List getInsideBoundingBox() { - return insideBoundingBox; - } - - public SearchParamsObject setInsidePolygon(List insidePolygon) { - this.insidePolygon = insidePolygon; - return this; - } - - public SearchParamsObject addInsidePolygon(Double insidePolygonItem) { - if (this.insidePolygon == null) { - this.insidePolygon = new ArrayList<>(); - } - this.insidePolygon.add(insidePolygonItem); - return this; - } - - /** - * Search inside a - * [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) - * (in geographical coordinates). - * - * @return insidePolygon - */ - @javax.annotation.Nullable - public List getInsidePolygon() { - return insidePolygon; - } - - public SearchParamsObject setNaturalLanguages(List naturalLanguages) { - this.naturalLanguages = naturalLanguages; - return this; - } - - public SearchParamsObject addNaturalLanguages(String naturalLanguagesItem) { - if (this.naturalLanguages == null) { - this.naturalLanguages = new ArrayList<>(); - } - this.naturalLanguages.add(naturalLanguagesItem); - return this; - } - - /** - * Changes the default values of parameters that work best for a natural language query, such as - * `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and - * `ruleContexts`. These parameters work well together when the query consists of fuller natural - * language strings instead of keywords, for example when processing voice search queries. - * - * @return naturalLanguages - */ - @javax.annotation.Nullable - public List getNaturalLanguages() { - return naturalLanguages; - } - - public SearchParamsObject setRuleContexts(List ruleContexts) { - this.ruleContexts = ruleContexts; - return this; - } - - public SearchParamsObject addRuleContexts(String ruleContextsItem) { - if (this.ruleContexts == null) { - this.ruleContexts = new ArrayList<>(); - } - this.ruleContexts.add(ruleContextsItem); - return this; - } - - /** - * Assigns [rule - * contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) - * to search queries. - * - * @return ruleContexts - */ - @javax.annotation.Nullable - public List getRuleContexts() { - return ruleContexts; - } - - public SearchParamsObject setPersonalizationImpact(Integer personalizationImpact) { - this.personalizationImpact = personalizationImpact; - return this; - } - - /** - * Defines how much [Personalization affects - * results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact). - * - * @return personalizationImpact - */ - @javax.annotation.Nullable - public Integer getPersonalizationImpact() { - return personalizationImpact; - } - - public SearchParamsObject setUserToken(String userToken) { - this.userToken = userToken; - return this; - } - - /** - * Associates a [user - * token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current - * search. - * - * @return userToken - */ - @javax.annotation.Nullable - public String getUserToken() { - return userToken; - } - - public SearchParamsObject setGetRankingInfo(Boolean getRankingInfo) { - this.getRankingInfo = getRankingInfo; - return this; - } - - /** - * Incidates whether the search response includes [detailed ranking - * information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information). - * - * @return getRankingInfo - */ - @javax.annotation.Nullable - public Boolean getGetRankingInfo() { - return getRankingInfo; - } - - public SearchParamsObject setClickAnalytics(Boolean clickAnalytics) { - this.clickAnalytics = clickAnalytics; - return this; - } - - /** - * Indicates whether a query ID parameter is included in the search response. This is required for - * [tracking click and conversion - * events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests). - * - * @return clickAnalytics - */ - @javax.annotation.Nullable - public Boolean getClickAnalytics() { - return clickAnalytics; - } - - public SearchParamsObject setAnalytics(Boolean analytics) { - this.analytics = analytics; - return this; - } - - /** - * Indicates whether this query will be included in - * [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/). - * - * @return analytics - */ - @javax.annotation.Nullable - public Boolean getAnalytics() { - return analytics; - } - - public SearchParamsObject setAnalyticsTags(List analyticsTags) { - this.analyticsTags = analyticsTags; - return this; - } - - public SearchParamsObject addAnalyticsTags(String analyticsTagsItem) { - if (this.analyticsTags == null) { - this.analyticsTags = new ArrayList<>(); - } - this.analyticsTags.add(analyticsTagsItem); - return this; - } - - /** - * Tags to apply to the query for [segmenting analytics - * data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/). - * - * @return analyticsTags - */ - @javax.annotation.Nullable - public List getAnalyticsTags() { - return analyticsTags; - } - - public SearchParamsObject setPercentileComputation(Boolean percentileComputation) { - this.percentileComputation = percentileComputation; - return this; - } - - /** - * Whether to include or exclude a query from the processing-time percentile computation. - * - * @return percentileComputation - */ - @javax.annotation.Nullable - public Boolean getPercentileComputation() { - return percentileComputation; - } - - public SearchParamsObject setEnableABTest(Boolean enableABTest) { - this.enableABTest = enableABTest; - return this; - } - - /** - * Incidates whether this search will be considered in A/B testing. - * - * @return enableABTest - */ - @javax.annotation.Nullable - public Boolean getEnableABTest() { - return enableABTest; - } - - public SearchParamsObject setEnableReRanking(Boolean enableReRanking) { - this.enableReRanking = enableReRanking; - return this; - } - - /** - * Indicates whether this search will use [Dynamic - * Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). - * - * @return enableReRanking - */ - @javax.annotation.Nullable - public Boolean getEnableReRanking() { - return enableReRanking; - } - - public SearchParamsObject setReRankingApplyFilter(ReRankingApplyFilter reRankingApplyFilter) { - this.reRankingApplyFilter = reRankingApplyFilter; - return this; - } - - /** - * Get reRankingApplyFilter - * - * @return reRankingApplyFilter - */ - @javax.annotation.Nullable - public ReRankingApplyFilter getReRankingApplyFilter() { - return reRankingApplyFilter; - } - - public SearchParamsObject setAttributesForFaceting(List attributesForFaceting) { - this.attributesForFaceting = attributesForFaceting; - return this; - } - - public SearchParamsObject addAttributesForFaceting(String attributesForFacetingItem) { - if (this.attributesForFaceting == null) { - this.attributesForFaceting = new ArrayList<>(); - } - this.attributesForFaceting.add(attributesForFacetingItem); - return this; - } - - /** - * Attributes used for - * [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and - * the - * [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) - * that can be applied: `filterOnly`, `searchable`, and `afterDistinct`. - * - * @return attributesForFaceting - */ - @javax.annotation.Nullable - public List getAttributesForFaceting() { - return attributesForFaceting; - } - - public SearchParamsObject setAttributesToRetrieve(List attributesToRetrieve) { - this.attributesToRetrieve = attributesToRetrieve; - return this; - } - - public SearchParamsObject addAttributesToRetrieve(String attributesToRetrieveItem) { - if (this.attributesToRetrieve == null) { - this.attributesToRetrieve = new ArrayList<>(); - } - this.attributesToRetrieve.add(attributesToRetrieveItem); - return this; - } - - /** - * Attributes to include in the API response. To reduce the size of your response, you can - * retrieve only some of the attributes. By default, the response includes all attributes. - * - * @return attributesToRetrieve - */ - @javax.annotation.Nullable - public List getAttributesToRetrieve() { - return attributesToRetrieve; - } - - public SearchParamsObject setRestrictSearchableAttributes(List restrictSearchableAttributes) { - this.restrictSearchableAttributes = restrictSearchableAttributes; - return this; - } - - public SearchParamsObject addRestrictSearchableAttributes(String restrictSearchableAttributesItem) { - if (this.restrictSearchableAttributes == null) { - this.restrictSearchableAttributes = new ArrayList<>(); - } - this.restrictSearchableAttributes.add(restrictSearchableAttributesItem); - return this; - } - - /** - * Restricts a query to only look at a subset of your [searchable - * attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/). - * - * @return restrictSearchableAttributes - */ - @javax.annotation.Nullable - public List getRestrictSearchableAttributes() { - return restrictSearchableAttributes; - } - - public SearchParamsObject setRanking(List ranking) { - this.ranking = ranking; - return this; - } - - public SearchParamsObject addRanking(String rankingItem) { - if (this.ranking == null) { - this.ranking = new ArrayList<>(); - } - this.ranking.add(rankingItem); - return this; - } - - /** - * Determines the order in which Algolia [returns your - * results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). - * - * @return ranking - */ - @javax.annotation.Nullable - public List getRanking() { - return ranking; - } - - public SearchParamsObject setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public SearchParamsObject addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * Specifies the [Custom ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use - * the `asc` and `desc` modifiers to specify the ranking order: ascending or descending. - * - * @return customRanking - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - - public SearchParamsObject setRelevancyStrictness(Integer relevancyStrictness) { - this.relevancyStrictness = relevancyStrictness; - return this; - } - - /** - * Relevancy threshold below which less relevant results aren't included in the results. - * - * @return relevancyStrictness - */ - @javax.annotation.Nullable - public Integer getRelevancyStrictness() { - return relevancyStrictness; - } - - public SearchParamsObject setAttributesToHighlight(List attributesToHighlight) { - this.attributesToHighlight = attributesToHighlight; - return this; - } - - public SearchParamsObject addAttributesToHighlight(String attributesToHighlightItem) { - if (this.attributesToHighlight == null) { - this.attributesToHighlight = new ArrayList<>(); - } - this.attributesToHighlight.add(attributesToHighlightItem); - return this; - } - - /** - * Attributes to highlight. Strings that match the search query in the attributes are highlighted - * by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`). - * - * @return attributesToHighlight - */ - @javax.annotation.Nullable - public List getAttributesToHighlight() { - return attributesToHighlight; - } - - public SearchParamsObject setAttributesToSnippet(List attributesToSnippet) { - this.attributesToSnippet = attributesToSnippet; - return this; - } - - public SearchParamsObject addAttributesToSnippet(String attributesToSnippetItem) { - if (this.attributesToSnippet == null) { - this.attributesToSnippet = new ArrayList<>(); - } - this.attributesToSnippet.add(attributesToSnippetItem); - return this; - } - - /** - * Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. - * If not specified, the attribute is shortened to the 10 words around the matching string but you - * can specify the number. For example: `body:20`. - * - * @return attributesToSnippet - */ - @javax.annotation.Nullable - public List getAttributesToSnippet() { - return attributesToSnippet; - } - - public SearchParamsObject setHighlightPreTag(String highlightPreTag) { - this.highlightPreTag = highlightPreTag; - return this; - } - - /** - * HTML string to insert before the highlighted parts in all highlight and snippet results. - * - * @return highlightPreTag - */ - @javax.annotation.Nullable - public String getHighlightPreTag() { - return highlightPreTag; - } - - public SearchParamsObject setHighlightPostTag(String highlightPostTag) { - this.highlightPostTag = highlightPostTag; - return this; - } - - /** - * HTML string to insert after the highlighted parts in all highlight and snippet results. - * - * @return highlightPostTag - */ - @javax.annotation.Nullable - public String getHighlightPostTag() { - return highlightPostTag; - } - - public SearchParamsObject setSnippetEllipsisText(String snippetEllipsisText) { - this.snippetEllipsisText = snippetEllipsisText; - return this; - } - - /** - * String used as an ellipsis indicator when a snippet is truncated. - * - * @return snippetEllipsisText - */ - @javax.annotation.Nullable - public String getSnippetEllipsisText() { - return snippetEllipsisText; - } - - public SearchParamsObject setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) { - this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays; - return this; - } - - /** - * Restrict highlighting and snippeting to items that matched the query. - * - * @return restrictHighlightAndSnippetArrays - */ - @javax.annotation.Nullable - public Boolean getRestrictHighlightAndSnippetArrays() { - return restrictHighlightAndSnippetArrays; - } - - public SearchParamsObject setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public SearchParamsObject setMinWordSizefor1Typo(Integer minWordSizefor1Typo) { - this.minWordSizefor1Typo = minWordSizefor1Typo; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [one - * typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor1Typo - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor1Typo() { - return minWordSizefor1Typo; - } - - public SearchParamsObject setMinWordSizefor2Typos(Integer minWordSizefor2Typos) { - this.minWordSizefor2Typos = minWordSizefor2Typos; - return this; - } - - /** - * Minimum number of characters a word in the query string must contain to accept matches with - * [two - * typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos). - * - * @return minWordSizefor2Typos - */ - @javax.annotation.Nullable - public Integer getMinWordSizefor2Typos() { - return minWordSizefor2Typos; - } - - public SearchParamsObject setTypoTolerance(TypoTolerance typoTolerance) { - this.typoTolerance = typoTolerance; - return this; - } - - /** - * Get typoTolerance - * - * @return typoTolerance - */ - @javax.annotation.Nullable - public TypoTolerance getTypoTolerance() { - return typoTolerance; - } - - public SearchParamsObject setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) { - this.allowTyposOnNumericTokens = allowTyposOnNumericTokens; - return this; - } - - /** - * Whether to allow typos on numbers (\"numeric tokens\") in the query string. - * - * @return allowTyposOnNumericTokens - */ - @javax.annotation.Nullable - public Boolean getAllowTyposOnNumericTokens() { - return allowTyposOnNumericTokens; - } - - public SearchParamsObject setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) { - this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes; - return this; - } - - public SearchParamsObject addDisableTypoToleranceOnAttributes(String disableTypoToleranceOnAttributesItem) { - if (this.disableTypoToleranceOnAttributes == null) { - this.disableTypoToleranceOnAttributes = new ArrayList<>(); - } - this.disableTypoToleranceOnAttributes.add(disableTypoToleranceOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to turn off [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). - * - * @return disableTypoToleranceOnAttributes - */ - @javax.annotation.Nullable - public List getDisableTypoToleranceOnAttributes() { - return disableTypoToleranceOnAttributes; - } - - public SearchParamsObject setIgnorePlurals(IgnorePlurals ignorePlurals) { - this.ignorePlurals = ignorePlurals; - return this; - } - - /** - * Get ignorePlurals - * - * @return ignorePlurals - */ - @javax.annotation.Nullable - public IgnorePlurals getIgnorePlurals() { - return ignorePlurals; - } - - public SearchParamsObject setRemoveStopWords(RemoveStopWords removeStopWords) { - this.removeStopWords = removeStopWords; - return this; - } - - /** - * Get removeStopWords - * - * @return removeStopWords - */ - @javax.annotation.Nullable - public RemoveStopWords getRemoveStopWords() { - return removeStopWords; - } - - public SearchParamsObject setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * Characters that the engine shouldn't automatically - * [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). - * - * @return keepDiacriticsOnCharacters - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - - public SearchParamsObject setQueryLanguages(List queryLanguages) { - this.queryLanguages = queryLanguages; - return this; - } - - public SearchParamsObject addQueryLanguages(String queryLanguagesItem) { - if (this.queryLanguages == null) { - this.queryLanguages = new ArrayList<>(); - } - this.queryLanguages.add(queryLanguagesItem); - return this; - } - - /** - * Sets your user's search language. This adjusts language-specific settings and features such as - * `ignorePlurals`, `removeStopWords`, and - * [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) - * word detection. - * - * @return queryLanguages - */ - @javax.annotation.Nullable - public List getQueryLanguages() { - return queryLanguages; - } - - public SearchParamsObject setDecompoundQuery(Boolean decompoundQuery) { - this.decompoundQuery = decompoundQuery; - return this; - } - - /** - * [Splits compound - * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) - * into their component word parts in the query. - * - * @return decompoundQuery - */ - @javax.annotation.Nullable - public Boolean getDecompoundQuery() { - return decompoundQuery; - } - - public SearchParamsObject setEnableRules(Boolean enableRules) { - this.enableRules = enableRules; - return this; - } - - /** - * Incidates whether - * [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled. - * - * @return enableRules - */ - @javax.annotation.Nullable - public Boolean getEnableRules() { - return enableRules; - } - - public SearchParamsObject setEnablePersonalization(Boolean enablePersonalization) { - this.enablePersonalization = enablePersonalization; - return this; - } - - /** - * Incidates whether - * [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) - * is enabled. - * - * @return enablePersonalization - */ - @javax.annotation.Nullable - public Boolean getEnablePersonalization() { - return enablePersonalization; - } - - public SearchParamsObject setQueryType(QueryType queryType) { - this.queryType = queryType; - return this; - } - - /** - * Get queryType - * - * @return queryType - */ - @javax.annotation.Nullable - public QueryType getQueryType() { - return queryType; - } - - public SearchParamsObject setRemoveWordsIfNoResults(RemoveWordsIfNoResults removeWordsIfNoResults) { - this.removeWordsIfNoResults = removeWordsIfNoResults; - return this; - } - - /** - * Get removeWordsIfNoResults - * - * @return removeWordsIfNoResults - */ - @javax.annotation.Nullable - public RemoveWordsIfNoResults getRemoveWordsIfNoResults() { - return removeWordsIfNoResults; - } - - public SearchParamsObject setMode(Mode mode) { - this.mode = mode; - return this; - } - - /** - * Get mode - * - * @return mode - */ - @javax.annotation.Nullable - public Mode getMode() { - return mode; - } - - public SearchParamsObject setSemanticSearch(IndexSettingsAsSearchParamsSemanticSearch semanticSearch) { - this.semanticSearch = semanticSearch; - return this; - } - - /** - * Get semanticSearch - * - * @return semanticSearch - */ - @javax.annotation.Nullable - public IndexSettingsAsSearchParamsSemanticSearch getSemanticSearch() { - return semanticSearch; - } - - public SearchParamsObject setAdvancedSyntax(Boolean advancedSyntax) { - this.advancedSyntax = advancedSyntax; - return this; - } - - /** - * Enables the [advanced query - * syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax). - * - * @return advancedSyntax - */ - @javax.annotation.Nullable - public Boolean getAdvancedSyntax() { - return advancedSyntax; - } - - public SearchParamsObject setOptionalWords(List optionalWords) { - this.optionalWords = optionalWords; - return this; - } - - public SearchParamsObject addOptionalWords(String optionalWordsItem) { - if (this.optionalWords == null) { - this.optionalWords = new ArrayList<>(); - } - this.optionalWords.add(optionalWordsItem); - return this; - } - - /** - * Words which should be considered - * [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) - * when found in a query. - * - * @return optionalWords - */ - @javax.annotation.Nullable - public List getOptionalWords() { - return optionalWords; - } - - public SearchParamsObject setDisableExactOnAttributes(List disableExactOnAttributes) { - this.disableExactOnAttributes = disableExactOnAttributes; - return this; - } - - public SearchParamsObject addDisableExactOnAttributes(String disableExactOnAttributesItem) { - if (this.disableExactOnAttributes == null) { - this.disableExactOnAttributes = new ArrayList<>(); - } - this.disableExactOnAttributes.add(disableExactOnAttributesItem); - return this; - } - - /** - * Attributes for which you want to [turn off the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return disableExactOnAttributes - */ - @javax.annotation.Nullable - public List getDisableExactOnAttributes() { - return disableExactOnAttributes; - } - - public SearchParamsObject setExactOnSingleWordQuery(ExactOnSingleWordQuery exactOnSingleWordQuery) { - this.exactOnSingleWordQuery = exactOnSingleWordQuery; - return this; - } - - /** - * Get exactOnSingleWordQuery - * - * @return exactOnSingleWordQuery - */ - @javax.annotation.Nullable - public ExactOnSingleWordQuery getExactOnSingleWordQuery() { - return exactOnSingleWordQuery; - } - - public SearchParamsObject setAlternativesAsExact(List alternativesAsExact) { - this.alternativesAsExact = alternativesAsExact; - return this; - } - - public SearchParamsObject addAlternativesAsExact(AlternativesAsExact alternativesAsExactItem) { - if (this.alternativesAsExact == null) { - this.alternativesAsExact = new ArrayList<>(); - } - this.alternativesAsExact.add(alternativesAsExactItem); - return this; - } - - /** - * Alternatives that should be considered an exact match by [the exact ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). - * - * @return alternativesAsExact - */ - @javax.annotation.Nullable - public List getAlternativesAsExact() { - return alternativesAsExact; - } - - public SearchParamsObject setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) { - this.advancedSyntaxFeatures = advancedSyntaxFeatures; - return this; - } - - public SearchParamsObject addAdvancedSyntaxFeatures(AdvancedSyntaxFeatures advancedSyntaxFeaturesItem) { - if (this.advancedSyntaxFeatures == null) { - this.advancedSyntaxFeatures = new ArrayList<>(); - } - this.advancedSyntaxFeatures.add(advancedSyntaxFeaturesItem); - return this; - } - - /** - * Allows you to specify which advanced syntax features are active when `advancedSyntax` is - * enabled. - * - * @return advancedSyntaxFeatures - */ - @javax.annotation.Nullable - public List getAdvancedSyntaxFeatures() { - return advancedSyntaxFeatures; - } - - public SearchParamsObject setExplain(List explain) { - this.explain = explain; - return this; - } - - public SearchParamsObject addExplain(String explainItem) { - if (this.explain == null) { - this.explain = new ArrayList<>(); - } - this.explain.add(explainItem); - return this; - } - - /** - * Enriches the API's response with information about how the query was processed. - * - * @return explain - */ - @javax.annotation.Nullable - public List getExplain() { - return explain; - } - - public SearchParamsObject setDistinct(Distinct distinct) { - this.distinct = distinct; - return this; - } - - /** - * Get distinct - * - * @return distinct - */ - @javax.annotation.Nullable - public Distinct getDistinct() { - return distinct; - } - - public SearchParamsObject setAttributeForDistinct(String attributeForDistinct) { - this.attributeForDistinct = attributeForDistinct; - return this; - } - - /** - * Name of the deduplication attribute to be used with Algolia's [_distinct_ - * feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). - * - * @return attributeForDistinct - */ - @javax.annotation.Nullable - public String getAttributeForDistinct() { - return attributeForDistinct; - } - - public SearchParamsObject setSynonyms(Boolean synonyms) { - this.synonyms = synonyms; - return this; - } - - /** - * Whether to take into account an index's synonyms for a particular search. - * - * @return synonyms - */ - @javax.annotation.Nullable - public Boolean getSynonyms() { - return synonyms; - } - - public SearchParamsObject setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) { - this.replaceSynonymsInHighlight = replaceSynonymsInHighlight; - return this; - } - - /** - * Whether to highlight and snippet the original word that matches the synonym or the synonym - * itself. - * - * @return replaceSynonymsInHighlight - */ - @javax.annotation.Nullable - public Boolean getReplaceSynonymsInHighlight() { - return replaceSynonymsInHighlight; - } - - public SearchParamsObject setMinProximity(Integer minProximity) { - this.minProximity = minProximity; - return this; - } - - /** - * Precision of the [proximity ranking - * criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity). - * minimum: 1 maximum: 7 - * - * @return minProximity - */ - @javax.annotation.Nullable - public Integer getMinProximity() { - return minProximity; - } - - public SearchParamsObject setResponseFields(List responseFields) { - this.responseFields = responseFields; - return this; - } - - public SearchParamsObject addResponseFields(String responseFieldsItem) { - if (this.responseFields == null) { - this.responseFields = new ArrayList<>(); - } - this.responseFields.add(responseFieldsItem); - return this; - } - - /** - * Attributes to include in the API response for search and browse queries. - * - * @return responseFields - */ - @javax.annotation.Nullable - public List getResponseFields() { - return responseFields; - } - - public SearchParamsObject setMaxFacetHits(Integer maxFacetHits) { - this.maxFacetHits = maxFacetHits; - return this; - } - - /** - * Maximum number of facet hits to return when [searching for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - * maximum: 100 - * - * @return maxFacetHits - */ - @javax.annotation.Nullable - public Integer getMaxFacetHits() { - return maxFacetHits; - } - - public SearchParamsObject setAttributeCriteriaComputedByMinProximity(Boolean attributeCriteriaComputedByMinProximity) { - this.attributeCriteriaComputedByMinProximity = attributeCriteriaComputedByMinProximity; - return this; - } - - /** - * When the [Attribute criterion is ranked above - * Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) - * in your ranking formula, Proximity is used to select which searchable attribute is matched in - * the Attribute ranking stage. - * - * @return attributeCriteriaComputedByMinProximity - */ - @javax.annotation.Nullable - public Boolean getAttributeCriteriaComputedByMinProximity() { - return attributeCriteriaComputedByMinProximity; - } - - public SearchParamsObject setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchParamsObject searchParamsObject = (SearchParamsObject) o; - return ( - Objects.equals(this.query, searchParamsObject.query) && - Objects.equals(this.similarQuery, searchParamsObject.similarQuery) && - Objects.equals(this.filters, searchParamsObject.filters) && - Objects.equals(this.facetFilters, searchParamsObject.facetFilters) && - Objects.equals(this.optionalFilters, searchParamsObject.optionalFilters) && - Objects.equals(this.numericFilters, searchParamsObject.numericFilters) && - Objects.equals(this.tagFilters, searchParamsObject.tagFilters) && - Objects.equals(this.sumOrFiltersScores, searchParamsObject.sumOrFiltersScores) && - Objects.equals(this.facets, searchParamsObject.facets) && - Objects.equals(this.maxValuesPerFacet, searchParamsObject.maxValuesPerFacet) && - Objects.equals(this.facetingAfterDistinct, searchParamsObject.facetingAfterDistinct) && - Objects.equals(this.sortFacetValuesBy, searchParamsObject.sortFacetValuesBy) && - Objects.equals(this.page, searchParamsObject.page) && - Objects.equals(this.offset, searchParamsObject.offset) && - Objects.equals(this.length, searchParamsObject.length) && - Objects.equals(this.aroundLatLng, searchParamsObject.aroundLatLng) && - Objects.equals(this.aroundLatLngViaIP, searchParamsObject.aroundLatLngViaIP) && - Objects.equals(this.aroundRadius, searchParamsObject.aroundRadius) && - Objects.equals(this.aroundPrecision, searchParamsObject.aroundPrecision) && - Objects.equals(this.minimumAroundRadius, searchParamsObject.minimumAroundRadius) && - Objects.equals(this.insideBoundingBox, searchParamsObject.insideBoundingBox) && - Objects.equals(this.insidePolygon, searchParamsObject.insidePolygon) && - Objects.equals(this.naturalLanguages, searchParamsObject.naturalLanguages) && - Objects.equals(this.ruleContexts, searchParamsObject.ruleContexts) && - Objects.equals(this.personalizationImpact, searchParamsObject.personalizationImpact) && - Objects.equals(this.userToken, searchParamsObject.userToken) && - Objects.equals(this.getRankingInfo, searchParamsObject.getRankingInfo) && - Objects.equals(this.clickAnalytics, searchParamsObject.clickAnalytics) && - Objects.equals(this.analytics, searchParamsObject.analytics) && - Objects.equals(this.analyticsTags, searchParamsObject.analyticsTags) && - Objects.equals(this.percentileComputation, searchParamsObject.percentileComputation) && - Objects.equals(this.enableABTest, searchParamsObject.enableABTest) && - Objects.equals(this.enableReRanking, searchParamsObject.enableReRanking) && - Objects.equals(this.reRankingApplyFilter, searchParamsObject.reRankingApplyFilter) && - Objects.equals(this.attributesForFaceting, searchParamsObject.attributesForFaceting) && - Objects.equals(this.attributesToRetrieve, searchParamsObject.attributesToRetrieve) && - Objects.equals(this.restrictSearchableAttributes, searchParamsObject.restrictSearchableAttributes) && - Objects.equals(this.ranking, searchParamsObject.ranking) && - Objects.equals(this.customRanking, searchParamsObject.customRanking) && - Objects.equals(this.relevancyStrictness, searchParamsObject.relevancyStrictness) && - Objects.equals(this.attributesToHighlight, searchParamsObject.attributesToHighlight) && - Objects.equals(this.attributesToSnippet, searchParamsObject.attributesToSnippet) && - Objects.equals(this.highlightPreTag, searchParamsObject.highlightPreTag) && - Objects.equals(this.highlightPostTag, searchParamsObject.highlightPostTag) && - Objects.equals(this.snippetEllipsisText, searchParamsObject.snippetEllipsisText) && - Objects.equals(this.restrictHighlightAndSnippetArrays, searchParamsObject.restrictHighlightAndSnippetArrays) && - Objects.equals(this.hitsPerPage, searchParamsObject.hitsPerPage) && - Objects.equals(this.minWordSizefor1Typo, searchParamsObject.minWordSizefor1Typo) && - Objects.equals(this.minWordSizefor2Typos, searchParamsObject.minWordSizefor2Typos) && - Objects.equals(this.typoTolerance, searchParamsObject.typoTolerance) && - Objects.equals(this.allowTyposOnNumericTokens, searchParamsObject.allowTyposOnNumericTokens) && - Objects.equals(this.disableTypoToleranceOnAttributes, searchParamsObject.disableTypoToleranceOnAttributes) && - Objects.equals(this.ignorePlurals, searchParamsObject.ignorePlurals) && - Objects.equals(this.removeStopWords, searchParamsObject.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, searchParamsObject.keepDiacriticsOnCharacters) && - Objects.equals(this.queryLanguages, searchParamsObject.queryLanguages) && - Objects.equals(this.decompoundQuery, searchParamsObject.decompoundQuery) && - Objects.equals(this.enableRules, searchParamsObject.enableRules) && - Objects.equals(this.enablePersonalization, searchParamsObject.enablePersonalization) && - Objects.equals(this.queryType, searchParamsObject.queryType) && - Objects.equals(this.removeWordsIfNoResults, searchParamsObject.removeWordsIfNoResults) && - Objects.equals(this.mode, searchParamsObject.mode) && - Objects.equals(this.semanticSearch, searchParamsObject.semanticSearch) && - Objects.equals(this.advancedSyntax, searchParamsObject.advancedSyntax) && - Objects.equals(this.optionalWords, searchParamsObject.optionalWords) && - Objects.equals(this.disableExactOnAttributes, searchParamsObject.disableExactOnAttributes) && - Objects.equals(this.exactOnSingleWordQuery, searchParamsObject.exactOnSingleWordQuery) && - Objects.equals(this.alternativesAsExact, searchParamsObject.alternativesAsExact) && - Objects.equals(this.advancedSyntaxFeatures, searchParamsObject.advancedSyntaxFeatures) && - Objects.equals(this.explain, searchParamsObject.explain) && - Objects.equals(this.distinct, searchParamsObject.distinct) && - Objects.equals(this.attributeForDistinct, searchParamsObject.attributeForDistinct) && - Objects.equals(this.synonyms, searchParamsObject.synonyms) && - Objects.equals(this.replaceSynonymsInHighlight, searchParamsObject.replaceSynonymsInHighlight) && - Objects.equals(this.minProximity, searchParamsObject.minProximity) && - Objects.equals(this.responseFields, searchParamsObject.responseFields) && - Objects.equals(this.maxFacetHits, searchParamsObject.maxFacetHits) && - Objects.equals(this.attributeCriteriaComputedByMinProximity, searchParamsObject.attributeCriteriaComputedByMinProximity) && - Objects.equals(this.renderingContent, searchParamsObject.renderingContent) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - query, - similarQuery, - filters, - facetFilters, - optionalFilters, - numericFilters, - tagFilters, - sumOrFiltersScores, - facets, - maxValuesPerFacet, - facetingAfterDistinct, - sortFacetValuesBy, - page, - offset, - length, - aroundLatLng, - aroundLatLngViaIP, - aroundRadius, - aroundPrecision, - minimumAroundRadius, - insideBoundingBox, - insidePolygon, - naturalLanguages, - ruleContexts, - personalizationImpact, - userToken, - getRankingInfo, - clickAnalytics, - analytics, - analyticsTags, - percentileComputation, - enableABTest, - enableReRanking, - reRankingApplyFilter, - attributesForFaceting, - attributesToRetrieve, - restrictSearchableAttributes, - ranking, - customRanking, - relevancyStrictness, - attributesToHighlight, - attributesToSnippet, - highlightPreTag, - highlightPostTag, - snippetEllipsisText, - restrictHighlightAndSnippetArrays, - hitsPerPage, - minWordSizefor1Typo, - minWordSizefor2Typos, - typoTolerance, - allowTyposOnNumericTokens, - disableTypoToleranceOnAttributes, - ignorePlurals, - removeStopWords, - keepDiacriticsOnCharacters, - queryLanguages, - decompoundQuery, - enableRules, - enablePersonalization, - queryType, - removeWordsIfNoResults, - mode, - semanticSearch, - advancedSyntax, - optionalWords, - disableExactOnAttributes, - exactOnSingleWordQuery, - alternativesAsExact, - advancedSyntaxFeatures, - explain, - distinct, - attributeForDistinct, - synonyms, - replaceSynonymsInHighlight, - minProximity, - responseFields, - maxFacetHits, - attributeCriteriaComputedByMinProximity, - renderingContent - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchParamsObject {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" similarQuery: ").append(toIndentedString(similarQuery)).append("\n"); - sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); - sb.append(" facetFilters: ").append(toIndentedString(facetFilters)).append("\n"); - sb.append(" optionalFilters: ").append(toIndentedString(optionalFilters)).append("\n"); - sb.append(" numericFilters: ").append(toIndentedString(numericFilters)).append("\n"); - sb.append(" tagFilters: ").append(toIndentedString(tagFilters)).append("\n"); - sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n"); - sb.append(" facetingAfterDistinct: ").append(toIndentedString(facetingAfterDistinct)).append("\n"); - sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); - sb.append(" length: ").append(toIndentedString(length)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" aroundLatLngViaIP: ").append(toIndentedString(aroundLatLngViaIP)).append("\n"); - sb.append(" aroundRadius: ").append(toIndentedString(aroundRadius)).append("\n"); - sb.append(" aroundPrecision: ").append(toIndentedString(aroundPrecision)).append("\n"); - sb.append(" minimumAroundRadius: ").append(toIndentedString(minimumAroundRadius)).append("\n"); - sb.append(" insideBoundingBox: ").append(toIndentedString(insideBoundingBox)).append("\n"); - sb.append(" insidePolygon: ").append(toIndentedString(insidePolygon)).append("\n"); - sb.append(" naturalLanguages: ").append(toIndentedString(naturalLanguages)).append("\n"); - sb.append(" ruleContexts: ").append(toIndentedString(ruleContexts)).append("\n"); - sb.append(" personalizationImpact: ").append(toIndentedString(personalizationImpact)).append("\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" getRankingInfo: ").append(toIndentedString(getRankingInfo)).append("\n"); - sb.append(" clickAnalytics: ").append(toIndentedString(clickAnalytics)).append("\n"); - sb.append(" analytics: ").append(toIndentedString(analytics)).append("\n"); - sb.append(" analyticsTags: ").append(toIndentedString(analyticsTags)).append("\n"); - sb.append(" percentileComputation: ").append(toIndentedString(percentileComputation)).append("\n"); - sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); - sb.append(" enableReRanking: ").append(toIndentedString(enableReRanking)).append("\n"); - sb.append(" reRankingApplyFilter: ").append(toIndentedString(reRankingApplyFilter)).append("\n"); - sb.append(" attributesForFaceting: ").append(toIndentedString(attributesForFaceting)).append("\n"); - sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); - sb.append(" restrictSearchableAttributes: ").append(toIndentedString(restrictSearchableAttributes)).append("\n"); - sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); - sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); - sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); - sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); - sb.append(" highlightPreTag: ").append(toIndentedString(highlightPreTag)).append("\n"); - sb.append(" highlightPostTag: ").append(toIndentedString(highlightPostTag)).append("\n"); - sb.append(" snippetEllipsisText: ").append(toIndentedString(snippetEllipsisText)).append("\n"); - sb.append(" restrictHighlightAndSnippetArrays: ").append(toIndentedString(restrictHighlightAndSnippetArrays)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" minWordSizefor1Typo: ").append(toIndentedString(minWordSizefor1Typo)).append("\n"); - sb.append(" minWordSizefor2Typos: ").append(toIndentedString(minWordSizefor2Typos)).append("\n"); - sb.append(" typoTolerance: ").append(toIndentedString(typoTolerance)).append("\n"); - sb.append(" allowTyposOnNumericTokens: ").append(toIndentedString(allowTyposOnNumericTokens)).append("\n"); - sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); - sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); - sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); - sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); - sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); - sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); - sb.append(" enablePersonalization: ").append(toIndentedString(enablePersonalization)).append("\n"); - sb.append(" queryType: ").append(toIndentedString(queryType)).append("\n"); - sb.append(" removeWordsIfNoResults: ").append(toIndentedString(removeWordsIfNoResults)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" semanticSearch: ").append(toIndentedString(semanticSearch)).append("\n"); - sb.append(" advancedSyntax: ").append(toIndentedString(advancedSyntax)).append("\n"); - sb.append(" optionalWords: ").append(toIndentedString(optionalWords)).append("\n"); - sb.append(" disableExactOnAttributes: ").append(toIndentedString(disableExactOnAttributes)).append("\n"); - sb.append(" exactOnSingleWordQuery: ").append(toIndentedString(exactOnSingleWordQuery)).append("\n"); - sb.append(" alternativesAsExact: ").append(toIndentedString(alternativesAsExact)).append("\n"); - sb.append(" advancedSyntaxFeatures: ").append(toIndentedString(advancedSyntaxFeatures)).append("\n"); - sb.append(" explain: ").append(toIndentedString(explain)).append("\n"); - sb.append(" distinct: ").append(toIndentedString(distinct)).append("\n"); - sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" replaceSynonymsInHighlight: ").append(toIndentedString(replaceSynonymsInHighlight)).append("\n"); - sb.append(" minProximity: ").append(toIndentedString(minProximity)).append("\n"); - sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); - sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); - sb - .append(" attributeCriteriaComputedByMinProximity: ") - .append(toIndentedString(attributeCriteriaComputedByMinProximity)) - .append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsQuery.java deleted file mode 100644 index 484f2592ea..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsQuery.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchParamsQuery */ -public class SearchParamsQuery { - - @JsonProperty("query") - private String query; - - public SearchParamsQuery setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchParamsQuery searchParamsQuery = (SearchParamsQuery) o; - return Objects.equals(this.query, searchParamsQuery.query); - } - - @Override - public int hashCode() { - return Objects.hash(query); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchParamsQuery {\n"); - sb.append(" query: ").append(toIndentedString(query)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsString.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsString.java deleted file mode 100644 index 51bc0bc2e7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchParamsString.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchParamsString */ -public class SearchParamsString { - - @JsonProperty("params") - private String params; - - public SearchParamsString setParams(String params) { - this.params = params; - return this; - } - - /** - * Search parameters as a URL-encoded query string. - * - * @return params - */ - @javax.annotation.Nullable - public String getParams() { - return params; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchParamsString searchParamsString = (SearchParamsString) o; - return Objects.equals(this.params, searchParamsString.params); - } - - @Override - public int hashCode() { - return Objects.hash(params); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchParamsString {\n"); - sb.append(" params: ").append(toIndentedString(params)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchQuery.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchQuery.java deleted file mode 100644 index e9792666ea..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchQuery.java +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** SearchQuery */ -@JsonDeserialize(using = SearchQuery.SearchQueryDeserializer.class) -@JsonSerialize(using = SearchQuery.SearchQuerySerializer.class) -public abstract class SearchQuery implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(SearchQuery.class.getName()); - - public static SearchQuery of(SearchForFacets inside) { - return new SearchQuerySearchForFacets(inside); - } - - public static SearchQuery of(SearchForHits inside) { - return new SearchQuerySearchForHits(inside); - } - - public static class SearchQuerySerializer extends StdSerializer { - - public SearchQuerySerializer(Class t) { - super(t); - } - - public SearchQuerySerializer() { - this(null); - } - - @Override - public void serialize(SearchQuery value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class SearchQueryDeserializer extends StdDeserializer { - - public SearchQueryDeserializer() { - this(SearchQuery.class); - } - - public SearchQueryDeserializer(Class vc) { - super(vc); - } - - @Override - public SearchQuery deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize SearchForFacets - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - SearchForFacets value = parser.readValueAs(new TypeReference() {}); - return SearchQuery.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf SearchForFacets (error: " + e.getMessage() + ") (type: SearchForFacets)"); - } - } - - // deserialize SearchForHits - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - SearchForHits value = parser.readValueAs(new TypeReference() {}); - return SearchQuery.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf SearchForHits (error: " + e.getMessage() + ") (type: SearchForHits)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public SearchQuery getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "SearchQuery cannot be null"); - } - } -} - -class SearchQuerySearchForFacets extends SearchQuery { - - private final SearchForFacets insideValue; - - SearchQuerySearchForFacets(SearchForFacets insideValue) { - this.insideValue = insideValue; - } - - @Override - public SearchForFacets getInsideValue() { - return insideValue; - } -} - -class SearchQuerySearchForHits extends SearchQuery { - - private final SearchForHits insideValue; - - SearchQuerySearchForHits(SearchForHits insideValue) { - this.insideValue = insideValue; - } - - @Override - public SearchForHits getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResponse.java deleted file mode 100644 index 5873bac84f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResponse.java +++ /dev/null @@ -1,644 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SearchResponse */ -public class SearchResponse { - - @JsonProperty("abTestID") - private Integer abTestID; - - @JsonProperty("abTestVariantID") - private Integer abTestVariantID; - - @JsonProperty("aroundLatLng") - private String aroundLatLng; - - @JsonProperty("automaticRadius") - private String automaticRadius; - - @JsonProperty("exhaustiveFacetsCount") - private Boolean exhaustiveFacetsCount; - - @JsonProperty("exhaustiveNbHits") - private Boolean exhaustiveNbHits; - - @JsonProperty("exhaustiveTypo") - private Boolean exhaustiveTypo; - - @JsonProperty("facets") - private Map> facets; - - @JsonProperty("facets_stats") - private Map facetsStats; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("index") - private String index; - - @JsonProperty("indexUsed") - private String indexUsed; - - @JsonProperty("message") - private String message; - - @JsonProperty("nbHits") - private Integer nbHits; - - @JsonProperty("nbPages") - private Integer nbPages; - - @JsonProperty("nbSortedHits") - private Integer nbSortedHits; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("params") - private String params; - - @JsonProperty("redirect") - private BaseSearchResponseRedirect redirect; - - @JsonProperty("parsedQuery") - private String parsedQuery; - - @JsonProperty("processingTimeMS") - private Integer processingTimeMS; - - @JsonProperty("query") - private String query; - - @JsonProperty("queryAfterRemoval") - private String queryAfterRemoval; - - @JsonProperty("serverUsed") - private String serverUsed; - - @JsonProperty("userData") - private Object userData; - - @JsonProperty("renderingContent") - private RenderingContent renderingContent; - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - public SearchResponse setAbTestID(Integer abTestID) { - this.abTestID = abTestID; - return this; - } - - /** - * A/B test ID. This is only included in the response for indices that are part of an A/B test. - * - * @return abTestID - */ - @javax.annotation.Nullable - public Integer getAbTestID() { - return abTestID; - } - - public SearchResponse setAbTestVariantID(Integer abTestVariantID) { - this.abTestVariantID = abTestVariantID; - return this; - } - - /** - * Variant ID. This is only included in the response for indices that are part of an A/B test. - * minimum: 1 - * - * @return abTestVariantID - */ - @javax.annotation.Nullable - public Integer getAbTestVariantID() { - return abTestVariantID; - } - - public SearchResponse setAroundLatLng(String aroundLatLng) { - this.aroundLatLng = aroundLatLng; - return this; - } - - /** - * Computed geographical location. - * - * @return aroundLatLng - */ - @javax.annotation.Nullable - public String getAroundLatLng() { - return aroundLatLng; - } - - public SearchResponse setAutomaticRadius(String automaticRadius) { - this.automaticRadius = automaticRadius; - return this; - } - - /** - * Automatically-computed radius. - * - * @return automaticRadius - */ - @javax.annotation.Nullable - public String getAutomaticRadius() { - return automaticRadius; - } - - public SearchResponse setExhaustiveFacetsCount(Boolean exhaustiveFacetsCount) { - this.exhaustiveFacetsCount = exhaustiveFacetsCount; - return this; - } - - /** - * Indicates whether the facet count is exhaustive (exact) or approximate. - * - * @return exhaustiveFacetsCount - */ - @javax.annotation.Nullable - public Boolean getExhaustiveFacetsCount() { - return exhaustiveFacetsCount; - } - - public SearchResponse setExhaustiveNbHits(Boolean exhaustiveNbHits) { - this.exhaustiveNbHits = exhaustiveNbHits; - return this; - } - - /** - * Indicates whether the number of hits `nbHits` is exhaustive (exact) or approximate. - * - * @return exhaustiveNbHits - */ - @javax.annotation.Nonnull - public Boolean getExhaustiveNbHits() { - return exhaustiveNbHits; - } - - public SearchResponse setExhaustiveTypo(Boolean exhaustiveTypo) { - this.exhaustiveTypo = exhaustiveTypo; - return this; - } - - /** - * Indicates whether the search for typos was exhaustive (exact) or approximate. - * - * @return exhaustiveTypo - */ - @javax.annotation.Nullable - public Boolean getExhaustiveTypo() { - return exhaustiveTypo; - } - - public SearchResponse setFacets(Map> facets) { - this.facets = facets; - return this; - } - - public SearchResponse putFacets(String key, Map facetsItem) { - if (this.facets == null) { - this.facets = new HashMap<>(); - } - this.facets.put(key, facetsItem); - return this; - } - - /** - * Mapping of each facet name to the corresponding facet counts. - * - * @return facets - */ - @javax.annotation.Nullable - public Map> getFacets() { - return facets; - } - - public SearchResponse setFacetsStats(Map facetsStats) { - this.facetsStats = facetsStats; - return this; - } - - public SearchResponse putFacetsStats(String key, FacetsStats facetsStatsItem) { - if (this.facetsStats == null) { - this.facetsStats = new HashMap<>(); - } - this.facetsStats.put(key, facetsStatsItem); - return this; - } - - /** - * Statistics for numerical facets. - * - * @return facetsStats - */ - @javax.annotation.Nullable - public Map getFacetsStats() { - return facetsStats; - } - - public SearchResponse setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nonnull - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public SearchResponse setIndex(String index) { - this.index = index; - return this; - } - - /** - * Index name used for the query. - * - * @return index - */ - @javax.annotation.Nullable - public String getIndex() { - return index; - } - - public SearchResponse setIndexUsed(String indexUsed) { - this.indexUsed = indexUsed; - return this; - } - - /** - * Index name used for the query. During A/B testing, the targeted index isn't always the index - * used by the query. - * - * @return indexUsed - */ - @javax.annotation.Nullable - public String getIndexUsed() { - return indexUsed; - } - - public SearchResponse setMessage(String message) { - this.message = message; - return this; - } - - /** - * Warnings about the query. - * - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public SearchResponse setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - public SearchResponse setNbPages(Integer nbPages) { - this.nbPages = nbPages; - return this; - } - - /** - * Number of pages of results for the current query. - * - * @return nbPages - */ - @javax.annotation.Nonnull - public Integer getNbPages() { - return nbPages; - } - - public SearchResponse setNbSortedHits(Integer nbSortedHits) { - this.nbSortedHits = nbSortedHits; - return this; - } - - /** - * Number of hits selected and sorted by the relevant sort algorithm. - * - * @return nbSortedHits - */ - @javax.annotation.Nullable - public Integer getNbSortedHits() { - return nbSortedHits; - } - - public SearchResponse setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nonnull - public Integer getPage() { - return page; - } - - public SearchResponse setParams(String params) { - this.params = params; - return this; - } - - /** - * URL-encoded string of all search parameters. - * - * @return params - */ - @javax.annotation.Nonnull - public String getParams() { - return params; - } - - public SearchResponse setRedirect(BaseSearchResponseRedirect redirect) { - this.redirect = redirect; - return this; - } - - /** - * Get redirect - * - * @return redirect - */ - @javax.annotation.Nullable - public BaseSearchResponseRedirect getRedirect() { - return redirect; - } - - public SearchResponse setParsedQuery(String parsedQuery) { - this.parsedQuery = parsedQuery; - return this; - } - - /** - * Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) - * query string that will be searched. - * - * @return parsedQuery - */ - @javax.annotation.Nullable - public String getParsedQuery() { - return parsedQuery; - } - - public SearchResponse setProcessingTimeMS(Integer processingTimeMS) { - this.processingTimeMS = processingTimeMS; - return this; - } - - /** - * Time the server took to process the request, in milliseconds. - * - * @return processingTimeMS - */ - @javax.annotation.Nonnull - public Integer getProcessingTimeMS() { - return processingTimeMS; - } - - public SearchResponse setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } - - public SearchResponse setQueryAfterRemoval(String queryAfterRemoval) { - this.queryAfterRemoval = queryAfterRemoval; - return this; - } - - /** - * Markup text indicating which parts of the original query have been removed to retrieve a - * non-empty result set. - * - * @return queryAfterRemoval - */ - @javax.annotation.Nullable - public String getQueryAfterRemoval() { - return queryAfterRemoval; - } - - public SearchResponse setServerUsed(String serverUsed) { - this.serverUsed = serverUsed; - return this; - } - - /** - * Host name of the server that processed the request. - * - * @return serverUsed - */ - @javax.annotation.Nullable - public String getServerUsed() { - return serverUsed; - } - - public SearchResponse setUserData(Object userData) { - this.userData = userData; - return this; - } - - /** - * Lets you store custom data in your indices. - * - * @return userData - */ - @javax.annotation.Nullable - public Object getUserData() { - return userData; - } - - public SearchResponse setRenderingContent(RenderingContent renderingContent) { - this.renderingContent = renderingContent; - return this; - } - - /** - * Get renderingContent - * - * @return renderingContent - */ - @javax.annotation.Nullable - public RenderingContent getRenderingContent() { - return renderingContent; - } - - public SearchResponse setHits(List hits) { - this.hits = hits; - return this; - } - - public SearchResponse addHits(T hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Get hits - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchResponse searchResponse = (SearchResponse) o; - return ( - Objects.equals(this.abTestID, searchResponse.abTestID) && - Objects.equals(this.abTestVariantID, searchResponse.abTestVariantID) && - Objects.equals(this.aroundLatLng, searchResponse.aroundLatLng) && - Objects.equals(this.automaticRadius, searchResponse.automaticRadius) && - Objects.equals(this.exhaustiveFacetsCount, searchResponse.exhaustiveFacetsCount) && - Objects.equals(this.exhaustiveNbHits, searchResponse.exhaustiveNbHits) && - Objects.equals(this.exhaustiveTypo, searchResponse.exhaustiveTypo) && - Objects.equals(this.facets, searchResponse.facets) && - Objects.equals(this.facetsStats, searchResponse.facetsStats) && - Objects.equals(this.hitsPerPage, searchResponse.hitsPerPage) && - Objects.equals(this.index, searchResponse.index) && - Objects.equals(this.indexUsed, searchResponse.indexUsed) && - Objects.equals(this.message, searchResponse.message) && - Objects.equals(this.nbHits, searchResponse.nbHits) && - Objects.equals(this.nbPages, searchResponse.nbPages) && - Objects.equals(this.nbSortedHits, searchResponse.nbSortedHits) && - Objects.equals(this.page, searchResponse.page) && - Objects.equals(this.params, searchResponse.params) && - Objects.equals(this.redirect, searchResponse.redirect) && - Objects.equals(this.parsedQuery, searchResponse.parsedQuery) && - Objects.equals(this.processingTimeMS, searchResponse.processingTimeMS) && - Objects.equals(this.query, searchResponse.query) && - Objects.equals(this.queryAfterRemoval, searchResponse.queryAfterRemoval) && - Objects.equals(this.serverUsed, searchResponse.serverUsed) && - Objects.equals(this.userData, searchResponse.userData) && - Objects.equals(this.renderingContent, searchResponse.renderingContent) && - Objects.equals(this.hits, searchResponse.hits) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - abTestID, - abTestVariantID, - aroundLatLng, - automaticRadius, - exhaustiveFacetsCount, - exhaustiveNbHits, - exhaustiveTypo, - facets, - facetsStats, - hitsPerPage, - index, - indexUsed, - message, - nbHits, - nbPages, - nbSortedHits, - page, - params, - redirect, - parsedQuery, - processingTimeMS, - query, - queryAfterRemoval, - serverUsed, - userData, - renderingContent, - hits - ); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchResponse {\n"); - sb.append(" abTestID: ").append(toIndentedString(abTestID)).append("\n"); - sb.append(" abTestVariantID: ").append(toIndentedString(abTestVariantID)).append("\n"); - sb.append(" aroundLatLng: ").append(toIndentedString(aroundLatLng)).append("\n"); - sb.append(" automaticRadius: ").append(toIndentedString(automaticRadius)).append("\n"); - sb.append(" exhaustiveFacetsCount: ").append(toIndentedString(exhaustiveFacetsCount)).append("\n"); - sb.append(" exhaustiveNbHits: ").append(toIndentedString(exhaustiveNbHits)).append("\n"); - sb.append(" exhaustiveTypo: ").append(toIndentedString(exhaustiveTypo)).append("\n"); - sb.append(" facets: ").append(toIndentedString(facets)).append("\n"); - sb.append(" facetsStats: ").append(toIndentedString(facetsStats)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" indexUsed: ").append(toIndentedString(indexUsed)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).append("\n"); - sb.append(" nbPages: ").append(toIndentedString(nbPages)).append("\n"); - sb.append(" nbSortedHits: ").append(toIndentedString(nbSortedHits)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" params: ").append(toIndentedString(params)).append("\n"); - sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n"); - sb.append(" parsedQuery: ").append(toIndentedString(parsedQuery)).append("\n"); - sb.append(" processingTimeMS: ").append(toIndentedString(processingTimeMS)).append("\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" queryAfterRemoval: ").append(toIndentedString(queryAfterRemoval)).append("\n"); - sb.append(" serverUsed: ").append(toIndentedString(serverUsed)).append("\n"); - sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); - sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).append("\n"); - sb.append(" hits: ").append(toIndentedString(hits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResponses.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResponses.java deleted file mode 100644 index 5b7908de52..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResponses.java +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchResponses */ -public class SearchResponses { - - @JsonProperty("results") - private List> results = new ArrayList<>(); - - public SearchResponses setResults(List> results) { - this.results = results; - return this; - } - - public SearchResponses addResults(SearchResult resultsItem) { - this.results.add(resultsItem); - return this; - } - - /** - * Get results - * - * @return results - */ - @javax.annotation.Nonnull - public List> getResults() { - return results; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchResponses searchResponses = (SearchResponses) o; - return Objects.equals(this.results, searchResponses.results); - } - - @Override - public int hashCode() { - return Objects.hash(results); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchResponses {\n"); - sb.append(" results: ").append(toIndentedString(results)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResult.java deleted file mode 100644 index 266be78481..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchResult.java +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** SearchResult */ -@JsonDeserialize(using = SearchResult.SearchResultDeserializer.class) -@JsonSerialize(using = SearchResult.SearchResultSerializer.class) -public abstract class SearchResult implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(SearchResult.class.getName()); - - public static SearchResult of(SearchForFacetValuesResponse inside) { - return new SearchResultSearchForFacetValuesResponse(inside); - } - - public static SearchResult of(SearchResponse inside) { - return new SearchResultSearchResponse(inside); - } - - public static class SearchResultSerializer extends StdSerializer { - - public SearchResultSerializer(Class t) { - super(t); - } - - public SearchResultSerializer() { - this(null); - } - - @Override - public void serialize(SearchResult value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class SearchResultDeserializer extends StdDeserializer { - - public SearchResultDeserializer() { - this(SearchResult.class); - } - - public SearchResultDeserializer(Class vc) { - super(vc); - } - - @Override - public SearchResult deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize SearchForFacetValuesResponse - if (tree.isObject() && tree.has("facetHits")) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - SearchForFacetValuesResponse value = parser.readValueAs(new TypeReference() {}); - return SearchResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf SearchForFacetValuesResponse (error: " + e.getMessage() + ") (type: SearchForFacetValuesResponse)" - ); - } - } - - // deserialize SearchResponse - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - SearchResponse value = parser.readValueAs(new TypeReference() {}); - return SearchResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf SearchResponse (error: " + e.getMessage() + ") (type: SearchResponse)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public SearchResult getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "SearchResult cannot be null"); - } - } -} - -class SearchResultSearchForFacetValuesResponse extends SearchResult { - - private final SearchForFacetValuesResponse insideValue; - - SearchResultSearchForFacetValuesResponse(SearchForFacetValuesResponse insideValue) { - this.insideValue = insideValue; - } - - @Override - public SearchForFacetValuesResponse getInsideValue() { - return insideValue; - } -} - -class SearchResultSearchResponse extends SearchResult { - - private final SearchResponse insideValue; - - SearchResultSearchResponse(SearchResponse insideValue) { - this.insideValue = insideValue; - } - - @Override - public SearchResponse getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchRulesParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchRulesParams.java deleted file mode 100644 index 69f16a44fc..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchRulesParams.java +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Rules search parameters. */ -public class SearchRulesParams { - - @JsonProperty("query") - private String query; - - @JsonProperty("anchoring") - private Anchoring anchoring; - - @JsonProperty("context") - private String context; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("enabled") - private Boolean enabled; - - @JsonProperty("requestOptions") - private List requestOptions; - - public SearchRulesParams setQuery(String query) { - this.query = query; - return this; - } - - /** - * Rule object query. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - public SearchRulesParams setAnchoring(Anchoring anchoring) { - this.anchoring = anchoring; - return this; - } - - /** - * Get anchoring - * - * @return anchoring - */ - @javax.annotation.Nullable - public Anchoring getAnchoring() { - return anchoring; - } - - public SearchRulesParams setContext(String context) { - this.context = context; - return this; - } - - /** - * Restricts responses to the specified [contextual - * rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules). - * - * @return context - */ - @javax.annotation.Nullable - public String getContext() { - return context; - } - - public SearchRulesParams setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Requested page (the first page is page 0). minimum: 0 - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public SearchRulesParams setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Maximum number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public SearchRulesParams setEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Restricts responses to enabled rules. When not specified (default), _all_ rules are retrieved. - * - * @return enabled - */ - @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; - } - - public SearchRulesParams setRequestOptions(List requestOptions) { - this.requestOptions = requestOptions; - return this; - } - - public SearchRulesParams addRequestOptions(Object requestOptionsItem) { - if (this.requestOptions == null) { - this.requestOptions = new ArrayList<>(); - } - this.requestOptions.add(requestOptionsItem); - return this; - } - - /** - * Request options to send with the API call. - * - * @return requestOptions - */ - @javax.annotation.Nullable - public List getRequestOptions() { - return requestOptions; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchRulesParams searchRulesParams = (SearchRulesParams) o; - return ( - Objects.equals(this.query, searchRulesParams.query) && - Objects.equals(this.anchoring, searchRulesParams.anchoring) && - Objects.equals(this.context, searchRulesParams.context) && - Objects.equals(this.page, searchRulesParams.page) && - Objects.equals(this.hitsPerPage, searchRulesParams.hitsPerPage) && - Objects.equals(this.enabled, searchRulesParams.enabled) && - Objects.equals(this.requestOptions, searchRulesParams.requestOptions) - ); - } - - @Override - public int hashCode() { - return Objects.hash(query, anchoring, context, page, hitsPerPage, enabled, requestOptions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchRulesParams {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" anchoring: ").append(toIndentedString(anchoring)).append("\n"); - sb.append(" context: ").append(toIndentedString(context)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" requestOptions: ").append(toIndentedString(requestOptions)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchRulesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchRulesResponse.java deleted file mode 100644 index 2680aa1af0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchRulesResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** SearchRulesResponse */ -public class SearchRulesResponse { - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - @JsonProperty("nbHits") - private Integer nbHits; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("nbPages") - private Integer nbPages; - - public SearchRulesResponse setHits(List hits) { - this.hits = hits; - return this; - } - - public SearchRulesResponse addHits(Rule hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Fetched rules. - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - public SearchRulesResponse setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of fetched rules. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - public SearchRulesResponse setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Current page. - * - * @return page - */ - @javax.annotation.Nonnull - public Integer getPage() { - return page; - } - - public SearchRulesResponse setNbPages(Integer nbPages) { - this.nbPages = nbPages; - return this; - } - - /** - * Number of pages. - * - * @return nbPages - */ - @javax.annotation.Nonnull - public Integer getNbPages() { - return nbPages; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchRulesResponse searchRulesResponse = (SearchRulesResponse) o; - return ( - Objects.equals(this.hits, searchRulesResponse.hits) && - Objects.equals(this.nbHits, searchRulesResponse.nbHits) && - Objects.equals(this.page, searchRulesResponse.page) && - Objects.equals(this.nbPages, searchRulesResponse.nbPages) - ); - } - - @Override - public int hashCode() { - return Objects.hash(hits, nbHits, page, nbPages); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchRulesResponse {\n"); - sb.append(" hits: ").append(toIndentedString(hits)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" nbPages: ").append(toIndentedString(nbPages)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchStrategy.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchStrategy.java deleted file mode 100644 index 441f881fa1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchStrategy.java +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * - `none`: executes all queries. - `stopIfEnoughMatches`: executes queries one by one, stopping - * further query execution as soon as a query matches at least the `hitsPerPage` number of results. - */ -public enum SearchStrategy { - NONE("none"), - - STOP_IF_ENOUGH_MATCHES("stopIfEnoughMatches"); - - private final String value; - - SearchStrategy(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SearchStrategy fromValue(String value) { - for (SearchStrategy b : SearchStrategy.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchSynonymsParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchSynonymsParams.java deleted file mode 100644 index f899f4f634..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchSynonymsParams.java +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** SearchSynonymsParams */ -public class SearchSynonymsParams { - - @JsonProperty("query") - private String query; - - public SearchSynonymsParams setQuery(String query) { - this.query = query; - return this; - } - - /** - * Text to search for in an index. - * - * @return query - */ - @javax.annotation.Nullable - public String getQuery() { - return query; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchSynonymsParams searchSynonymsParams = (SearchSynonymsParams) o; - return Objects.equals(this.query, searchSynonymsParams.query); - } - - @Override - public int hashCode() { - return Objects.hash(query); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchSynonymsParams {\n"); - sb.append(" query: ").append(toIndentedString(query)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchSynonymsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchSynonymsResponse.java deleted file mode 100644 index 0b493ae0b7..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchSynonymsResponse.java +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SearchSynonymsResponse */ -public class SearchSynonymsResponse { - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - @JsonProperty("nbHits") - private Integer nbHits; - - private Map additionalProperties = new HashMap<>(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public SearchSynonymsResponse setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - return this; - } - - public SearchSynonymsResponse setHits(List hits) { - this.hits = hits; - return this; - } - - public SearchSynonymsResponse addHits(SynonymHit hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * Synonym objects. - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - public SearchSynonymsResponse setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchSynonymsResponse searchSynonymsResponse = (SearchSynonymsResponse) o; - return ( - Objects.equals(this.hits, searchSynonymsResponse.hits) && - Objects.equals(this.nbHits, searchSynonymsResponse.nbHits) && - super.equals(o) - ); - } - - @Override - public int hashCode() { - return Objects.hash(hits, nbHits, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchSynonymsResponse {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" hits: ").append(toIndentedString(hits)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchTypeDefault.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchTypeDefault.java deleted file mode 100644 index 79d25ad570..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchTypeDefault.java +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * - `default`: perform a search query - `facet` [searches for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - */ -public enum SearchTypeDefault { - DEFAULT("default"); - - private final String value; - - SearchTypeDefault(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SearchTypeDefault fromValue(String value) { - for (SearchTypeDefault b : SearchTypeDefault.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchTypeFacet.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchTypeFacet.java deleted file mode 100644 index 0906362fd6..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchTypeFacet.java +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * - `default`: perform a search query - `facet` [searches for facet - * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). - */ -public enum SearchTypeFacet { - FACET("facet"); - - private final String value; - - SearchTypeFacet(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SearchTypeFacet fromValue(String value) { - for (SearchTypeFacet b : SearchTypeFacet.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchUserIdsParams.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchUserIdsParams.java deleted file mode 100644 index 34c3a71fd1..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchUserIdsParams.java +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** OK */ -public class SearchUserIdsParams { - - @JsonProperty("query") - private String query; - - @JsonProperty("clusterName") - private String clusterName; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - public SearchUserIdsParams setQuery(String query) { - this.query = query; - return this; - } - - /** - * Query to search. The search is a prefix search with [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) - * enabled. An empty query will retrieve all users. - * - * @return query - */ - @javax.annotation.Nonnull - public String getQuery() { - return query; - } - - public SearchUserIdsParams setClusterName(String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * Cluster name. - * - * @return clusterName - */ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - public SearchUserIdsParams setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public SearchUserIdsParams setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nullable - public Integer getHitsPerPage() { - return hitsPerPage; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchUserIdsParams searchUserIdsParams = (SearchUserIdsParams) o; - return ( - Objects.equals(this.query, searchUserIdsParams.query) && - Objects.equals(this.clusterName, searchUserIdsParams.clusterName) && - Objects.equals(this.page, searchUserIdsParams.page) && - Objects.equals(this.hitsPerPage, searchUserIdsParams.hitsPerPage) - ); - } - - @Override - public int hashCode() { - return Objects.hash(query, clusterName, page, hitsPerPage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchUserIdsParams {\n"); - sb.append(" query: ").append(toIndentedString(query)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchUserIdsResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchUserIdsResponse.java deleted file mode 100644 index 316341db9a..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SearchUserIdsResponse.java +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** userIDs data. */ -public class SearchUserIdsResponse { - - @JsonProperty("hits") - private List hits = new ArrayList<>(); - - @JsonProperty("nbHits") - private Integer nbHits; - - @JsonProperty("page") - private Integer page; - - @JsonProperty("hitsPerPage") - private Integer hitsPerPage; - - @JsonProperty("updatedAt") - private String updatedAt; - - public SearchUserIdsResponse setHits(List hits) { - this.hits = hits; - return this; - } - - public SearchUserIdsResponse addHits(UserHit hitsItem) { - this.hits.add(hitsItem); - return this; - } - - /** - * User objects that match the query. - * - * @return hits - */ - @javax.annotation.Nonnull - public List getHits() { - return hits; - } - - public SearchUserIdsResponse setNbHits(Integer nbHits) { - this.nbHits = nbHits; - return this; - } - - /** - * Number of hits the search query matched. - * - * @return nbHits - */ - @javax.annotation.Nonnull - public Integer getNbHits() { - return nbHits; - } - - public SearchUserIdsResponse setPage(Integer page) { - this.page = page; - return this; - } - - /** - * Page to retrieve (the first page is `0`, not `1`). - * - * @return page - */ - @javax.annotation.Nonnull - public Integer getPage() { - return page; - } - - public SearchUserIdsResponse setHitsPerPage(Integer hitsPerPage) { - this.hitsPerPage = hitsPerPage; - return this; - } - - /** - * Maximum number of hits per page. minimum: 1 maximum: 1000 - * - * @return hitsPerPage - */ - @javax.annotation.Nonnull - public Integer getHitsPerPage() { - return hitsPerPage; - } - - public SearchUserIdsResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SearchUserIdsResponse searchUserIdsResponse = (SearchUserIdsResponse) o; - return ( - Objects.equals(this.hits, searchUserIdsResponse.hits) && - Objects.equals(this.nbHits, searchUserIdsResponse.nbHits) && - Objects.equals(this.page, searchUserIdsResponse.page) && - Objects.equals(this.hitsPerPage, searchUserIdsResponse.hitsPerPage) && - Objects.equals(this.updatedAt, searchUserIdsResponse.updatedAt) - ); - } - - @Override - public int hashCode() { - return Objects.hash(hits, nbHits, page, hitsPerPage, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SearchUserIdsResponse {\n"); - sb.append(" hits: ").append(toIndentedString(hits)).append("\n"); - sb.append(" nbHits: ").append(toIndentedString(nbHits)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SnippetResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SnippetResult.java deleted file mode 100644 index e4114cb5a9..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SnippetResult.java +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** SnippetResult */ -@JsonDeserialize(using = SnippetResult.SnippetResultDeserializer.class) -@JsonSerialize(using = SnippetResult.SnippetResultSerializer.class) -public abstract class SnippetResult implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(SnippetResult.class.getName()); - - public static SnippetResult of(List inside) { - return new SnippetResultListOfSnippetResultOption(inside); - } - - public static SnippetResult of(SnippetResultOption inside) { - return new SnippetResultSnippetResultOption(inside); - } - - public static class SnippetResultSerializer extends StdSerializer { - - public SnippetResultSerializer(Class t) { - super(t); - } - - public SnippetResultSerializer() { - this(null); - } - - @Override - public void serialize(SnippetResult value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class SnippetResultDeserializer extends StdDeserializer { - - public SnippetResultDeserializer() { - this(SnippetResult.class); - } - - public SnippetResultDeserializer(Class vc) { - super(vc); - } - - @Override - public SnippetResult deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return SnippetResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize SnippetResultOption - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - SnippetResultOption value = parser.readValueAs(new TypeReference() {}); - return SnippetResult.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf SnippetResultOption (error: " + e.getMessage() + ") (type: SnippetResultOption)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public SnippetResult getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "SnippetResult cannot be null"); - } - } -} - -class SnippetResultListOfSnippetResultOption extends SnippetResult { - - private final List insideValue; - - SnippetResultListOfSnippetResultOption(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class SnippetResultSnippetResultOption extends SnippetResult { - - private final SnippetResultOption insideValue; - - SnippetResultSnippetResultOption(SnippetResultOption insideValue) { - this.insideValue = insideValue; - } - - @Override - public SnippetResultOption getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SnippetResultOption.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SnippetResultOption.java deleted file mode 100644 index 68f6abb751..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SnippetResultOption.java +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** - * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet - * is non-empty. - */ -public class SnippetResultOption { - - @JsonProperty("value") - private String value; - - @JsonProperty("matchLevel") - private MatchLevel matchLevel; - - public SnippetResultOption setValue(String value) { - this.value = value; - return this; - } - - /** - * Markup text with `facetQuery` matches highlighted. - * - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public SnippetResultOption setMatchLevel(MatchLevel matchLevel) { - this.matchLevel = matchLevel; - return this; - } - - /** - * Get matchLevel - * - * @return matchLevel - */ - @javax.annotation.Nonnull - public MatchLevel getMatchLevel() { - return matchLevel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SnippetResultOption snippetResultOption = (SnippetResultOption) o; - return Objects.equals(this.value, snippetResultOption.value) && Objects.equals(this.matchLevel, snippetResultOption.matchLevel); - } - - @Override - public int hashCode() { - return Objects.hash(value, matchLevel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SnippetResultOption {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" matchLevel: ").append(toIndentedString(matchLevel)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SortRemainingBy.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SortRemainingBy.java deleted file mode 100644 index f14a44df23..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SortRemainingBy.java +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical - * (ascending). - `hidden`: show only pinned values. - */ -public enum SortRemainingBy { - COUNT("count"), - - ALPHA("alpha"), - - HIDDEN("hidden"); - - private final String value; - - SortRemainingBy(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SortRemainingBy fromValue(String value) { - for (SortRemainingBy b : SortRemainingBy.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Source.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Source.java deleted file mode 100644 index 065bbd6afb..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Source.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Source. */ -public class Source { - - @JsonProperty("source") - private String source; - - @JsonProperty("description") - private String description; - - public Source setSource(String source) { - this.source = source; - return this; - } - - /** - * IP address range of the source. - * - * @return source - */ - @javax.annotation.Nonnull - public String getSource() { - return source; - } - - public Source setDescription(String description) { - this.description = description; - return this; - } - - /** - * Source description. - * - * @return description - */ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Source source = (Source) o; - return Objects.equals(this.source, source.source) && Objects.equals(this.description, source.description); - } - - @Override - public int hashCode() { - return Objects.hash(source, description); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Source {\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/StandardEntries.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/StandardEntries.java deleted file mode 100644 index 2fceb80f2c..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/StandardEntries.java +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * Key-value pairs of [supported language ISO - * codes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) - * and boolean values. - */ -public class StandardEntries { - - @JsonProperty("plurals") - private Map plurals; - - @JsonProperty("stopwords") - private Map stopwords; - - @JsonProperty("compounds") - private Map compounds; - - public StandardEntries setPlurals(Map plurals) { - this.plurals = plurals; - return this; - } - - public StandardEntries putPlurals(String key, Boolean pluralsItem) { - if (this.plurals == null) { - this.plurals = new HashMap<>(); - } - this.plurals.put(key, pluralsItem); - return this; - } - - /** - * Key-value pair of a language ISO code and a boolean value. - * - * @return plurals - */ - @javax.annotation.Nullable - public Map getPlurals() { - return plurals; - } - - public StandardEntries setStopwords(Map stopwords) { - this.stopwords = stopwords; - return this; - } - - public StandardEntries putStopwords(String key, Boolean stopwordsItem) { - if (this.stopwords == null) { - this.stopwords = new HashMap<>(); - } - this.stopwords.put(key, stopwordsItem); - return this; - } - - /** - * Key-value pair of a language ISO code and a boolean value. - * - * @return stopwords - */ - @javax.annotation.Nullable - public Map getStopwords() { - return stopwords; - } - - public StandardEntries setCompounds(Map compounds) { - this.compounds = compounds; - return this; - } - - public StandardEntries putCompounds(String key, Boolean compoundsItem) { - if (this.compounds == null) { - this.compounds = new HashMap<>(); - } - this.compounds.put(key, compoundsItem); - return this; - } - - /** - * Key-value pair of a language ISO code and a boolean value. - * - * @return compounds - */ - @javax.annotation.Nullable - public Map getCompounds() { - return compounds; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StandardEntries standardEntries = (StandardEntries) o; - return ( - Objects.equals(this.plurals, standardEntries.plurals) && - Objects.equals(this.stopwords, standardEntries.stopwords) && - Objects.equals(this.compounds, standardEntries.compounds) - ); - } - - @Override - public int hashCode() { - return Objects.hash(plurals, stopwords, compounds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StandardEntries {\n"); - sb.append(" plurals: ").append(toIndentedString(plurals)).append("\n"); - sb.append(" stopwords: ").append(toIndentedString(stopwords)).append("\n"); - sb.append(" compounds: ").append(toIndentedString(compounds)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SynonymHit.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SynonymHit.java deleted file mode 100644 index 9d53c835e4..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SynonymHit.java +++ /dev/null @@ -1,238 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Synonym object. */ -public class SynonymHit { - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("type") - private SynonymType type; - - @JsonProperty("synonyms") - private List synonyms; - - @JsonProperty("input") - private String input; - - @JsonProperty("word") - private String word; - - @JsonProperty("corrections") - private List corrections; - - @JsonProperty("placeholder") - private String placeholder; - - @JsonProperty("replacements") - private List replacements; - - public SynonymHit setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique identifier of a synonym object. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public SynonymHit setType(SynonymType type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - public SynonymType getType() { - return type; - } - - public SynonymHit setSynonyms(List synonyms) { - this.synonyms = synonyms; - return this; - } - - public SynonymHit addSynonyms(String synonymsItem) { - if (this.synonyms == null) { - this.synonyms = new ArrayList<>(); - } - this.synonyms.add(synonymsItem); - return this; - } - - /** - * Words or phrases considered equivalent. - * - * @return synonyms - */ - @javax.annotation.Nullable - public List getSynonyms() { - return synonyms; - } - - public SynonymHit setInput(String input) { - this.input = input; - return this; - } - - /** - * Word or phrase to appear in query strings (for - * [`onewaysynonym`s](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/one-way-synonyms/)). - * - * @return input - */ - @javax.annotation.Nullable - public String getInput() { - return input; - } - - public SynonymHit setWord(String word) { - this.word = word; - return this; - } - - /** - * Word or phrase to appear in query strings (for [`altcorrection1` and - * `altcorrection2`](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-alternative-corrections/)). - * - * @return word - */ - @javax.annotation.Nullable - public String getWord() { - return word; - } - - public SynonymHit setCorrections(List corrections) { - this.corrections = corrections; - return this; - } - - public SynonymHit addCorrections(String correctionsItem) { - if (this.corrections == null) { - this.corrections = new ArrayList<>(); - } - this.corrections.add(correctionsItem); - return this; - } - - /** - * Words to be matched in records. - * - * @return corrections - */ - @javax.annotation.Nullable - public List getCorrections() { - return corrections; - } - - public SynonymHit setPlaceholder(String placeholder) { - this.placeholder = placeholder; - return this; - } - - /** - * [Placeholder - * token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/) - * to be put inside records. - * - * @return placeholder - */ - @javax.annotation.Nullable - public String getPlaceholder() { - return placeholder; - } - - public SynonymHit setReplacements(List replacements) { - this.replacements = replacements; - return this; - } - - public SynonymHit addReplacements(String replacementsItem) { - if (this.replacements == null) { - this.replacements = new ArrayList<>(); - } - this.replacements.add(replacementsItem); - return this; - } - - /** - * Query words that will match the [placeholder - * token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/). - * - * @return replacements - */ - @javax.annotation.Nullable - public List getReplacements() { - return replacements; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SynonymHit synonymHit = (SynonymHit) o; - return ( - Objects.equals(this.objectID, synonymHit.objectID) && - Objects.equals(this.type, synonymHit.type) && - Objects.equals(this.synonyms, synonymHit.synonyms) && - Objects.equals(this.input, synonymHit.input) && - Objects.equals(this.word, synonymHit.word) && - Objects.equals(this.corrections, synonymHit.corrections) && - Objects.equals(this.placeholder, synonymHit.placeholder) && - Objects.equals(this.replacements, synonymHit.replacements) - ); - } - - @Override - public int hashCode() { - return Objects.hash(objectID, type, synonyms, input, word, corrections, placeholder, replacements); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SynonymHit {\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" synonyms: ").append(toIndentedString(synonyms)).append("\n"); - sb.append(" input: ").append(toIndentedString(input)).append("\n"); - sb.append(" word: ").append(toIndentedString(word)).append("\n"); - sb.append(" corrections: ").append(toIndentedString(corrections)).append("\n"); - sb.append(" placeholder: ").append(toIndentedString(placeholder)).append("\n"); - sb.append(" replacements: ").append(toIndentedString(replacements)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SynonymType.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SynonymType.java deleted file mode 100644 index 1d19c1d9bf..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/SynonymType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Synonym type. */ -public enum SynonymType { - SYNONYM("synonym"), - - ONEWAYSYNONYM("onewaysynonym"), - - ALTCORRECTION_1("altcorrection1"), - - ALTCORRECTION_2("altcorrection2"), - - PLACEHOLDER("placeholder"); - - private final String value; - - SynonymType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SynonymType fromValue(String value) { - for (SynonymType b : SynonymType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TagFilters.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TagFilters.java deleted file mode 100644 index 6056663fd8..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TagFilters.java +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.List; -import java.util.logging.Logger; - -/** [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/). */ -@JsonDeserialize(using = TagFilters.TagFiltersDeserializer.class) -@JsonSerialize(using = TagFilters.TagFiltersSerializer.class) -public abstract class TagFilters implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(TagFilters.class.getName()); - - public static TagFilters of(List inside) { - return new TagFiltersListOfMixedSearchFilters(inside); - } - - public static TagFilters of(String inside) { - return new TagFiltersString(inside); - } - - public static class TagFiltersSerializer extends StdSerializer { - - public TagFiltersSerializer(Class t) { - super(t); - } - - public TagFiltersSerializer() { - this(null); - } - - @Override - public void serialize(TagFilters value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class TagFiltersDeserializer extends StdDeserializer { - - public TagFiltersDeserializer() { - this(TagFilters.class); - } - - public TagFiltersDeserializer(Class vc) { - super(vc); - } - - @Override - public TagFilters deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize List - if (tree.isArray()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return TagFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)" - ); - } - } - - // deserialize String - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - String value = parser.readValueAs(new TypeReference() {}); - return TagFilters.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf String (error: " + e.getMessage() + ") (type: String)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public TagFilters getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "TagFilters cannot be null"); - } - } -} - -class TagFiltersListOfMixedSearchFilters extends TagFilters { - - private final List insideValue; - - TagFiltersListOfMixedSearchFilters(List insideValue) { - this.insideValue = insideValue; - } - - @Override - public List getInsideValue() { - return insideValue; - } -} - -class TagFiltersString extends TagFilters { - - private final String insideValue; - - TagFiltersString(String insideValue) { - this.insideValue = insideValue; - } - - @Override - public String getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TaskStatus.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TaskStatus.java deleted file mode 100644 index 98b298e75f..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TaskStatus.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** _published_ if the task has been processed, _notPublished_ otherwise. */ -public enum TaskStatus { - PUBLISHED("published"), - - NOT_PUBLISHED("notPublished"); - - private final String value; - - TaskStatus(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TaskStatus fromValue(String value) { - for (TaskStatus b : TaskStatus.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TimeRange.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TimeRange.java deleted file mode 100644 index f882127f6b..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TimeRange.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** TimeRange */ -public class TimeRange { - - @JsonProperty("from") - private Integer from; - - @JsonProperty("until") - private Integer until; - - public TimeRange setFrom(Integer from) { - this.from = from; - return this; - } - - /** - * Lower bound of the time range (Unix timestamp). - * - * @return from - */ - @javax.annotation.Nonnull - public Integer getFrom() { - return from; - } - - public TimeRange setUntil(Integer until) { - this.until = until; - return this; - } - - /** - * Upper bound of the time range (Unix timestamp). - * - * @return until - */ - @javax.annotation.Nonnull - public Integer getUntil() { - return until; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TimeRange timeRange = (TimeRange) o; - return Objects.equals(this.from, timeRange.from) && Objects.equals(this.until, timeRange.until); - } - - @Override - public int hashCode() { - return Objects.hash(from, until); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TimeRange {\n"); - sb.append(" from: ").append(toIndentedString(from)).append("\n"); - sb.append(" until: ").append(toIndentedString(until)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TypoTolerance.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TypoTolerance.java deleted file mode 100644 index f04dc1d445..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TypoTolerance.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.algolia.exceptions.AlgoliaRuntimeException; -import com.algolia.utils.CompoundType; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.logging.Logger; - -/** - * Controls whether [typo - * tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) - * is enabled and how it is applied. - */ -@JsonDeserialize(using = TypoTolerance.TypoToleranceDeserializer.class) -@JsonSerialize(using = TypoTolerance.TypoToleranceSerializer.class) -public abstract class TypoTolerance implements CompoundType { - - private static final Logger LOGGER = Logger.getLogger(TypoTolerance.class.getName()); - - public static TypoTolerance of(Boolean inside) { - return new TypoToleranceBoolean(inside); - } - - public static TypoTolerance of(TypoToleranceEnum inside) { - return new TypoToleranceTypoToleranceEnum(inside); - } - - public static class TypoToleranceSerializer extends StdSerializer { - - public TypoToleranceSerializer(Class t) { - super(t); - } - - public TypoToleranceSerializer() { - this(null); - } - - @Override - public void serialize(TypoTolerance value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getInsideValue()); - } - } - - public static class TypoToleranceDeserializer extends StdDeserializer { - - public TypoToleranceDeserializer() { - this(TypoTolerance.class); - } - - public TypoToleranceDeserializer(Class vc) { - super(vc); - } - - @Override - public TypoTolerance deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - JsonNode tree = jp.readValueAsTree(); - - // deserialize Boolean - if (tree.isValueNode()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - Boolean value = parser.readValueAs(new TypeReference() {}); - return TypoTolerance.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf Boolean (error: " + e.getMessage() + ") (type: Boolean)"); - } - } - - // deserialize TypoToleranceEnum - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - TypoToleranceEnum value = parser.readValueAs(new TypeReference() {}); - return TypoTolerance.of(value); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest("Failed to deserialize oneOf TypoToleranceEnum (error: " + e.getMessage() + ") (type: TypoToleranceEnum)"); - } - } - throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public TypoTolerance getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "TypoTolerance cannot be null"); - } - } -} - -class TypoToleranceBoolean extends TypoTolerance { - - private final Boolean insideValue; - - TypoToleranceBoolean(Boolean insideValue) { - this.insideValue = insideValue; - } - - @Override - public Boolean getInsideValue() { - return insideValue; - } -} - -class TypoToleranceTypoToleranceEnum extends TypoTolerance { - - private final TypoToleranceEnum insideValue; - - TypoToleranceTypoToleranceEnum(TypoToleranceEnum insideValue) { - this.insideValue = insideValue; - } - - @Override - public TypoToleranceEnum getInsideValue() { - return insideValue; - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TypoToleranceEnum.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TypoToleranceEnum.java deleted file mode 100644 index facaa851aa..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/TypoToleranceEnum.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets typoToleranceEnum */ -public enum TypoToleranceEnum { - MIN("min"), - - STRICT("strict"); - - private final String value; - - TypoToleranceEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypoToleranceEnum fromValue(String value) { - for (TypoToleranceEnum b : TypoToleranceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdateApiKeyResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdateApiKeyResponse.java deleted file mode 100644 index eaf443e79d..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdateApiKeyResponse.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** UpdateApiKeyResponse */ -public class UpdateApiKeyResponse { - - @JsonProperty("key") - private String key; - - @JsonProperty("updatedAt") - private String updatedAt; - - public UpdateApiKeyResponse setKey(String key) { - this.key = key; - return this; - } - - /** - * API key. - * - * @return key - */ - @javax.annotation.Nonnull - public String getKey() { - return key; - } - - public UpdateApiKeyResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateApiKeyResponse updateApiKeyResponse = (UpdateApiKeyResponse) o; - return Objects.equals(this.key, updateApiKeyResponse.key) && Objects.equals(this.updatedAt, updateApiKeyResponse.updatedAt); - } - - @Override - public int hashCode() { - return Objects.hash(key, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateApiKeyResponse {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtResponse.java deleted file mode 100644 index 7dfcf05e71..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Response, taskID, and update timestamp. */ -public class UpdatedAtResponse { - - @JsonProperty("taskID") - private Long taskID; - - @JsonProperty("updatedAt") - private String updatedAt; - - public UpdatedAtResponse setTaskID(Long taskID) { - this.taskID = taskID; - return this; - } - - /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. - * - * @return taskID - */ - @javax.annotation.Nonnull - public Long getTaskID() { - return taskID; - } - - public UpdatedAtResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatedAtResponse updatedAtResponse = (UpdatedAtResponse) o; - return Objects.equals(this.taskID, updatedAtResponse.taskID) && Objects.equals(this.updatedAt, updatedAtResponse.updatedAt); - } - - @Override - public int hashCode() { - return Objects.hash(taskID, updatedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdatedAtResponse {\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtWithObjectIdResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtWithObjectIdResponse.java deleted file mode 100644 index 87b7714668..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedAtWithObjectIdResponse.java +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Response, taskID, unique object identifier, and an update timestamp. */ -public class UpdatedAtWithObjectIdResponse { - - @JsonProperty("taskID") - private Long taskID; - - @JsonProperty("updatedAt") - private String updatedAt; - - @JsonProperty("objectID") - private String objectID; - - public UpdatedAtWithObjectIdResponse setTaskID(Long taskID) { - this.taskID = taskID; - return this; - } - - /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. - * - * @return taskID - */ - @javax.annotation.Nullable - public Long getTaskID() { - return taskID; - } - - public UpdatedAtWithObjectIdResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nullable - public String getUpdatedAt() { - return updatedAt; - } - - public UpdatedAtWithObjectIdResponse setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique object identifier. - * - * @return objectID - */ - @javax.annotation.Nullable - public String getObjectID() { - return objectID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatedAtWithObjectIdResponse updatedAtWithObjectIdResponse = (UpdatedAtWithObjectIdResponse) o; - return ( - Objects.equals(this.taskID, updatedAtWithObjectIdResponse.taskID) && - Objects.equals(this.updatedAt, updatedAtWithObjectIdResponse.updatedAt) && - Objects.equals(this.objectID, updatedAtWithObjectIdResponse.objectID) - ); - } - - @Override - public int hashCode() { - return Objects.hash(taskID, updatedAt, objectID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdatedAtWithObjectIdResponse {\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedRuleResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedRuleResponse.java deleted file mode 100644 index b8e20378a8..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UpdatedRuleResponse.java +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** UpdatedRuleResponse */ -public class UpdatedRuleResponse { - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("updatedAt") - private String updatedAt; - - @JsonProperty("taskID") - private Long taskID; - - public UpdatedRuleResponse setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * Unique object identifier. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public UpdatedRuleResponse setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. - * - * @return updatedAt - */ - @javax.annotation.Nonnull - public String getUpdatedAt() { - return updatedAt; - } - - public UpdatedRuleResponse setTaskID(Long taskID) { - this.taskID = taskID; - return this; - } - - /** - * Unique identifier of a task. A successful API response means that a task was added to a queue. - * It might not run immediately. You can check the task's progress with the `task` operation and - * this `taskID`. - * - * @return taskID - */ - @javax.annotation.Nonnull - public Long getTaskID() { - return taskID; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdatedRuleResponse updatedRuleResponse = (UpdatedRuleResponse) o; - return ( - Objects.equals(this.objectID, updatedRuleResponse.objectID) && - Objects.equals(this.updatedAt, updatedRuleResponse.updatedAt) && - Objects.equals(this.taskID, updatedRuleResponse.taskID) - ); - } - - @Override - public int hashCode() { - return Objects.hash(objectID, updatedAt, taskID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdatedRuleResponse {\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" taskID: ").append(toIndentedString(taskID)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserHighlightResult.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserHighlightResult.java deleted file mode 100644 index dd84bd5810..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserHighlightResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** UserHighlightResult */ -public class UserHighlightResult { - - @JsonProperty("userID") - private Map userID = new HashMap<>(); - - @JsonProperty("clusterName") - private Map clusterName = new HashMap<>(); - - public UserHighlightResult setUserID(Map userID) { - this.userID = userID; - return this; - } - - public UserHighlightResult putUserID(String key, HighlightResult userIDItem) { - this.userID.put(key, userIDItem); - return this; - } - - /** - * Show highlighted section and words matched on a query. - * - * @return userID - */ - @javax.annotation.Nonnull - public Map getUserID() { - return userID; - } - - public UserHighlightResult setClusterName(Map clusterName) { - this.clusterName = clusterName; - return this; - } - - public UserHighlightResult putClusterName(String key, HighlightResult clusterNameItem) { - this.clusterName.put(key, clusterNameItem); - return this; - } - - /** - * Show highlighted section and words matched on a query. - * - * @return clusterName - */ - @javax.annotation.Nonnull - public Map getClusterName() { - return clusterName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserHighlightResult userHighlightResult = (UserHighlightResult) o; - return Objects.equals(this.userID, userHighlightResult.userID) && Objects.equals(this.clusterName, userHighlightResult.clusterName); - } - - @Override - public int hashCode() { - return Objects.hash(userID, clusterName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserHighlightResult {\n"); - sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserHit.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserHit.java deleted file mode 100644 index ca71f031ed..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserHit.java +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** UserHit */ -public class UserHit { - - @JsonProperty("userID") - private String userID; - - @JsonProperty("clusterName") - private String clusterName; - - @JsonProperty("nbRecords") - private Integer nbRecords; - - @JsonProperty("dataSize") - private Integer dataSize; - - @JsonProperty("objectID") - private String objectID; - - @JsonProperty("_highlightResult") - private UserHighlightResult highlightResult; - - public UserHit setUserID(String userID) { - this.userID = userID; - return this; - } - - /** - * userID of the user. - * - * @return userID - */ - @javax.annotation.Nonnull - public String getUserID() { - return userID; - } - - public UserHit setClusterName(String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * Cluster name. - * - * @return clusterName - */ - @javax.annotation.Nonnull - public String getClusterName() { - return clusterName; - } - - public UserHit setNbRecords(Integer nbRecords) { - this.nbRecords = nbRecords; - return this; - } - - /** - * Number of records in the cluster. - * - * @return nbRecords - */ - @javax.annotation.Nonnull - public Integer getNbRecords() { - return nbRecords; - } - - public UserHit setDataSize(Integer dataSize) { - this.dataSize = dataSize; - return this; - } - - /** - * Data size taken by all the users assigned to the cluster. - * - * @return dataSize - */ - @javax.annotation.Nonnull - public Integer getDataSize() { - return dataSize; - } - - public UserHit setObjectID(String objectID) { - this.objectID = objectID; - return this; - } - - /** - * userID of the requested user. Same as userID. - * - * @return objectID - */ - @javax.annotation.Nonnull - public String getObjectID() { - return objectID; - } - - public UserHit setHighlightResult(UserHighlightResult highlightResult) { - this.highlightResult = highlightResult; - return this; - } - - /** - * Get highlightResult - * - * @return highlightResult - */ - @javax.annotation.Nonnull - public UserHighlightResult getHighlightResult() { - return highlightResult; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserHit userHit = (UserHit) o; - return ( - Objects.equals(this.userID, userHit.userID) && - Objects.equals(this.clusterName, userHit.clusterName) && - Objects.equals(this.nbRecords, userHit.nbRecords) && - Objects.equals(this.dataSize, userHit.dataSize) && - Objects.equals(this.objectID, userHit.objectID) && - Objects.equals(this.highlightResult, userHit.highlightResult) - ); - } - - @Override - public int hashCode() { - return Objects.hash(userID, clusterName, nbRecords, dataSize, objectID, highlightResult); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserHit {\n"); - sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" nbRecords: ").append(toIndentedString(nbRecords)).append("\n"); - sb.append(" dataSize: ").append(toIndentedString(dataSize)).append("\n"); - sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); - sb.append(" highlightResult: ").append(toIndentedString(highlightResult)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserId.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserId.java deleted file mode 100644 index 97453dd027..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/UserId.java +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -/** Unique user ID. */ -public class UserId { - - @JsonProperty("userID") - private String userID; - - @JsonProperty("clusterName") - private String clusterName; - - @JsonProperty("nbRecords") - private Integer nbRecords; - - @JsonProperty("dataSize") - private Integer dataSize; - - public UserId setUserID(String userID) { - this.userID = userID; - return this; - } - - /** - * userID of the user. - * - * @return userID - */ - @javax.annotation.Nonnull - public String getUserID() { - return userID; - } - - public UserId setClusterName(String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * Cluster to which the user is assigned. - * - * @return clusterName - */ - @javax.annotation.Nonnull - public String getClusterName() { - return clusterName; - } - - public UserId setNbRecords(Integer nbRecords) { - this.nbRecords = nbRecords; - return this; - } - - /** - * Number of records belonging to the user. - * - * @return nbRecords - */ - @javax.annotation.Nonnull - public Integer getNbRecords() { - return nbRecords; - } - - public UserId setDataSize(Integer dataSize) { - this.dataSize = dataSize; - return this; - } - - /** - * Data size used by the user. - * - * @return dataSize - */ - @javax.annotation.Nonnull - public Integer getDataSize() { - return dataSize; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserId userId = (UserId) o; - return ( - Objects.equals(this.userID, userId.userID) && - Objects.equals(this.clusterName, userId.clusterName) && - Objects.equals(this.nbRecords, userId.nbRecords) && - Objects.equals(this.dataSize, userId.dataSize) - ); - } - - @Override - public int hashCode() { - return Objects.hash(userID, clusterName, nbRecords, dataSize); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserId {\n"); - sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" nbRecords: ").append(toIndentedString(nbRecords)).append("\n"); - sb.append(" dataSize: ").append(toIndentedString(dataSize)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Value.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Value.java deleted file mode 100644 index 9800133bb0..0000000000 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Value.java +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost -// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -package com.algolia.model.search; - -import com.fasterxml.jackson.annotation.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Value */ -public class Value { - - @JsonProperty("order") - private List order; - - @JsonProperty("sortRemainingBy") - private SortRemainingBy sortRemainingBy; - - public Value setOrder(List order) { - this.order = order; - return this; - } - - public Value addOrder(String orderItem) { - if (this.order == null) { - this.order = new ArrayList<>(); - } - this.order.add(orderItem); - return this; - } - - /** - * Pinned order of facet lists. - * - * @return order - */ - @javax.annotation.Nullable - public List getOrder() { - return order; - } - - public Value setSortRemainingBy(SortRemainingBy sortRemainingBy) { - this.sortRemainingBy = sortRemainingBy; - return this; - } - - /** - * Get sortRemainingBy - * - * @return sortRemainingBy - */ - @javax.annotation.Nullable - public SortRemainingBy getSortRemainingBy() { - return sortRemainingBy; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Value value = (Value) o; - return Objects.equals(this.order, value.order) && Objects.equals(this.sortRemainingBy, value.sortRemainingBy); - } - - @Override - public int hashCode() { - return Objects.hash(order, sortRemainingBy); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Value {\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append(" sortRemainingBy: ").append(toIndentedString(sortRemainingBy)).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 "); - } -} diff --git a/clients/algoliasearch-client-java-2/gradle.properties b/clients/algoliasearch-client-java-2/gradle.properties deleted file mode 100644 index ee34058247..0000000000 --- a/clients/algoliasearch-client-java-2/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -GROUP=com.algolia -VERSION_NAME=4.0.0-SNAPSHOT - -SONATYPE_HOST=DEFAULT -RELEASE_SIGNING_ENABLED=true diff --git a/clients/algoliasearch-client-java-2/.github/workflows/release.yml b/clients/algoliasearch-client-java/.github/workflows/release.yml similarity index 100% rename from clients/algoliasearch-client-java-2/.github/workflows/release.yml rename to clients/algoliasearch-client-java/.github/workflows/release.yml diff --git a/clients/algoliasearch-client-java-2/.gitignore b/clients/algoliasearch-client-java/.gitignore similarity index 100% rename from clients/algoliasearch-client-java-2/.gitignore rename to clients/algoliasearch-client-java/.gitignore diff --git a/clients/algoliasearch-client-java-2/.java-version b/clients/algoliasearch-client-java/.java-version similarity index 100% rename from clients/algoliasearch-client-java-2/.java-version rename to clients/algoliasearch-client-java/.java-version diff --git a/clients/algoliasearch-client-java-2/CHANGELOG.md b/clients/algoliasearch-client-java/CHANGELOG.md similarity index 94% rename from clients/algoliasearch-client-java-2/CHANGELOG.md rename to clients/algoliasearch-client-java/CHANGELOG.md index 24b745ca6d..d1b8d8fff9 100644 --- a/clients/algoliasearch-client-java-2/CHANGELOG.md +++ b/clients/algoliasearch-client-java/CHANGELOG.md @@ -1,4 +1,4 @@ -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [58ea5dbf](https://github.com/algolia/api-clients-automation/commit/58ea5dbf) fix(specs): allow partial input update for authentications ([#1856](https://github.com/algolia/api-clients-automation/pull/1856)) by [@Fluf22](https://github.com/Fluf22/) - [2ac508ff](https://github.com/algolia/api-clients-automation/commit/2ac508ff) fix(specs): search w/ hits & facets responses ([#1774](https://github.com/algolia/api-clients-automation/pull/1774)) by [@aallam](https://github.com/aallam/) @@ -12,264 +12,264 @@ - [529f4c636](https://github.com/algolia/api-clients-automation/commit/529f4c636) docs(java): add migration guides code snippets ([#1691](https://github.com/algolia/api-clients-automation/pull/1691)) by [@aallam](https://github.com/aallam/) - [7250930c7](https://github.com/algolia/api-clients-automation/commit/7250930c7) fix(specs): add input to authentication list ([#1688](https://github.com/algolia/api-clients-automation/pull/1688)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [15bc7618](https://github.com/algolia/api-clients-automation/commit/15bc7618) feat(specs): updated_at removed from Run response ([#1651](https://github.com/algolia/api-clients-automation/pull/1651)) by [@mehmetaligok](https://github.com/mehmetaligok/) - [b7c71def](https://github.com/algolia/api-clients-automation/commit/b7c71def) feat(specs): add new outlier count properties to variant payload ([#1656](https://github.com/algolia/api-clients-automation/pull/1656)) by [@febeck](https://github.com/febeck/) - [b703dea4](https://github.com/algolia/api-clients-automation/commit/b703dea4) docs(specs): review Insights API spec ([#1647](https://github.com/algolia/api-clients-automation/pull/1647)) by [@kai687](https://github.com/kai687/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [19e99bb9](https://github.com/algolia/api-clients-automation/commit/19e99bb9) fix(specs): change github container registry name ([#1641](https://github.com/algolia/api-clients-automation/pull/1641)) by [@morganleroi](https://github.com/morganleroi/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [19e99bb9](https://github.com/algolia/api-clients-automation/commit/19e99bb9) fix(specs): change github container registry name ([#1641](https://github.com/algolia/api-clients-automation/pull/1641)) by [@morganleroi](https://github.com/morganleroi/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [308c7ccb](https://github.com/algolia/api-clients-automation/commit/308c7ccb) fix(specs): add blocking to reasonCode instead of outcome ([#1622](https://github.com/algolia/api-clients-automation/pull/1622)) by [@damcou](https://github.com/damcou/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [3cdb7495](https://github.com/algolia/api-clients-automation/commit/3cdb7495) fix(specs): add blocking run outcome ([#1619](https://github.com/algolia/api-clients-automation/pull/1619)) by [@damcou](https://github.com/damcou/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [81401eed](https://github.com/algolia/api-clients-automation/commit/81401eed) feat(specs): add `startDate` and `endDate` parameters to Ingestion API ([#1614](https://github.com/algolia/api-clients-automation/pull/1614)) by [@shortcuts](https://github.com/shortcuts/) - [138a35b5](https://github.com/algolia/api-clients-automation/commit/138a35b5) fix(specs): add processing run outcome ([#1613](https://github.com/algolia/api-clients-automation/pull/1613)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [e1cb1c89](https://github.com/algolia/api-clients-automation/commit/e1cb1c89) fix(specs): add docker source input ([#1594](https://github.com/algolia/api-clients-automation/pull/1594)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [2a55abf5](https://github.com/algolia/api-clients-automation/commit/2a55abf5) feat(specs): add objectID to BQ source input ([#1575](https://github.com/algolia/api-clients-automation/pull/1575)) by [@damcou](https://github.com/damcou/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [635806cb](https://github.com/algolia/api-clients-automation/commit/635806cb) feat(specs): ingestion partial update method changed to patch ([#1564](https://github.com/algolia/api-clients-automation/pull/1564)) by [@mehmetaligok](https://github.com/mehmetaligok/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [6284a8bc](https://github.com/algolia/api-clients-automation/commit/6284a8bc) feat(specs): add task input for bigquery ([#1549](https://github.com/algolia/api-clients-automation/pull/1549)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [49b4c00c](https://github.com/algolia/api-clients-automation/commit/49b4c00c) feat(specs): add property to BigQuery source input ([#1547](https://github.com/algolia/api-clients-automation/pull/1547)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [49b4c00c](https://github.com/algolia/api-clients-automation/commit/49b4c00c) feat(specs): add property to BigQuery source input ([#1547](https://github.com/algolia/api-clients-automation/pull/1547)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [7c9cfb9b](https://github.com/algolia/api-clients-automation/commit/7c9cfb9b) feat(specs): add reason code to run outcome ([#1531](https://github.com/algolia/api-clients-automation/pull/1531)) by [@Fluf22](https://github.com/Fluf22/) - [558b8fbb](https://github.com/algolia/api-clients-automation/commit/558b8fbb) feat(clients): add Kotlin API client ([#1400](https://github.com/algolia/api-clients-automation/pull/1400)) by [@aallam](https://github.com/aallam/) - [102f3d4d](https://github.com/algolia/api-clients-automation/commit/102f3d4d) fix(specs): remove unsupported delete option for task action type ([#1511](https://github.com/algolia/api-clients-automation/pull/1511)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [3af3eb49](https://github.com/algolia/api-clients-automation/commit/3af3eb49) fix(specs): update required for kotlin tests to pass ([#1492](https://github.com/algolia/api-clients-automation/pull/1492)) by [@aallam](https://github.com/aallam/) - [44962fa5](https://github.com/algolia/api-clients-automation/commit/44962fa5) feat(clients): add bigquery to sourceTypes enum ([#1490](https://github.com/algolia/api-clients-automation/pull/1490)) by [@damcou](https://github.com/damcou/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [ad21cc75](https://github.com/algolia/api-clients-automation/commit/ad21cc75) feat(specs): add predict segment size to responses [PRED-1277] ([#1478](https://github.com/algolia/api-clients-automation/pull/1478)) by [@bengreenbank](https://github.com/bengreenbank/) - [13e7d170](https://github.com/algolia/api-clients-automation/commit/13e7d170) feat(specs): add `neuralSearch` options ([#1474](https://github.com/algolia/api-clients-automation/pull/1474)) by [@shortcuts](https://github.com/shortcuts/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [9a65a533](https://github.com/algolia/api-clients-automation/commit/9a65a533) feat(specs): add `size` to predict segment response ([#1434](https://github.com/algolia/api-clients-automation/pull/1434)) by [@bengreenbank](https://github.com/bengreenbank/) - [0ed9eb22](https://github.com/algolia/api-clients-automation/commit/0ed9eb22) fix(specs): add `input` in GET tasks ([#1472](https://github.com/algolia/api-clients-automation/pull/1472)) by [@shortcuts](https://github.com/shortcuts/) - [692aa2d8](https://github.com/algolia/api-clients-automation/commit/692aa2d8) fix(specs): add transform event type ([#1470](https://github.com/algolia/api-clients-automation/pull/1470)) by [@millotp](https://github.com/millotp/) - [69aac53d](https://github.com/algolia/api-clients-automation/commit/69aac53d) fix(specs): task trigger guard import order ([#1459](https://github.com/algolia/api-clients-automation/pull/1459)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [a0d96721](https://github.com/algolia/api-clients-automation/commit/a0d96721) fix(specs): task trigger guard import ([#1458](https://github.com/algolia/api-clients-automation/pull/1458)) by [@Fluf22](https://github.com/Fluf22/) - [d3f107d4](https://github.com/algolia/api-clients-automation/commit/d3f107d4) fix(specs): task trigger guard update ([#1457](https://github.com/algolia/api-clients-automation/pull/1457)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [619e2ad7](https://github.com/algolia/api-clients-automation/commit/619e2ad7) feat(specs): add delimiter option for csv source ([#1445](https://github.com/algolia/api-clients-automation/pull/1445)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [33ec7bc7](https://github.com/algolia/api-clients-automation/commit/33ec7bc7) feat(specs): add `lastUpdatedAt` field to predict segments ([#1431](https://github.com/algolia/api-clients-automation/pull/1431)) by [@bengreenbank](https://github.com/bengreenbank/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [c49b6e6d](https://github.com/algolia/api-clients-automation/commit/c49b6e6d) fix(specs): add customRequest to ingestion and small fix ([#1418](https://github.com/algolia/api-clients-automation/pull/1418)) by [@millotp](https://github.com/millotp/) - [524347e3](https://github.com/algolia/api-clients-automation/commit/524347e3) fix(specs): update BigCommerce source payload ([#1416](https://github.com/algolia/api-clients-automation/pull/1416)) by [@shortcuts](https://github.com/shortcuts/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [e3fa5eb0](https://github.com/algolia/api-clients-automation/commit/e3fa5eb0) feat(specs): add new BigCommerce source fields ([#1387](https://github.com/algolia/api-clients-automation/pull/1387)) by [@shortcuts](https://github.com/shortcuts/) - [6f0ac998](https://github.com/algolia/api-clients-automation/commit/6f0ac998) feat(specs): make the `eu` region available for the ingestion client ([#1396](https://github.com/algolia/api-clients-automation/pull/1396)) by [@Fluf22](https://github.com/Fluf22/) - [79ae980b](https://github.com/algolia/api-clients-automation/commit/79ae980b) feat(specs): update affinity value type to accomodate booleans and numbers ([#1388](https://github.com/algolia/api-clients-automation/pull/1388)) by [@writeens](https://github.com/writeens/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [9f967a45](https://github.com/algolia/api-clients-automation/commit/9f967a45) fix(specs): authenticationID not required in source and destination ([#1379](https://github.com/algolia/api-clients-automation/pull/1379)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [5a93964e](https://github.com/algolia/api-clients-automation/commit/5a93964e) fix(specs): add skipped runs ([#1359](https://github.com/algolia/api-clients-automation/pull/1359)) by [@millotp](https://github.com/millotp/) - [2a4fe7ea](https://github.com/algolia/api-clients-automation/commit/2a4fe7ea) feat(clients): upgrade to node 18 ([#1344](https://github.com/algolia/api-clients-automation/pull/1344)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [33700b8c](https://github.com/algolia/api-clients-automation/commit/33700b8c) feat(specs): add a reason string to the run object ([#1347](https://github.com/algolia/api-clients-automation/pull/1347)) by [@Fluf22](https://github.com/Fluf22/) - [d7b03aed](https://github.com/algolia/api-clients-automation/commit/d7b03aed) chore(java): add api compat check ([#1335](https://github.com/algolia/api-clients-automation/pull/1335)) by [@aallam](https://github.com/aallam/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [b4d183fe](https://github.com/algolia/api-clients-automation/commit/b4d183fe) fix(specs): add pagination to events ([#1337](https://github.com/algolia/api-clients-automation/pull/1337)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [e3aa6b2d](https://github.com/algolia/api-clients-automation/commit/e3aa6b2d) fix(specs): add `UniqueIDColumn` property to `SourceJSON` input ([#1333](https://github.com/algolia/api-clients-automation/pull/1333)) by [@mehmetaligok](https://github.com/mehmetaligok/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [2eca9b7b](https://github.com/algolia/api-clients-automation/commit/2eca9b7b) fix(specs): update Predict Segment operators to textual format ([#1316](https://github.com/algolia/api-clients-automation/pull/1316)) by [@francoischalifour](https://github.com/francoischalifour/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [f7f0fbe8](https://github.com/algolia/api-clients-automation/commit/f7f0fbe8) feat(specs): make DELETE endpoints return a 200 OK ([#1314](https://github.com/algolia/api-clients-automation/pull/1314)) by [@Fluf22](https://github.com/Fluf22/) - [cb3001dd](https://github.com/algolia/api-clients-automation/commit/cb3001dd) fix(specs): remove segment version ([#1313](https://github.com/algolia/api-clients-automation/pull/1313)) by [@bengreenbank](https://github.com/bengreenbank/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [d3aead8a](https://github.com/algolia/api-clients-automation/commit/d3aead8a) refactor(specs): new predict segment condition syntax ([#1202](https://github.com/algolia/api-clients-automation/pull/1202)) by [@bengreenbank](https://github.com/bengreenbank/) - [bad11072](https://github.com/algolia/api-clients-automation/commit/bad11072) feat(specs): remove content attributes from models [PRED-982] ([#1226](https://github.com/algolia/api-clients-automation/pull/1226)) by [@bengreenbank](https://github.com/bengreenbank/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [023d5572](https://github.com/algolia/api-clients-automation/commit/023d5572) feat(specs): add sort and order handling in query parameters ([#1304](https://github.com/algolia/api-clients-automation/pull/1304)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [b9b4ba35](https://github.com/algolia/api-clients-automation/commit/b9b4ba35) feat(specs): add CSV source ([#1301](https://github.com/algolia/api-clients-automation/pull/1301)) by [@morganleroi](https://github.com/morganleroi/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [9d04dc22](https://github.com/algolia/api-clients-automation/commit/9d04dc22) fix(specs): rename task type to `onDemand` ([#1299](https://github.com/algolia/api-clients-automation/pull/1299)) by [@shortcuts](https://github.com/shortcuts/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [a1c7c245](https://github.com/algolia/api-clients-automation/commit/a1c7c245) fix(specs): correct types for Tasks trigger ([#1279](https://github.com/algolia/api-clients-automation/pull/1279)) by [@shortcuts](https://github.com/shortcuts/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [aed20fe6](https://github.com/algolia/api-clients-automation/commit/aed20fe6) feat(specs): add more descriptions to the Ingestion API ([#1273](https://github.com/algolia/api-clients-automation/pull/1273)) by [@shortcuts](https://github.com/shortcuts/) - [3739451a](https://github.com/algolia/api-clients-automation/commit/3739451a) fix(specs): add query params for observability ([#1277](https://github.com/algolia/api-clients-automation/pull/1277)) by [@millotp](https://github.com/millotp/) - [859c0a97](https://github.com/algolia/api-clients-automation/commit/859c0a97) feat(specs): source update changes ([#1276](https://github.com/algolia/api-clients-automation/pull/1276)) by [@mehmetaligok](https://github.com/mehmetaligok/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [46c1e2e9](https://github.com/algolia/api-clients-automation/commit/46c1e2e9) feat(specs): add search endpoint to every item type ([#1274](https://github.com/algolia/api-clients-automation/pull/1274)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [a60e6790](https://github.com/algolia/api-clients-automation/commit/a60e6790) feat(specs): add sourceID query param to task list endpoint ([#1250](https://github.com/algolia/api-clients-automation/pull/1250)) by [@Fluf22](https://github.com/Fluf22/) - [6916fb9b](https://github.com/algolia/api-clients-automation/commit/6916fb9b) feat(java): remove predict client temporarely ([#1262](https://github.com/algolia/api-clients-automation/pull/1262)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [83330afe](https://github.com/algolia/api-clients-automation/commit/83330afe) chore(specs): change PlatformType naming to Platform ([#1246](https://github.com/algolia/api-clients-automation/pull/1246)) by [@Fluf22](https://github.com/Fluf22/) - [700dad66](https://github.com/algolia/api-clients-automation/commit/700dad66) feat(specs): add query param to filter list endpoint results ([#1245](https://github.com/algolia/api-clients-automation/pull/1245)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [699fff2b](https://github.com/algolia/api-clients-automation/commit/699fff2b) fix(specs): fix method for task enable/disable status ([#1242](https://github.com/algolia/api-clients-automation/pull/1242)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [4b1f1fd3](https://github.com/algolia/api-clients-automation/commit/4b1f1fd3) feat(specs): add query params to task lists endpoint in Ingestion APIC ([#1233](https://github.com/algolia/api-clients-automation/pull/1233)) by [@Fluf22](https://github.com/Fluf22/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [466cc0b3](https://github.com/algolia/api-clients-automation/commit/466cc0b3) fix(specs): remove input from auth list ([#1229](https://github.com/algolia/api-clients-automation/pull/1229)) by [@millotp](https://github.com/millotp/) - [28d82603](https://github.com/algolia/api-clients-automation/commit/28d82603) fix(specs): authenticationID is not required in source and destination ([#1203](https://github.com/algolia/api-clients-automation/pull/1203)) by [@morganleroi](https://github.com/morganleroi/) - [9acdc96b](https://github.com/algolia/api-clients-automation/commit/9acdc96b) fix(specs): move lastRun and nextRun to task.trigger ([#1228](https://github.com/algolia/api-clients-automation/pull/1228)) by [@millotp](https://github.com/millotp/) - [8fc33195](https://github.com/algolia/api-clients-automation/commit/8fc33195) fix(specs): make enabled nullable ([#1212](https://github.com/algolia/api-clients-automation/pull/1212)) by [@kai687](https://github.com/kai687/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [75c9a862](https://github.com/algolia/api-clients-automation/commit/75c9a862) fix(specs): numberOfPendingTasks is plural ([#1211](https://github.com/algolia/api-clients-automation/pull/1211)) by [@kai687](https://github.com/kai687/) - [e77a46b9](https://github.com/algolia/api-clients-automation/commit/e77a46b9) fix(specs): example should be integer ([#1210](https://github.com/algolia/api-clients-automation/pull/1210)) by [@kai687](https://github.com/kai687/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [dd4fdefd](https://github.com/algolia/api-clients-automation/commit/dd4fdefd) feat(specs): add source json to ingestion client ([#1200](https://github.com/algolia/api-clients-automation/pull/1200)) by [@morganleroi](https://github.com/morganleroi/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [ec370af5](https://github.com/algolia/api-clients-automation/commit/ec370af5) fix(specs): new CT source input ([#1190](https://github.com/algolia/api-clients-automation/pull/1190)) by [@shortcuts](https://github.com/shortcuts/) - [377e091d](https://github.com/algolia/api-clients-automation/commit/377e091d) fix(specs): Algolia Search hostnames ([#1189](https://github.com/algolia/api-clients-automation/pull/1189)) by [@kai687](https://github.com/kai687/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [19552886](https://github.com/algolia/api-clients-automation/commit/19552886) fix(clients): replace sources client with ingestion ([#1178](https://github.com/algolia/api-clients-automation/pull/1178)) by [@millotp](https://github.com/millotp/) - [2f456a45](https://github.com/algolia/api-clients-automation/commit/2f456a45) fix(specs): mistakes in the ingestion spec ([#1176](https://github.com/algolia/api-clients-automation/pull/1176)) by [@millotp](https://github.com/millotp/) - [1685ed08](https://github.com/algolia/api-clients-automation/commit/1685ed08) feat(specs): create ingestion specs ([#1100](https://github.com/algolia/api-clients-automation/pull/1100)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [fc7f987d](https://github.com/algolia/api-clients-automation/commit/fc7f987d) feat(specs): add appropriate type to model instance type property ([#1077](https://github.com/algolia/api-clients-automation/pull/1077)) by [@writeens](https://github.com/writeens/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [e84584dd](https://github.com/algolia/api-clients-automation/commit/e84584dd) feat(specs): add modelID as part of getModelMetrics response ([#1075](https://github.com/algolia/api-clients-automation/pull/1075)) by [@writeens](https://github.com/writeens/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [8151e945](https://github.com/algolia/api-clients-automation/commit/8151e945) feat(specs): attributes no longer required in model instance response ([#1065](https://github.com/algolia/api-clients-automation/pull/1065)) by [@writeens](https://github.com/writeens/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [0ef2eab9](https://github.com/algolia/api-clients-automation/commit/0ef2eab9) fix(specs): update predict model endpoint modelAttributes type ([#1063](https://github.com/algolia/api-clients-automation/pull/1063)) by [@writeens](https://github.com/writeens/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [09a235cd](https://github.com/algolia/api-clients-automation/commit/09a235cd) fix(specs): update model response ([#1034](https://github.com/algolia/api-clients-automation/pull/1034)) by [@writeens](https://github.com/writeens/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [b56b2b49](https://github.com/algolia/api-clients-automation/commit/b56b2b49) fix(specs): prefix Predict predictions success types ([#1032](https://github.com/algolia/api-clients-automation/pull/1032)) by [@francoischalifour](https://github.com/francoischalifour/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [07a2e936](https://github.com/algolia/api-clients-automation/commit/07a2e936) feat(specs): predict segments ([#1013](https://github.com/algolia/api-clients-automation/pull/1013)) by [@bengreenbank](https://github.com/bengreenbank/) - [362cd6b1](https://github.com/algolia/api-clients-automation/commit/362cd6b1) feat(specs): deleteByParams ([#1016](https://github.com/algolia/api-clients-automation/pull/1016)) by [@clemfromspace](https://github.com/clemfromspace/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [bf539a7e](https://github.com/algolia/api-clients-automation/commit/bf539a7e) feat(specs): predict model endpoints ([#1014](https://github.com/algolia/api-clients-automation/pull/1014)) by [@writeens](https://github.com/writeens/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [d68089e0](https://github.com/algolia/api-clients-automation/commit/d68089e0) feat(specs): update predict client API URL ([#1010](https://github.com/algolia/api-clients-automation/pull/1010)) by [@bengreenbank](https://github.com/bengreenbank/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [e227d8a6](https://github.com/algolia/api-clients-automation/commit/e227d8a6) fix(specs): remove unretrievableAttributes from searchParams ([#988](https://github.com/algolia/api-clients-automation/pull/988)) by [@loicsay](https://github.com/loicsay/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [80724c1f](https://github.com/algolia/api-clients-automation/commit/80724c1f) feat(specs): create new methods ([#974](https://github.com/algolia/api-clients-automation/pull/974)) by [@bengreenbank](https://github.com/bengreenbank/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/compare/4.0.0-SNAPSHOT...4.0.0-SNAPSHOT) - [fbe774da](https://github.com/algolia/api-clients-automation/commit/fbe774da) docs(java): document browse and waitForApiKey ([#956](https://github.com/algolia/api-clients-automation/pull/956)) by [@millotp](https://github.com/millotp/) - [68ff7ee4](https://github.com/algolia/api-clients-automation/commit/68ff7ee4) feat(java): browse objects/synonyms/rules ([#952](https://github.com/algolia/api-clients-automation/pull/952)) by [@millotp](https://github.com/millotp/) - [a54e901f](https://github.com/algolia/api-clients-automation/commit/a54e901f) fix(java): freeze snapshot version to 4.0.0 ([#955](https://github.com/algolia/api-clients-automation/pull/955)) by [@millotp](https://github.com/millotp/) - [b7edbea6](https://github.com/algolia/api-clients-automation/commit/b7edbea6) fix(java): more flexible json parser ([#954](https://github.com/algolia/api-clients-automation/pull/954)) by [@millotp](https://github.com/millotp/) -## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/next) +## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java/next) - [4c1596df](https://github.com/algolia/api-clients-automation/commit/4c1596df) fix(clients): list available regions when region is missing ([#916](https://github.com/algolia/api-clients-automation/pull/916)) by [@shortcuts](https://github.com/shortcuts/) - [be45fc4e](https://github.com/algolia/api-clients-automation/commit/be45fc4e) fix(specs): make `batch` body parameters required ([#917](https://github.com/algolia/api-clients-automation/pull/917)) by [@shortcuts](https://github.com/shortcuts/) diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/build.gradle b/clients/algoliasearch-client-java/algoliasearch/build.gradle similarity index 92% rename from clients/algoliasearch-client-java-2/algoliasearch-core/build.gradle rename to clients/algoliasearch-client-java/algoliasearch/build.gradle index faf35f2fca..130187ffa4 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/build.gradle +++ b/clients/algoliasearch-client-java/algoliasearch/build.gradle @@ -8,6 +8,9 @@ repositories { mavenCentral() } +sourceCompatibility = '1.8' +targetCompatibility = '1.8' + dependencies { implementation 'com.google.code.findbugs:jsr305:3.0.2' api 'com.squareup.okhttp3:okhttp:4.11.0' diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/gradle.properties b/clients/algoliasearch-client-java/algoliasearch/gradle.properties similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/gradle.properties rename to clients/algoliasearch-client-java/algoliasearch/gradle.properties diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/ApiClient.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/ApiClient.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/ApiClient.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/ApiClient.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaApiException.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaApiException.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaApiException.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaApiException.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRetriesExceededException.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetriesExceededException.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRetriesExceededException.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetriesExceededException.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRuntimeException.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRuntimeException.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRuntimeException.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRuntimeException.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/LaunderThrowable.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/LaunderThrowable.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/LaunderThrowable.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/LaunderThrowable.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/AlgoliaAgent.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/AlgoliaAgent.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/AlgoliaAgent.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/AlgoliaAgent.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/AlgoliaIterableHelper.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/AlgoliaIterableHelper.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/AlgoliaIterableHelper.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/AlgoliaIterableHelper.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/ApiKeyOperation.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/ApiKeyOperation.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/ApiKeyOperation.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/ApiKeyOperation.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/ClientOptions.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/ClientOptions.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/ClientOptions.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/ClientOptions.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/CompoundType.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/CompoundType.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/CompoundType.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/CompoundType.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/Holder.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/Holder.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/Holder.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/Holder.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/HttpRequester.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/HttpRequester.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/HttpRequester.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/HttpRequester.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/JSONBuilder.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/JSONBuilder.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/JSONBuilder.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/JSONBuilder.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/LogLevel.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/LogLevel.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/LogLevel.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/LogLevel.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/RequestOptions.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/RequestOptions.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/RequestOptions.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/RequestOptions.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/Requester.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/Requester.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/Requester.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/Requester.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/TaskUtils.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/TaskUtils.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/TaskUtils.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/TaskUtils.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/UseReadTransporter.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/UseReadTransporter.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/UseReadTransporter.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/UseReadTransporter.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/Utils.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/Utils.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/Utils.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/Utils.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/retry/CallType.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/retry/CallType.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/retry/CallType.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/retry/CallType.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/retry/RetryStrategy.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/retry/RetryStrategy.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/retry/RetryStrategy.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/retry/RetryStrategy.java diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/retry/StatefulHost.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/retry/StatefulHost.java similarity index 100% rename from clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/retry/StatefulHost.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/retry/StatefulHost.java diff --git a/clients/algoliasearch-client-java-2/api/build.gradle b/clients/algoliasearch-client-java/api/build.gradle similarity index 96% rename from clients/algoliasearch-client-java-2/api/build.gradle rename to clients/algoliasearch-client-java/api/build.gradle index 104f22ac3e..30b43d6e38 100644 --- a/clients/algoliasearch-client-java-2/api/build.gradle +++ b/clients/algoliasearch-client-java/api/build.gradle @@ -20,7 +20,7 @@ dependencies { baseline('com.algolia:algoliasearch-client-java:4.+') { transitive = false } - latest(projects.algoliasearchCore) + latest(projects.algoliasearch) } def japicmp = tasks.register('japicmp', JapicmpTask) { diff --git a/clients/algoliasearch-client-java-2/build.gradle b/clients/algoliasearch-client-java/build.gradle similarity index 100% rename from clients/algoliasearch-client-java-2/build.gradle rename to clients/algoliasearch-client-java/build.gradle diff --git a/clients/algoliasearch-client-java-2/gradle/wrapper/gradle-wrapper.jar b/clients/algoliasearch-client-java/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from clients/algoliasearch-client-java-2/gradle/wrapper/gradle-wrapper.jar rename to clients/algoliasearch-client-java/gradle/wrapper/gradle-wrapper.jar diff --git a/clients/algoliasearch-client-java-2/gradle/wrapper/gradle-wrapper.properties b/clients/algoliasearch-client-java/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from clients/algoliasearch-client-java-2/gradle/wrapper/gradle-wrapper.properties rename to clients/algoliasearch-client-java/gradle/wrapper/gradle-wrapper.properties diff --git a/clients/algoliasearch-client-java-2/gradlew b/clients/algoliasearch-client-java/gradlew similarity index 100% rename from clients/algoliasearch-client-java-2/gradlew rename to clients/algoliasearch-client-java/gradlew diff --git a/clients/algoliasearch-client-java-2/settings.gradle b/clients/algoliasearch-client-java/settings.gradle similarity index 78% rename from clients/algoliasearch-client-java-2/settings.gradle rename to clients/algoliasearch-client-java/settings.gradle index b39f066aa5..01525757ba 100644 --- a/clients/algoliasearch-client-java-2/settings.gradle +++ b/clients/algoliasearch-client-java/settings.gradle @@ -1,6 +1,6 @@ rootProject.name = "algoliasearch-client-java" -include(":algoliasearch-core") +include(":algoliasearch") include(":api") enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/config/clients.config.json b/config/clients.config.json index 35a8abd590..6793301387 100644 --- a/config/clients.config.json +++ b/config/clients.config.json @@ -1,10 +1,10 @@ { "java": { - "folder": "clients/algoliasearch-client-java-2", - "gitRepoId": "algoliasearch-client-java-2", + "folder": "clients/algoliasearch-client-java", + "gitRepoId": "algoliasearch-client-java", "packageVersion": "4.0.0-SNAPSHOT", - "modelFolder": "algoliasearch-core/src/main/java/com/algolia/model", - "apiFolder": "algoliasearch-core/src/main/java/com/algolia/api", + "modelFolder": "algoliasearch/src/main/java/com/algolia/model", + "apiFolder": "algoliasearch/src/main/java/com/algolia/api", "customGenerator": "algolia-java", "tests": { "extension": ".test.java", diff --git a/config/generation.config.mjs b/config/generation.config.mjs index d180f6fca1..6b60fc9bbe 100644 --- a/config/generation.config.mjs +++ b/config/generation.config.mjs @@ -7,10 +7,10 @@ export const patterns = [ '!clients/**/.openapi-generator-ignore', // Java - '!clients/algoliasearch-client-java-2/**', - 'clients/algoliasearch-client-java-2/gradle.properties', - 'clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/**', - 'clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/**', + '!clients/algoliasearch-client-java/**', + 'clients/algoliasearch-client-java/gradle.properties', + 'clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/**', + 'clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/**', 'tests/output/java/build.gradle', diff --git a/config/openapitools.json b/config/openapitools.json index cc509c88e6..89ac03ab0f 100644 --- a/config/openapitools.json +++ b/config/openapitools.json @@ -39,28 +39,28 @@ "output": "#{cwd}/clients/algoliasearch-client-javascript/packages/monitoring" }, "java-search": { - "output": "#{cwd}/clients/algoliasearch-client-java-2" + "output": "#{cwd}/clients/algoliasearch-client-java" }, "java-recommend": { - "output": "#{cwd}/clients/algoliasearch-client-java-2" + "output": "#{cwd}/clients/algoliasearch-client-java" }, "java-personalization": { - "output": "#{cwd}/clients/algoliasearch-client-java-2" + "output": "#{cwd}/clients/algoliasearch-client-java" }, "java-analytics": { - "output": "#{cwd}/clients/algoliasearch-client-java-2" + "output": "#{cwd}/clients/algoliasearch-client-java" }, "java-insights": { - "output": "#{cwd}/clients/algoliasearch-client-java-2" + "output": "#{cwd}/clients/algoliasearch-client-java" }, "java-abtesting": { - "output": "#{cwd}/clients/algoliasearch-client-java-2" + "output": "#{cwd}/clients/algoliasearch-client-java" }, "java-query-suggestions": { - "output": "#{cwd}/clients/algoliasearch-client-java-2" + "output": "#{cwd}/clients/algoliasearch-client-java" }, "java-monitoring": { - "output": "#{cwd}/clients/algoliasearch-client-java-2" + "output": "#{cwd}/clients/algoliasearch-client-java" }, "php-search": { "output": "#{cwd}/clients/algoliasearch-client-php" diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java index e57023b6e4..18cdc17c89 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java @@ -24,7 +24,7 @@ public String getName() { public void processOpts() { // generator specific options String client = (String) additionalProperties.get("client"); - setSourceFolder("algoliasearch-core/src/main/java"); + setSourceFolder("algoliasearch/src/main/java"); setGroupId("com.algolia"); setModelPackage("com.algolia.model." + Utils.camelize(client).toLowerCase()); additionalProperties.put("invokerPackage", "com.algolia"); @@ -42,22 +42,7 @@ public void processOpts() { apiDocTemplateFiles.clear(); modelDocTemplateFiles.clear(); - supportingFiles.removeIf(file -> - file.getTemplateFile().equals("build.gradle.mustache") || - file.getTemplateFile().equals("settings.gradle.mustache") || - file.getTemplateFile().equals("gradlew.mustache") || - file.getTemplateFile().equals("gitignore.mustache") || - file.getTemplateFile().equals("ApiClient.mustache") || - file.getTemplateFile().equals("ApiCallback.mustache") || - file.getTemplateFile().equals("ApiResponse.mustache") || - file.getTemplateFile().equals("AbstractOpenApiSchema.mustache") || - file.getTemplateFile().equals("maven.yml.mustache") || - file.getTemplateFile().equals("JSON.mustache") || - file.getTemplateFile().equals("ProgressRequestBody.mustache") || - file.getTemplateFile().equals("ProgressResponseBody.mustache") || - file.getTemplateFile().equals("Pair.mustache") - ); - + supportingFiles.clear(); additionalProperties.put("isSearchClient", client.equals("search")); try { diff --git a/playground/java/settings.gradle b/playground/java/settings.gradle index 5fd134fcb4..eee72536ac 100644 --- a/playground/java/settings.gradle +++ b/playground/java/settings.gradle @@ -1,7 +1,7 @@ rootProject.name = 'java-playground' -includeBuild('../../clients/algoliasearch-client-java-2') { +includeBuild('../../clients/algoliasearch-client-java') { dependencySubstitution { - substitute module('com.algolia:algoliasearch-client-java') using project(':algoliasearch-core') + substitute module('com.algolia:algoliasearch-client-java') using project(':algoliasearch') } } diff --git a/scripts/husky/__tests__/pre-commit.test.mjs b/scripts/husky/__tests__/pre-commit.test.mjs index 2dd85d1d57..0b1518e719 100644 --- a/scripts/husky/__tests__/pre-commit.test.mjs +++ b/scripts/husky/__tests__/pre-commit.test.mjs @@ -8,12 +8,12 @@ describe('micromatch', () => { micromatch .match( [ - 'clients/algoliasearch-client-java-2/build.gradle', - 'clients/algoliasearch-client-java-2/.gitignore', - 'clients/algoliasearch-client-java-2/gradle.properties', - 'clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java', - 'clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Test.java', - 'clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/AlgoliaAgent.java', + 'clients/algoliasearch-client-java/build.gradle', + 'clients/algoliasearch-client-java/.gitignore', + 'clients/algoliasearch-client-java/gradle.properties', + 'clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java', + 'clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Test.java', + 'clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/utils/AlgoliaAgent.java', 'clients/algoliasearch-client-javascript/.prettierrc', 'clients/algoliasearch-client-javascript/lerna.json', @@ -39,9 +39,9 @@ describe('micromatch', () => { .sort() ).toEqual( [ - 'clients/algoliasearch-client-java-2/gradle.properties', - 'clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java', - 'clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/search/Test.java', + 'clients/algoliasearch-client-java/gradle.properties', + 'clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java', + 'clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Test.java', 'clients/algoliasearch-client-javascript/packages/client-search/ignore.txt', diff --git a/tests/output/java/settings.gradle b/tests/output/java/settings.gradle index 623dbe0748..e655d66361 100644 --- a/tests/output/java/settings.gradle +++ b/tests/output/java/settings.gradle @@ -1,7 +1,7 @@ rootProject.name = 'java-tests' -includeBuild('../../../clients/algoliasearch-client-java-2') { +includeBuild('../../../clients/algoliasearch-client-java') { dependencySubstitution { - substitute module('com.algolia:algoliasearch-client-java') using project(':algoliasearch-core') + substitute module('com.algolia:algoliasearch-client-java') using project(':algoliasearch') } } diff --git a/website/docs/clients/introduction.md b/website/docs/clients/introduction.md index e174fff177..454ba5cd6a 100644 --- a/website/docs/clients/introduction.md +++ b/website/docs/clients/introduction.md @@ -12,7 +12,7 @@ Generated code in production can be find on repository of the clients. - [Javascript](https://github.com/algolia/algoliasearch-client-javascript/tree/next/) - [PHP](https://github.com/algolia/algoliasearch-client-php/tree/next/) -- [Java](https://github.com/algolia/algoliasearch-client-java-2/tree/next/) +- [Java](https://github.com/algolia/algoliasearch-client-java/tree/next/) ## Usage diff --git a/website/docs/contributing/release-process.md b/website/docs/contributing/release-process.md index af44110f9f..2ef57fd84a 100644 --- a/website/docs/contributing/release-process.md +++ b/website/docs/contributing/release-process.md @@ -41,10 +41,10 @@ Each language repository should have their own release process, and should run o ### Java Java is released to [sonatype](https://oss.sonatype.org/) before being sent to [Maven](https://search.maven.org/artifact/com.algolia/algoliasearch-client-java) central repository, the `jar` need to be signed before publishing, and then verified on sonatype by using `closeAndRelease` target on Gradle. -All of this is handled in the [release action](https://github.com/algolia/algoliasearch-client-java-2/tree/next/.github/workflows/release.yml), executed on the [Java repository](https://github.com/algolia/algoliasearch-client-java-2). +All of this is handled in the [release action](https://github.com/algolia/algoliasearch-client-java/tree/next/.github/workflows/release.yml), executed on the [Java repository](https://github.com/algolia/algoliasearch-client-java). If you want to release manually, you need to copy some secrets to either: -- `clients/algoliasearch-client-java-2/gradle.properties` /!\ make sure to remove them before committing ! +- `clients/algoliasearch-client-java/gradle.properties` /!\ make sure to remove them before committing ! - `~/.gradle/gradle.properties` which is safer because it's not committed and can stay on your computer. The secrets are fetched from the vault, make sure you have access to `api-clients-squad`, and then read the value and place them in the `gradle.properties` file you want (don't copy this file verbatim): @@ -58,11 +58,11 @@ mavenCentralUsername=$(vault read -field user secret/algolia/api-clients-squad/s mavenCentralPassword=$(vault read -field password secret/algolia/api-clients-squad/sonatype) ``` -To release a snapshot, you need to add `-SNAPSHOT` to the `VERSION_NAME` in `clients/algoliasearch-client-java-2/gradle.properties`, then to release run: -` ./gradle/gradlew -p clients/algoliasearch-client-java-2 --no-parallel publish` +To release a snapshot, you need to add `-SNAPSHOT` to the `VERSION_NAME` in `clients/algoliasearch-client-java/gradle.properties`, then to release run: +` ./gradle/gradlew -p clients/algoliasearch-client-java --no-parallel publish` And if it's not a snapshot, run: -` ./gradle/gradlew -p clients/algoliasearch-client-java-2 closeAndReleaseRepository` +` ./gradle/gradlew -p clients/algoliasearch-client-java closeAndReleaseRepository` Once the package is published, it can be used in gradle file as: