From 56b0b8ec5c30e807f174fa539a6daa8c95906249 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Tue, 30 Jul 2024 08:36:39 +0000 Subject: [PATCH] fix(specs): proper title with linter (#3444) (generated) [skip ci] Co-authored-by: Pierre Millot --- .../Clients/QuerySuggestionsClient.cs | 36 +-- .../algoliasearch/Clients/UsageClient.cs | 36 +-- ...ctsEmptySearch.cs => EmptySearchFilter.cs} | 10 +- .../Models/Abtesting/FilterEffects.cs | 4 +- ...erEffectsOutliers.cs => OutliersFilter.cs} | 10 +- ...lickPositionsInner.cs => ClickPosition.cs} | 10 +- .../Analytics/GetClickPositionsResponse.cs | 4 +- .../Analytics/TopSearchWithAnalytics.cs | 4 +- .../TopSearchWithRevenueAnalytics.cs | 4 +- .../Models/Ingestion/DockerStreamsInput.cs | 2 +- ...esponseError.cs => TransformationError.cs} | 10 +- .../Ingestion/TransformationTryResponse.cs | 2 +- ...GetServers403Response.cs => BadRequest.cs} | 12 +- .../Models/Monitoring/Forbidden.cs | 88 ++++++ .../{IncidentsInner.cs => IncidentEntry.cs} | 12 +- .../Models/Monitoring/IncidentsResponse.cs | 2 +- ...meResponseMetrics.cs => IndexingMetric.cs} | 14 +- .../Models/Monitoring/IndexingTimeResponse.cs | 2 +- .../Monitoring/InfrastructureResponse.cs | 2 +- ...ncyResponseMetrics.cs => LatencyMetric.cs} | 14 +- .../Models/Monitoring/LatencyResponse.cs | 2 +- ...structureResponseMetrics.cs => Metrics.cs} | 12 +- .../Monitoring/{TimeInner.cs => TimeEntry.cs} | 12 +- .../Models/Monitoring/Unauthorized.cs | 88 ++++++ ...igStatus200Response.cs => ConfigStatus.cs} | 12 +- .../{GetLogFile200Response.cs => LogFile.cs} | 12 +- .../Models/Recommend/AroundPrecision.cs | 22 +- ...undPrecisionFromValueInner.cs => Range.cs} | 10 +- .../Models/Recommend/RecommendRule.cs | 2 +- ...tadataData.cs => RedirectRuleIndexData.cs} | 14 +- .../Recommend/RedirectRuleIndexMetadata.cs | 4 +- ...commendRuleMetadata.cs => RuleMetadata.cs} | 10 +- .../Models/Search/AroundPrecision.cs | 22 +- ...undPrecisionFromValueInner.cs => Range.cs} | 10 +- ...tadataData.cs => RedirectRuleIndexData.cs} | 14 +- .../Search/RedirectRuleIndexMetadata.cs | 4 +- .../Models/Search/SearchParamsString.cs | 2 +- ...sponseErrorErrorsInner.cs => ErrorItem.cs} | 16 +- .../{GetUsage400Response.cs => Forbidden.cs} | 18 +- ...e400ResponseError.cs => ForbiddenError.cs} | 14 +- .../{GetUsage200Response.cs => IndexUsage.cs} | 14 +- .../Models/Usage/InvalidRequest.cs | 95 ++++++ .../Models/Usage/InvalidRequestError.cs | 112 +++++++ ...seStatisticsInner.cs => StatisticEntry.cs} | 12 +- .../algoliasearch/lib/algoliasearch_lite.dart | 4 +- .../algoliasearch/lib/src/deserialize.dart | 15 +- .../lib/src/model/base_search_params.dart | 2 +- .../base_search_params_without_query.dart | 2 +- .../lib/src/model/browse_params_object.dart | 2 +- .../lib/src/model/consequence_params.dart | 2 +- .../lib/src/model/fallback_params.dart | 2 +- .../lib/src/model/range.dart} | 17 +- .../lib/src/model/range.g.dart} | 13 +- .../src/model/redirect_rule_index_data.dart} | 17 +- .../model/redirect_rule_index_data.g.dart} | 12 +- .../model/redirect_rule_index_metadata.dart | 4 +- .../model/redirect_rule_index_metadata.g.dart | 6 +- .../lib/src/model/search_for_facets.dart | 2 +- .../lib/src/model/search_for_hits.dart | 2 +- .../lib/src/model/search_params.dart | 2 +- .../lib/src/model/search_params_object.dart | 2 +- .../lib/algolia_client_recommend.dart | 6 +- .../client_recommend/lib/src/deserialize.dart | 22 +- .../lib/src/model/base_search_params.dart | 2 +- .../base_search_params_without_query.dart | 2 +- .../lib/src/model/fallback_params.dart | 2 +- .../lib/src/model/range.dart} | 17 +- .../lib/src/model/range.g.dart} | 13 +- .../lib/src/model/recommend_rule.dart | 4 +- .../lib/src/model/recommend_rule.g.dart | 2 +- .../src/model/redirect_rule_index_data.dart} | 17 +- .../model/redirect_rule_index_data.g.dart} | 12 +- .../model/redirect_rule_index_metadata.dart | 4 +- .../model/redirect_rule_index_metadata.g.dart | 6 +- ..._rule_metadata.dart => rule_metadata.dart} | 16 +- ...e_metadata.g.dart => rule_metadata.g.dart} | 12 +- .../lib/src/model/search_params.dart | 2 +- .../lib/src/model/search_params_object.dart | 2 +- .../lib/algolia_client_search.dart | 4 +- .../client_search/lib/src/deserialize.dart | 15 +- .../lib/src/model/base_search_params.dart | 2 +- .../base_search_params_without_query.dart | 2 +- .../lib/src/model/browse_params_object.dart | 2 +- .../lib/src/model/consequence_params.dart | 2 +- .../lib/src/model/range.dart} | 17 +- ...n_from_value_inner.g.dart => range.g.dart} | 13 +- ...ata.dart => redirect_rule_index_data.dart} | 17 +- .../model/redirect_rule_index_data.g.dart} | 12 +- .../model/redirect_rule_index_metadata.dart | 4 +- .../model/redirect_rule_index_metadata.g.dart | 6 +- .../lib/src/model/search_for_facets.dart | 2 +- .../lib/src/model/search_for_hits.dart | 2 +- .../lib/src/model/search_params_object.dart | 2 +- ...search.go => model_empty_search_filter.go} | 50 +-- .../algolia/abtesting/model_filter_effects.go | 28 +- ...s_outliers.go => model_outliers_filter.go} | 50 +-- ...tions_inner.go => model_click_position.go} | 50 +-- .../model_get_click_positions_response.go | 12 +- .../model_top_search_with_analytics.go | 12 +- ...model_top_search_with_revenue_analytics.go | 12 +- .../ingestion/model_docker_streams_input.go | 2 +- ...error.go => model_transformation_error.go} | 50 +-- .../model_transformation_try_response.go | 16 +- ...s_403_response.go => model_bad_request.go} | 38 +-- .../algolia/monitoring/model_forbidden.go | 89 ++++++ ...dents_inner.go => model_incident_entry.go} | 50 +-- .../monitoring/model_incidents_response.go | 14 +- .../monitoring/model_indexing_metric.go | 89 ++++++ .../model_indexing_time_response.go | 14 +- .../model_indexing_time_response_metrics.go | 89 ------ .../model_infrastructure_response.go | 14 +- .../monitoring/model_latency_metric.go | 89 ++++++ .../monitoring/model_latency_response.go | 14 +- .../model_latency_response_metrics.go | 89 ------ ...e_response_metrics.go => model_metrics.go} | 86 +++--- ...odel_time_inner.go => model_time_entry.go} | 50 +-- .../algolia/monitoring/model_unauthorized.go | 89 ++++++ .../api_query_suggestions.go | 12 +- ...200_response.go => model_config_status.go} | 86 +++--- ...file_200_response.go => model_log_file.go} | 74 ++--- .../recommend/model_around_precision.go | 34 +-- ...ion_from_value_inner.go => model_range.go} | 50 +-- .../algolia/recommend/model_recommend_rule.go | 14 +- ...a.go => model_redirect_rule_index_data.go} | 30 +- .../model_redirect_rule_index_metadata.go | 14 +- ...le__metadata.go => model_rule_metadata.go} | 38 +-- .../algolia/search/model_around_precision.go | 34 +-- ...ion_from_value_inner.go => model_range.go} | 50 +-- ...a.go => model_redirect_rule_index_data.go} | 30 +- .../model_redirect_rule_index_metadata.go | 14 +- .../search/model_search_params_string.go | 2 +- .../algolia/usage/api_usage.go | 12 +- ...or_errors_inner.go => model_error_item.go} | 68 ++--- ...age_400_response.go => model_forbidden.go} | 34 +-- ...onse_error.go => model_forbidden_error.go} | 72 ++--- .../usage/model_get_usage_200_response.go | 89 ------ .../algolia/usage/model_index_usage.go | 89 ++++++ .../algolia/usage/model_invalid_request.go | 71 +++++ .../usage/model_invalid_request_error.go | 177 +++++++++++ ...tics_inner.go => model_statistic_entry.go} | 50 +-- .../algolia/api/QuerySuggestionsClient.java | 21 +- .../java/com/algolia/api/UsageClient.java | 47 ++- ...mptySearch.java => EmptySearchFilter.java} | 14 +- .../model/abtesting/FilterEffects.java | 12 +- ...fectsOutliers.java => OutliersFilter.java} | 14 +- ...PositionsInner.java => ClickPosition.java} | 14 +- .../analytics/GetClickPositionsResponse.java | 8 +- .../analytics/TopSearchWithAnalytics.java | 8 +- .../TopSearchWithRevenueAnalytics.java | 8 +- .../model/ingestion/DockerStreamsInput.java | 2 +- ...nseError.java => TransformationError.java} | 14 +- .../ingestion/TransformationTryResponse.java | 6 +- ...ervers403Response.java => BadRequest.java} | 12 +- .../algolia/model/monitoring/Forbidden.java | 62 ++++ ...IncidentsInner.java => IncidentEntry.java} | 14 +- .../model/monitoring/IncidentsResponse.java | 8 +- ...sponseMetrics.java => IndexingMetric.java} | 18 +- .../monitoring/IndexingTimeResponse.java | 6 +- .../monitoring/InfrastructureResponse.java | 6 +- ...esponseMetrics.java => LatencyMetric.java} | 18 +- .../model/monitoring/LatencyResponse.java | 6 +- ...ctureResponseMetrics.java => Metrics.java} | 38 +-- .../{TimeInner.java => TimeEntry.java} | 14 +- .../model/monitoring/Unauthorized.java | 62 ++++ ...atus200Response.java => ConfigStatus.java} | 28 +- ...etLogFile200Response.java => LogFile.java} | 24 +- .../model/recommend/AroundPrecision.java | 35 +-- ...recisionFromValueInner.java => Range.java} | 12 +- .../model/recommend/RecommendRule.java | 6 +- ...taData.java => RedirectRuleIndexData.java} | 10 +- .../recommend/RedirectRuleIndexMetadata.java | 6 +- ...endRuleMetadata.java => RuleMetadata.java} | 10 +- .../algolia/model/search/AroundPrecision.java | 35 +-- ...recisionFromValueInner.java => Range.java} | 12 +- ...taData.java => RedirectRuleIndexData.java} | 10 +- .../search/RedirectRuleIndexMetadata.java | 6 +- .../model/search/SearchParamsString.java | 2 +- ...seErrorErrorsInner.java => ErrorItem.java} | 24 +- ...etUsage400Response.java => Forbidden.java} | 16 +- .../algolia/model/usage/ForbiddenError.java | 106 +++++++ ...tUsage200Response.java => IndexUsage.java} | 18 +- .../algolia/model/usage/InvalidRequest.java | 62 ++++ ...nseError.java => InvalidRequestError.java} | 26 +- ...atisticsInner.java => StatisticEntry.java} | 14 +- .../packages/algoliasearch/builds/models.ts | 8 +- .../lite/model/aroundPrecision.ts | 4 +- .../algoliasearch/lite/model/index.ts | 4 +- .../lite/model/range.ts} | 2 +- ...tadataData.ts => redirectRuleIndexData.ts} | 2 +- .../lite/model/redirectRuleIndexMetadata.ts | 4 +- ...ctsEmptySearch.ts => emptySearchFilter.ts} | 2 +- .../client-abtesting/model/filterEffects.ts | 8 +- .../packages/client-abtesting/model/index.ts | 4 +- ...erEffectsOutliers.ts => outliersFilter.ts} | 2 +- ...lickPositionsInner.ts => clickPosition.ts} | 2 +- .../model/getClickPositionsResponse.ts | 4 +- .../packages/client-analytics/model/index.ts | 2 +- .../model/topSearchWithAnalytics.ts | 4 +- .../model/topSearchWithRevenueAnalytics.ts | 4 +- ...igStatus200Response.ts => configStatus.ts} | 2 +- .../client-query-suggestions/model/index.ts | 4 +- .../{getLogFile200Response.ts => logFile.ts} | 2 +- .../src/querySuggestionsClient.ts | 8 +- .../client-search/model/aroundPrecision.ts | 4 +- .../packages/client-search/model/index.ts | 4 +- .../model/range.ts} | 2 +- .../model/redirectRuleIndexData.ts} | 2 +- .../model/redirectRuleIndexMetadata.ts | 4 +- .../client-search/model/searchParamsString.ts | 3 + ...sponseErrorErrorsInner.ts => errorItem.ts} | 2 +- .../packages/client-usage/model/forbidden.ts | 7 + .../model/forbiddenError.ts} | 10 +- .../client-usage/model/getUsage200Response.ts | 7 - .../client-usage/model/getUsage400Response.ts | 7 - .../model/getUsage400ResponseError.ts | 11 - .../packages/client-usage/model/index.ts | 12 +- .../packages/client-usage/model/indexUsage.ts | 7 + .../model/invalidRequest.ts} | 6 +- .../client-usage/model/invalidRequestError.ts | 11 + ...seStatisticsInner.ts => statisticEntry.ts} | 2 +- .../packages/client-usage/src/usageClient.ts | 6 +- .../ingestion/model/dockerStreamsInput.ts | 3 + .../packages/ingestion/model/index.ts | 2 +- ...esponseError.ts => transformationError.ts} | 2 +- .../model/transformationTryResponse.ts | 4 +- ...getServers403Response.ts => badRequest.ts} | 2 +- .../packages/monitoring/model/forbidden.ts | 5 + .../{incidentsInner.ts => incidentEntry.ts} | 2 +- .../monitoring/model/incidentsResponse.ts | 4 +- .../packages/monitoring/model/index.ts | 14 +- .../monitoring/model/indexingMetric.ts | 7 + .../monitoring/model/indexingTimeResponse.ts | 4 +- .../model/infrastructureResponse.ts | 4 +- .../monitoring/model/latencyMetric.ts | 7 + .../monitoring/model/latencyResponse.ts | 4 +- ...structureResponseMetrics.ts => metrics.ts} | 2 +- .../model/{timeInner.ts => timeEntry.ts} | 2 +- .../packages/monitoring/model/unauthorized.ts | 5 + .../recommend/model/aroundPrecision.ts | 4 +- .../packages/recommend/model/index.ts | 6 +- ...undPrecisionFromValueInner.ts => range.ts} | 2 +- .../packages/recommend/model/recommendRule.ts | 4 +- .../model/redirectRuleIndexData.ts} | 2 +- .../model/redirectRuleIndexMetadata.ts | 4 +- ...commendRuleMetadata.ts => ruleMetadata.ts} | 2 +- .../client/api/QuerySuggestionsClient.kt | 4 +- .../com/algolia/client/api/UsageClient.kt | 4 +- ...ctsEmptySearch.kt => EmptySearchFilter.kt} | 2 +- .../client/model/abtesting/FilterEffects.kt | 4 +- ...erEffectsOutliers.kt => OutliersFilter.kt} | 2 +- ...lickPositionsInner.kt => ClickPosition.kt} | 2 +- .../analytics/GetClickPositionsResponse.kt | 2 +- .../model/analytics/TopSearchWithAnalytics.kt | 2 +- .../TopSearchWithRevenueAnalytics.kt | 2 +- .../model/ingestion/DockerStreamsInput.kt | 2 +- ...esponseError.kt => TransformationError.kt} | 2 +- .../ingestion/TransformationTryResponse.kt | 2 +- ...GetServers403Response.kt => BadRequest.kt} | 4 +- .../client/model/monitoring/Forbidden.kt | 16 + .../{IncidentsInner.kt => IncidentEntry.kt} | 4 +- .../model/monitoring/IncidentsResponse.kt | 2 +- ...meResponseMetrics.kt => IndexingMetric.kt} | 6 +- .../model/monitoring/IndexingTimeResponse.kt | 2 +- .../monitoring/InfrastructureResponse.kt | 2 +- ...ncyResponseMetrics.kt => LatencyMetric.kt} | 6 +- .../model/monitoring/LatencyResponse.kt | 2 +- ...structureResponseMetrics.kt => Metrics.kt} | 4 +- .../monitoring/{TimeInner.kt => TimeEntry.kt} | 4 +- .../client/model/monitoring/Unauthorized.kt | 16 + ...igStatus200Response.kt => ConfigStatus.kt} | 4 +- .../{GetLogFile200Response.kt => LogFile.kt} | 4 +- .../client/model/recommend/AroundPrecision.kt | 10 +- ...undPrecisionFromValueInner.kt => Range.kt} | 2 +- .../client/model/recommend/RecommendRule.kt | 2 +- ...tadataData.kt => RedirectRuleIndexData.kt} | 2 +- .../recommend/RedirectRuleIndexMetadata.kt | 2 +- ...commendRuleMetadata.kt => RuleMetadata.kt} | 2 +- .../client/model/search/AroundPrecision.kt | 10 +- ...undPrecisionFromValueInner.kt => Range.kt} | 2 +- ...tadataData.kt => RedirectRuleIndexData.kt} | 2 +- .../model/search/RedirectRuleIndexMetadata.kt | 2 +- .../client/model/search/SearchParamsString.kt | 2 +- ...sponseErrorErrorsInner.kt => ErrorItem.kt} | 4 +- .../{GetUsage400Response.kt => Forbidden.kt} | 6 +- ...e400ResponseError.kt => ForbiddenError.kt} | 6 +- .../{GetUsage200Response.kt => IndexUsage.kt} | 6 +- .../client/model/usage/InvalidRequest.kt | 16 + .../client/model/usage/InvalidRequestError.kt | 22 ++ ...seStatisticsInner.kt => StatisticEntry.kt} | 4 +- .../lib/Api/QuerySuggestionsClient.php | 4 +- .../lib/Api/UsageClient.php | 4 +- ...sEmptySearch.php => EmptySearchFilter.php} | 4 +- .../lib/Model/Abtesting/FilterEffects.php | 12 +- ...EffectsOutliers.php => OutliersFilter.php} | 4 +- ...ckPositionsInner.php => ClickPosition.php} | 10 +- .../Analytics/GetClickPositionsResponse.php | 6 +- .../Analytics/TopSearchWithAnalytics.php | 6 +- .../TopSearchWithRevenueAnalytics.php | 6 +- .../Model/Ingestion/DockerStreamsInput.php | 2 + ...ponseError.php => TransformationError.php} | 4 +- .../Ingestion/TransformationTryResponse.php | 6 +- ...tServers403Response.php => BadRequest.php} | 4 +- .../lib/Model/Monitoring/Forbidden.php | 225 ++++++++++++++ .../{IncidentsInner.php => IncidentEntry.php} | 4 +- ...ResponseMetrics.php => IndexingMetric.php} | 4 +- .../Model/Monitoring/IndexingTimeResponse.php | 6 +- .../Monitoring/InfrastructureResponse.php | 6 +- ...yResponseMetrics.php => LatencyMetric.php} | 4 +- .../lib/Model/Monitoring/LatencyResponse.php | 6 +- ...ructureResponseMetrics.php => Metrics.php} | 4 +- .../{TimeInner.php => TimeEntry.php} | 4 +- .../lib/Model/Monitoring/Unauthorized.php | 225 ++++++++++++++ ...Status200Response.php => ConfigStatus.php} | 4 +- ...{GetLogFile200Response.php => LogFile.php} | 4 +- ...dPrecisionFromValueInner.php => Range.php} | 4 +- .../lib/Model/Recommend/RecommendRule.php | 6 +- ...dataData.php => RedirectRuleIndexData.php} | 4 +- .../Recommend/RedirectRuleIndexMetadata.php | 6 +- ...mmendRuleMetadata.php => RuleMetadata.php} | 4 +- ...dPrecisionFromValueInner.php => Range.php} | 4 +- ...dataData.php => RedirectRuleIndexData.php} | 4 +- .../Search/RedirectRuleIndexMetadata.php | 6 +- .../lib/Model/Search/SearchParamsString.php | 2 + ...onseErrorErrorsInner.php => ErrorItem.php} | 4 +- ...{GetUsage400Response.php => Forbidden.php} | 10 +- ...00ResponseError.php => ForbiddenError.php} | 10 +- ...GetUsage200Response.php => IndexUsage.php} | 10 +- .../lib/Model/Usage/InvalidRequest.php | 231 ++++++++++++++ .../lib/Model/Usage/InvalidRequestError.php | 289 ++++++++++++++++++ ...StatisticsInner.php => StatisticEntry.php} | 4 +- ...empty_search.py => empty_search_filter.py} | 6 +- .../abtesting/models/filter_effects.py | 16 +- ...effects_outliers.py => outliers_filter.py} | 6 +- ...k_positions_inner.py => click_position.py} | 6 +- .../models/get_click_positions_response.py | 15 +- .../models/top_search_with_analytics.py | 6 +- .../top_search_with_revenue_analytics.py | 6 +- .../ingestion/models/docker_streams_input.py | 2 +- ...ponse_error.py => transformation_error.py} | 6 +- .../models/transformation_try_response.py | 8 +- ..._servers403_response.py => bad_request.py} | 8 +- .../monitoring/models/forbidden.py | 61 ++++ .../{incidents_inner.py => incident_entry.py} | 8 +- .../monitoring/models/incidents_response.py | 6 +- ...response_metrics.py => indexing_metric.py} | 14 +- .../models/indexing_time_response.py | 8 +- .../models/infrastructure_response.py | 8 +- ..._response_metrics.py => latency_metric.py} | 14 +- .../monitoring/models/latency_response.py | 8 +- ...ructure_response_metrics.py => metrics.py} | 8 +- .../models/{time_inner.py => time_entry.py} | 8 +- .../monitoring/models/unauthorized.py | 61 ++++ .../algoliasearch/query_suggestions/client.py | 20 +- ...status200_response.py => config_status.py} | 8 +- ...et_log_file200_response.py => log_file.py} | 8 +- .../recommend/models/around_precision.py | 14 +- .../models/range.py} | 6 +- .../recommend/models/recommend_rule.py | 6 +- .../models/redirect_rule_index_data.py} | 6 +- .../models/redirect_rule_index_metadata.py | 8 +- ...mend_rule_metadata.py => rule_metadata.py} | 6 +- .../search/models/around_precision.py | 14 +- .../models/range.py} | 6 +- .../models/redirect_rule_index_data.py} | 6 +- .../models/redirect_rule_index_metadata.py | 8 +- .../search/models/search_params_string.py | 2 +- .../algoliasearch/usage/client.py | 14 +- ...se_error_errors_inner.py => error_item.py} | 8 +- ...{get_usage400_response.py => forbidden.py} | 16 +- ...0_response_error.py => forbidden_error.py} | 19 +- ...et_usage200_response.py => index_usage.py} | 19 +- .../usage/models/invalid_request.py | 73 +++++ .../usage/models/invalid_request_error.py | 81 +++++ ...statistics_inner.py => statistic_entry.py} | 8 +- .../algolia/api/query_suggestions_client.rb | 14 +- .../lib/algolia/api/usage_client.rb | 8 +- ...empty_search.rb => empty_search_filter.rb} | 6 +- .../models/abtesting/filter_effects.rb | 4 +- ...effects_outliers.rb => outliers_filter.rb} | 6 +- ...k_positions_inner.rb => click_position.rb} | 6 +- .../analytics/get_click_positions_response.rb | 2 +- .../analytics/top_search_with_analytics.rb | 2 +- .../top_search_with_revenue_analytics.rb | 2 +- .../models/ingestion/docker_streams_input.rb | 1 + ...ponse_error.rb => transformation_error.rb} | 6 +- .../ingestion/transformation_try_response.rb | 2 +- ..._servers403_response.rb => bad_request.rb} | 6 +- .../algolia/models/monitoring/forbidden.rb | 211 +++++++++++++ .../{incidents_inner.rb => incident_entry.rb} | 6 +- ...response_metrics.rb => indexing_metric.rb} | 6 +- .../monitoring/indexing_time_response.rb | 2 +- .../monitoring/infrastructure_response.rb | 2 +- ..._response_metrics.rb => latency_metric.rb} | 6 +- .../models/monitoring/latency_response.rb | 2 +- ...ructure_response_metrics.rb => metrics.rb} | 9 +- .../{time_inner.rb => time_entry.rb} | 6 +- .../algolia/models/monitoring/unauthorized.rb | 211 +++++++++++++ .../models/query-suggestions/config_status.rb | 252 +++++++++++++++ .../models/query-suggestions/log_file.rb | 260 ++++++++++++++++ .../models/recommend/around_precision.rb | 2 +- ...precision_from_value_inner.rb => range.rb} | 9 +- .../models/recommend/recommend_rule.rb | 2 +- ...ta_data.rb => redirect_rule_index_data.rb} | 6 +- .../recommend/redirect_rule_index_metadata.rb | 2 +- ...mend_rule_metadata.rb => rule_metadata.rb} | 6 +- .../algolia/models/search/around_precision.rb | 2 +- ...precision_from_value_inner.rb => range.rb} | 9 +- ...ta_data.rb => redirect_rule_index_data.rb} | 6 +- .../search/redirect_rule_index_metadata.rb | 2 +- .../models/search/search_params_string.rb | 1 + ...se_error_errors_inner.rb => error_item.rb} | 6 +- ...{get_usage400_response.rb => forbidden.rb} | 8 +- ...0_response_error.rb => forbidden_error.rb} | 8 +- ...et_usage200_response.rb => index_usage.rb} | 8 +- .../algolia/models/usage/invalid_request.rb | 213 +++++++++++++ .../models/usage/invalid_request_error.rb | 231 ++++++++++++++ ...statistics_inner.rb => statistic_entry.rb} | 6 +- ...tySearch.scala => EmptySearchFilter.scala} | 2 +- .../abtesting/FilterEffects.scala | 4 +- ...ctsOutliers.scala => OutliersFilter.scala} | 2 +- ...sitionsInner.scala => ClickPosition.scala} | 2 +- .../analytics/GetClickPositionsResponse.scala | 2 +- .../analytics/TopSearchWithAnalytics.scala | 2 +- .../TopSearchWithRevenueAnalytics.scala | 2 +- .../algoliasearch/api/MonitoringClient.scala | 4 +- .../api/QuerySuggestionsClient.scala | 12 +- .../scala/algoliasearch/api/UsageClient.scala | 13 +- .../ingestion/DockerStreamsInput.scala | 2 +- ...eError.scala => TransformationError.scala} | 2 +- .../ingestion/TransformationTryResponse.scala | 2 +- ...vers403Response.scala => BadRequest.scala} | 4 +- ...yResponseMetrics.scala => Forbidden.scala} | 6 +- ...cidentsInner.scala => IncidentEntry.scala} | 4 +- .../monitoring/IncidentsResponse.scala | 2 +- ...onseMetrics.scala => IndexingMetric.scala} | 6 +- .../monitoring/IndexingTimeResponse.scala | 2 +- .../monitoring/InfrastructureResponse.scala | 2 +- .../monitoring/LatencyMetric.scala | 25 ++ .../monitoring/LatencyResponse.scala | 2 +- ...ureResponseMetrics.scala => Metrics.scala} | 4 +- .../{TimeInner.scala => TimeEntry.scala} | 4 +- .../monitoring/Unauthorized.scala | 25 ++ ...us200Response.scala => ConfigStatus.scala} | 4 +- ...LogFile200Response.scala => LogFile.scala} | 4 +- .../recommend/AroundPrecision.scala | 15 +- ...cisionFromValueInner.scala => Range.scala} | 2 +- .../recommend/RecommendRule.scala | 2 +- ...Data.scala => RedirectRuleIndexData.scala} | 2 +- .../recommend/RedirectRuleIndexMetadata.scala | 2 +- ...dRuleMetadata.scala => RuleMetadata.scala} | 2 +- .../search/AroundPrecision.scala | 15 +- ...cisionFromValueInner.scala => Range.scala} | 2 +- ...Data.scala => RedirectRuleIndexData.scala} | 2 +- .../search/RedirectRuleIndexMetadata.scala | 2 +- .../search/SearchParamsString.scala | 2 +- ...ErrorErrorsInner.scala => ErrorItem.scala} | 4 +- ...Usage400Response.scala => Forbidden.scala} | 6 +- ...sponseError.scala => ForbiddenError.scala} | 6 +- ...sage200Response.scala => IndexUsage.scala} | 6 +- .../algoliasearch/usage/InvalidRequest.scala | 22 ++ .../usage/InvalidRequestError.scala | 24 ++ ...isticsInner.scala => StatisticEntry.scala} | 4 +- ...tySearch.swift => EmptySearchFilter.swift} | 8 +- .../Abtesting/Models/FilterEffects.swift | 6 +- ...ctsOutliers.swift => OutliersFilter.swift} | 8 +- ...sitionsInner.swift => ClickPosition.swift} | 8 +- .../Models/GetClickPositionsResponse.swift | 4 +- .../Models/TopSearchWithAnalytics.swift | 4 +- .../TopSearchWithRevenueAnalytics.swift | 4 +- .../Ingestion/Models/DockerStreamsInput.swift | 1 + ...eError.swift => TransformationError.swift} | 8 +- .../Models/TransformationTryResponse.swift | 4 +- ...vers403Response.swift => BadRequest.swift} | 8 +- ...cidentsInner.swift => IncidentEntry.swift} | 8 +- .../Monitoring/Models/IncidentsResponse.swift | 4 +- ...onseMetrics.swift => IndexingMetric.swift} | 12 +- .../Models/IndexingTimeResponse.swift | 4 +- .../Models/InfrastructureResponse.swift | 4 +- ...ponseMetrics.swift => LatencyMetric.swift} | 12 +- .../Monitoring/Models/LatencyResponse.swift | 4 +- ...ureResponseMetrics.swift => Metrics.swift} | 8 +- .../Models/MonitoringForbidden.swift | 38 +++ .../{TimeInner.swift => TimeEntry.swift} | 8 +- .../Monitoring/Models/Unauthorized.swift | 38 +++ ...us200Response.swift => ConfigStatus.swift} | 8 +- ...LogFile200Response.swift => LogFile.swift} | 8 +- .../QuerySuggestionsClient.swift | 26 +- .../Models/RecommendAroundPrecision.swift | 12 +- .../Models/RecommendRange.swift} | 8 +- .../RecommendRedirectRuleIndexData.swift} | 8 +- .../RecommendRedirectRuleIndexMetadata.swift | 10 +- .../Recommend/Models/RecommendRule.swift | 4 +- ...dRuleMetadata.swift => RuleMetadata.swift} | 8 +- .../Search/Models/SearchAroundPrecision.swift | 12 +- .../Search/Models/SearchParamsString.swift | 1 + .../Models/SearchRange.swift} | 11 +- .../Models/SearchRedirectRuleIndexData.swift} | 11 +- .../SearchRedirectRuleIndexMetadata.swift | 10 +- ...ErrorErrorsInner.swift => ErrorItem.swift} | 8 +- ...sponseError.swift => ForbiddenError.swift} | 12 +- ...sage200Response.swift => IndexUsage.swift} | 12 +- ...400Response.swift => InvalidRequest.swift} | 12 +- .../Usage/Models/InvalidRequestError.swift | 50 +++ ...isticsInner.swift => StatisticEntry.swift} | 8 +- .../Sources/Usage/Models/UsageForbidden.swift | 38 +++ .../Sources/Usage/UsageClient.swift | 20 +- specs/bundled/abtesting.doc.yml | 2 + specs/bundled/abtesting.yml | 2 + specs/bundled/algoliasearch.yml | 9 +- specs/bundled/analytics.doc.yml | 41 +-- specs/bundled/analytics.yml | 41 +-- specs/bundled/crawler.doc.yml | 28 +- specs/bundled/crawler.yml | 28 +- specs/bundled/ingestion.doc.yml | 30 +- specs/bundled/ingestion.yml | 30 +- specs/bundled/insights.doc.yml | 2 +- specs/bundled/insights.yml | 2 +- specs/bundled/monitoring.doc.yml | 24 +- specs/bundled/monitoring.yml | 24 +- specs/bundled/query-suggestions.doc.yml | 3 + specs/bundled/query-suggestions.yml | 3 + specs/bundled/recommend.doc.yml | 9 +- specs/bundled/recommend.yml | 9 +- specs/bundled/search.doc.yml | 17 +- specs/bundled/search.yml | 17 +- specs/bundled/usage.doc.yml | 8 + specs/bundled/usage.yml | 8 + 527 files changed, 6641 insertions(+), 2615 deletions(-) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/{FilterEffectsEmptySearch.cs => EmptySearchFilter.cs} (90%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/{FilterEffectsOutliers.cs => OutliersFilter.cs} (91%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/{ClickPositionsInner.cs => ClickPosition.cs} (92%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/{TransformationTryResponseError.cs => TransformationError.cs} (89%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/{GetServers403Response.cs => BadRequest.cs} (87%) create mode 100644 clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Forbidden.cs rename clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/{IncidentsInner.cs => IncidentEntry.cs} (90%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/{IndexingTimeResponseMetrics.cs => IndexingMetric.cs} (83%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/{LatencyResponseMetrics.cs => LatencyMetric.cs} (84%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/{InfrastructureResponseMetrics.cs => Metrics.cs} (93%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/{TimeInner.cs => TimeEntry.cs} (91%) create mode 100644 clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Unauthorized.cs rename clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/{GetConfigStatus200Response.cs => ConfigStatus.cs} (93%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/{GetLogFile200Response.cs => LogFile.cs} (92%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/{AroundPrecisionFromValueInner.cs => Range.cs} (90%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/{RedirectRuleIndexMetadataData.cs => RedirectRuleIndexData.cs} (83%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/{RecommendRuleMetadata.cs => RuleMetadata.cs} (89%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Search/{AroundPrecisionFromValueInner.cs => Range.cs} (90%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Search/{RedirectRuleIndexMetadataData.cs => RedirectRuleIndexData.cs} (83%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/{GetUsage400ResponseErrorErrorsInner.cs => ErrorItem.cs} (85%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/{GetUsage400Response.cs => Forbidden.cs} (82%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/{GetUsage400ResponseError.cs => ForbiddenError.cs} (87%) rename clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/{GetUsage200Response.cs => IndexUsage.cs} (85%) create mode 100644 clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/InvalidRequest.cs create mode 100644 clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/InvalidRequestError.cs rename clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/{GetUsage200ResponseStatisticsInner.cs => StatisticEntry.cs} (86%) rename clients/algoliasearch-client-dart/packages/{client_search/lib/src/model/around_precision_from_value_inner.dart => algoliasearch/lib/src/model/range.dart} (63%) rename clients/algoliasearch-client-dart/packages/{client_recommend/lib/src/model/around_precision_from_value_inner.g.dart => algoliasearch/lib/src/model/range.g.dart} (65%) rename clients/algoliasearch-client-dart/packages/{client_recommend/lib/src/model/redirect_rule_index_metadata_data.dart => algoliasearch/lib/src/model/redirect_rule_index_data.dart} (54%) rename clients/algoliasearch-client-dart/packages/{client_recommend/lib/src/model/redirect_rule_index_metadata_data.g.dart => algoliasearch/lib/src/model/redirect_rule_index_data.g.dart} (62%) rename clients/algoliasearch-client-dart/packages/{algoliasearch/lib/src/model/around_precision_from_value_inner.dart => client_recommend/lib/src/model/range.dart} (63%) rename clients/algoliasearch-client-dart/packages/{algoliasearch/lib/src/model/around_precision_from_value_inner.g.dart => client_recommend/lib/src/model/range.g.dart} (65%) rename clients/algoliasearch-client-dart/packages/{algoliasearch/lib/src/model/redirect_rule_index_metadata_data.dart => client_recommend/lib/src/model/redirect_rule_index_data.dart} (54%) rename clients/algoliasearch-client-dart/packages/{client_search/lib/src/model/redirect_rule_index_metadata_data.g.dart => client_recommend/lib/src/model/redirect_rule_index_data.g.dart} (62%) rename clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/{recommend_rule_metadata.dart => rule_metadata.dart} (61%) rename clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/{recommend_rule_metadata.g.dart => rule_metadata.g.dart} (67%) rename clients/algoliasearch-client-dart/packages/{client_recommend/lib/src/model/around_precision_from_value_inner.dart => client_search/lib/src/model/range.dart} (63%) rename clients/algoliasearch-client-dart/packages/client_search/lib/src/model/{around_precision_from_value_inner.g.dart => range.g.dart} (65%) rename clients/algoliasearch-client-dart/packages/client_search/lib/src/model/{redirect_rule_index_metadata_data.dart => redirect_rule_index_data.dart} (54%) rename clients/algoliasearch-client-dart/packages/{algoliasearch/lib/src/model/redirect_rule_index_metadata_data.g.dart => client_search/lib/src/model/redirect_rule_index_data.g.dart} (62%) rename clients/algoliasearch-client-go/algolia/abtesting/{model_filter_effects_empty_search.go => model_empty_search_filter.go} (60%) rename clients/algoliasearch-client-go/algolia/abtesting/{model_filter_effects_outliers.go => model_outliers_filter.go} (62%) rename clients/algoliasearch-client-go/algolia/analytics/{model_click_positions_inner.go => model_click_position.go} (64%) rename clients/algoliasearch-client-go/algolia/ingestion/{model_transformation_try_response_error.go => model_transformation_error.go} (55%) rename clients/algoliasearch-client-go/algolia/monitoring/{model_get_servers_403_response.go => model_bad_request.go} (55%) create mode 100644 clients/algoliasearch-client-go/algolia/monitoring/model_forbidden.go rename clients/algoliasearch-client-go/algolia/monitoring/{model_incidents_inner.go => model_incident_entry.go} (63%) create mode 100644 clients/algoliasearch-client-go/algolia/monitoring/model_indexing_metric.go delete mode 100644 clients/algoliasearch-client-go/algolia/monitoring/model_indexing_time_response_metrics.go create mode 100644 clients/algoliasearch-client-go/algolia/monitoring/model_latency_metric.go delete mode 100644 clients/algoliasearch-client-go/algolia/monitoring/model_latency_response_metrics.go rename clients/algoliasearch-client-go/algolia/monitoring/{model_infrastructure_response_metrics.go => model_metrics.go} (61%) rename clients/algoliasearch-client-go/algolia/monitoring/{model_time_inner.go => model_time_entry.go} (67%) create mode 100644 clients/algoliasearch-client-go/algolia/monitoring/model_unauthorized.go rename clients/algoliasearch-client-go/algolia/query-suggestions/{model_get_config_status_200_response.go => model_config_status.go} (65%) rename clients/algoliasearch-client-go/algolia/query-suggestions/{model_get_log_file_200_response.go => model_log_file.go} (65%) rename clients/algoliasearch-client-go/algolia/recommend/{model_around_precision_from_value_inner.go => model_range.go} (57%) rename clients/algoliasearch-client-go/algolia/recommend/{model_redirect_rule_index_metadata_data.go => model_redirect_rule_index_data.go} (53%) rename clients/algoliasearch-client-go/algolia/recommend/{model_recommend_rule__metadata.go => model_rule_metadata.go} (58%) rename clients/algoliasearch-client-go/algolia/search/{model_around_precision_from_value_inner.go => model_range.go} (56%) rename clients/algoliasearch-client-go/algolia/search/{model_redirect_rule_index_metadata_data.go => model_redirect_rule_index_data.go} (53%) rename clients/algoliasearch-client-go/algolia/usage/{model_get_usage_400_response_error_errors_inner.go => model_error_item.go} (56%) rename clients/algoliasearch-client-go/algolia/usage/{model_get_usage_400_response.go => model_forbidden.go} (51%) rename clients/algoliasearch-client-go/algolia/usage/{model_get_usage_400_response_error.go => model_forbidden_error.go} (52%) delete mode 100644 clients/algoliasearch-client-go/algolia/usage/model_get_usage_200_response.go create mode 100644 clients/algoliasearch-client-go/algolia/usage/model_index_usage.go create mode 100644 clients/algoliasearch-client-go/algolia/usage/model_invalid_request.go create mode 100644 clients/algoliasearch-client-go/algolia/usage/model_invalid_request_error.go rename clients/algoliasearch-client-go/algolia/usage/{model_get_usage_200_response_statistics_inner.go => model_statistic_entry.go} (51%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/{FilterEffectsEmptySearch.java => EmptySearchFilter.java} (78%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/{FilterEffectsOutliers.java => OutliersFilter.java} (79%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/{ClickPositionsInner.java => ClickPosition.java} (81%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/{TransformationTryResponseError.java => TransformationError.java} (76%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/{GetServers403Response.java => BadRequest.java} (79%) create mode 100644 clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Forbidden.java rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/{IncidentsInner.java => IncidentEntry.java} (82%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/{IndexingTimeResponseMetrics.java => IndexingMetric.java} (70%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/{LatencyResponseMetrics.java => LatencyMetric.java} (72%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/{InfrastructureResponseMetrics.java => Metrics.java} (70%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/{TimeInner.java => TimeEntry.java} (84%) create mode 100644 clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Unauthorized.java rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/{GetConfigStatus200Response.java => ConfigStatus.java} (74%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/{GetLogFile200Response.java => LogFile.java} (77%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/{AroundPrecisionFromValueInner.java => Range.java} (79%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/{RedirectRuleIndexMetadataData.java => RedirectRuleIndexData.java} (78%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/{RecommendRuleMetadata.java => RuleMetadata.java} (81%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/{AroundPrecisionFromValueInner.java => Range.java} (79%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/{RedirectRuleIndexMetadataData.java => RedirectRuleIndexData.java} (78%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage400ResponseErrorErrorsInner.java => ErrorItem.java} (70%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage400Response.java => Forbidden.java} (74%) create mode 100644 clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/ForbiddenError.java rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage200Response.java => IndexUsage.java} (71%) create mode 100644 clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequest.java rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage400ResponseError.java => InvalidRequestError.java} (70%) rename clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage200ResponseStatisticsInner.java => StatisticEntry.java} (73%) rename clients/algoliasearch-client-javascript/packages/{client-search/model/aroundPrecisionFromValueInner.ts => algoliasearch/lite/model/range.ts} (92%) rename clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/{redirectRuleIndexMetadataData.ts => redirectRuleIndexData.ts} (83%) rename clients/algoliasearch-client-javascript/packages/client-abtesting/model/{filterEffectsEmptySearch.ts => emptySearchFilter.ts} (91%) rename clients/algoliasearch-client-javascript/packages/client-abtesting/model/{filterEffectsOutliers.ts => outliersFilter.ts} (92%) rename clients/algoliasearch-client-javascript/packages/client-analytics/model/{clickPositionsInner.ts => clickPosition.ts} (93%) rename clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/{getConfigStatus200Response.ts => configStatus.ts} (94%) rename clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/{getLogFile200Response.ts => logFile.ts} (94%) rename clients/algoliasearch-client-javascript/packages/{algoliasearch/lite/model/aroundPrecisionFromValueInner.ts => client-search/model/range.ts} (92%) rename clients/algoliasearch-client-javascript/packages/{recommend/model/redirectRuleIndexMetadataData.ts => client-search/model/redirectRuleIndexData.ts} (83%) rename clients/algoliasearch-client-javascript/packages/client-usage/model/{getUsage400ResponseErrorErrorsInner.ts => errorItem.ts} (83%) create mode 100644 clients/algoliasearch-client-javascript/packages/client-usage/model/forbidden.ts rename clients/algoliasearch-client-javascript/packages/{monitoring/model/indexingTimeResponseMetrics.ts => client-usage/model/forbiddenError.ts} (56%) delete mode 100644 clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage200Response.ts delete mode 100644 clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400Response.ts delete mode 100644 clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400ResponseError.ts create mode 100644 clients/algoliasearch-client-javascript/packages/client-usage/model/indexUsage.ts rename clients/algoliasearch-client-javascript/packages/{monitoring/model/latencyResponseMetrics.ts => client-usage/model/invalidRequest.ts} (59%) create mode 100644 clients/algoliasearch-client-javascript/packages/client-usage/model/invalidRequestError.ts rename clients/algoliasearch-client-javascript/packages/client-usage/model/{getUsage200ResponseStatisticsInner.ts => statisticEntry.ts} (87%) rename clients/algoliasearch-client-javascript/packages/ingestion/model/{transformationTryResponseError.ts => transformationError.ts} (88%) rename clients/algoliasearch-client-javascript/packages/monitoring/model/{getServers403Response.ts => badRequest.ts} (84%) create mode 100644 clients/algoliasearch-client-javascript/packages/monitoring/model/forbidden.ts rename clients/algoliasearch-client-javascript/packages/monitoring/model/{incidentsInner.ts => incidentEntry.ts} (91%) create mode 100644 clients/algoliasearch-client-javascript/packages/monitoring/model/indexingMetric.ts create mode 100644 clients/algoliasearch-client-javascript/packages/monitoring/model/latencyMetric.ts rename clients/algoliasearch-client-javascript/packages/monitoring/model/{infrastructureResponseMetrics.ts => metrics.ts} (94%) rename clients/algoliasearch-client-javascript/packages/monitoring/model/{timeInner.ts => timeEntry.ts} (92%) create mode 100644 clients/algoliasearch-client-javascript/packages/monitoring/model/unauthorized.ts rename clients/algoliasearch-client-javascript/packages/recommend/model/{aroundPrecisionFromValueInner.ts => range.ts} (92%) rename clients/algoliasearch-client-javascript/packages/{client-search/model/redirectRuleIndexMetadataData.ts => recommend/model/redirectRuleIndexData.ts} (83%) rename clients/algoliasearch-client-javascript/packages/recommend/model/{recommendRuleMetadata.ts => ruleMetadata.ts} (89%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/{FilterEffectsEmptySearch.kt => EmptySearchFilter.kt} (94%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/{FilterEffectsOutliers.kt => OutliersFilter.kt} (95%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/{ClickPositionsInner.kt => ClickPosition.kt} (96%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/{TransformationTryResponseError.kt => TransformationError.kt} (93%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/{GetServers403Response.kt => BadRequest.kt} (85%) create mode 100644 clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Forbidden.kt rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/{IncidentsInner.kt => IncidentEntry.kt} (91%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/{IndexingTimeResponseMetrics.kt => IndexingMetric.kt} (79%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/{LatencyResponseMetrics.kt => LatencyMetric.kt} (81%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/{InfrastructureResponseMetrics.kt => Metrics.kt} (95%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/{TimeInner.kt => TimeEntry.kt} (93%) create mode 100644 clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Unauthorized.kt rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/{GetConfigStatus200Response.kt => ConfigStatus.kt} (95%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/{GetLogFile200Response.kt => LogFile.kt} (94%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/{AroundPrecisionFromValueInner.kt => Range.kt} (95%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/{RedirectRuleIndexMetadataData.kt => RedirectRuleIndexData.kt} (89%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/{RecommendRuleMetadata.kt => RuleMetadata.kt} (93%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/{AroundPrecisionFromValueInner.kt => Range.kt} (95%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/{RedirectRuleIndexMetadataData.kt => RedirectRuleIndexData.kt} (89%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/{GetUsage400ResponseErrorErrorsInner.kt => ErrorItem.kt} (86%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/{GetUsage400Response.kt => Forbidden.kt} (72%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/{GetUsage400ResponseError.kt => ForbiddenError.kt} (74%) rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/{GetUsage200Response.kt => IndexUsage.kt} (67%) create mode 100644 clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/InvalidRequest.kt create mode 100644 clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/InvalidRequestError.kt rename clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/{GetUsage200ResponseStatisticsInner.kt => StatisticEntry.kt} (86%) rename clients/algoliasearch-client-php/lib/Model/Abtesting/{FilterEffectsEmptySearch.php => EmptySearchFilter.php} (97%) rename clients/algoliasearch-client-php/lib/Model/Abtesting/{FilterEffectsOutliers.php => OutliersFilter.php} (97%) rename clients/algoliasearch-client-php/lib/Model/Analytics/{ClickPositionsInner.php => ClickPosition.php} (93%) rename clients/algoliasearch-client-php/lib/Model/Ingestion/{TransformationTryResponseError.php => TransformationError.php} (96%) rename clients/algoliasearch-client-php/lib/Model/Monitoring/{GetServers403Response.php => BadRequest.php} (96%) create mode 100644 clients/algoliasearch-client-php/lib/Model/Monitoring/Forbidden.php rename clients/algoliasearch-client-php/lib/Model/Monitoring/{IncidentsInner.php => IncidentEntry.php} (97%) rename clients/algoliasearch-client-php/lib/Model/Monitoring/{IndexingTimeResponseMetrics.php => IndexingMetric.php} (96%) rename clients/algoliasearch-client-php/lib/Model/Monitoring/{LatencyResponseMetrics.php => LatencyMetric.php} (96%) rename clients/algoliasearch-client-php/lib/Model/Monitoring/{InfrastructureResponseMetrics.php => Metrics.php} (97%) rename clients/algoliasearch-client-php/lib/Model/Monitoring/{TimeInner.php => TimeEntry.php} (98%) create mode 100644 clients/algoliasearch-client-php/lib/Model/Monitoring/Unauthorized.php rename clients/algoliasearch-client-php/lib/Model/QuerySuggestions/{GetConfigStatus200Response.php => ConfigStatus.php} (98%) rename clients/algoliasearch-client-php/lib/Model/QuerySuggestions/{GetLogFile200Response.php => LogFile.php} (97%) rename clients/algoliasearch-client-php/lib/Model/Recommend/{AroundPrecisionFromValueInner.php => Range.php} (97%) rename clients/algoliasearch-client-php/lib/Model/Recommend/{RedirectRuleIndexMetadataData.php => RedirectRuleIndexData.php} (96%) rename clients/algoliasearch-client-php/lib/Model/Recommend/{RecommendRuleMetadata.php => RuleMetadata.php} (96%) rename clients/algoliasearch-client-php/lib/Model/Search/{AroundPrecisionFromValueInner.php => Range.php} (97%) rename clients/algoliasearch-client-php/lib/Model/Search/{RedirectRuleIndexMetadataData.php => RedirectRuleIndexData.php} (96%) rename clients/algoliasearch-client-php/lib/Model/Usage/{GetUsage400ResponseErrorErrorsInner.php => ErrorItem.php} (97%) rename clients/algoliasearch-client-php/lib/Model/Usage/{GetUsage400Response.php => Forbidden.php} (93%) rename clients/algoliasearch-client-php/lib/Model/Usage/{GetUsage400ResponseError.php => ForbiddenError.php} (92%) rename clients/algoliasearch-client-php/lib/Model/Usage/{GetUsage200Response.php => IndexUsage.php} (91%) create mode 100644 clients/algoliasearch-client-php/lib/Model/Usage/InvalidRequest.php create mode 100644 clients/algoliasearch-client-php/lib/Model/Usage/InvalidRequestError.php rename clients/algoliasearch-client-php/lib/Model/Usage/{GetUsage200ResponseStatisticsInner.php => StatisticEntry.php} (96%) rename clients/algoliasearch-client-python/algoliasearch/abtesting/models/{filter_effects_empty_search.py => empty_search_filter.py} (91%) rename clients/algoliasearch-client-python/algoliasearch/abtesting/models/{filter_effects_outliers.py => outliers_filter.py} (91%) rename clients/algoliasearch-client-python/algoliasearch/analytics/models/{click_positions_inner.py => click_position.py} (92%) rename clients/algoliasearch-client-python/algoliasearch/ingestion/models/{transformation_try_response_error.py => transformation_error.py} (89%) rename clients/algoliasearch-client-python/algoliasearch/monitoring/models/{get_servers403_response.py => bad_request.py} (88%) create mode 100644 clients/algoliasearch-client-python/algoliasearch/monitoring/models/forbidden.py rename clients/algoliasearch-client-python/algoliasearch/monitoring/models/{incidents_inner.py => incident_entry.py} (91%) rename clients/algoliasearch-client-python/algoliasearch/monitoring/models/{indexing_time_response_metrics.py => indexing_metric.py} (83%) rename clients/algoliasearch-client-python/algoliasearch/monitoring/models/{latency_response_metrics.py => latency_metric.py} (84%) rename clients/algoliasearch-client-python/algoliasearch/monitoring/models/{infrastructure_response_metrics.py => metrics.py} (96%) rename clients/algoliasearch-client-python/algoliasearch/monitoring/models/{time_inner.py => time_entry.py} (91%) create mode 100644 clients/algoliasearch-client-python/algoliasearch/monitoring/models/unauthorized.py rename clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/{get_config_status200_response.py => config_status.py} (92%) rename clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/{get_log_file200_response.py => log_file.py} (92%) rename clients/algoliasearch-client-python/algoliasearch/{search/models/around_precision_from_value_inner.py => recommend/models/range.py} (90%) rename clients/algoliasearch-client-python/algoliasearch/{search/models/redirect_rule_index_metadata_data.py => recommend/models/redirect_rule_index_data.py} (88%) rename clients/algoliasearch-client-python/algoliasearch/recommend/models/{recommend_rule_metadata.py => rule_metadata.py} (90%) rename clients/algoliasearch-client-python/algoliasearch/{recommend/models/around_precision_from_value_inner.py => search/models/range.py} (90%) rename clients/algoliasearch-client-python/algoliasearch/{recommend/models/redirect_rule_index_metadata_data.py => search/models/redirect_rule_index_data.py} (88%) rename clients/algoliasearch-client-python/algoliasearch/usage/models/{get_usage400_response_error_errors_inner.py => error_item.py} (87%) rename clients/algoliasearch-client-python/algoliasearch/usage/models/{get_usage400_response.py => forbidden.py} (80%) rename clients/algoliasearch-client-python/algoliasearch/usage/models/{get_usage400_response_error.py => forbidden_error.py} (77%) rename clients/algoliasearch-client-python/algoliasearch/usage/models/{get_usage200_response.py => index_usage.py} (76%) create mode 100644 clients/algoliasearch-client-python/algoliasearch/usage/models/invalid_request.py create mode 100644 clients/algoliasearch-client-python/algoliasearch/usage/models/invalid_request_error.py rename clients/algoliasearch-client-python/algoliasearch/usage/models/{get_usage200_response_statistics_inner.py => statistic_entry.py} (88%) rename clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/{filter_effects_empty_search.rb => empty_search_filter.rb} (96%) rename clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/{filter_effects_outliers.rb => outliers_filter.rb} (96%) rename clients/algoliasearch-client-ruby/lib/algolia/models/analytics/{click_positions_inner.rb => click_position.rb} (97%) rename clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/{transformation_try_response_error.rb => transformation_error.rb} (97%) rename clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/{get_servers403_response.rb => bad_request.rb} (96%) create mode 100644 clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/forbidden.rb rename clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/{incidents_inner.rb => incident_entry.rb} (97%) rename clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/{indexing_time_response_metrics.rb => indexing_metric.rb} (97%) rename clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/{latency_response_metrics.rb => latency_metric.rb} (97%) rename clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/{infrastructure_response_metrics.rb => metrics.rb} (95%) rename clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/{time_inner.rb => time_entry.rb} (98%) create mode 100644 clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/unauthorized.rb create mode 100644 clients/algoliasearch-client-ruby/lib/algolia/models/query-suggestions/config_status.rb create mode 100644 clients/algoliasearch-client-ruby/lib/algolia/models/query-suggestions/log_file.rb rename clients/algoliasearch-client-ruby/lib/algolia/models/recommend/{around_precision_from_value_inner.rb => range.rb} (94%) rename clients/algoliasearch-client-ruby/lib/algolia/models/recommend/{redirect_rule_index_metadata_data.rb => redirect_rule_index_data.rb} (97%) rename clients/algoliasearch-client-ruby/lib/algolia/models/recommend/{recommend_rule_metadata.rb => rule_metadata.rb} (96%) rename clients/algoliasearch-client-ruby/lib/algolia/models/search/{around_precision_from_value_inner.rb => range.rb} (94%) rename clients/algoliasearch-client-ruby/lib/algolia/models/search/{redirect_rule_index_metadata_data.rb => redirect_rule_index_data.rb} (97%) rename clients/algoliasearch-client-ruby/lib/algolia/models/usage/{get_usage400_response_error_errors_inner.rb => error_item.rb} (96%) rename clients/algoliasearch-client-ruby/lib/algolia/models/usage/{get_usage400_response.rb => forbidden.rb} (95%) rename clients/algoliasearch-client-ruby/lib/algolia/models/usage/{get_usage400_response_error.rb => forbidden_error.rb} (95%) rename clients/algoliasearch-client-ruby/lib/algolia/models/usage/{get_usage200_response.rb => index_usage.rb} (95%) create mode 100644 clients/algoliasearch-client-ruby/lib/algolia/models/usage/invalid_request.rb create mode 100644 clients/algoliasearch-client-ruby/lib/algolia/models/usage/invalid_request_error.rb rename clients/algoliasearch-client-ruby/lib/algolia/models/usage/{get_usage200_response_statistics_inner.rb => statistic_entry.rb} (95%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/{FilterEffectsEmptySearch.scala => EmptySearchFilter.scala} (98%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/{FilterEffectsOutliers.scala => OutliersFilter.scala} (98%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/{ClickPositionsInner.scala => ClickPosition.scala} (98%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/{TransformationTryResponseError.scala => TransformationError.scala} (98%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/{GetServers403Response.scala => BadRequest.scala} (96%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/{LatencyResponseMetrics.scala => Forbidden.scala} (92%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/{IncidentsInner.scala => IncidentEntry.scala} (97%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/{IndexingTimeResponseMetrics.scala => IndexingMetric.scala} (92%) create mode 100644 clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyMetric.scala rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/{InfrastructureResponseMetrics.scala => Metrics.scala} (96%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/{TimeInner.scala => TimeEntry.scala} (97%) create mode 100644 clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Unauthorized.scala rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/{GetConfigStatus200Response.scala => ConfigStatus.scala} (97%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/{GetLogFile200Response.scala => LogFile.scala} (97%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/{AroundPrecisionFromValueInner.scala => Range.scala} (98%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/{RedirectRuleIndexMetadataData.scala => RedirectRuleIndexData.scala} (98%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/{RecommendRuleMetadata.scala => RuleMetadata.scala} (98%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/{AroundPrecisionFromValueInner.scala => Range.scala} (98%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/{RedirectRuleIndexMetadataData.scala => RedirectRuleIndexData.scala} (98%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/{GetUsage400ResponseErrorErrorsInner.scala => ErrorItem.scala} (94%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/{GetUsage400Response.scala => Forbidden.scala} (93%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/{GetUsage400ResponseError.scala => ForbiddenError.scala} (90%) rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/{GetUsage200Response.scala => IndexUsage.scala} (90%) create mode 100644 clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/InvalidRequest.scala create mode 100644 clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/InvalidRequestError.scala rename clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/{GetUsage200ResponseStatisticsInner.scala => StatisticEntry.scala} (94%) rename clients/algoliasearch-client-swift/Sources/Abtesting/Models/{FilterEffectsEmptySearch.swift => EmptySearchFilter.swift} (84%) rename clients/algoliasearch-client-swift/Sources/Abtesting/Models/{FilterEffectsOutliers.swift => OutliersFilter.swift} (85%) rename clients/algoliasearch-client-swift/Sources/Analytics/Models/{ClickPositionsInner.swift => ClickPosition.swift} (86%) rename clients/algoliasearch-client-swift/Sources/Ingestion/Models/{TransformationTryResponseError.swift => TransformationError.swift} (80%) rename clients/algoliasearch-client-swift/Sources/Monitoring/Models/{GetServers403Response.swift => BadRequest.swift} (77%) rename clients/algoliasearch-client-swift/Sources/Monitoring/Models/{IncidentsInner.swift => IncidentEntry.swift} (83%) rename clients/algoliasearch-client-swift/Sources/Monitoring/Models/{IndexingTimeResponseMetrics.swift => IndexingMetric.swift} (66%) rename clients/algoliasearch-client-swift/Sources/Monitoring/Models/{LatencyResponseMetrics.swift => LatencyMetric.swift} (68%) rename clients/algoliasearch-client-swift/Sources/Monitoring/Models/{InfrastructureResponseMetrics.swift => Metrics.swift} (90%) create mode 100644 clients/algoliasearch-client-swift/Sources/Monitoring/Models/MonitoringForbidden.swift rename clients/algoliasearch-client-swift/Sources/Monitoring/Models/{TimeInner.swift => TimeEntry.swift} (85%) create mode 100644 clients/algoliasearch-client-swift/Sources/Monitoring/Models/Unauthorized.swift rename clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/{GetConfigStatus200Response.swift => ConfigStatus.swift} (91%) rename clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/{GetLogFile200Response.swift => LogFile.swift} (89%) rename clients/algoliasearch-client-swift/Sources/{Search/Models/SearchAroundPrecisionFromValueInner.swift => Recommend/Models/RecommendRange.swift} (81%) rename clients/algoliasearch-client-swift/Sources/{Search/Models/SearchRedirectRuleIndexMetadataData.swift => Recommend/Models/RecommendRedirectRuleIndexData.swift} (73%) rename clients/algoliasearch-client-swift/Sources/Recommend/Models/{RecommendRuleMetadata.swift => RuleMetadata.swift} (79%) rename clients/algoliasearch-client-swift/Sources/{Recommend/Models/RecommendAroundPrecisionFromValueInner.swift => Search/Models/SearchRange.swift} (79%) rename clients/algoliasearch-client-swift/Sources/{Recommend/Models/RecommendRedirectRuleIndexMetadataData.swift => Search/Models/SearchRedirectRuleIndexData.swift} (71%) rename clients/algoliasearch-client-swift/Sources/Usage/Models/{GetUsage400ResponseErrorErrorsInner.swift => ErrorItem.swift} (83%) rename clients/algoliasearch-client-swift/Sources/Usage/Models/{GetUsage400ResponseError.swift => ForbiddenError.swift} (77%) rename clients/algoliasearch-client-swift/Sources/Usage/Models/{GetUsage200Response.swift => IndexUsage.swift} (67%) rename clients/algoliasearch-client-swift/Sources/Usage/Models/{GetUsage400Response.swift => InvalidRequest.swift} (68%) create mode 100644 clients/algoliasearch-client-swift/Sources/Usage/Models/InvalidRequestError.swift rename clients/algoliasearch-client-swift/Sources/Usage/Models/{GetUsage200ResponseStatisticsInner.swift => StatisticEntry.swift} (77%) create mode 100644 clients/algoliasearch-client-swift/Sources/Usage/Models/UsageForbidden.swift diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Clients/QuerySuggestionsClient.cs b/clients/algoliasearch-client-csharp/algoliasearch/Clients/QuerySuggestionsClient.cs index 83da71046d..2bf0f15213 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Clients/QuerySuggestionsClient.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Clients/QuerySuggestionsClient.cs @@ -232,8 +232,8 @@ public interface IQuerySuggestionsClient /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of GetConfigStatus200Response - Task GetConfigStatusAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); + /// Task of ConfigStatus + Task GetConfigStatusAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// /// Reports the status of a Query Suggestions index. (Synchronous version) @@ -244,8 +244,8 @@ public interface IQuerySuggestionsClient /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// GetConfigStatus200Response - GetConfigStatus200Response GetConfigStatus(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); + /// ConfigStatus + ConfigStatus GetConfigStatus(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// /// Retrieves the logs for a single Query Suggestions index. @@ -256,8 +256,8 @@ public interface IQuerySuggestionsClient /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of GetLogFile200Response - Task GetLogFileAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); + /// Task of LogFile + Task GetLogFileAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// /// Retrieves the logs for a single Query Suggestions index. (Synchronous version) @@ -268,8 +268,8 @@ public interface IQuerySuggestionsClient /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// GetLogFile200Response - GetLogFile200Response GetLogFile(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); + /// LogFile + LogFile GetLogFile(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default); /// /// Updates a QuerySuggestions configuration. @@ -712,8 +712,8 @@ public ConfigurationResponse GetConfig(string indexName, RequestOptions options /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of GetConfigStatus200Response - public async Task GetConfigStatusAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) + /// Task of ConfigStatus + public async Task GetConfigStatusAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) { if (indexName == null) @@ -723,7 +723,7 @@ public async Task GetConfigStatusAsync(string indexN requestOptions.PathParameters.Add("indexName", QueryStringHelper.ParameterToString(indexName)); - return await _transport.ExecuteRequestAsync(new HttpMethod("GET"), "/1/configs/{indexName}/status", requestOptions, cancellationToken).ConfigureAwait(false); + return await _transport.ExecuteRequestAsync(new HttpMethod("GET"), "/1/configs/{indexName}/status", requestOptions, cancellationToken).ConfigureAwait(false); } @@ -739,8 +739,8 @@ public async Task GetConfigStatusAsync(string indexN /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// GetConfigStatus200Response - public GetConfigStatus200Response GetConfigStatus(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) => + /// ConfigStatus + public ConfigStatus GetConfigStatus(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) => AsyncHelper.RunSync(() => GetConfigStatusAsync(indexName, options, cancellationToken)); @@ -756,8 +756,8 @@ public GetConfigStatus200Response GetConfigStatus(string indexName, RequestOptio /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of GetLogFile200Response - public async Task GetLogFileAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) + /// Task of LogFile + public async Task GetLogFileAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) { if (indexName == null) @@ -767,7 +767,7 @@ public async Task GetLogFileAsync(string indexName, Reque requestOptions.PathParameters.Add("indexName", QueryStringHelper.ParameterToString(indexName)); - return await _transport.ExecuteRequestAsync(new HttpMethod("GET"), "/1/logs/{indexName}", requestOptions, cancellationToken).ConfigureAwait(false); + return await _transport.ExecuteRequestAsync(new HttpMethod("GET"), "/1/logs/{indexName}", requestOptions, cancellationToken).ConfigureAwait(false); } @@ -783,8 +783,8 @@ public async Task GetLogFileAsync(string indexName, Reque /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// GetLogFile200Response - public GetLogFile200Response GetLogFile(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) => + /// LogFile + public LogFile GetLogFile(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) => AsyncHelper.RunSync(() => GetLogFileAsync(indexName, options, cancellationToken)); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Clients/UsageClient.cs b/clients/algoliasearch-client-csharp/algoliasearch/Clients/UsageClient.cs index 0f2afe047d..20b027a3ad 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Clients/UsageClient.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Clients/UsageClient.cs @@ -142,8 +142,8 @@ public interface IUsageClient /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of GetUsage200Response - Task GetIndexUsageAsync(Statistic statistic, string indexName, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default); + /// Task of IndexUsage + Task GetIndexUsageAsync(Statistic statistic, string indexName, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// /// Retrieves the selected usage statistics for one index. (Synchronous version) @@ -158,8 +158,8 @@ public interface IUsageClient /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// GetUsage200Response - GetUsage200Response GetIndexUsage(Statistic statistic, string indexName, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default); + /// IndexUsage + IndexUsage GetIndexUsage(Statistic statistic, string indexName, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// /// Retrieves usage statistics evaluated over a specified period. @@ -173,8 +173,8 @@ public interface IUsageClient /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of GetUsage200Response - Task GetUsageAsync(Statistic statistic, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default); + /// Task of IndexUsage + Task GetUsageAsync(Statistic statistic, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// /// Retrieves usage statistics evaluated over a specified period. (Synchronous version) @@ -188,8 +188,8 @@ public interface IUsageClient /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// GetUsage200Response - GetUsage200Response GetUsage(Statistic statistic, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default); + /// IndexUsage + IndexUsage GetUsage(Statistic statistic, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default); } @@ -438,8 +438,8 @@ public object CustomPut(string path, Dictionary parameters = def /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of GetUsage200Response - public async Task GetIndexUsageAsync(Statistic statistic, string indexName, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default) + /// Task of IndexUsage + public async Task GetIndexUsageAsync(Statistic statistic, string indexName, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default) { @@ -462,7 +462,7 @@ public async Task GetIndexUsageAsync(Statistic statistic, s requestOptions.AddQueryParameter("startDate", startDate); requestOptions.AddQueryParameter("endDate", endDate); requestOptions.AddQueryParameter("granularity", granularity); - return await _transport.ExecuteRequestAsync(new HttpMethod("GET"), "/1/usage/{statistic}/{indexName}", requestOptions, cancellationToken).ConfigureAwait(false); + return await _transport.ExecuteRequestAsync(new HttpMethod("GET"), "/1/usage/{statistic}/{indexName}", requestOptions, cancellationToken).ConfigureAwait(false); } @@ -479,8 +479,8 @@ public async Task GetIndexUsageAsync(Statistic statistic, s /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// GetUsage200Response - public GetUsage200Response GetIndexUsage(Statistic statistic, string indexName, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default) => + /// IndexUsage + public IndexUsage GetIndexUsage(Statistic statistic, string indexName, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default) => AsyncHelper.RunSync(() => GetIndexUsageAsync(statistic, indexName, startDate, endDate, granularity, options, cancellationToken)); @@ -496,8 +496,8 @@ public GetUsage200Response GetIndexUsage(Statistic statistic, string indexName, /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// Task of GetUsage200Response - public async Task GetUsageAsync(Statistic statistic, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default) + /// Task of IndexUsage + public async Task GetUsageAsync(Statistic statistic, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default) { @@ -515,7 +515,7 @@ public async Task GetUsageAsync(Statistic statistic, string requestOptions.AddQueryParameter("startDate", startDate); requestOptions.AddQueryParameter("endDate", endDate); requestOptions.AddQueryParameter("granularity", granularity); - return await _transport.ExecuteRequestAsync(new HttpMethod("GET"), "/1/usage/{statistic}", requestOptions, cancellationToken).ConfigureAwait(false); + return await _transport.ExecuteRequestAsync(new HttpMethod("GET"), "/1/usage/{statistic}", requestOptions, cancellationToken).ConfigureAwait(false); } @@ -531,8 +531,8 @@ public async Task GetUsageAsync(Statistic statistic, string /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint - /// GetUsage200Response - public GetUsage200Response GetUsage(Statistic statistic, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default) => + /// IndexUsage + public IndexUsage GetUsage(Statistic statistic, string startDate, string endDate, Granularity? granularity = default, RequestOptions options = null, CancellationToken cancellationToken = default) => AsyncHelper.RunSync(() => GetUsageAsync(statistic, startDate, endDate, granularity, options, cancellationToken)); } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffectsEmptySearch.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/EmptySearchFilter.cs similarity index 90% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffectsEmptySearch.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/EmptySearchFilter.cs index 783fc5f191..01a0ade7b1 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffectsEmptySearch.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/EmptySearchFilter.cs @@ -14,12 +14,12 @@ namespace Algolia.Search.Models.Abtesting; /// /// Empty searches removed from the A/B test as a result of configuration settings. /// -public partial class FilterEffectsEmptySearch +public partial class EmptySearchFilter { /// - /// Initializes a new instance of the FilterEffectsEmptySearch class. + /// Initializes a new instance of the EmptySearchFilter class. /// - public FilterEffectsEmptySearch() + public EmptySearchFilter() { } @@ -44,7 +44,7 @@ public FilterEffectsEmptySearch() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class FilterEffectsEmptySearch {\n"); + sb.Append("class EmptySearchFilter {\n"); sb.Append(" UsersCount: ").Append(UsersCount).Append("\n"); sb.Append(" TrackedSearchesCount: ").Append(TrackedSearchesCount).Append("\n"); sb.Append("}\n"); @@ -67,7 +67,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not FilterEffectsEmptySearch input) + if (obj is not EmptySearchFilter input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffects.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffects.cs index 042fd5a147..7ff62a9c14 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffects.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffects.cs @@ -27,13 +27,13 @@ public FilterEffects() /// Gets or Sets Outliers /// [JsonPropertyName("outliers")] - public FilterEffectsOutliers Outliers { get; set; } + public OutliersFilter Outliers { get; set; } /// /// Gets or Sets EmptySearch /// [JsonPropertyName("emptySearch")] - public FilterEffectsEmptySearch EmptySearch { get; set; } + public EmptySearchFilter EmptySearch { get; set; } /// /// Returns the string presentation of the object diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffectsOutliers.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/OutliersFilter.cs similarity index 91% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffectsOutliers.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/OutliersFilter.cs index f8c7401ad9..0fc568b9bf 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/FilterEffectsOutliers.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Abtesting/OutliersFilter.cs @@ -14,12 +14,12 @@ namespace Algolia.Search.Models.Abtesting; /// /// Outliers removed from the A/B test as a result of configuration settings. /// -public partial class FilterEffectsOutliers +public partial class OutliersFilter { /// - /// Initializes a new instance of the FilterEffectsOutliers class. + /// Initializes a new instance of the OutliersFilter class. /// - public FilterEffectsOutliers() + public OutliersFilter() { } @@ -44,7 +44,7 @@ public FilterEffectsOutliers() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class FilterEffectsOutliers {\n"); + sb.Append("class OutliersFilter {\n"); sb.Append(" UsersCount: ").Append(UsersCount).Append("\n"); sb.Append(" TrackedSearchesCount: ").Append(TrackedSearchesCount).Append("\n"); sb.Append("}\n"); @@ -67,7 +67,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not FilterEffectsOutliers input) + if (obj is not OutliersFilter input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/ClickPositionsInner.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/ClickPosition.cs similarity index 92% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/ClickPositionsInner.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/ClickPosition.cs index 86805c308a..d6d7aa9452 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/ClickPositionsInner.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/ClickPosition.cs @@ -14,12 +14,12 @@ namespace Algolia.Search.Models.Analytics; /// /// Click position. /// -public partial class ClickPositionsInner +public partial class ClickPosition { /// - /// Initializes a new instance of the ClickPositionsInner class. + /// Initializes a new instance of the ClickPosition class. /// - public ClickPositionsInner() + public ClickPosition() { } @@ -44,7 +44,7 @@ public ClickPositionsInner() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class ClickPositionsInner {\n"); + sb.Append("class ClickPosition {\n"); sb.Append(" Position: ").Append(Position).Append("\n"); sb.Append(" ClickCount: ").Append(ClickCount).Append("\n"); sb.Append("}\n"); @@ -67,7 +67,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not ClickPositionsInner input) + if (obj is not ClickPosition input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/GetClickPositionsResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/GetClickPositionsResponse.cs index 2a08f99d39..d178001bdb 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/GetClickPositionsResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/GetClickPositionsResponse.cs @@ -25,7 +25,7 @@ public GetClickPositionsResponse() { } /// Initializes a new instance of the GetClickPositionsResponse class. /// /// List of positions in the search results and clicks associated with this search. (required). - public GetClickPositionsResponse(List positions) + public GetClickPositionsResponse(List positions) { Positions = positions ?? throw new ArgumentNullException(nameof(positions)); } @@ -35,7 +35,7 @@ public GetClickPositionsResponse(List positions) /// /// List of positions in the search results and clicks associated with this search. [JsonPropertyName("positions")] - public List Positions { get; set; } + public List Positions { get; set; } /// /// Returns the string presentation of the object diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithAnalytics.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithAnalytics.cs index a898737052..9f27d80ff5 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithAnalytics.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithAnalytics.cs @@ -34,7 +34,7 @@ public TopSearchWithAnalytics() { } /// Number of clicks associated with this search. (required) (default to 0). /// Number of conversions from this search. (required) (default to 0). /// Number of results (hits). (required). - public TopSearchWithAnalytics(string search, int count, double? clickThroughRate, double? averageClickPosition, List clickPositions, double? conversionRate, int trackedSearchCount, int clickCount, int conversionCount, int nbHits) + public TopSearchWithAnalytics(string search, int count, double? clickThroughRate, double? averageClickPosition, List clickPositions, double? conversionRate, int trackedSearchCount, int clickCount, int conversionCount, int nbHits) { Search = search ?? throw new ArgumentNullException(nameof(search)); Count = count; @@ -81,7 +81,7 @@ public TopSearchWithAnalytics(string search, int count, double? clickThroughRate /// /// List of positions in the search results and clicks associated with this search. [JsonPropertyName("clickPositions")] - public List ClickPositions { get; set; } + public List ClickPositions { get; set; } /// /// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithRevenueAnalytics.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithRevenueAnalytics.cs index 8fa31a97cb..50995fd344 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithRevenueAnalytics.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Analytics/TopSearchWithRevenueAnalytics.cs @@ -39,7 +39,7 @@ public TopSearchWithRevenueAnalytics() { } /// Number of add-to-cart events from this search. (required) (default to 0). /// Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. (required). /// Number of purchase events from this search. (required) (default to 0). - public TopSearchWithRevenueAnalytics(string search, int count, double? clickThroughRate, double? averageClickPosition, List clickPositions, double? conversionRate, int trackedSearchCount, int clickCount, int conversionCount, int nbHits, Dictionary currencies, double? addToCartRate, int addToCartCount, double? purchaseRate, int purchaseCount) + public TopSearchWithRevenueAnalytics(string search, int count, double? clickThroughRate, double? averageClickPosition, List clickPositions, double? conversionRate, int trackedSearchCount, int clickCount, int conversionCount, int nbHits, Dictionary currencies, double? addToCartRate, int addToCartCount, double? purchaseRate, int purchaseCount) { Search = search ?? throw new ArgumentNullException(nameof(search)); Count = count; @@ -91,7 +91,7 @@ public TopSearchWithRevenueAnalytics(string search, int count, double? clickThro /// /// List of positions in the search results and clicks associated with this search. [JsonPropertyName("clickPositions")] - public List ClickPositions { get; set; } + public List ClickPositions { get; set; } /// /// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DockerStreamsInput.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DockerStreamsInput.cs index cf87144967..6f230921a1 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DockerStreamsInput.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DockerStreamsInput.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Ingestion; /// -/// DockerStreamsInput +/// The selected streams of a singer or airbyte connector. /// public partial class DockerStreamsInput { diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationTryResponseError.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationError.cs similarity index 89% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationTryResponseError.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationError.cs index 3f6e985aef..01d84ee66e 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationTryResponseError.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationError.cs @@ -14,12 +14,12 @@ namespace Algolia.Search.Models.Ingestion; /// /// The error if the transformation failed. /// -public partial class TransformationTryResponseError +public partial class TransformationError { /// - /// Initializes a new instance of the TransformationTryResponseError class. + /// Initializes a new instance of the TransformationError class. /// - public TransformationTryResponseError() + public TransformationError() { } @@ -44,7 +44,7 @@ public TransformationTryResponseError() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class TransformationTryResponseError {\n"); + sb.Append("class TransformationError {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append("}\n"); @@ -67,7 +67,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not TransformationTryResponseError input) + if (obj is not TransformationError input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationTryResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationTryResponse.cs index 5de6f5df21..60c8171b57 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationTryResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationTryResponse.cs @@ -41,7 +41,7 @@ public TransformationTryResponse(List payloads) /// Gets or Sets Error /// [JsonPropertyName("error")] - public TransformationTryResponseError Error { get; set; } + public TransformationError Error { get; set; } /// /// Returns the string presentation of the object diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/GetServers403Response.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/BadRequest.cs similarity index 87% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/GetServers403Response.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/BadRequest.cs index 387035732d..23c1b4c0c3 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/GetServers403Response.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/BadRequest.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.Monitoring; /// -/// GetServers403Response +/// BadRequest /// -public partial class GetServers403Response +public partial class BadRequest { /// - /// Initializes a new instance of the GetServers403Response class. + /// Initializes a new instance of the BadRequest class. /// - public GetServers403Response() + public BadRequest() { } @@ -36,7 +36,7 @@ public GetServers403Response() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class GetServers403Response {\n"); + sb.Append("class BadRequest {\n"); sb.Append(" Reason: ").Append(Reason).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -58,7 +58,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not GetServers403Response input) + if (obj is not BadRequest input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Forbidden.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Forbidden.cs new file mode 100644 index 0000000000..4355a88195 --- /dev/null +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Forbidden.cs @@ -0,0 +1,88 @@ +// +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +// +using System; +using System.Text; +using System.Linq; +using System.Text.Json.Serialization; +using System.Collections.Generic; +using Algolia.Search.Serializer; +using System.Text.Json; + +namespace Algolia.Search.Models.Monitoring; + +/// +/// Forbidden +/// +public partial class Forbidden +{ + /// + /// Initializes a new instance of the Forbidden class. + /// + public Forbidden() + { + } + + /// + /// Gets or Sets Reason + /// + [JsonPropertyName("reason")] + public string Reason { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Forbidden {\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonSerializer.Serialize(this, JsonConfig.Options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is not Forbidden input) + { + return false; + } + + return + (Reason == input.Reason || (Reason != null && Reason.Equals(input.Reason))); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (Reason != null) + { + hashCode = (hashCode * 59) + Reason.GetHashCode(); + } + return hashCode; + } + } + +} + diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentsInner.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentEntry.cs similarity index 90% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentsInner.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentEntry.cs index 2c4de697e3..f097731b52 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentsInner.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentEntry.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.Monitoring; /// -/// IncidentsInner +/// IncidentEntry /// -public partial class IncidentsInner +public partial class IncidentEntry { /// - /// Initializes a new instance of the IncidentsInner class. + /// Initializes a new instance of the IncidentEntry class. /// - public IncidentsInner() + public IncidentEntry() { } @@ -43,7 +43,7 @@ public IncidentsInner() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class IncidentsInner {\n"); + sb.Append("class IncidentEntry {\n"); sb.Append(" T: ").Append(T).Append("\n"); sb.Append(" V: ").Append(V).Append("\n"); sb.Append("}\n"); @@ -66,7 +66,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not IncidentsInner input) + if (obj is not IncidentEntry input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentsResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentsResponse.cs index ac7081dde7..8ff2e2397d 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentsResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IncidentsResponse.cs @@ -27,7 +27,7 @@ public IncidentsResponse() /// Gets or Sets Incidents /// [JsonPropertyName("incidents")] - public Dictionary> Incidents { get; set; } + public Dictionary> Incidents { get; set; } /// /// Returns the string presentation of the object diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingTimeResponseMetrics.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingMetric.cs similarity index 83% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingTimeResponseMetrics.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingMetric.cs index 04bec19652..b169b9b31a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingTimeResponseMetrics.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingMetric.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.Monitoring; /// -/// IndexingTimeResponseMetrics +/// IndexingMetric /// -public partial class IndexingTimeResponseMetrics +public partial class IndexingMetric { /// - /// Initializes a new instance of the IndexingTimeResponseMetrics class. + /// Initializes a new instance of the IndexingMetric class. /// - public IndexingTimeResponseMetrics() + public IndexingMetric() { } @@ -27,7 +27,7 @@ public IndexingTimeResponseMetrics() /// Gets or Sets Indexing /// [JsonPropertyName("indexing")] - public Dictionary> Indexing { get; set; } + public Dictionary> Indexing { get; set; } /// /// Returns the string presentation of the object @@ -36,7 +36,7 @@ public IndexingTimeResponseMetrics() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class IndexingTimeResponseMetrics {\n"); + sb.Append("class IndexingMetric {\n"); sb.Append(" Indexing: ").Append(Indexing).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -58,7 +58,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not IndexingTimeResponseMetrics input) + if (obj is not IndexingMetric input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingTimeResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingTimeResponse.cs index f073fc823c..bfe51aac75 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingTimeResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/IndexingTimeResponse.cs @@ -27,7 +27,7 @@ public IndexingTimeResponse() /// Gets or Sets Metrics /// [JsonPropertyName("metrics")] - public IndexingTimeResponseMetrics Metrics { get; set; } + public IndexingMetric Metrics { get; set; } /// /// Returns the string presentation of the object diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/InfrastructureResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/InfrastructureResponse.cs index 0df36855e9..1bdc045f5b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/InfrastructureResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/InfrastructureResponse.cs @@ -27,7 +27,7 @@ public InfrastructureResponse() /// Gets or Sets Metrics /// [JsonPropertyName("metrics")] - public InfrastructureResponseMetrics Metrics { get; set; } + public Metrics Metrics { get; set; } /// /// Returns the string presentation of the object diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyResponseMetrics.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyMetric.cs similarity index 84% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyResponseMetrics.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyMetric.cs index 2f0a066379..b28adaaf52 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyResponseMetrics.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyMetric.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.Monitoring; /// -/// LatencyResponseMetrics +/// LatencyMetric /// -public partial class LatencyResponseMetrics +public partial class LatencyMetric { /// - /// Initializes a new instance of the LatencyResponseMetrics class. + /// Initializes a new instance of the LatencyMetric class. /// - public LatencyResponseMetrics() + public LatencyMetric() { } @@ -27,7 +27,7 @@ public LatencyResponseMetrics() /// Gets or Sets Latency /// [JsonPropertyName("latency")] - public Dictionary> Latency { get; set; } + public Dictionary> Latency { get; set; } /// /// Returns the string presentation of the object @@ -36,7 +36,7 @@ public LatencyResponseMetrics() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class LatencyResponseMetrics {\n"); + sb.Append("class LatencyMetric {\n"); sb.Append(" Latency: ").Append(Latency).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -58,7 +58,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not LatencyResponseMetrics input) + if (obj is not LatencyMetric input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyResponse.cs index af9fe1eda4..e019d685b4 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/LatencyResponse.cs @@ -27,7 +27,7 @@ public LatencyResponse() /// Gets or Sets Metrics /// [JsonPropertyName("metrics")] - public LatencyResponseMetrics Metrics { get; set; } + public LatencyMetric Metrics { get; set; } /// /// Returns the string presentation of the object diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/InfrastructureResponseMetrics.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Metrics.cs similarity index 93% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/InfrastructureResponseMetrics.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Metrics.cs index 2685c4353a..e1828add5a 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/InfrastructureResponseMetrics.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Metrics.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.Monitoring; /// -/// InfrastructureResponseMetrics +/// Metrics /// -public partial class InfrastructureResponseMetrics +public partial class Metrics { /// - /// Initializes a new instance of the InfrastructureResponseMetrics class. + /// Initializes a new instance of the Metrics class. /// - public InfrastructureResponseMetrics() + public Metrics() { } @@ -65,7 +65,7 @@ public InfrastructureResponseMetrics() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class InfrastructureResponseMetrics {\n"); + sb.Append("class Metrics {\n"); sb.Append(" CpuUsage: ").Append(CpuUsage).Append("\n"); sb.Append(" RamIndexingUsage: ").Append(RamIndexingUsage).Append("\n"); sb.Append(" RamSearchUsage: ").Append(RamSearchUsage).Append("\n"); @@ -91,7 +91,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not InfrastructureResponseMetrics input) + if (obj is not Metrics input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/TimeInner.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/TimeEntry.cs similarity index 91% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/TimeInner.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/TimeEntry.cs index a65c51f518..2b55e62696 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/TimeInner.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/TimeEntry.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.Monitoring; /// -/// TimeInner +/// TimeEntry /// -public partial class TimeInner +public partial class TimeEntry { /// - /// Initializes a new instance of the TimeInner class. + /// Initializes a new instance of the TimeEntry class. /// - public TimeInner() + public TimeEntry() { } @@ -44,7 +44,7 @@ public TimeInner() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class TimeInner {\n"); + sb.Append("class TimeEntry {\n"); sb.Append(" T: ").Append(T).Append("\n"); sb.Append(" V: ").Append(V).Append("\n"); sb.Append("}\n"); @@ -67,7 +67,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not TimeInner input) + if (obj is not TimeEntry input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Unauthorized.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Unauthorized.cs new file mode 100644 index 0000000000..406b27bfc1 --- /dev/null +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Monitoring/Unauthorized.cs @@ -0,0 +1,88 @@ +// +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +// +using System; +using System.Text; +using System.Linq; +using System.Text.Json.Serialization; +using System.Collections.Generic; +using Algolia.Search.Serializer; +using System.Text.Json; + +namespace Algolia.Search.Models.Monitoring; + +/// +/// Unauthorized +/// +public partial class Unauthorized +{ + /// + /// Initializes a new instance of the Unauthorized class. + /// + public Unauthorized() + { + } + + /// + /// Gets or Sets Reason + /// + [JsonPropertyName("reason")] + public string Reason { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Unauthorized {\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonSerializer.Serialize(this, JsonConfig.Options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is not Unauthorized input) + { + return false; + } + + return + (Reason == input.Reason || (Reason != null && Reason.Equals(input.Reason))); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (Reason != null) + { + hashCode = (hashCode * 59) + Reason.GetHashCode(); + } + return hashCode; + } + } + +} + diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/GetConfigStatus200Response.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/ConfigStatus.cs similarity index 93% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/GetConfigStatus200Response.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/ConfigStatus.cs index 822490f88b..6c25964859 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/GetConfigStatus200Response.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/ConfigStatus.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.QuerySuggestions; /// -/// GetConfigStatus200Response +/// ConfigStatus /// -public partial class GetConfigStatus200Response +public partial class ConfigStatus { /// - /// Initializes a new instance of the GetConfigStatus200Response class. + /// Initializes a new instance of the ConfigStatus class. /// - public GetConfigStatus200Response() + public ConfigStatus() { } @@ -65,7 +65,7 @@ public GetConfigStatus200Response() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class GetConfigStatus200Response {\n"); + sb.Append("class ConfigStatus {\n"); sb.Append(" IndexName: ").Append(IndexName).Append("\n"); sb.Append(" IsRunning: ").Append(IsRunning).Append("\n"); sb.Append(" LastBuiltAt: ").Append(LastBuiltAt).Append("\n"); @@ -91,7 +91,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not GetConfigStatus200Response input) + if (obj is not ConfigStatus input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/GetLogFile200Response.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/LogFile.cs similarity index 92% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/GetLogFile200Response.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/LogFile.cs index a54f24c2d7..656c7bbdc3 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/GetLogFile200Response.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/QuerySuggestions/LogFile.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.QuerySuggestions; /// -/// GetLogFile200Response +/// LogFile /// -public partial class GetLogFile200Response +public partial class LogFile { /// @@ -23,9 +23,9 @@ public partial class GetLogFile200Response [JsonPropertyName("level")] public LogLevel? Level { get; set; } /// - /// Initializes a new instance of the GetLogFile200Response class. + /// Initializes a new instance of the LogFile class. /// - public GetLogFile200Response() + public LogFile() { } @@ -57,7 +57,7 @@ public GetLogFile200Response() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class GetLogFile200Response {\n"); + sb.Append("class LogFile {\n"); sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); sb.Append(" Level: ").Append(Level).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); @@ -82,7 +82,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not GetLogFile200Response input) + if (obj is not LogFile input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecision.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecision.cs index e1be7844cf..810ee43b47 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecision.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecision.cs @@ -32,10 +32,10 @@ public AroundPrecision(int actualInstance) /// /// Initializes a new instance of the AroundPrecision class - /// with a List{AroundPrecisionFromValueInner} + /// with a List{Range} /// - /// An instance of List<AroundPrecisionFromValueInner>. - public AroundPrecision(List actualInstance) + /// An instance of List<Range>. + public AroundPrecision(List actualInstance) { ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } @@ -57,13 +57,13 @@ public int AsInt() } /// - /// Get the actual instance of `List{AroundPrecisionFromValueInner}`. If the actual instance is not `List{AroundPrecisionFromValueInner}`, + /// Get the actual instance of `List{Range}`. If the actual instance is not `List{Range}`, /// the InvalidClassException will be thrown /// - /// An instance of List<AroundPrecisionFromValueInner> - public List AsList() + /// An instance of List<Range> + public List AsList() { - return (List)ActualInstance; + return (List)ActualInstance; } @@ -77,12 +77,12 @@ public bool IsInt() } /// - /// Check if the actual instance is of `List{AroundPrecisionFromValueInner}` type. + /// Check if the actual instance is of `List{Range}` type. /// /// Whether or not the instance is the type public bool IsList() { - return ActualInstance.GetType() == typeof(List); + return ActualInstance.GetType() == typeof(List); } /// @@ -185,12 +185,12 @@ public override AroundPrecision Read(ref Utf8JsonReader reader, Type typeToConve { try { - return new AroundPrecision(jsonDocument.Deserialize>(JsonConfig.Options)); + return new AroundPrecision(jsonDocument.Deserialize>(JsonConfig.Options)); } catch (Exception exception) { // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List: {exception}"); + System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List: {exception}"); } } throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined."); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecisionFromValueInner.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Range.cs similarity index 90% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecisionFromValueInner.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Range.cs index 69ec54d5b3..891de3c082 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/AroundPrecisionFromValueInner.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/Range.cs @@ -14,12 +14,12 @@ namespace Algolia.Search.Models.Recommend; /// /// Range object with lower and upper values in meters to define custom ranges. /// -public partial class AroundPrecisionFromValueInner +public partial class Range { /// - /// Initializes a new instance of the AroundPrecisionFromValueInner class. + /// Initializes a new instance of the Range class. /// - public AroundPrecisionFromValueInner() + public Range() { } @@ -44,7 +44,7 @@ public AroundPrecisionFromValueInner() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class AroundPrecisionFromValueInner {\n"); + sb.Append("class Range {\n"); sb.Append(" From: ").Append(From).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append("}\n"); @@ -67,7 +67,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not AroundPrecisionFromValueInner input) + if (obj is not Range input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendRule.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendRule.cs index da1bcb83f3..32ea009a18 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendRule.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendRule.cs @@ -27,7 +27,7 @@ public RecommendRule() /// Gets or Sets Metadata /// [JsonPropertyName("_metadata")] - public RecommendRuleMetadata Metadata { get; set; } + public RuleMetadata Metadata { get; set; } /// /// Unique identifier of a rule object. diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexMetadataData.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexData.cs similarity index 83% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexMetadataData.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexData.cs index 109d648cef..bded9b1730 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexMetadataData.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexData.cs @@ -14,18 +14,18 @@ namespace Algolia.Search.Models.Recommend; /// /// Redirect rule data. /// -public partial class RedirectRuleIndexMetadataData +public partial class RedirectRuleIndexData { /// - /// Initializes a new instance of the RedirectRuleIndexMetadataData class. + /// Initializes a new instance of the RedirectRuleIndexData class. /// [JsonConstructor] - public RedirectRuleIndexMetadataData() { } + public RedirectRuleIndexData() { } /// - /// Initializes a new instance of the RedirectRuleIndexMetadataData class. + /// Initializes a new instance of the RedirectRuleIndexData class. /// /// ruleObjectID (required). - public RedirectRuleIndexMetadataData(string ruleObjectID) + public RedirectRuleIndexData(string ruleObjectID) { RuleObjectID = ruleObjectID ?? throw new ArgumentNullException(nameof(ruleObjectID)); } @@ -43,7 +43,7 @@ public RedirectRuleIndexMetadataData(string ruleObjectID) public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class RedirectRuleIndexMetadataData {\n"); + sb.Append("class RedirectRuleIndexData {\n"); sb.Append(" RuleObjectID: ").Append(RuleObjectID).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -65,7 +65,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not RedirectRuleIndexMetadataData input) + if (obj is not RedirectRuleIndexData input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexMetadata.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexMetadata.cs index a690580ebd..5e38234c8e 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexMetadata.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RedirectRuleIndexMetadata.cs @@ -29,7 +29,7 @@ public RedirectRuleIndexMetadata() { } /// Reason for the redirect rule. (required). /// Redirect rule status. (required). /// data (required). - public RedirectRuleIndexMetadata(string source, string dest, string reason, bool succeed, RedirectRuleIndexMetadataData data) + public RedirectRuleIndexMetadata(string source, string dest, string reason, bool succeed, RedirectRuleIndexData data) { Source = source ?? throw new ArgumentNullException(nameof(source)); Dest = dest ?? throw new ArgumentNullException(nameof(dest)); @@ -70,7 +70,7 @@ public RedirectRuleIndexMetadata(string source, string dest, string reason, bool /// Gets or Sets Data /// [JsonPropertyName("data")] - public RedirectRuleIndexMetadataData Data { get; set; } + public RedirectRuleIndexData Data { get; set; } /// /// Returns the string presentation of the object diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendRuleMetadata.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RuleMetadata.cs similarity index 89% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendRuleMetadata.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RuleMetadata.cs index c524ada786..4fdbffa74c 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendRuleMetadata.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RuleMetadata.cs @@ -14,12 +14,12 @@ namespace Algolia.Search.Models.Recommend; /// /// Rule metadata. /// -public partial class RecommendRuleMetadata +public partial class RuleMetadata { /// - /// Initializes a new instance of the RecommendRuleMetadata class. + /// Initializes a new instance of the RuleMetadata class. /// - public RecommendRuleMetadata() + public RuleMetadata() { } @@ -37,7 +37,7 @@ public RecommendRuleMetadata() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class RecommendRuleMetadata {\n"); + sb.Append("class RuleMetadata {\n"); sb.Append(" LastUpdate: ").Append(LastUpdate).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -59,7 +59,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not RecommendRuleMetadata input) + if (obj is not RuleMetadata input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecision.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecision.cs index 39da18b262..2c6368810c 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecision.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecision.cs @@ -32,10 +32,10 @@ public AroundPrecision(int actualInstance) /// /// Initializes a new instance of the AroundPrecision class - /// with a List{AroundPrecisionFromValueInner} + /// with a List{Range} /// - /// An instance of List<AroundPrecisionFromValueInner>. - public AroundPrecision(List actualInstance) + /// An instance of List<Range>. + public AroundPrecision(List actualInstance) { ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } @@ -57,13 +57,13 @@ public int AsInt() } /// - /// Get the actual instance of `List{AroundPrecisionFromValueInner}`. If the actual instance is not `List{AroundPrecisionFromValueInner}`, + /// Get the actual instance of `List{Range}`. If the actual instance is not `List{Range}`, /// the InvalidClassException will be thrown /// - /// An instance of List<AroundPrecisionFromValueInner> - public List AsList() + /// An instance of List<Range> + public List AsList() { - return (List)ActualInstance; + return (List)ActualInstance; } @@ -77,12 +77,12 @@ public bool IsInt() } /// - /// Check if the actual instance is of `List{AroundPrecisionFromValueInner}` type. + /// Check if the actual instance is of `List{Range}` type. /// /// Whether or not the instance is the type public bool IsList() { - return ActualInstance.GetType() == typeof(List); + return ActualInstance.GetType() == typeof(List); } /// @@ -185,12 +185,12 @@ public override AroundPrecision Read(ref Utf8JsonReader reader, Type typeToConve { try { - return new AroundPrecision(jsonDocument.Deserialize>(JsonConfig.Options)); + return new AroundPrecision(jsonDocument.Deserialize>(JsonConfig.Options)); } catch (Exception exception) { // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List: {exception}"); + System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List: {exception}"); } } throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined."); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecisionFromValueInner.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Range.cs similarity index 90% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecisionFromValueInner.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Range.cs index da70103ff5..edf1af2b9c 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/AroundPrecisionFromValueInner.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Range.cs @@ -14,12 +14,12 @@ namespace Algolia.Search.Models.Search; /// /// Range object with lower and upper values in meters to define custom ranges. /// -public partial class AroundPrecisionFromValueInner +public partial class Range { /// - /// Initializes a new instance of the AroundPrecisionFromValueInner class. + /// Initializes a new instance of the Range class. /// - public AroundPrecisionFromValueInner() + public Range() { } @@ -44,7 +44,7 @@ public AroundPrecisionFromValueInner() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class AroundPrecisionFromValueInner {\n"); + sb.Append("class Range {\n"); sb.Append(" From: ").Append(From).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append("}\n"); @@ -67,7 +67,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not AroundPrecisionFromValueInner input) + if (obj is not Range input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexMetadataData.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexData.cs similarity index 83% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexMetadataData.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexData.cs index e9f2904a45..86acb85e13 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexMetadataData.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexData.cs @@ -14,18 +14,18 @@ namespace Algolia.Search.Models.Search; /// /// Redirect rule data. /// -public partial class RedirectRuleIndexMetadataData +public partial class RedirectRuleIndexData { /// - /// Initializes a new instance of the RedirectRuleIndexMetadataData class. + /// Initializes a new instance of the RedirectRuleIndexData class. /// [JsonConstructor] - public RedirectRuleIndexMetadataData() { } + public RedirectRuleIndexData() { } /// - /// Initializes a new instance of the RedirectRuleIndexMetadataData class. + /// Initializes a new instance of the RedirectRuleIndexData class. /// /// ruleObjectID (required). - public RedirectRuleIndexMetadataData(string ruleObjectID) + public RedirectRuleIndexData(string ruleObjectID) { RuleObjectID = ruleObjectID ?? throw new ArgumentNullException(nameof(ruleObjectID)); } @@ -43,7 +43,7 @@ public RedirectRuleIndexMetadataData(string ruleObjectID) public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class RedirectRuleIndexMetadataData {\n"); + sb.Append("class RedirectRuleIndexData {\n"); sb.Append(" RuleObjectID: ").Append(RuleObjectID).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -65,7 +65,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not RedirectRuleIndexMetadataData input) + if (obj is not RedirectRuleIndexData input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexMetadata.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexMetadata.cs index 90ced0d02a..32faac232f 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexMetadata.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/RedirectRuleIndexMetadata.cs @@ -29,7 +29,7 @@ public RedirectRuleIndexMetadata() { } /// Reason for the redirect rule. (required). /// Redirect rule status. (required). /// data (required). - public RedirectRuleIndexMetadata(string source, string dest, string reason, bool succeed, RedirectRuleIndexMetadataData data) + public RedirectRuleIndexMetadata(string source, string dest, string reason, bool succeed, RedirectRuleIndexData data) { Source = source ?? throw new ArgumentNullException(nameof(source)); Dest = dest ?? throw new ArgumentNullException(nameof(dest)); @@ -70,7 +70,7 @@ public RedirectRuleIndexMetadata(string source, string dest, string reason, bool /// Gets or Sets Data /// [JsonPropertyName("data")] - public RedirectRuleIndexMetadataData Data { get; set; } + public RedirectRuleIndexData Data { get; set; } /// /// Returns the string presentation of the object diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsString.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsString.cs index 48e62e7227..025957c996 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsString.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsString.cs @@ -12,7 +12,7 @@ namespace Algolia.Search.Models.Search; /// -/// SearchParamsString +/// Search parameters as query string. /// public partial class SearchParamsString { diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage400ResponseErrorErrorsInner.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/ErrorItem.cs similarity index 85% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage400ResponseErrorErrorsInner.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/ErrorItem.cs index d4d75796f5..511b3d3144 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage400ResponseErrorErrorsInner.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/ErrorItem.cs @@ -12,20 +12,20 @@ namespace Algolia.Search.Models.Usage; /// -/// GetUsage400ResponseErrorErrorsInner +/// ErrorItem /// -public partial class GetUsage400ResponseErrorErrorsInner +public partial class ErrorItem { /// - /// Initializes a new instance of the GetUsage400ResponseErrorErrorsInner class. + /// Initializes a new instance of the ErrorItem class. /// [JsonConstructor] - public GetUsage400ResponseErrorErrorsInner() { } + public ErrorItem() { } /// - /// Initializes a new instance of the GetUsage400ResponseErrorErrorsInner class. + /// Initializes a new instance of the ErrorItem class. /// /// message (required). - public GetUsage400ResponseErrorErrorsInner(string message) + public ErrorItem(string message) { Message = message ?? throw new ArgumentNullException(nameof(message)); } @@ -61,7 +61,7 @@ public GetUsage400ResponseErrorErrorsInner(string message) public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class GetUsage400ResponseErrorErrorsInner {\n"); + sb.Append("class ErrorItem {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append(" Line: ").Append(Line).Append("\n"); @@ -86,7 +86,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not GetUsage400ResponseErrorErrorsInner input) + if (obj is not ErrorItem input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage400Response.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/Forbidden.cs similarity index 82% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage400Response.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/Forbidden.cs index 460e34eddc..00beb3cc35 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage400Response.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/Forbidden.cs @@ -12,20 +12,20 @@ namespace Algolia.Search.Models.Usage; /// -/// GetUsage400Response +/// Forbidden /// -public partial class GetUsage400Response +public partial class Forbidden { /// - /// Initializes a new instance of the GetUsage400Response class. + /// Initializes a new instance of the Forbidden class. /// [JsonConstructor] - public GetUsage400Response() { } + public Forbidden() { } /// - /// Initializes a new instance of the GetUsage400Response class. + /// Initializes a new instance of the Forbidden class. /// /// error (required). - public GetUsage400Response(GetUsage400ResponseError error) + public Forbidden(ForbiddenError error) { Error = error ?? throw new ArgumentNullException(nameof(error)); } @@ -34,7 +34,7 @@ public GetUsage400Response(GetUsage400ResponseError error) /// Gets or Sets Error /// [JsonPropertyName("error")] - public GetUsage400ResponseError Error { get; set; } + public ForbiddenError Error { get; set; } /// /// Returns the string presentation of the object @@ -43,7 +43,7 @@ public GetUsage400Response(GetUsage400ResponseError error) public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class GetUsage400Response {\n"); + sb.Append("class Forbidden {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -65,7 +65,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not GetUsage400Response input) + if (obj is not Forbidden input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage400ResponseError.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/ForbiddenError.cs similarity index 87% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage400ResponseError.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/ForbiddenError.cs index f1a65210f5..5e51c2c14b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage400ResponseError.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/ForbiddenError.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.Usage; /// -/// GetUsage400ResponseError +/// ForbiddenError /// -public partial class GetUsage400ResponseError +public partial class ForbiddenError { /// - /// Initializes a new instance of the GetUsage400ResponseError class. + /// Initializes a new instance of the ForbiddenError class. /// - public GetUsage400ResponseError() + public ForbiddenError() { } @@ -39,7 +39,7 @@ public GetUsage400ResponseError() /// Gets or Sets Errors /// [JsonPropertyName("errors")] - public List Errors { get; set; } + public List Errors { get; set; } /// /// Returns the string presentation of the object @@ -48,7 +48,7 @@ public GetUsage400ResponseError() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class GetUsage400ResponseError {\n"); + sb.Append("class ForbiddenError {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append(" Errors: ").Append(Errors).Append("\n"); @@ -72,7 +72,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not GetUsage400ResponseError input) + if (obj is not ForbiddenError input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage200Response.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/IndexUsage.cs similarity index 85% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage200Response.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/IndexUsage.cs index 54f1288ee3..62201065a0 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage200Response.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/IndexUsage.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.Usage; /// -/// GetUsage200Response +/// IndexUsage /// -public partial class GetUsage200Response +public partial class IndexUsage { /// - /// Initializes a new instance of the GetUsage200Response class. + /// Initializes a new instance of the IndexUsage class. /// - public GetUsage200Response() + public IndexUsage() { } @@ -27,7 +27,7 @@ public GetUsage200Response() /// Gets or Sets Statistics /// [JsonPropertyName("statistics")] - public List Statistics { get; set; } + public List Statistics { get; set; } /// /// Returns the string presentation of the object @@ -36,7 +36,7 @@ public GetUsage200Response() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class GetUsage200Response {\n"); + sb.Append("class IndexUsage {\n"); sb.Append(" Statistics: ").Append(Statistics).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -58,7 +58,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not GetUsage200Response input) + if (obj is not IndexUsage input) { return false; } diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/InvalidRequest.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/InvalidRequest.cs new file mode 100644 index 0000000000..2b9fe531ce --- /dev/null +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/InvalidRequest.cs @@ -0,0 +1,95 @@ +// +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +// +using System; +using System.Text; +using System.Linq; +using System.Text.Json.Serialization; +using System.Collections.Generic; +using Algolia.Search.Serializer; +using System.Text.Json; + +namespace Algolia.Search.Models.Usage; + +/// +/// InvalidRequest +/// +public partial class InvalidRequest +{ + /// + /// Initializes a new instance of the InvalidRequest class. + /// + [JsonConstructor] + public InvalidRequest() { } + /// + /// Initializes a new instance of the InvalidRequest class. + /// + /// error (required). + public InvalidRequest(InvalidRequestError error) + { + Error = error ?? throw new ArgumentNullException(nameof(error)); + } + + /// + /// Gets or Sets Error + /// + [JsonPropertyName("error")] + public InvalidRequestError Error { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InvalidRequest {\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonSerializer.Serialize(this, JsonConfig.Options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is not InvalidRequest input) + { + return false; + } + + return + (Error == input.Error || (Error != null && Error.Equals(input.Error))); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (Error != null) + { + hashCode = (hashCode * 59) + Error.GetHashCode(); + } + return hashCode; + } + } + +} + diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/InvalidRequestError.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/InvalidRequestError.cs new file mode 100644 index 0000000000..0ed688da7b --- /dev/null +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/InvalidRequestError.cs @@ -0,0 +1,112 @@ +// +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +// +using System; +using System.Text; +using System.Linq; +using System.Text.Json.Serialization; +using System.Collections.Generic; +using Algolia.Search.Serializer; +using System.Text.Json; + +namespace Algolia.Search.Models.Usage; + +/// +/// InvalidRequestError +/// +public partial class InvalidRequestError +{ + /// + /// Initializes a new instance of the InvalidRequestError class. + /// + public InvalidRequestError() + { + } + + /// + /// Gets or Sets Code + /// + [JsonPropertyName("code")] + public string Code { get; set; } + + /// + /// Gets or Sets Message + /// + [JsonPropertyName("message")] + public string Message { get; set; } + + /// + /// Gets or Sets Errors + /// + [JsonPropertyName("errors")] + public List Errors { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InvalidRequestError {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonSerializer.Serialize(this, JsonConfig.Options); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is not InvalidRequestError input) + { + return false; + } + + return + (Code == input.Code || (Code != null && Code.Equals(input.Code))) && + (Message == input.Message || (Message != null && Message.Equals(input.Message))) && + (Errors == input.Errors || Errors != null && input.Errors != null && Errors.SequenceEqual(input.Errors)); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (Code != null) + { + hashCode = (hashCode * 59) + Code.GetHashCode(); + } + if (Message != null) + { + hashCode = (hashCode * 59) + Message.GetHashCode(); + } + if (Errors != null) + { + hashCode = (hashCode * 59) + Errors.GetHashCode(); + } + return hashCode; + } + } + +} + diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage200ResponseStatisticsInner.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/StatisticEntry.cs similarity index 86% rename from clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage200ResponseStatisticsInner.cs rename to clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/StatisticEntry.cs index 846f06d6ec..b63da7b61b 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/GetUsage200ResponseStatisticsInner.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Usage/StatisticEntry.cs @@ -12,14 +12,14 @@ namespace Algolia.Search.Models.Usage; /// -/// GetUsage200ResponseStatisticsInner +/// StatisticEntry /// -public partial class GetUsage200ResponseStatisticsInner +public partial class StatisticEntry { /// - /// Initializes a new instance of the GetUsage200ResponseStatisticsInner class. + /// Initializes a new instance of the StatisticEntry class. /// - public GetUsage200ResponseStatisticsInner() + public StatisticEntry() { } @@ -43,7 +43,7 @@ public GetUsage200ResponseStatisticsInner() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class GetUsage200ResponseStatisticsInner {\n"); + sb.Append("class StatisticEntry {\n"); sb.Append(" T: ").Append(T).Append("\n"); sb.Append(" V: ").Append(V).Append("\n"); sb.Append("}\n"); @@ -66,7 +66,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not GetUsage200ResponseStatisticsInner input) + if (obj is not StatisticEntry input) { return false; } diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch_lite.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch_lite.dart index 8830ca686a..4ef055975a 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch_lite.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch_lite.dart @@ -9,7 +9,6 @@ export 'src/model/acl.dart'; export 'src/model/advanced_syntax_features.dart'; export 'src/model/alternatives_as_exact.dart'; export 'src/model/api_key.dart'; -export 'src/model/around_precision_from_value_inner.dart'; export 'src/model/around_radius_all.dart'; export 'src/model/automatic_facet_filter.dart'; export 'src/model/base_get_api_key_response.dart'; @@ -53,6 +52,7 @@ export 'src/model/mode.dart'; export 'src/model/params.dart'; export 'src/model/personalization.dart'; export 'src/model/query_type.dart'; +export 'src/model/range.dart'; export 'src/model/ranking_info.dart'; export 'src/model/recommend_hit.dart'; export 'src/model/recommendations_hits.dart'; @@ -61,8 +61,8 @@ export 'src/model/recommended_for_you.dart'; export 'src/model/recommended_for_you_model.dart'; export 'src/model/recommended_for_you_query.dart'; export 'src/model/redirect.dart'; +export 'src/model/redirect_rule_index_data.dart'; export 'src/model/redirect_rule_index_metadata.dart'; -export 'src/model/redirect_rule_index_metadata_data.dart'; export 'src/model/redirect_url.dart'; export 'src/model/related_model.dart'; export 'src/model/related_products.dart'; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/deserialize.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/deserialize.dart index dbf5bba5c4..2ef3823dd6 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/deserialize.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/deserialize.dart @@ -2,7 +2,6 @@ import 'package:algoliasearch/src/model/acl.dart'; import 'package:algoliasearch/src/model/advanced_syntax_features.dart'; import 'package:algoliasearch/src/model/alternatives_as_exact.dart'; import 'package:algoliasearch/src/model/api_key.dart'; -import 'package:algoliasearch/src/model/around_precision_from_value_inner.dart'; import 'package:algoliasearch/src/model/around_radius_all.dart'; import 'package:algoliasearch/src/model/automatic_facet_filter.dart'; import 'package:algoliasearch/src/model/base_get_api_key_response.dart'; @@ -46,6 +45,7 @@ import 'package:algoliasearch/src/model/mode.dart'; import 'package:algoliasearch/src/model/params.dart'; import 'package:algoliasearch/src/model/personalization.dart'; import 'package:algoliasearch/src/model/query_type.dart'; +import 'package:algoliasearch/src/model/range.dart'; import 'package:algoliasearch/src/model/ranking_info.dart'; import 'package:algoliasearch/src/model/recommend_hit.dart'; import 'package:algoliasearch/src/model/recommendations_hits.dart'; @@ -54,8 +54,8 @@ import 'package:algoliasearch/src/model/recommended_for_you.dart'; import 'package:algoliasearch/src/model/recommended_for_you_model.dart'; import 'package:algoliasearch/src/model/recommended_for_you_query.dart'; import 'package:algoliasearch/src/model/redirect.dart'; +import 'package:algoliasearch/src/model/redirect_rule_index_data.dart'; import 'package:algoliasearch/src/model/redirect_rule_index_metadata.dart'; -import 'package:algoliasearch/src/model/redirect_rule_index_metadata_data.dart'; import 'package:algoliasearch/src/model/redirect_url.dart'; import 'package:algoliasearch/src/model/related_model.dart'; import 'package:algoliasearch/src/model/related_products.dart'; @@ -121,9 +121,6 @@ ReturnType deserialize(dynamic value, String targetType, return AlternativesAsExact.fromJson(value) as ReturnType; case 'ApiKey': return ApiKey.fromJson(value as Map) as ReturnType; - case 'AroundPrecisionFromValueInner': - return AroundPrecisionFromValueInner.fromJson( - value as Map) as ReturnType; case 'AroundRadiusAll': return AroundRadiusAll.fromJson(value) as ReturnType; case 'AutomaticFacetFilter': @@ -236,6 +233,8 @@ ReturnType deserialize(dynamic value, String targetType, as ReturnType; case 'QueryType': return QueryType.fromJson(value) as ReturnType; + case 'Range': + return Range.fromJson(value as Map) as ReturnType; case 'RankingInfo': return RankingInfo.fromJson(value as Map) as ReturnType; case 'RecommendHit': @@ -256,12 +255,12 @@ ReturnType deserialize(dynamic value, String targetType, as ReturnType; case 'Redirect': return Redirect.fromJson(value as Map) as ReturnType; + case 'RedirectRuleIndexData': + return RedirectRuleIndexData.fromJson(value as Map) + as ReturnType; case 'RedirectRuleIndexMetadata': return RedirectRuleIndexMetadata.fromJson(value as Map) as ReturnType; - case 'RedirectRuleIndexMetadataData': - return RedirectRuleIndexMetadataData.fromJson( - value as Map) as ReturnType; case 'RedirectURL': return RedirectURL.fromJson(value as Map) as ReturnType; case 'RelatedModel': diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.dart index 3baf3359fa..2fb3991c41 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params.dart @@ -130,7 +130,7 @@ final class BaseSearchParams { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.dart index 7d91ad7b14..e75567a400 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_search_params_without_query.dart @@ -125,7 +125,7 @@ final class BaseSearchParamsWithoutQuery { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart index a27195e7f8..f2c38f1165 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart @@ -183,7 +183,7 @@ final class BrowseParamsObject { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart index df7b2b8e2e..4117f93466 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart @@ -180,7 +180,7 @@ final class ConsequenceParams { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.dart index cf5ba7ff39..4091ceaad6 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.dart @@ -182,7 +182,7 @@ final class FallbackParams { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/range.dart similarity index 63% rename from clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.dart rename to clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/range.dart index b426c8727f..029577a5df 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/range.dart @@ -3,12 +3,12 @@ import 'package:json_annotation/json_annotation.dart'; -part 'around_precision_from_value_inner.g.dart'; +part 'range.g.dart'; @JsonSerializable() -final class AroundPrecisionFromValueInner { - /// Returns a new [AroundPrecisionFromValueInner] instance. - const AroundPrecisionFromValueInner({ +final class Range { + /// Returns a new [Range] instance. + const Range({ this.from, this.value, }); @@ -24,17 +24,14 @@ final class AroundPrecisionFromValueInner { @override bool operator ==(Object other) => identical(this, other) || - other is AroundPrecisionFromValueInner && - other.from == from && - other.value == value; + other is Range && other.from == from && other.value == value; @override int get hashCode => from.hashCode + value.hashCode; - factory AroundPrecisionFromValueInner.fromJson(Map json) => - _$AroundPrecisionFromValueInnerFromJson(json); + factory Range.fromJson(Map json) => _$RangeFromJson(json); - Map toJson() => _$AroundPrecisionFromValueInnerToJson(this); + Map toJson() => _$RangeToJson(this); @override String toString() { diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/range.g.dart similarity index 65% rename from clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.g.dart rename to clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/range.g.dart index 026e0551d3..223e9bd02e 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/range.g.dart @@ -1,18 +1,16 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'around_precision_from_value_inner.dart'; +part of 'range.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -AroundPrecisionFromValueInner _$AroundPrecisionFromValueInnerFromJson( - Map json) => - $checkedCreate( - 'AroundPrecisionFromValueInner', +Range _$RangeFromJson(Map json) => $checkedCreate( + 'Range', json, ($checkedConvert) { - final val = AroundPrecisionFromValueInner( + final val = Range( from: $checkedConvert('from', (v) => (v as num?)?.toInt()), value: $checkedConvert('value', (v) => (v as num?)?.toInt()), ); @@ -20,8 +18,7 @@ AroundPrecisionFromValueInner _$AroundPrecisionFromValueInnerFromJson( }, ); -Map _$AroundPrecisionFromValueInnerToJson( - AroundPrecisionFromValueInner instance) { +Map _$RangeToJson(Range instance) { final val = {}; void writeNotNull(String key, dynamic value) { diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata_data.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_data.dart similarity index 54% rename from clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata_data.dart rename to clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_data.dart index f9bba71211..55f0f0e368 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata_data.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_data.dart @@ -3,12 +3,12 @@ import 'package:json_annotation/json_annotation.dart'; -part 'redirect_rule_index_metadata_data.g.dart'; +part 'redirect_rule_index_data.g.dart'; @JsonSerializable() -final class RedirectRuleIndexMetadataData { - /// Returns a new [RedirectRuleIndexMetadataData] instance. - const RedirectRuleIndexMetadataData({ +final class RedirectRuleIndexData { + /// Returns a new [RedirectRuleIndexData] instance. + const RedirectRuleIndexData({ required this.ruleObjectID, }); @@ -18,16 +18,15 @@ final class RedirectRuleIndexMetadataData { @override bool operator ==(Object other) => identical(this, other) || - other is RedirectRuleIndexMetadataData && - other.ruleObjectID == ruleObjectID; + other is RedirectRuleIndexData && other.ruleObjectID == ruleObjectID; @override int get hashCode => ruleObjectID.hashCode; - factory RedirectRuleIndexMetadataData.fromJson(Map json) => - _$RedirectRuleIndexMetadataDataFromJson(json); + factory RedirectRuleIndexData.fromJson(Map json) => + _$RedirectRuleIndexDataFromJson(json); - Map toJson() => _$RedirectRuleIndexMetadataDataToJson(this); + Map toJson() => _$RedirectRuleIndexDataToJson(this); @override String toString() { diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata_data.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_data.g.dart similarity index 62% rename from clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata_data.g.dart rename to clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_data.g.dart index c994c4ce10..a038eb9225 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata_data.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_data.g.dart @@ -1,26 +1,26 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'redirect_rule_index_metadata_data.dart'; +part of 'redirect_rule_index_data.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -RedirectRuleIndexMetadataData _$RedirectRuleIndexMetadataDataFromJson( +RedirectRuleIndexData _$RedirectRuleIndexDataFromJson( Map json) => $checkedCreate( - 'RedirectRuleIndexMetadataData', + 'RedirectRuleIndexData', json, ($checkedConvert) { - final val = RedirectRuleIndexMetadataData( + final val = RedirectRuleIndexData( ruleObjectID: $checkedConvert('ruleObjectID', (v) => v as String), ); return val; }, ); -Map _$RedirectRuleIndexMetadataDataToJson( - RedirectRuleIndexMetadataData instance) => +Map _$RedirectRuleIndexDataToJson( + RedirectRuleIndexData instance) => { 'ruleObjectID': instance.ruleObjectID, }; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata.dart index 8b4934f870..58af1438dc 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata.dart @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. // ignore_for_file: unused_element -import 'package:algoliasearch/src/model/redirect_rule_index_metadata_data.dart'; +import 'package:algoliasearch/src/model/redirect_rule_index_data.dart'; import 'package:json_annotation/json_annotation.dart'; @@ -34,7 +34,7 @@ final class RedirectRuleIndexMetadata { final bool succeed; @JsonKey(name: r'data') - final RedirectRuleIndexMetadataData data; + final RedirectRuleIndexData data; @override bool operator ==(Object other) => diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata.g.dart index d2e1897f87..91cb7e5991 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata.g.dart @@ -17,10 +17,8 @@ RedirectRuleIndexMetadata _$RedirectRuleIndexMetadataFromJson( dest: $checkedConvert('dest', (v) => v as String), reason: $checkedConvert('reason', (v) => v as String), succeed: $checkedConvert('succeed', (v) => v as bool), - data: $checkedConvert( - 'data', - (v) => RedirectRuleIndexMetadataData.fromJson( - v as Map)), + data: $checkedConvert('data', + (v) => RedirectRuleIndexData.fromJson(v as Map)), ); return val; }, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart index 0e9ba3a974..90e219873a 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart @@ -187,7 +187,7 @@ final class SearchForFacets { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart index 7710edc354..60925794b8 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart @@ -185,7 +185,7 @@ final class SearchForHits { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params.dart index b9d29c45b1..7ad1bf1802 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params.dart @@ -182,7 +182,7 @@ final class SearchParams { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart index 65bdb5629a..87f9af398b 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart @@ -182,7 +182,7 @@ final class SearchParamsObject { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/algolia_client_recommend.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/algolia_client_recommend.dart index 53141f935f..9880b6a87e 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/algolia_client_recommend.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/algolia_client_recommend.dart @@ -7,7 +7,6 @@ export 'src/api/recommend_client.dart'; export 'src/model/advanced_syntax_features.dart'; export 'src/model/alternatives_as_exact.dart'; -export 'src/model/around_precision_from_value_inner.dart'; export 'src/model/around_radius_all.dart'; export 'src/model/auto_facet_filter.dart'; export 'src/model/base_recommend_request.dart'; @@ -43,25 +42,26 @@ export 'src/model/params_consequence.dart'; export 'src/model/personalization.dart'; export 'src/model/promote_consequence_object.dart'; export 'src/model/query_type.dart'; +export 'src/model/range.dart'; export 'src/model/ranking_info.dart'; export 'src/model/recommend_hit.dart'; export 'src/model/recommend_models.dart'; export 'src/model/recommend_rule.dart'; -export 'src/model/recommend_rule_metadata.dart'; export 'src/model/recommendations_hits.dart'; export 'src/model/recommendations_results.dart'; export 'src/model/recommended_for_you.dart'; export 'src/model/recommended_for_you_model.dart'; export 'src/model/recommended_for_you_query.dart'; export 'src/model/redirect.dart'; +export 'src/model/redirect_rule_index_data.dart'; export 'src/model/redirect_rule_index_metadata.dart'; -export 'src/model/redirect_rule_index_metadata_data.dart'; export 'src/model/redirect_url.dart'; export 'src/model/related_model.dart'; export 'src/model/related_products.dart'; export 'src/model/related_query.dart'; export 'src/model/remove_words_if_no_results.dart'; export 'src/model/rendering_content.dart'; +export 'src/model/rule_metadata.dart'; export 'src/model/search_pagination.dart'; export 'src/model/search_params.dart'; export 'src/model/search_params_object.dart'; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/deserialize.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/deserialize.dart index 54ab8bb6f2..d65bec024b 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/deserialize.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/deserialize.dart @@ -1,6 +1,5 @@ import 'package:algolia_client_recommend/src/model/advanced_syntax_features.dart'; import 'package:algolia_client_recommend/src/model/alternatives_as_exact.dart'; -import 'package:algolia_client_recommend/src/model/around_precision_from_value_inner.dart'; import 'package:algolia_client_recommend/src/model/around_radius_all.dart'; import 'package:algolia_client_recommend/src/model/auto_facet_filter.dart'; import 'package:algolia_client_recommend/src/model/base_recommend_request.dart'; @@ -36,25 +35,26 @@ import 'package:algolia_client_recommend/src/model/params_consequence.dart'; import 'package:algolia_client_recommend/src/model/personalization.dart'; import 'package:algolia_client_recommend/src/model/promote_consequence_object.dart'; import 'package:algolia_client_recommend/src/model/query_type.dart'; +import 'package:algolia_client_recommend/src/model/range.dart'; import 'package:algolia_client_recommend/src/model/ranking_info.dart'; import 'package:algolia_client_recommend/src/model/recommend_hit.dart'; import 'package:algolia_client_recommend/src/model/recommend_models.dart'; import 'package:algolia_client_recommend/src/model/recommend_rule.dart'; -import 'package:algolia_client_recommend/src/model/recommend_rule_metadata.dart'; import 'package:algolia_client_recommend/src/model/recommendations_hits.dart'; import 'package:algolia_client_recommend/src/model/recommendations_results.dart'; import 'package:algolia_client_recommend/src/model/recommended_for_you.dart'; import 'package:algolia_client_recommend/src/model/recommended_for_you_model.dart'; import 'package:algolia_client_recommend/src/model/recommended_for_you_query.dart'; import 'package:algolia_client_recommend/src/model/redirect.dart'; +import 'package:algolia_client_recommend/src/model/redirect_rule_index_data.dart'; import 'package:algolia_client_recommend/src/model/redirect_rule_index_metadata.dart'; -import 'package:algolia_client_recommend/src/model/redirect_rule_index_metadata_data.dart'; import 'package:algolia_client_recommend/src/model/redirect_url.dart'; import 'package:algolia_client_recommend/src/model/related_model.dart'; import 'package:algolia_client_recommend/src/model/related_products.dart'; import 'package:algolia_client_recommend/src/model/related_query.dart'; import 'package:algolia_client_recommend/src/model/remove_words_if_no_results.dart'; import 'package:algolia_client_recommend/src/model/rendering_content.dart'; +import 'package:algolia_client_recommend/src/model/rule_metadata.dart'; import 'package:algolia_client_recommend/src/model/search_pagination.dart'; import 'package:algolia_client_recommend/src/model/search_params.dart'; import 'package:algolia_client_recommend/src/model/search_params_object.dart'; @@ -99,9 +99,6 @@ ReturnType deserialize(dynamic value, String targetType, return AdvancedSyntaxFeatures.fromJson(value) as ReturnType; case 'AlternativesAsExact': return AlternativesAsExact.fromJson(value) as ReturnType; - case 'AroundPrecisionFromValueInner': - return AroundPrecisionFromValueInner.fromJson( - value as Map) as ReturnType; case 'AroundRadiusAll': return AroundRadiusAll.fromJson(value) as ReturnType; case 'AutoFacetFilter': @@ -194,6 +191,8 @@ ReturnType deserialize(dynamic value, String targetType, as ReturnType; case 'QueryType': return QueryType.fromJson(value) as ReturnType; + case 'Range': + return Range.fromJson(value as Map) as ReturnType; case 'RankingInfo': return RankingInfo.fromJson(value as Map) as ReturnType; case 'RecommendHit': @@ -203,9 +202,6 @@ ReturnType deserialize(dynamic value, String targetType, case 'RecommendRule': return RecommendRule.fromJson(value as Map) as ReturnType; - case 'RecommendRuleMetadata': - return RecommendRuleMetadata.fromJson(value as Map) - as ReturnType; case 'RecommendationsHits': return RecommendationsHits.fromJson(value as Map) as ReturnType; @@ -222,12 +218,12 @@ ReturnType deserialize(dynamic value, String targetType, as ReturnType; case 'Redirect': return Redirect.fromJson(value as Map) as ReturnType; + case 'RedirectRuleIndexData': + return RedirectRuleIndexData.fromJson(value as Map) + as ReturnType; case 'RedirectRuleIndexMetadata': return RedirectRuleIndexMetadata.fromJson(value as Map) as ReturnType; - case 'RedirectRuleIndexMetadataData': - return RedirectRuleIndexMetadataData.fromJson( - value as Map) as ReturnType; case 'RedirectURL': return RedirectURL.fromJson(value as Map) as ReturnType; case 'RelatedModel': @@ -242,6 +238,8 @@ ReturnType deserialize(dynamic value, String targetType, case 'RenderingContent': return RenderingContent.fromJson(value as Map) as ReturnType; + case 'RuleMetadata': + return RuleMetadata.fromJson(value as Map) as ReturnType; case 'SearchPagination': return SearchPagination.fromJson(value as Map) as ReturnType; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.dart index 340cfc79c8..0804061fd4 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params.dart @@ -130,7 +130,7 @@ final class BaseSearchParams { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.dart index 982fba8f77..adeb385877 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_search_params_without_query.dart @@ -125,7 +125,7 @@ final class BaseSearchParamsWithoutQuery { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.dart index 154a3a4cbc..e139409f2b 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.dart @@ -182,7 +182,7 @@ final class FallbackParams { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/range.dart similarity index 63% rename from clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.dart rename to clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/range.dart index b426c8727f..029577a5df 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/range.dart @@ -3,12 +3,12 @@ import 'package:json_annotation/json_annotation.dart'; -part 'around_precision_from_value_inner.g.dart'; +part 'range.g.dart'; @JsonSerializable() -final class AroundPrecisionFromValueInner { - /// Returns a new [AroundPrecisionFromValueInner] instance. - const AroundPrecisionFromValueInner({ +final class Range { + /// Returns a new [Range] instance. + const Range({ this.from, this.value, }); @@ -24,17 +24,14 @@ final class AroundPrecisionFromValueInner { @override bool operator ==(Object other) => identical(this, other) || - other is AroundPrecisionFromValueInner && - other.from == from && - other.value == value; + other is Range && other.from == from && other.value == value; @override int get hashCode => from.hashCode + value.hashCode; - factory AroundPrecisionFromValueInner.fromJson(Map json) => - _$AroundPrecisionFromValueInnerFromJson(json); + factory Range.fromJson(Map json) => _$RangeFromJson(json); - Map toJson() => _$AroundPrecisionFromValueInnerToJson(this); + Map toJson() => _$RangeToJson(this); @override String toString() { diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/range.g.dart similarity index 65% rename from clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.g.dart rename to clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/range.g.dart index 026e0551d3..223e9bd02e 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/around_precision_from_value_inner.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/range.g.dart @@ -1,18 +1,16 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'around_precision_from_value_inner.dart'; +part of 'range.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -AroundPrecisionFromValueInner _$AroundPrecisionFromValueInnerFromJson( - Map json) => - $checkedCreate( - 'AroundPrecisionFromValueInner', +Range _$RangeFromJson(Map json) => $checkedCreate( + 'Range', json, ($checkedConvert) { - final val = AroundPrecisionFromValueInner( + final val = Range( from: $checkedConvert('from', (v) => (v as num?)?.toInt()), value: $checkedConvert('value', (v) => (v as num?)?.toInt()), ); @@ -20,8 +18,7 @@ AroundPrecisionFromValueInner _$AroundPrecisionFromValueInnerFromJson( }, ); -Map _$AroundPrecisionFromValueInnerToJson( - AroundPrecisionFromValueInner instance) { +Map _$RangeToJson(Range instance) { final val = {}; void writeNotNull(String key, dynamic value) { diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule.dart index f81bd9c859..a8500168f7 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule.dart @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. // ignore_for_file: unused_element -import 'package:algolia_client_recommend/src/model/recommend_rule_metadata.dart'; import 'package:algolia_client_recommend/src/model/condition.dart'; +import 'package:algolia_client_recommend/src/model/rule_metadata.dart'; import 'package:algolia_client_recommend/src/model/consequence.dart'; import 'package:json_annotation/json_annotation.dart'; @@ -21,7 +21,7 @@ final class RecommendRule { }); @JsonKey(name: r'_metadata') - final RecommendRuleMetadata? metadata; + final RuleMetadata? metadata; /// Unique identifier of a rule object. @JsonKey(name: r'objectID') diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule.g.dart index b04850c798..d62bdfe882 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule.g.dart @@ -16,7 +16,7 @@ RecommendRule _$RecommendRuleFromJson(Map json) => '_metadata', (v) => v == null ? null - : RecommendRuleMetadata.fromJson(v as Map)), + : RuleMetadata.fromJson(v as Map)), objectID: $checkedConvert('objectID', (v) => v as String?), condition: $checkedConvert( 'condition', diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata_data.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_data.dart similarity index 54% rename from clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata_data.dart rename to clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_data.dart index f9bba71211..55f0f0e368 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata_data.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_data.dart @@ -3,12 +3,12 @@ import 'package:json_annotation/json_annotation.dart'; -part 'redirect_rule_index_metadata_data.g.dart'; +part 'redirect_rule_index_data.g.dart'; @JsonSerializable() -final class RedirectRuleIndexMetadataData { - /// Returns a new [RedirectRuleIndexMetadataData] instance. - const RedirectRuleIndexMetadataData({ +final class RedirectRuleIndexData { + /// Returns a new [RedirectRuleIndexData] instance. + const RedirectRuleIndexData({ required this.ruleObjectID, }); @@ -18,16 +18,15 @@ final class RedirectRuleIndexMetadataData { @override bool operator ==(Object other) => identical(this, other) || - other is RedirectRuleIndexMetadataData && - other.ruleObjectID == ruleObjectID; + other is RedirectRuleIndexData && other.ruleObjectID == ruleObjectID; @override int get hashCode => ruleObjectID.hashCode; - factory RedirectRuleIndexMetadataData.fromJson(Map json) => - _$RedirectRuleIndexMetadataDataFromJson(json); + factory RedirectRuleIndexData.fromJson(Map json) => + _$RedirectRuleIndexDataFromJson(json); - Map toJson() => _$RedirectRuleIndexMetadataDataToJson(this); + Map toJson() => _$RedirectRuleIndexDataToJson(this); @override String toString() { diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata_data.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_data.g.dart similarity index 62% rename from clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata_data.g.dart rename to clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_data.g.dart index c994c4ce10..a038eb9225 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata_data.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_data.g.dart @@ -1,26 +1,26 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'redirect_rule_index_metadata_data.dart'; +part of 'redirect_rule_index_data.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -RedirectRuleIndexMetadataData _$RedirectRuleIndexMetadataDataFromJson( +RedirectRuleIndexData _$RedirectRuleIndexDataFromJson( Map json) => $checkedCreate( - 'RedirectRuleIndexMetadataData', + 'RedirectRuleIndexData', json, ($checkedConvert) { - final val = RedirectRuleIndexMetadataData( + final val = RedirectRuleIndexData( ruleObjectID: $checkedConvert('ruleObjectID', (v) => v as String), ); return val; }, ); -Map _$RedirectRuleIndexMetadataDataToJson( - RedirectRuleIndexMetadataData instance) => +Map _$RedirectRuleIndexDataToJson( + RedirectRuleIndexData instance) => { 'ruleObjectID': instance.ruleObjectID, }; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata.dart index 9ac021c011..0358abcaea 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata.dart @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. // ignore_for_file: unused_element -import 'package:algolia_client_recommend/src/model/redirect_rule_index_metadata_data.dart'; +import 'package:algolia_client_recommend/src/model/redirect_rule_index_data.dart'; import 'package:json_annotation/json_annotation.dart'; @@ -34,7 +34,7 @@ final class RedirectRuleIndexMetadata { final bool succeed; @JsonKey(name: r'data') - final RedirectRuleIndexMetadataData data; + final RedirectRuleIndexData data; @override bool operator ==(Object other) => diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata.g.dart index d2e1897f87..91cb7e5991 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/redirect_rule_index_metadata.g.dart @@ -17,10 +17,8 @@ RedirectRuleIndexMetadata _$RedirectRuleIndexMetadataFromJson( dest: $checkedConvert('dest', (v) => v as String), reason: $checkedConvert('reason', (v) => v as String), succeed: $checkedConvert('succeed', (v) => v as bool), - data: $checkedConvert( - 'data', - (v) => RedirectRuleIndexMetadataData.fromJson( - v as Map)), + data: $checkedConvert('data', + (v) => RedirectRuleIndexData.fromJson(v as Map)), ); return val; }, diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule_metadata.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/rule_metadata.dart similarity index 61% rename from clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule_metadata.dart rename to clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/rule_metadata.dart index 2f01ee3f81..0ddcfdb7c6 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule_metadata.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/rule_metadata.dart @@ -3,12 +3,12 @@ import 'package:json_annotation/json_annotation.dart'; -part 'recommend_rule_metadata.g.dart'; +part 'rule_metadata.g.dart'; @JsonSerializable() -final class RecommendRuleMetadata { - /// Returns a new [RecommendRuleMetadata] instance. - const RecommendRuleMetadata({ +final class RuleMetadata { + /// Returns a new [RuleMetadata] instance. + const RuleMetadata({ this.lastUpdate, }); @@ -19,15 +19,15 @@ final class RecommendRuleMetadata { @override bool operator ==(Object other) => identical(this, other) || - other is RecommendRuleMetadata && other.lastUpdate == lastUpdate; + other is RuleMetadata && other.lastUpdate == lastUpdate; @override int get hashCode => lastUpdate.hashCode; - factory RecommendRuleMetadata.fromJson(Map json) => - _$RecommendRuleMetadataFromJson(json); + factory RuleMetadata.fromJson(Map json) => + _$RuleMetadataFromJson(json); - Map toJson() => _$RecommendRuleMetadataToJson(this); + Map toJson() => _$RuleMetadataToJson(this); @override String toString() { diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule_metadata.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/rule_metadata.g.dart similarity index 67% rename from clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule_metadata.g.dart rename to clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/rule_metadata.g.dart index 30dcaaff20..518d3aeaf1 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_rule_metadata.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/rule_metadata.g.dart @@ -1,26 +1,24 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'recommend_rule_metadata.dart'; +part of 'rule_metadata.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -RecommendRuleMetadata _$RecommendRuleMetadataFromJson( - Map json) => +RuleMetadata _$RuleMetadataFromJson(Map json) => $checkedCreate( - 'RecommendRuleMetadata', + 'RuleMetadata', json, ($checkedConvert) { - final val = RecommendRuleMetadata( + final val = RuleMetadata( lastUpdate: $checkedConvert('lastUpdate', (v) => v as String?), ); return val; }, ); -Map _$RecommendRuleMetadataToJson( - RecommendRuleMetadata instance) { +Map _$RuleMetadataToJson(RuleMetadata instance) { final val = {}; void writeNotNull(String key, dynamic value) { diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params.dart index a648ca4959..f86353606b 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params.dart @@ -182,7 +182,7 @@ final class SearchParams { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.dart index f3d0664750..134903a24e 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/search_params_object.dart @@ -182,7 +182,7 @@ final class SearchParamsObject { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart index 944b6439b6..0cb5134e2c 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart @@ -13,7 +13,6 @@ export 'src/model/alternatives_as_exact.dart'; export 'src/model/anchoring.dart'; export 'src/model/api_key.dart'; export 'src/model/api_key_operation.dart'; -export 'src/model/around_precision_from_value_inner.dart'; export 'src/model/around_radius_all.dart'; export 'src/model/assign_user_id_params.dart'; export 'src/model/automatic_facet_filter.dart'; @@ -94,10 +93,11 @@ export 'src/model/personalization.dart'; export 'src/model/promote_object_id.dart'; export 'src/model/promote_object_ids.dart'; export 'src/model/query_type.dart'; +export 'src/model/range.dart'; export 'src/model/ranking_info.dart'; export 'src/model/redirect.dart'; +export 'src/model/redirect_rule_index_data.dart'; export 'src/model/redirect_rule_index_metadata.dart'; -export 'src/model/redirect_rule_index_metadata_data.dart'; export 'src/model/redirect_url.dart'; export 'src/model/remove_user_id_response.dart'; export 'src/model/remove_words_if_no_results.dart'; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart index c4fefcede3..4299423243 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart @@ -6,7 +6,6 @@ import 'package:algolia_client_search/src/model/alternatives_as_exact.dart'; import 'package:algolia_client_search/src/model/anchoring.dart'; import 'package:algolia_client_search/src/model/api_key.dart'; import 'package:algolia_client_search/src/model/api_key_operation.dart'; -import 'package:algolia_client_search/src/model/around_precision_from_value_inner.dart'; import 'package:algolia_client_search/src/model/around_radius_all.dart'; import 'package:algolia_client_search/src/model/assign_user_id_params.dart'; import 'package:algolia_client_search/src/model/automatic_facet_filter.dart'; @@ -87,10 +86,11 @@ import 'package:algolia_client_search/src/model/personalization.dart'; import 'package:algolia_client_search/src/model/promote_object_id.dart'; import 'package:algolia_client_search/src/model/promote_object_ids.dart'; import 'package:algolia_client_search/src/model/query_type.dart'; +import 'package:algolia_client_search/src/model/range.dart'; import 'package:algolia_client_search/src/model/ranking_info.dart'; import 'package:algolia_client_search/src/model/redirect.dart'; +import 'package:algolia_client_search/src/model/redirect_rule_index_data.dart'; import 'package:algolia_client_search/src/model/redirect_rule_index_metadata.dart'; -import 'package:algolia_client_search/src/model/redirect_rule_index_metadata_data.dart'; import 'package:algolia_client_search/src/model/redirect_url.dart'; import 'package:algolia_client_search/src/model/remove_user_id_response.dart'; import 'package:algolia_client_search/src/model/remove_words_if_no_results.dart'; @@ -185,9 +185,6 @@ ReturnType deserialize(dynamic value, String targetType, return ApiKey.fromJson(value as Map) as ReturnType; case 'ApiKeyOperation': return ApiKeyOperation.fromJson(value) as ReturnType; - case 'AroundPrecisionFromValueInner': - return AroundPrecisionFromValueInner.fromJson( - value as Map) as ReturnType; case 'AroundRadiusAll': return AroundRadiusAll.fromJson(value) as ReturnType; case 'AssignUserIdParams': @@ -399,16 +396,18 @@ ReturnType deserialize(dynamic value, String targetType, as ReturnType; case 'QueryType': return QueryType.fromJson(value) as ReturnType; + case 'Range': + return Range.fromJson(value as Map) as ReturnType; case 'RankingInfo': return RankingInfo.fromJson(value as Map) as ReturnType; case 'Redirect': return Redirect.fromJson(value as Map) as ReturnType; + case 'RedirectRuleIndexData': + return RedirectRuleIndexData.fromJson(value as Map) + as ReturnType; case 'RedirectRuleIndexMetadata': return RedirectRuleIndexMetadata.fromJson(value as Map) as ReturnType; - case 'RedirectRuleIndexMetadataData': - return RedirectRuleIndexMetadataData.fromJson( - value as Map) as ReturnType; case 'RedirectURL': return RedirectURL.fromJson(value as Map) as ReturnType; case 'RemoveUserIdResponse': diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.dart index 7613849303..7208b6dfe1 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params.dart @@ -130,7 +130,7 @@ final class BaseSearchParams { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.dart index a24895008b..ca67cc9d13 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_search_params_without_query.dart @@ -125,7 +125,7 @@ final class BaseSearchParamsWithoutQuery { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart index 69e1932c8c..c9d7544ee4 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart @@ -183,7 +183,7 @@ final class BrowseParamsObject { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart index e502559844..15bf975220 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart @@ -180,7 +180,7 @@ final class ConsequenceParams { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/range.dart similarity index 63% rename from clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.dart rename to clients/algoliasearch-client-dart/packages/client_search/lib/src/model/range.dart index b426c8727f..029577a5df 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/around_precision_from_value_inner.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/range.dart @@ -3,12 +3,12 @@ import 'package:json_annotation/json_annotation.dart'; -part 'around_precision_from_value_inner.g.dart'; +part 'range.g.dart'; @JsonSerializable() -final class AroundPrecisionFromValueInner { - /// Returns a new [AroundPrecisionFromValueInner] instance. - const AroundPrecisionFromValueInner({ +final class Range { + /// Returns a new [Range] instance. + const Range({ this.from, this.value, }); @@ -24,17 +24,14 @@ final class AroundPrecisionFromValueInner { @override bool operator ==(Object other) => identical(this, other) || - other is AroundPrecisionFromValueInner && - other.from == from && - other.value == value; + other is Range && other.from == from && other.value == value; @override int get hashCode => from.hashCode + value.hashCode; - factory AroundPrecisionFromValueInner.fromJson(Map json) => - _$AroundPrecisionFromValueInnerFromJson(json); + factory Range.fromJson(Map json) => _$RangeFromJson(json); - Map toJson() => _$AroundPrecisionFromValueInnerToJson(this); + Map toJson() => _$RangeToJson(this); @override String toString() { diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/range.g.dart similarity index 65% rename from clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.g.dart rename to clients/algoliasearch-client-dart/packages/client_search/lib/src/model/range.g.dart index 026e0551d3..223e9bd02e 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/around_precision_from_value_inner.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/range.g.dart @@ -1,18 +1,16 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'around_precision_from_value_inner.dart'; +part of 'range.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -AroundPrecisionFromValueInner _$AroundPrecisionFromValueInnerFromJson( - Map json) => - $checkedCreate( - 'AroundPrecisionFromValueInner', +Range _$RangeFromJson(Map json) => $checkedCreate( + 'Range', json, ($checkedConvert) { - final val = AroundPrecisionFromValueInner( + final val = Range( from: $checkedConvert('from', (v) => (v as num?)?.toInt()), value: $checkedConvert('value', (v) => (v as num?)?.toInt()), ); @@ -20,8 +18,7 @@ AroundPrecisionFromValueInner _$AroundPrecisionFromValueInnerFromJson( }, ); -Map _$AroundPrecisionFromValueInnerToJson( - AroundPrecisionFromValueInner instance) { +Map _$RangeToJson(Range instance) { final val = {}; void writeNotNull(String key, dynamic value) { diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata_data.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_data.dart similarity index 54% rename from clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata_data.dart rename to clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_data.dart index f9bba71211..55f0f0e368 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata_data.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_data.dart @@ -3,12 +3,12 @@ import 'package:json_annotation/json_annotation.dart'; -part 'redirect_rule_index_metadata_data.g.dart'; +part 'redirect_rule_index_data.g.dart'; @JsonSerializable() -final class RedirectRuleIndexMetadataData { - /// Returns a new [RedirectRuleIndexMetadataData] instance. - const RedirectRuleIndexMetadataData({ +final class RedirectRuleIndexData { + /// Returns a new [RedirectRuleIndexData] instance. + const RedirectRuleIndexData({ required this.ruleObjectID, }); @@ -18,16 +18,15 @@ final class RedirectRuleIndexMetadataData { @override bool operator ==(Object other) => identical(this, other) || - other is RedirectRuleIndexMetadataData && - other.ruleObjectID == ruleObjectID; + other is RedirectRuleIndexData && other.ruleObjectID == ruleObjectID; @override int get hashCode => ruleObjectID.hashCode; - factory RedirectRuleIndexMetadataData.fromJson(Map json) => - _$RedirectRuleIndexMetadataDataFromJson(json); + factory RedirectRuleIndexData.fromJson(Map json) => + _$RedirectRuleIndexDataFromJson(json); - Map toJson() => _$RedirectRuleIndexMetadataDataToJson(this); + Map toJson() => _$RedirectRuleIndexDataToJson(this); @override String toString() { diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata_data.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_data.g.dart similarity index 62% rename from clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata_data.g.dart rename to clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_data.g.dart index c994c4ce10..a038eb9225 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/redirect_rule_index_metadata_data.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_data.g.dart @@ -1,26 +1,26 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'redirect_rule_index_metadata_data.dart'; +part of 'redirect_rule_index_data.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -RedirectRuleIndexMetadataData _$RedirectRuleIndexMetadataDataFromJson( +RedirectRuleIndexData _$RedirectRuleIndexDataFromJson( Map json) => $checkedCreate( - 'RedirectRuleIndexMetadataData', + 'RedirectRuleIndexData', json, ($checkedConvert) { - final val = RedirectRuleIndexMetadataData( + final val = RedirectRuleIndexData( ruleObjectID: $checkedConvert('ruleObjectID', (v) => v as String), ); return val; }, ); -Map _$RedirectRuleIndexMetadataDataToJson( - RedirectRuleIndexMetadataData instance) => +Map _$RedirectRuleIndexDataToJson( + RedirectRuleIndexData instance) => { 'ruleObjectID': instance.ruleObjectID, }; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata.dart index eb89fdb03f..9df7eb07da 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata.dart @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. // ignore_for_file: unused_element -import 'package:algolia_client_search/src/model/redirect_rule_index_metadata_data.dart'; +import 'package:algolia_client_search/src/model/redirect_rule_index_data.dart'; import 'package:json_annotation/json_annotation.dart'; @@ -34,7 +34,7 @@ final class RedirectRuleIndexMetadata { final bool succeed; @JsonKey(name: r'data') - final RedirectRuleIndexMetadataData data; + final RedirectRuleIndexData data; @override bool operator ==(Object other) => diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata.g.dart index d2e1897f87..91cb7e5991 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/redirect_rule_index_metadata.g.dart @@ -17,10 +17,8 @@ RedirectRuleIndexMetadata _$RedirectRuleIndexMetadataFromJson( dest: $checkedConvert('dest', (v) => v as String), reason: $checkedConvert('reason', (v) => v as String), succeed: $checkedConvert('succeed', (v) => v as bool), - data: $checkedConvert( - 'data', - (v) => RedirectRuleIndexMetadataData.fromJson( - v as Map)), + data: $checkedConvert('data', + (v) => RedirectRuleIndexData.fromJson(v as Map)), ); return val; }, diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart index 4c1768ff9e..8ef7649504 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart @@ -192,7 +192,7 @@ final class SearchForFacets { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart index c36b8e3420..4b4c4ce5b3 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart @@ -190,7 +190,7 @@ final class SearchForHits { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart index 90a95075f1..92c56835a3 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart @@ -182,7 +182,7 @@ final class SearchParamsObject { final dynamic aroundRadius; /// One of types: - /// - [List] + /// - [List] /// - [int] @JsonKey(name: r'aroundPrecision') final dynamic aroundPrecision; diff --git a/clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects_empty_search.go b/clients/algoliasearch-client-go/algolia/abtesting/model_empty_search_filter.go similarity index 60% rename from clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects_empty_search.go rename to clients/algoliasearch-client-go/algolia/abtesting/model_empty_search_filter.go index 5828cd6365..529c42e384 100644 --- a/clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects_empty_search.go +++ b/clients/algoliasearch-client-go/algolia/abtesting/model_empty_search_filter.go @@ -6,47 +6,47 @@ import ( "fmt" ) -// FilterEffectsEmptySearch Empty searches removed from the A/B test as a result of configuration settings. -type FilterEffectsEmptySearch struct { +// EmptySearchFilter Empty searches removed from the A/B test as a result of configuration settings. +type EmptySearchFilter struct { // Number of users removed from the A/B test. UsersCount *int32 `json:"usersCount,omitempty"` // Number of tracked searches removed from the A/B test. TrackedSearchesCount *int32 `json:"trackedSearchesCount,omitempty"` } -type FilterEffectsEmptySearchOption func(f *FilterEffectsEmptySearch) +type EmptySearchFilterOption func(f *EmptySearchFilter) -func WithFilterEffectsEmptySearchUsersCount(val int32) FilterEffectsEmptySearchOption { - return func(f *FilterEffectsEmptySearch) { +func WithEmptySearchFilterUsersCount(val int32) EmptySearchFilterOption { + return func(f *EmptySearchFilter) { f.UsersCount = &val } } -func WithFilterEffectsEmptySearchTrackedSearchesCount(val int32) FilterEffectsEmptySearchOption { - return func(f *FilterEffectsEmptySearch) { +func WithEmptySearchFilterTrackedSearchesCount(val int32) EmptySearchFilterOption { + return func(f *EmptySearchFilter) { f.TrackedSearchesCount = &val } } -// NewFilterEffectsEmptySearch instantiates a new FilterEffectsEmptySearch object +// NewEmptySearchFilter instantiates a new EmptySearchFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewFilterEffectsEmptySearch(opts ...FilterEffectsEmptySearchOption) *FilterEffectsEmptySearch { - this := &FilterEffectsEmptySearch{} +func NewEmptySearchFilter(opts ...EmptySearchFilterOption) *EmptySearchFilter { + this := &EmptySearchFilter{} for _, opt := range opts { opt(this) } return this } -// NewEmptyFilterEffectsEmptySearch return a pointer to an empty FilterEffectsEmptySearch object. -func NewEmptyFilterEffectsEmptySearch() *FilterEffectsEmptySearch { - return &FilterEffectsEmptySearch{} +// NewEmptyEmptySearchFilter return a pointer to an empty EmptySearchFilter object. +func NewEmptyEmptySearchFilter() *EmptySearchFilter { + return &EmptySearchFilter{} } // GetUsersCount returns the UsersCount field value if set, zero value otherwise. -func (o *FilterEffectsEmptySearch) GetUsersCount() int32 { +func (o *EmptySearchFilter) GetUsersCount() int32 { if o == nil || o.UsersCount == nil { var ret int32 return ret @@ -56,7 +56,7 @@ func (o *FilterEffectsEmptySearch) GetUsersCount() int32 { // GetUsersCountOk returns a tuple with the UsersCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FilterEffectsEmptySearch) GetUsersCountOk() (*int32, bool) { +func (o *EmptySearchFilter) GetUsersCountOk() (*int32, bool) { if o == nil || o.UsersCount == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *FilterEffectsEmptySearch) GetUsersCountOk() (*int32, bool) { } // HasUsersCount returns a boolean if a field has been set. -func (o *FilterEffectsEmptySearch) HasUsersCount() bool { +func (o *EmptySearchFilter) HasUsersCount() bool { if o != nil && o.UsersCount != nil { return true } @@ -73,13 +73,13 @@ func (o *FilterEffectsEmptySearch) HasUsersCount() bool { } // SetUsersCount gets a reference to the given int32 and assigns it to the UsersCount field. -func (o *FilterEffectsEmptySearch) SetUsersCount(v int32) *FilterEffectsEmptySearch { +func (o *EmptySearchFilter) SetUsersCount(v int32) *EmptySearchFilter { o.UsersCount = &v return o } // GetTrackedSearchesCount returns the TrackedSearchesCount field value if set, zero value otherwise. -func (o *FilterEffectsEmptySearch) GetTrackedSearchesCount() int32 { +func (o *EmptySearchFilter) GetTrackedSearchesCount() int32 { if o == nil || o.TrackedSearchesCount == nil { var ret int32 return ret @@ -89,7 +89,7 @@ func (o *FilterEffectsEmptySearch) GetTrackedSearchesCount() int32 { // GetTrackedSearchesCountOk returns a tuple with the TrackedSearchesCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FilterEffectsEmptySearch) GetTrackedSearchesCountOk() (*int32, bool) { +func (o *EmptySearchFilter) GetTrackedSearchesCountOk() (*int32, bool) { if o == nil || o.TrackedSearchesCount == nil { return nil, false } @@ -97,7 +97,7 @@ func (o *FilterEffectsEmptySearch) GetTrackedSearchesCountOk() (*int32, bool) { } // HasTrackedSearchesCount returns a boolean if a field has been set. -func (o *FilterEffectsEmptySearch) HasTrackedSearchesCount() bool { +func (o *EmptySearchFilter) HasTrackedSearchesCount() bool { if o != nil && o.TrackedSearchesCount != nil { return true } @@ -106,12 +106,12 @@ func (o *FilterEffectsEmptySearch) HasTrackedSearchesCount() bool { } // SetTrackedSearchesCount gets a reference to the given int32 and assigns it to the TrackedSearchesCount field. -func (o *FilterEffectsEmptySearch) SetTrackedSearchesCount(v int32) *FilterEffectsEmptySearch { +func (o *EmptySearchFilter) SetTrackedSearchesCount(v int32) *EmptySearchFilter { o.TrackedSearchesCount = &v return o } -func (o FilterEffectsEmptySearch) MarshalJSON() ([]byte, error) { +func (o EmptySearchFilter) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.UsersCount != nil { toSerialize["usersCount"] = o.UsersCount @@ -121,15 +121,15 @@ func (o FilterEffectsEmptySearch) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal FilterEffectsEmptySearch: %w", err) + return nil, fmt.Errorf("failed to marshal EmptySearchFilter: %w", err) } return serialized, nil } -func (o FilterEffectsEmptySearch) String() string { +func (o EmptySearchFilter) String() string { out := "" out += fmt.Sprintf(" usersCount=%v\n", o.UsersCount) out += fmt.Sprintf(" trackedSearchesCount=%v\n", o.TrackedSearchesCount) - return fmt.Sprintf("FilterEffectsEmptySearch {\n%s}", out) + return fmt.Sprintf("EmptySearchFilter {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects.go b/clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects.go index fc6afdf178..9e8b901ccf 100644 --- a/clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects.go +++ b/clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects.go @@ -8,19 +8,19 @@ import ( // FilterEffects A/B test filter effects resulting from configuration settings. type FilterEffects struct { - Outliers *FilterEffectsOutliers `json:"outliers,omitempty"` - EmptySearch *FilterEffectsEmptySearch `json:"emptySearch,omitempty"` + Outliers *OutliersFilter `json:"outliers,omitempty"` + EmptySearch *EmptySearchFilter `json:"emptySearch,omitempty"` } type FilterEffectsOption func(f *FilterEffects) -func WithFilterEffectsOutliers(val FilterEffectsOutliers) FilterEffectsOption { +func WithFilterEffectsOutliers(val OutliersFilter) FilterEffectsOption { return func(f *FilterEffects) { f.Outliers = &val } } -func WithFilterEffectsEmptySearch(val FilterEffectsEmptySearch) FilterEffectsOption { +func WithFilterEffectsEmptySearch(val EmptySearchFilter) FilterEffectsOption { return func(f *FilterEffects) { f.EmptySearch = &val } @@ -44,9 +44,9 @@ func NewEmptyFilterEffects() *FilterEffects { } // GetOutliers returns the Outliers field value if set, zero value otherwise. -func (o *FilterEffects) GetOutliers() FilterEffectsOutliers { +func (o *FilterEffects) GetOutliers() OutliersFilter { if o == nil || o.Outliers == nil { - var ret FilterEffectsOutliers + var ret OutliersFilter return ret } return *o.Outliers @@ -54,7 +54,7 @@ func (o *FilterEffects) GetOutliers() FilterEffectsOutliers { // GetOutliersOk returns a tuple with the Outliers field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FilterEffects) GetOutliersOk() (*FilterEffectsOutliers, bool) { +func (o *FilterEffects) GetOutliersOk() (*OutliersFilter, bool) { if o == nil || o.Outliers == nil { return nil, false } @@ -70,16 +70,16 @@ func (o *FilterEffects) HasOutliers() bool { return false } -// SetOutliers gets a reference to the given FilterEffectsOutliers and assigns it to the Outliers field. -func (o *FilterEffects) SetOutliers(v *FilterEffectsOutliers) *FilterEffects { +// SetOutliers gets a reference to the given OutliersFilter and assigns it to the Outliers field. +func (o *FilterEffects) SetOutliers(v *OutliersFilter) *FilterEffects { o.Outliers = v return o } // GetEmptySearch returns the EmptySearch field value if set, zero value otherwise. -func (o *FilterEffects) GetEmptySearch() FilterEffectsEmptySearch { +func (o *FilterEffects) GetEmptySearch() EmptySearchFilter { if o == nil || o.EmptySearch == nil { - var ret FilterEffectsEmptySearch + var ret EmptySearchFilter return ret } return *o.EmptySearch @@ -87,7 +87,7 @@ func (o *FilterEffects) GetEmptySearch() FilterEffectsEmptySearch { // GetEmptySearchOk returns a tuple with the EmptySearch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FilterEffects) GetEmptySearchOk() (*FilterEffectsEmptySearch, bool) { +func (o *FilterEffects) GetEmptySearchOk() (*EmptySearchFilter, bool) { if o == nil || o.EmptySearch == nil { return nil, false } @@ -103,8 +103,8 @@ func (o *FilterEffects) HasEmptySearch() bool { return false } -// SetEmptySearch gets a reference to the given FilterEffectsEmptySearch and assigns it to the EmptySearch field. -func (o *FilterEffects) SetEmptySearch(v *FilterEffectsEmptySearch) *FilterEffects { +// SetEmptySearch gets a reference to the given EmptySearchFilter and assigns it to the EmptySearch field. +func (o *FilterEffects) SetEmptySearch(v *EmptySearchFilter) *FilterEffects { o.EmptySearch = v return o } diff --git a/clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects_outliers.go b/clients/algoliasearch-client-go/algolia/abtesting/model_outliers_filter.go similarity index 62% rename from clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects_outliers.go rename to clients/algoliasearch-client-go/algolia/abtesting/model_outliers_filter.go index 41c90fcf8e..a2b7d91cfc 100644 --- a/clients/algoliasearch-client-go/algolia/abtesting/model_filter_effects_outliers.go +++ b/clients/algoliasearch-client-go/algolia/abtesting/model_outliers_filter.go @@ -6,47 +6,47 @@ import ( "fmt" ) -// FilterEffectsOutliers Outliers removed from the A/B test as a result of configuration settings. -type FilterEffectsOutliers struct { +// OutliersFilter Outliers removed from the A/B test as a result of configuration settings. +type OutliersFilter struct { // Number of users removed from the A/B test. UsersCount *int32 `json:"usersCount,omitempty"` // Number of tracked searches removed from the A/B test. TrackedSearchesCount *int32 `json:"trackedSearchesCount,omitempty"` } -type FilterEffectsOutliersOption func(f *FilterEffectsOutliers) +type OutliersFilterOption func(f *OutliersFilter) -func WithFilterEffectsOutliersUsersCount(val int32) FilterEffectsOutliersOption { - return func(f *FilterEffectsOutliers) { +func WithOutliersFilterUsersCount(val int32) OutliersFilterOption { + return func(f *OutliersFilter) { f.UsersCount = &val } } -func WithFilterEffectsOutliersTrackedSearchesCount(val int32) FilterEffectsOutliersOption { - return func(f *FilterEffectsOutliers) { +func WithOutliersFilterTrackedSearchesCount(val int32) OutliersFilterOption { + return func(f *OutliersFilter) { f.TrackedSearchesCount = &val } } -// NewFilterEffectsOutliers instantiates a new FilterEffectsOutliers object +// NewOutliersFilter instantiates a new OutliersFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewFilterEffectsOutliers(opts ...FilterEffectsOutliersOption) *FilterEffectsOutliers { - this := &FilterEffectsOutliers{} +func NewOutliersFilter(opts ...OutliersFilterOption) *OutliersFilter { + this := &OutliersFilter{} for _, opt := range opts { opt(this) } return this } -// NewEmptyFilterEffectsOutliers return a pointer to an empty FilterEffectsOutliers object. -func NewEmptyFilterEffectsOutliers() *FilterEffectsOutliers { - return &FilterEffectsOutliers{} +// NewEmptyOutliersFilter return a pointer to an empty OutliersFilter object. +func NewEmptyOutliersFilter() *OutliersFilter { + return &OutliersFilter{} } // GetUsersCount returns the UsersCount field value if set, zero value otherwise. -func (o *FilterEffectsOutliers) GetUsersCount() int32 { +func (o *OutliersFilter) GetUsersCount() int32 { if o == nil || o.UsersCount == nil { var ret int32 return ret @@ -56,7 +56,7 @@ func (o *FilterEffectsOutliers) GetUsersCount() int32 { // GetUsersCountOk returns a tuple with the UsersCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FilterEffectsOutliers) GetUsersCountOk() (*int32, bool) { +func (o *OutliersFilter) GetUsersCountOk() (*int32, bool) { if o == nil || o.UsersCount == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *FilterEffectsOutliers) GetUsersCountOk() (*int32, bool) { } // HasUsersCount returns a boolean if a field has been set. -func (o *FilterEffectsOutliers) HasUsersCount() bool { +func (o *OutliersFilter) HasUsersCount() bool { if o != nil && o.UsersCount != nil { return true } @@ -73,13 +73,13 @@ func (o *FilterEffectsOutliers) HasUsersCount() bool { } // SetUsersCount gets a reference to the given int32 and assigns it to the UsersCount field. -func (o *FilterEffectsOutliers) SetUsersCount(v int32) *FilterEffectsOutliers { +func (o *OutliersFilter) SetUsersCount(v int32) *OutliersFilter { o.UsersCount = &v return o } // GetTrackedSearchesCount returns the TrackedSearchesCount field value if set, zero value otherwise. -func (o *FilterEffectsOutliers) GetTrackedSearchesCount() int32 { +func (o *OutliersFilter) GetTrackedSearchesCount() int32 { if o == nil || o.TrackedSearchesCount == nil { var ret int32 return ret @@ -89,7 +89,7 @@ func (o *FilterEffectsOutliers) GetTrackedSearchesCount() int32 { // GetTrackedSearchesCountOk returns a tuple with the TrackedSearchesCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FilterEffectsOutliers) GetTrackedSearchesCountOk() (*int32, bool) { +func (o *OutliersFilter) GetTrackedSearchesCountOk() (*int32, bool) { if o == nil || o.TrackedSearchesCount == nil { return nil, false } @@ -97,7 +97,7 @@ func (o *FilterEffectsOutliers) GetTrackedSearchesCountOk() (*int32, bool) { } // HasTrackedSearchesCount returns a boolean if a field has been set. -func (o *FilterEffectsOutliers) HasTrackedSearchesCount() bool { +func (o *OutliersFilter) HasTrackedSearchesCount() bool { if o != nil && o.TrackedSearchesCount != nil { return true } @@ -106,12 +106,12 @@ func (o *FilterEffectsOutliers) HasTrackedSearchesCount() bool { } // SetTrackedSearchesCount gets a reference to the given int32 and assigns it to the TrackedSearchesCount field. -func (o *FilterEffectsOutliers) SetTrackedSearchesCount(v int32) *FilterEffectsOutliers { +func (o *OutliersFilter) SetTrackedSearchesCount(v int32) *OutliersFilter { o.TrackedSearchesCount = &v return o } -func (o FilterEffectsOutliers) MarshalJSON() ([]byte, error) { +func (o OutliersFilter) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.UsersCount != nil { toSerialize["usersCount"] = o.UsersCount @@ -121,15 +121,15 @@ func (o FilterEffectsOutliers) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal FilterEffectsOutliers: %w", err) + return nil, fmt.Errorf("failed to marshal OutliersFilter: %w", err) } return serialized, nil } -func (o FilterEffectsOutliers) String() string { +func (o OutliersFilter) String() string { out := "" out += fmt.Sprintf(" usersCount=%v\n", o.UsersCount) out += fmt.Sprintf(" trackedSearchesCount=%v\n", o.TrackedSearchesCount) - return fmt.Sprintf("FilterEffectsOutliers {\n%s}", out) + return fmt.Sprintf("OutliersFilter {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/analytics/model_click_positions_inner.go b/clients/algoliasearch-client-go/algolia/analytics/model_click_position.go similarity index 64% rename from clients/algoliasearch-client-go/algolia/analytics/model_click_positions_inner.go rename to clients/algoliasearch-client-go/algolia/analytics/model_click_position.go index f4256a9cf5..9770cd06a6 100644 --- a/clients/algoliasearch-client-go/algolia/analytics/model_click_positions_inner.go +++ b/clients/algoliasearch-client-go/algolia/analytics/model_click_position.go @@ -6,47 +6,47 @@ import ( "fmt" ) -// ClickPositionsInner Click position. -type ClickPositionsInner struct { +// ClickPosition Click position. +type ClickPosition struct { // Range of positions in the search results, using the pattern `[start,end]`. For positions 11 and up, click events are summed over the specified range. `-1` indicates the end of the list of search results. Position []int32 `json:"position,omitempty"` // Number of times this search has been clicked at that position. ClickCount *int32 `json:"clickCount,omitempty"` } -type ClickPositionsInnerOption func(f *ClickPositionsInner) +type ClickPositionOption func(f *ClickPosition) -func WithClickPositionsInnerPosition(val []int32) ClickPositionsInnerOption { - return func(f *ClickPositionsInner) { +func WithClickPositionPosition(val []int32) ClickPositionOption { + return func(f *ClickPosition) { f.Position = val } } -func WithClickPositionsInnerClickCount(val int32) ClickPositionsInnerOption { - return func(f *ClickPositionsInner) { +func WithClickPositionClickCount(val int32) ClickPositionOption { + return func(f *ClickPosition) { f.ClickCount = &val } } -// NewClickPositionsInner instantiates a new ClickPositionsInner object +// NewClickPosition instantiates a new ClickPosition object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewClickPositionsInner(opts ...ClickPositionsInnerOption) *ClickPositionsInner { - this := &ClickPositionsInner{} +func NewClickPosition(opts ...ClickPositionOption) *ClickPosition { + this := &ClickPosition{} for _, opt := range opts { opt(this) } return this } -// NewEmptyClickPositionsInner return a pointer to an empty ClickPositionsInner object. -func NewEmptyClickPositionsInner() *ClickPositionsInner { - return &ClickPositionsInner{} +// NewEmptyClickPosition return a pointer to an empty ClickPosition object. +func NewEmptyClickPosition() *ClickPosition { + return &ClickPosition{} } // GetPosition returns the Position field value if set, zero value otherwise. -func (o *ClickPositionsInner) GetPosition() []int32 { +func (o *ClickPosition) GetPosition() []int32 { if o == nil || o.Position == nil { var ret []int32 return ret @@ -56,7 +56,7 @@ func (o *ClickPositionsInner) GetPosition() []int32 { // GetPositionOk returns a tuple with the Position field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ClickPositionsInner) GetPositionOk() ([]int32, bool) { +func (o *ClickPosition) GetPositionOk() ([]int32, bool) { if o == nil || o.Position == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *ClickPositionsInner) GetPositionOk() ([]int32, bool) { } // HasPosition returns a boolean if a field has been set. -func (o *ClickPositionsInner) HasPosition() bool { +func (o *ClickPosition) HasPosition() bool { if o != nil && o.Position != nil { return true } @@ -73,13 +73,13 @@ func (o *ClickPositionsInner) HasPosition() bool { } // SetPosition gets a reference to the given []int32 and assigns it to the Position field. -func (o *ClickPositionsInner) SetPosition(v []int32) *ClickPositionsInner { +func (o *ClickPosition) SetPosition(v []int32) *ClickPosition { o.Position = v return o } // GetClickCount returns the ClickCount field value if set, zero value otherwise. -func (o *ClickPositionsInner) GetClickCount() int32 { +func (o *ClickPosition) GetClickCount() int32 { if o == nil || o.ClickCount == nil { var ret int32 return ret @@ -89,7 +89,7 @@ func (o *ClickPositionsInner) GetClickCount() int32 { // GetClickCountOk returns a tuple with the ClickCount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ClickPositionsInner) GetClickCountOk() (*int32, bool) { +func (o *ClickPosition) GetClickCountOk() (*int32, bool) { if o == nil || o.ClickCount == nil { return nil, false } @@ -97,7 +97,7 @@ func (o *ClickPositionsInner) GetClickCountOk() (*int32, bool) { } // HasClickCount returns a boolean if a field has been set. -func (o *ClickPositionsInner) HasClickCount() bool { +func (o *ClickPosition) HasClickCount() bool { if o != nil && o.ClickCount != nil { return true } @@ -106,12 +106,12 @@ func (o *ClickPositionsInner) HasClickCount() bool { } // SetClickCount gets a reference to the given int32 and assigns it to the ClickCount field. -func (o *ClickPositionsInner) SetClickCount(v int32) *ClickPositionsInner { +func (o *ClickPosition) SetClickCount(v int32) *ClickPosition { o.ClickCount = &v return o } -func (o ClickPositionsInner) MarshalJSON() ([]byte, error) { +func (o ClickPosition) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Position != nil { toSerialize["position"] = o.Position @@ -121,15 +121,15 @@ func (o ClickPositionsInner) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal ClickPositionsInner: %w", err) + return nil, fmt.Errorf("failed to marshal ClickPosition: %w", err) } return serialized, nil } -func (o ClickPositionsInner) String() string { +func (o ClickPosition) String() string { out := "" out += fmt.Sprintf(" position=%v\n", o.Position) out += fmt.Sprintf(" clickCount=%v\n", o.ClickCount) - return fmt.Sprintf("ClickPositionsInner {\n%s}", out) + return fmt.Sprintf("ClickPosition {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/analytics/model_get_click_positions_response.go b/clients/algoliasearch-client-go/algolia/analytics/model_get_click_positions_response.go index 638a8c2143..61c1954dec 100644 --- a/clients/algoliasearch-client-go/algolia/analytics/model_get_click_positions_response.go +++ b/clients/algoliasearch-client-go/algolia/analytics/model_get_click_positions_response.go @@ -9,14 +9,14 @@ import ( // GetClickPositionsResponse struct for GetClickPositionsResponse. type GetClickPositionsResponse struct { // List of positions in the search results and clicks associated with this search. - Positions []ClickPositionsInner `json:"positions"` + Positions []ClickPosition `json:"positions"` } // NewGetClickPositionsResponse instantiates a new GetClickPositionsResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewGetClickPositionsResponse(positions []ClickPositionsInner) *GetClickPositionsResponse { +func NewGetClickPositionsResponse(positions []ClickPosition) *GetClickPositionsResponse { this := &GetClickPositionsResponse{} this.Positions = positions return this @@ -28,9 +28,9 @@ func NewEmptyGetClickPositionsResponse() *GetClickPositionsResponse { } // GetPositions returns the Positions field value. -func (o *GetClickPositionsResponse) GetPositions() []ClickPositionsInner { +func (o *GetClickPositionsResponse) GetPositions() []ClickPosition { if o == nil { - var ret []ClickPositionsInner + var ret []ClickPosition return ret } @@ -39,7 +39,7 @@ func (o *GetClickPositionsResponse) GetPositions() []ClickPositionsInner { // GetPositionsOk returns a tuple with the Positions field value // and a boolean to check if the value has been set. -func (o *GetClickPositionsResponse) GetPositionsOk() ([]ClickPositionsInner, bool) { +func (o *GetClickPositionsResponse) GetPositionsOk() ([]ClickPosition, bool) { if o == nil { return nil, false } @@ -47,7 +47,7 @@ func (o *GetClickPositionsResponse) GetPositionsOk() ([]ClickPositionsInner, boo } // SetPositions sets field value. -func (o *GetClickPositionsResponse) SetPositions(v []ClickPositionsInner) *GetClickPositionsResponse { +func (o *GetClickPositionsResponse) SetPositions(v []ClickPosition) *GetClickPositionsResponse { o.Positions = v return o } diff --git a/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_analytics.go b/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_analytics.go index cbead85d62..cb1df34000 100644 --- a/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_analytics.go +++ b/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_analytics.go @@ -19,7 +19,7 @@ type TopSearchWithAnalytics struct { // Average position of a clicked search result in the list of search results. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. AverageClickPosition utils.Nullable[float64] `json:"averageClickPosition"` // List of positions in the search results and clicks associated with this search. - ClickPositions []ClickPositionsInner `json:"clickPositions"` + ClickPositions []ClickPosition `json:"clickPositions"` // Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. ConversionRate utils.Nullable[float64] `json:"conversionRate"` // Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. @@ -36,7 +36,7 @@ type TopSearchWithAnalytics struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewTopSearchWithAnalytics(search string, count int32, clickThroughRate utils.Nullable[float64], averageClickPosition utils.Nullable[float64], clickPositions []ClickPositionsInner, conversionRate utils.Nullable[float64], trackedSearchCount int32, clickCount int32, conversionCount int32, nbHits int32) *TopSearchWithAnalytics { +func NewTopSearchWithAnalytics(search string, count int32, clickThroughRate utils.Nullable[float64], averageClickPosition utils.Nullable[float64], clickPositions []ClickPosition, conversionRate utils.Nullable[float64], trackedSearchCount int32, clickCount int32, conversionCount int32, nbHits int32) *TopSearchWithAnalytics { this := &TopSearchWithAnalytics{} this.Search = search this.Count = count @@ -161,9 +161,9 @@ func (o *TopSearchWithAnalytics) SetAverageClickPosition(v float64) *TopSearchWi } // GetClickPositions returns the ClickPositions field value. -func (o *TopSearchWithAnalytics) GetClickPositions() []ClickPositionsInner { +func (o *TopSearchWithAnalytics) GetClickPositions() []ClickPosition { if o == nil { - var ret []ClickPositionsInner + var ret []ClickPosition return ret } @@ -172,7 +172,7 @@ func (o *TopSearchWithAnalytics) GetClickPositions() []ClickPositionsInner { // GetClickPositionsOk returns a tuple with the ClickPositions field value // and a boolean to check if the value has been set. -func (o *TopSearchWithAnalytics) GetClickPositionsOk() ([]ClickPositionsInner, bool) { +func (o *TopSearchWithAnalytics) GetClickPositionsOk() ([]ClickPosition, bool) { if o == nil { return nil, false } @@ -180,7 +180,7 @@ func (o *TopSearchWithAnalytics) GetClickPositionsOk() ([]ClickPositionsInner, b } // SetClickPositions sets field value. -func (o *TopSearchWithAnalytics) SetClickPositions(v []ClickPositionsInner) *TopSearchWithAnalytics { +func (o *TopSearchWithAnalytics) SetClickPositions(v []ClickPosition) *TopSearchWithAnalytics { o.ClickPositions = v return o } diff --git a/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_revenue_analytics.go b/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_revenue_analytics.go index d30a426b1b..cd32c8d5fb 100644 --- a/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_revenue_analytics.go +++ b/clients/algoliasearch-client-go/algolia/analytics/model_top_search_with_revenue_analytics.go @@ -19,7 +19,7 @@ type TopSearchWithRevenueAnalytics struct { // Average position of a clicked search result in the list of search results. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. AverageClickPosition utils.Nullable[float64] `json:"averageClickPosition"` // List of positions in the search results and clicks associated with this search. - ClickPositions []ClickPositionsInner `json:"clickPositions"` + ClickPositions []ClickPosition `json:"clickPositions"` // Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. ConversionRate utils.Nullable[float64] `json:"conversionRate"` // Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. @@ -46,7 +46,7 @@ type TopSearchWithRevenueAnalytics struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewTopSearchWithRevenueAnalytics(search string, count int32, clickThroughRate utils.Nullable[float64], averageClickPosition utils.Nullable[float64], clickPositions []ClickPositionsInner, conversionRate utils.Nullable[float64], trackedSearchCount int32, clickCount int32, conversionCount int32, nbHits int32, currencies map[string]CurrenciesValue, addToCartRate utils.Nullable[float64], addToCartCount int32, purchaseRate utils.Nullable[float64], purchaseCount int32) *TopSearchWithRevenueAnalytics { +func NewTopSearchWithRevenueAnalytics(search string, count int32, clickThroughRate utils.Nullable[float64], averageClickPosition utils.Nullable[float64], clickPositions []ClickPosition, conversionRate utils.Nullable[float64], trackedSearchCount int32, clickCount int32, conversionCount int32, nbHits int32, currencies map[string]CurrenciesValue, addToCartRate utils.Nullable[float64], addToCartCount int32, purchaseRate utils.Nullable[float64], purchaseCount int32) *TopSearchWithRevenueAnalytics { this := &TopSearchWithRevenueAnalytics{} this.Search = search this.Count = count @@ -176,9 +176,9 @@ func (o *TopSearchWithRevenueAnalytics) SetAverageClickPosition(v float64) *TopS } // GetClickPositions returns the ClickPositions field value. -func (o *TopSearchWithRevenueAnalytics) GetClickPositions() []ClickPositionsInner { +func (o *TopSearchWithRevenueAnalytics) GetClickPositions() []ClickPosition { if o == nil { - var ret []ClickPositionsInner + var ret []ClickPosition return ret } @@ -187,7 +187,7 @@ func (o *TopSearchWithRevenueAnalytics) GetClickPositions() []ClickPositionsInne // GetClickPositionsOk returns a tuple with the ClickPositions field value // and a boolean to check if the value has been set. -func (o *TopSearchWithRevenueAnalytics) GetClickPositionsOk() ([]ClickPositionsInner, bool) { +func (o *TopSearchWithRevenueAnalytics) GetClickPositionsOk() ([]ClickPosition, bool) { if o == nil { return nil, false } @@ -195,7 +195,7 @@ func (o *TopSearchWithRevenueAnalytics) GetClickPositionsOk() ([]ClickPositionsI } // SetClickPositions sets field value. -func (o *TopSearchWithRevenueAnalytics) SetClickPositions(v []ClickPositionsInner) *TopSearchWithRevenueAnalytics { +func (o *TopSearchWithRevenueAnalytics) SetClickPositions(v []ClickPosition) *TopSearchWithRevenueAnalytics { o.ClickPositions = v return o } diff --git a/clients/algoliasearch-client-go/algolia/ingestion/model_docker_streams_input.go b/clients/algoliasearch-client-go/algolia/ingestion/model_docker_streams_input.go index 683fd41753..33caf87666 100644 --- a/clients/algoliasearch-client-go/algolia/ingestion/model_docker_streams_input.go +++ b/clients/algoliasearch-client-go/algolia/ingestion/model_docker_streams_input.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// DockerStreamsInput struct for DockerStreamsInput. +// DockerStreamsInput The selected streams of a singer or airbyte connector. type DockerStreamsInput struct { Streams map[string]any `json:"streams"` } diff --git a/clients/algoliasearch-client-go/algolia/ingestion/model_transformation_try_response_error.go b/clients/algoliasearch-client-go/algolia/ingestion/model_transformation_error.go similarity index 55% rename from clients/algoliasearch-client-go/algolia/ingestion/model_transformation_try_response_error.go rename to clients/algoliasearch-client-go/algolia/ingestion/model_transformation_error.go index ebe9e12b7f..08333e950f 100644 --- a/clients/algoliasearch-client-go/algolia/ingestion/model_transformation_try_response_error.go +++ b/clients/algoliasearch-client-go/algolia/ingestion/model_transformation_error.go @@ -6,47 +6,47 @@ import ( "fmt" ) -// TransformationTryResponseError The error if the transformation failed. -type TransformationTryResponseError struct { +// TransformationError The error if the transformation failed. +type TransformationError struct { // The error status code. Code *int32 `json:"code,omitempty"` // A descriptive message explaining the failure. Message *string `json:"message,omitempty"` } -type TransformationTryResponseErrorOption func(f *TransformationTryResponseError) +type TransformationErrorOption func(f *TransformationError) -func WithTransformationTryResponseErrorCode(val int32) TransformationTryResponseErrorOption { - return func(f *TransformationTryResponseError) { +func WithTransformationErrorCode(val int32) TransformationErrorOption { + return func(f *TransformationError) { f.Code = &val } } -func WithTransformationTryResponseErrorMessage(val string) TransformationTryResponseErrorOption { - return func(f *TransformationTryResponseError) { +func WithTransformationErrorMessage(val string) TransformationErrorOption { + return func(f *TransformationError) { f.Message = &val } } -// NewTransformationTryResponseError instantiates a new TransformationTryResponseError object +// NewTransformationError instantiates a new TransformationError object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewTransformationTryResponseError(opts ...TransformationTryResponseErrorOption) *TransformationTryResponseError { - this := &TransformationTryResponseError{} +func NewTransformationError(opts ...TransformationErrorOption) *TransformationError { + this := &TransformationError{} for _, opt := range opts { opt(this) } return this } -// NewEmptyTransformationTryResponseError return a pointer to an empty TransformationTryResponseError object. -func NewEmptyTransformationTryResponseError() *TransformationTryResponseError { - return &TransformationTryResponseError{} +// NewEmptyTransformationError return a pointer to an empty TransformationError object. +func NewEmptyTransformationError() *TransformationError { + return &TransformationError{} } // GetCode returns the Code field value if set, zero value otherwise. -func (o *TransformationTryResponseError) GetCode() int32 { +func (o *TransformationError) GetCode() int32 { if o == nil || o.Code == nil { var ret int32 return ret @@ -56,7 +56,7 @@ func (o *TransformationTryResponseError) GetCode() int32 { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TransformationTryResponseError) GetCodeOk() (*int32, bool) { +func (o *TransformationError) GetCodeOk() (*int32, bool) { if o == nil || o.Code == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *TransformationTryResponseError) GetCodeOk() (*int32, bool) { } // HasCode returns a boolean if a field has been set. -func (o *TransformationTryResponseError) HasCode() bool { +func (o *TransformationError) HasCode() bool { if o != nil && o.Code != nil { return true } @@ -73,13 +73,13 @@ func (o *TransformationTryResponseError) HasCode() bool { } // SetCode gets a reference to the given int32 and assigns it to the Code field. -func (o *TransformationTryResponseError) SetCode(v int32) *TransformationTryResponseError { +func (o *TransformationError) SetCode(v int32) *TransformationError { o.Code = &v return o } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *TransformationTryResponseError) GetMessage() string { +func (o *TransformationError) GetMessage() string { if o == nil || o.Message == nil { var ret string return ret @@ -89,7 +89,7 @@ func (o *TransformationTryResponseError) GetMessage() string { // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TransformationTryResponseError) GetMessageOk() (*string, bool) { +func (o *TransformationError) GetMessageOk() (*string, bool) { if o == nil || o.Message == nil { return nil, false } @@ -97,7 +97,7 @@ func (o *TransformationTryResponseError) GetMessageOk() (*string, bool) { } // HasMessage returns a boolean if a field has been set. -func (o *TransformationTryResponseError) HasMessage() bool { +func (o *TransformationError) HasMessage() bool { if o != nil && o.Message != nil { return true } @@ -106,12 +106,12 @@ func (o *TransformationTryResponseError) HasMessage() bool { } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *TransformationTryResponseError) SetMessage(v string) *TransformationTryResponseError { +func (o *TransformationError) SetMessage(v string) *TransformationError { o.Message = &v return o } -func (o TransformationTryResponseError) MarshalJSON() ([]byte, error) { +func (o TransformationError) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Code != nil { toSerialize["code"] = o.Code @@ -121,15 +121,15 @@ func (o TransformationTryResponseError) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal TransformationTryResponseError: %w", err) + return nil, fmt.Errorf("failed to marshal TransformationError: %w", err) } return serialized, nil } -func (o TransformationTryResponseError) String() string { +func (o TransformationError) String() string { out := "" out += fmt.Sprintf(" code=%v\n", o.Code) out += fmt.Sprintf(" message=%v\n", o.Message) - return fmt.Sprintf("TransformationTryResponseError {\n%s}", out) + return fmt.Sprintf("TransformationError {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/ingestion/model_transformation_try_response.go b/clients/algoliasearch-client-go/algolia/ingestion/model_transformation_try_response.go index 7606bb81b3..3528a872f2 100644 --- a/clients/algoliasearch-client-go/algolia/ingestion/model_transformation_try_response.go +++ b/clients/algoliasearch-client-go/algolia/ingestion/model_transformation_try_response.go @@ -9,13 +9,13 @@ import ( // TransformationTryResponse struct for TransformationTryResponse. type TransformationTryResponse struct { // The array of records returned by the transformation service. - Payloads []map[string]any `json:"payloads"` - Error *TransformationTryResponseError `json:"error,omitempty"` + Payloads []map[string]any `json:"payloads"` + Error *TransformationError `json:"error,omitempty"` } type TransformationTryResponseOption func(f *TransformationTryResponse) -func WithTransformationTryResponseError(val TransformationTryResponseError) TransformationTryResponseOption { +func WithTransformationTryResponseError(val TransformationError) TransformationTryResponseOption { return func(f *TransformationTryResponse) { f.Error = &val } @@ -65,9 +65,9 @@ func (o *TransformationTryResponse) SetPayloads(v []map[string]any) *Transformat } // GetError returns the Error field value if set, zero value otherwise. -func (o *TransformationTryResponse) GetError() TransformationTryResponseError { +func (o *TransformationTryResponse) GetError() TransformationError { if o == nil || o.Error == nil { - var ret TransformationTryResponseError + var ret TransformationError return ret } return *o.Error @@ -75,7 +75,7 @@ func (o *TransformationTryResponse) GetError() TransformationTryResponseError { // GetErrorOk returns a tuple with the Error field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TransformationTryResponse) GetErrorOk() (*TransformationTryResponseError, bool) { +func (o *TransformationTryResponse) GetErrorOk() (*TransformationError, bool) { if o == nil || o.Error == nil { return nil, false } @@ -91,8 +91,8 @@ func (o *TransformationTryResponse) HasError() bool { return false } -// SetError gets a reference to the given TransformationTryResponseError and assigns it to the Error field. -func (o *TransformationTryResponse) SetError(v *TransformationTryResponseError) *TransformationTryResponse { +// SetError gets a reference to the given TransformationError and assigns it to the Error field. +func (o *TransformationTryResponse) SetError(v *TransformationError) *TransformationTryResponse { o.Error = v return o } diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_get_servers_403_response.go b/clients/algoliasearch-client-go/algolia/monitoring/model_bad_request.go similarity index 55% rename from clients/algoliasearch-client-go/algolia/monitoring/model_get_servers_403_response.go rename to clients/algoliasearch-client-go/algolia/monitoring/model_bad_request.go index 00d093bd69..a240da0a82 100644 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_get_servers_403_response.go +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_bad_request.go @@ -6,38 +6,38 @@ import ( "fmt" ) -// GetServers403Response struct for GetServers403Response. -type GetServers403Response struct { +// BadRequest struct for BadRequest. +type BadRequest struct { Reason *string `json:"reason,omitempty"` } -type GetServers403ResponseOption func(f *GetServers403Response) +type BadRequestOption func(f *BadRequest) -func WithGetServers403ResponseReason(val string) GetServers403ResponseOption { - return func(f *GetServers403Response) { +func WithBadRequestReason(val string) BadRequestOption { + return func(f *BadRequest) { f.Reason = &val } } -// NewGetServers403Response instantiates a new GetServers403Response object +// NewBadRequest instantiates a new BadRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewGetServers403Response(opts ...GetServers403ResponseOption) *GetServers403Response { - this := &GetServers403Response{} +func NewBadRequest(opts ...BadRequestOption) *BadRequest { + this := &BadRequest{} for _, opt := range opts { opt(this) } return this } -// NewEmptyGetServers403Response return a pointer to an empty GetServers403Response object. -func NewEmptyGetServers403Response() *GetServers403Response { - return &GetServers403Response{} +// NewEmptyBadRequest return a pointer to an empty BadRequest object. +func NewEmptyBadRequest() *BadRequest { + return &BadRequest{} } // GetReason returns the Reason field value if set, zero value otherwise. -func (o *GetServers403Response) GetReason() string { +func (o *BadRequest) GetReason() string { if o == nil || o.Reason == nil { var ret string return ret @@ -47,7 +47,7 @@ func (o *GetServers403Response) GetReason() string { // GetReasonOk returns a tuple with the Reason field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetServers403Response) GetReasonOk() (*string, bool) { +func (o *BadRequest) GetReasonOk() (*string, bool) { if o == nil || o.Reason == nil { return nil, false } @@ -55,7 +55,7 @@ func (o *GetServers403Response) GetReasonOk() (*string, bool) { } // HasReason returns a boolean if a field has been set. -func (o *GetServers403Response) HasReason() bool { +func (o *BadRequest) HasReason() bool { if o != nil && o.Reason != nil { return true } @@ -64,26 +64,26 @@ func (o *GetServers403Response) HasReason() bool { } // SetReason gets a reference to the given string and assigns it to the Reason field. -func (o *GetServers403Response) SetReason(v string) *GetServers403Response { +func (o *BadRequest) SetReason(v string) *BadRequest { o.Reason = &v return o } -func (o GetServers403Response) MarshalJSON() ([]byte, error) { +func (o BadRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Reason != nil { toSerialize["reason"] = o.Reason } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal GetServers403Response: %w", err) + return nil, fmt.Errorf("failed to marshal BadRequest: %w", err) } return serialized, nil } -func (o GetServers403Response) String() string { +func (o BadRequest) String() string { out := "" out += fmt.Sprintf(" reason=%v\n", o.Reason) - return fmt.Sprintf("GetServers403Response {\n%s}", out) + return fmt.Sprintf("BadRequest {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_forbidden.go b/clients/algoliasearch-client-go/algolia/monitoring/model_forbidden.go new file mode 100644 index 0000000000..3ba095540a --- /dev/null +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_forbidden.go @@ -0,0 +1,89 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +package monitoring + +import ( + "encoding/json" + "fmt" +) + +// Forbidden struct for Forbidden. +type Forbidden struct { + Reason *string `json:"reason,omitempty"` +} + +type ForbiddenOption func(f *Forbidden) + +func WithForbiddenReason(val string) ForbiddenOption { + return func(f *Forbidden) { + f.Reason = &val + } +} + +// NewForbidden instantiates a new Forbidden object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewForbidden(opts ...ForbiddenOption) *Forbidden { + this := &Forbidden{} + for _, opt := range opts { + opt(this) + } + return this +} + +// NewEmptyForbidden return a pointer to an empty Forbidden object. +func NewEmptyForbidden() *Forbidden { + return &Forbidden{} +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *Forbidden) GetReason() string { + if o == nil || o.Reason == nil { + var ret string + return ret + } + return *o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Forbidden) GetReasonOk() (*string, bool) { + if o == nil || o.Reason == nil { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *Forbidden) HasReason() bool { + if o != nil && o.Reason != nil { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *Forbidden) SetReason(v string) *Forbidden { + o.Reason = &v + return o +} + +func (o Forbidden) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Reason != nil { + toSerialize["reason"] = o.Reason + } + serialized, err := json.Marshal(toSerialize) + if err != nil { + return nil, fmt.Errorf("failed to marshal Forbidden: %w", err) + } + + return serialized, nil +} + +func (o Forbidden) String() string { + out := "" + out += fmt.Sprintf(" reason=%v\n", o.Reason) + return fmt.Sprintf("Forbidden {\n%s}", out) +} diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_incidents_inner.go b/clients/algoliasearch-client-go/algolia/monitoring/model_incident_entry.go similarity index 63% rename from clients/algoliasearch-client-go/algolia/monitoring/model_incidents_inner.go rename to clients/algoliasearch-client-go/algolia/monitoring/model_incident_entry.go index 3c886b0ca9..f32ccc7d0e 100644 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_incidents_inner.go +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_incident_entry.go @@ -6,46 +6,46 @@ import ( "fmt" ) -// IncidentsInner struct for IncidentsInner. -type IncidentsInner struct { +// IncidentEntry struct for IncidentEntry. +type IncidentEntry struct { // Timestamp, measured in milliseconds since the Unix epoch. T *int64 `json:"t,omitempty"` V *Incident `json:"v,omitempty"` } -type IncidentsInnerOption func(f *IncidentsInner) +type IncidentEntryOption func(f *IncidentEntry) -func WithIncidentsInnerT(val int64) IncidentsInnerOption { - return func(f *IncidentsInner) { +func WithIncidentEntryT(val int64) IncidentEntryOption { + return func(f *IncidentEntry) { f.T = &val } } -func WithIncidentsInnerV(val Incident) IncidentsInnerOption { - return func(f *IncidentsInner) { +func WithIncidentEntryV(val Incident) IncidentEntryOption { + return func(f *IncidentEntry) { f.V = &val } } -// NewIncidentsInner instantiates a new IncidentsInner object +// NewIncidentEntry instantiates a new IncidentEntry object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewIncidentsInner(opts ...IncidentsInnerOption) *IncidentsInner { - this := &IncidentsInner{} +func NewIncidentEntry(opts ...IncidentEntryOption) *IncidentEntry { + this := &IncidentEntry{} for _, opt := range opts { opt(this) } return this } -// NewEmptyIncidentsInner return a pointer to an empty IncidentsInner object. -func NewEmptyIncidentsInner() *IncidentsInner { - return &IncidentsInner{} +// NewEmptyIncidentEntry return a pointer to an empty IncidentEntry object. +func NewEmptyIncidentEntry() *IncidentEntry { + return &IncidentEntry{} } // GetT returns the T field value if set, zero value otherwise. -func (o *IncidentsInner) GetT() int64 { +func (o *IncidentEntry) GetT() int64 { if o == nil || o.T == nil { var ret int64 return ret @@ -55,7 +55,7 @@ func (o *IncidentsInner) GetT() int64 { // GetTOk returns a tuple with the T field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *IncidentsInner) GetTOk() (*int64, bool) { +func (o *IncidentEntry) GetTOk() (*int64, bool) { if o == nil || o.T == nil { return nil, false } @@ -63,7 +63,7 @@ func (o *IncidentsInner) GetTOk() (*int64, bool) { } // HasT returns a boolean if a field has been set. -func (o *IncidentsInner) HasT() bool { +func (o *IncidentEntry) HasT() bool { if o != nil && o.T != nil { return true } @@ -72,13 +72,13 @@ func (o *IncidentsInner) HasT() bool { } // SetT gets a reference to the given int64 and assigns it to the T field. -func (o *IncidentsInner) SetT(v int64) *IncidentsInner { +func (o *IncidentEntry) SetT(v int64) *IncidentEntry { o.T = &v return o } // GetV returns the V field value if set, zero value otherwise. -func (o *IncidentsInner) GetV() Incident { +func (o *IncidentEntry) GetV() Incident { if o == nil || o.V == nil { var ret Incident return ret @@ -88,7 +88,7 @@ func (o *IncidentsInner) GetV() Incident { // GetVOk returns a tuple with the V field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *IncidentsInner) GetVOk() (*Incident, bool) { +func (o *IncidentEntry) GetVOk() (*Incident, bool) { if o == nil || o.V == nil { return nil, false } @@ -96,7 +96,7 @@ func (o *IncidentsInner) GetVOk() (*Incident, bool) { } // HasV returns a boolean if a field has been set. -func (o *IncidentsInner) HasV() bool { +func (o *IncidentEntry) HasV() bool { if o != nil && o.V != nil { return true } @@ -105,12 +105,12 @@ func (o *IncidentsInner) HasV() bool { } // SetV gets a reference to the given Incident and assigns it to the V field. -func (o *IncidentsInner) SetV(v *Incident) *IncidentsInner { +func (o *IncidentEntry) SetV(v *Incident) *IncidentEntry { o.V = v return o } -func (o IncidentsInner) MarshalJSON() ([]byte, error) { +func (o IncidentEntry) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.T != nil { toSerialize["t"] = o.T @@ -120,15 +120,15 @@ func (o IncidentsInner) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal IncidentsInner: %w", err) + return nil, fmt.Errorf("failed to marshal IncidentEntry: %w", err) } return serialized, nil } -func (o IncidentsInner) String() string { +func (o IncidentEntry) String() string { out := "" out += fmt.Sprintf(" t=%v\n", o.T) out += fmt.Sprintf(" v=%v\n", o.V) - return fmt.Sprintf("IncidentsInner {\n%s}", out) + return fmt.Sprintf("IncidentEntry {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_incidents_response.go b/clients/algoliasearch-client-go/algolia/monitoring/model_incidents_response.go index 386e69bcc8..ba8e1ad62f 100644 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_incidents_response.go +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_incidents_response.go @@ -8,12 +8,12 @@ import ( // IncidentsResponse struct for IncidentsResponse. type IncidentsResponse struct { - Incidents *map[string][]IncidentsInner `json:"incidents,omitempty"` + Incidents *map[string][]IncidentEntry `json:"incidents,omitempty"` } type IncidentsResponseOption func(f *IncidentsResponse) -func WithIncidentsResponseIncidents(val map[string][]IncidentsInner) IncidentsResponseOption { +func WithIncidentsResponseIncidents(val map[string][]IncidentEntry) IncidentsResponseOption { return func(f *IncidentsResponse) { f.Incidents = &val } @@ -37,9 +37,9 @@ func NewEmptyIncidentsResponse() *IncidentsResponse { } // GetIncidents returns the Incidents field value if set, zero value otherwise. -func (o *IncidentsResponse) GetIncidents() map[string][]IncidentsInner { +func (o *IncidentsResponse) GetIncidents() map[string][]IncidentEntry { if o == nil || o.Incidents == nil { - var ret map[string][]IncidentsInner + var ret map[string][]IncidentEntry return ret } return *o.Incidents @@ -47,7 +47,7 @@ func (o *IncidentsResponse) GetIncidents() map[string][]IncidentsInner { // GetIncidentsOk returns a tuple with the Incidents field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *IncidentsResponse) GetIncidentsOk() (*map[string][]IncidentsInner, bool) { +func (o *IncidentsResponse) GetIncidentsOk() (*map[string][]IncidentEntry, bool) { if o == nil || o.Incidents == nil { return nil, false } @@ -63,8 +63,8 @@ func (o *IncidentsResponse) HasIncidents() bool { return false } -// SetIncidents gets a reference to the given map[string][]IncidentsInner and assigns it to the Incidents field. -func (o *IncidentsResponse) SetIncidents(v map[string][]IncidentsInner) *IncidentsResponse { +// SetIncidents gets a reference to the given map[string][]IncidentEntry and assigns it to the Incidents field. +func (o *IncidentsResponse) SetIncidents(v map[string][]IncidentEntry) *IncidentsResponse { o.Incidents = &v return o } diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_metric.go b/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_metric.go new file mode 100644 index 0000000000..b857c66c37 --- /dev/null +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_metric.go @@ -0,0 +1,89 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +package monitoring + +import ( + "encoding/json" + "fmt" +) + +// IndexingMetric struct for IndexingMetric. +type IndexingMetric struct { + Indexing *map[string][]TimeEntry `json:"indexing,omitempty"` +} + +type IndexingMetricOption func(f *IndexingMetric) + +func WithIndexingMetricIndexing(val map[string][]TimeEntry) IndexingMetricOption { + return func(f *IndexingMetric) { + f.Indexing = &val + } +} + +// NewIndexingMetric instantiates a new IndexingMetric object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewIndexingMetric(opts ...IndexingMetricOption) *IndexingMetric { + this := &IndexingMetric{} + for _, opt := range opts { + opt(this) + } + return this +} + +// NewEmptyIndexingMetric return a pointer to an empty IndexingMetric object. +func NewEmptyIndexingMetric() *IndexingMetric { + return &IndexingMetric{} +} + +// GetIndexing returns the Indexing field value if set, zero value otherwise. +func (o *IndexingMetric) GetIndexing() map[string][]TimeEntry { + if o == nil || o.Indexing == nil { + var ret map[string][]TimeEntry + return ret + } + return *o.Indexing +} + +// GetIndexingOk returns a tuple with the Indexing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndexingMetric) GetIndexingOk() (*map[string][]TimeEntry, bool) { + if o == nil || o.Indexing == nil { + return nil, false + } + return o.Indexing, true +} + +// HasIndexing returns a boolean if a field has been set. +func (o *IndexingMetric) HasIndexing() bool { + if o != nil && o.Indexing != nil { + return true + } + + return false +} + +// SetIndexing gets a reference to the given map[string][]TimeEntry and assigns it to the Indexing field. +func (o *IndexingMetric) SetIndexing(v map[string][]TimeEntry) *IndexingMetric { + o.Indexing = &v + return o +} + +func (o IndexingMetric) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Indexing != nil { + toSerialize["indexing"] = o.Indexing + } + serialized, err := json.Marshal(toSerialize) + if err != nil { + return nil, fmt.Errorf("failed to marshal IndexingMetric: %w", err) + } + + return serialized, nil +} + +func (o IndexingMetric) String() string { + out := "" + out += fmt.Sprintf(" indexing=%v\n", o.Indexing) + return fmt.Sprintf("IndexingMetric {\n%s}", out) +} diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_time_response.go b/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_time_response.go index cbbfc595d6..dbae1cd791 100644 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_time_response.go +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_time_response.go @@ -8,12 +8,12 @@ import ( // IndexingTimeResponse struct for IndexingTimeResponse. type IndexingTimeResponse struct { - Metrics *IndexingTimeResponseMetrics `json:"metrics,omitempty"` + Metrics *IndexingMetric `json:"metrics,omitempty"` } type IndexingTimeResponseOption func(f *IndexingTimeResponse) -func WithIndexingTimeResponseMetrics(val IndexingTimeResponseMetrics) IndexingTimeResponseOption { +func WithIndexingTimeResponseMetrics(val IndexingMetric) IndexingTimeResponseOption { return func(f *IndexingTimeResponse) { f.Metrics = &val } @@ -37,9 +37,9 @@ func NewEmptyIndexingTimeResponse() *IndexingTimeResponse { } // GetMetrics returns the Metrics field value if set, zero value otherwise. -func (o *IndexingTimeResponse) GetMetrics() IndexingTimeResponseMetrics { +func (o *IndexingTimeResponse) GetMetrics() IndexingMetric { if o == nil || o.Metrics == nil { - var ret IndexingTimeResponseMetrics + var ret IndexingMetric return ret } return *o.Metrics @@ -47,7 +47,7 @@ func (o *IndexingTimeResponse) GetMetrics() IndexingTimeResponseMetrics { // GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *IndexingTimeResponse) GetMetricsOk() (*IndexingTimeResponseMetrics, bool) { +func (o *IndexingTimeResponse) GetMetricsOk() (*IndexingMetric, bool) { if o == nil || o.Metrics == nil { return nil, false } @@ -63,8 +63,8 @@ func (o *IndexingTimeResponse) HasMetrics() bool { return false } -// SetMetrics gets a reference to the given IndexingTimeResponseMetrics and assigns it to the Metrics field. -func (o *IndexingTimeResponse) SetMetrics(v *IndexingTimeResponseMetrics) *IndexingTimeResponse { +// SetMetrics gets a reference to the given IndexingMetric and assigns it to the Metrics field. +func (o *IndexingTimeResponse) SetMetrics(v *IndexingMetric) *IndexingTimeResponse { o.Metrics = v return o } diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_time_response_metrics.go b/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_time_response_metrics.go deleted file mode 100644 index da7be54790..0000000000 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_indexing_time_response_metrics.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -package monitoring - -import ( - "encoding/json" - "fmt" -) - -// IndexingTimeResponseMetrics struct for IndexingTimeResponseMetrics. -type IndexingTimeResponseMetrics struct { - Indexing *map[string][]TimeInner `json:"indexing,omitempty"` -} - -type IndexingTimeResponseMetricsOption func(f *IndexingTimeResponseMetrics) - -func WithIndexingTimeResponseMetricsIndexing(val map[string][]TimeInner) IndexingTimeResponseMetricsOption { - return func(f *IndexingTimeResponseMetrics) { - f.Indexing = &val - } -} - -// NewIndexingTimeResponseMetrics instantiates a new IndexingTimeResponseMetrics object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewIndexingTimeResponseMetrics(opts ...IndexingTimeResponseMetricsOption) *IndexingTimeResponseMetrics { - this := &IndexingTimeResponseMetrics{} - for _, opt := range opts { - opt(this) - } - return this -} - -// NewEmptyIndexingTimeResponseMetrics return a pointer to an empty IndexingTimeResponseMetrics object. -func NewEmptyIndexingTimeResponseMetrics() *IndexingTimeResponseMetrics { - return &IndexingTimeResponseMetrics{} -} - -// GetIndexing returns the Indexing field value if set, zero value otherwise. -func (o *IndexingTimeResponseMetrics) GetIndexing() map[string][]TimeInner { - if o == nil || o.Indexing == nil { - var ret map[string][]TimeInner - return ret - } - return *o.Indexing -} - -// GetIndexingOk returns a tuple with the Indexing field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IndexingTimeResponseMetrics) GetIndexingOk() (*map[string][]TimeInner, bool) { - if o == nil || o.Indexing == nil { - return nil, false - } - return o.Indexing, true -} - -// HasIndexing returns a boolean if a field has been set. -func (o *IndexingTimeResponseMetrics) HasIndexing() bool { - if o != nil && o.Indexing != nil { - return true - } - - return false -} - -// SetIndexing gets a reference to the given map[string][]TimeInner and assigns it to the Indexing field. -func (o *IndexingTimeResponseMetrics) SetIndexing(v map[string][]TimeInner) *IndexingTimeResponseMetrics { - o.Indexing = &v - return o -} - -func (o IndexingTimeResponseMetrics) MarshalJSON() ([]byte, error) { - toSerialize := map[string]any{} - if o.Indexing != nil { - toSerialize["indexing"] = o.Indexing - } - serialized, err := json.Marshal(toSerialize) - if err != nil { - return nil, fmt.Errorf("failed to marshal IndexingTimeResponseMetrics: %w", err) - } - - return serialized, nil -} - -func (o IndexingTimeResponseMetrics) String() string { - out := "" - out += fmt.Sprintf(" indexing=%v\n", o.Indexing) - return fmt.Sprintf("IndexingTimeResponseMetrics {\n%s}", out) -} diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_infrastructure_response.go b/clients/algoliasearch-client-go/algolia/monitoring/model_infrastructure_response.go index a8f7be25df..04cc61b145 100644 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_infrastructure_response.go +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_infrastructure_response.go @@ -8,12 +8,12 @@ import ( // InfrastructureResponse struct for InfrastructureResponse. type InfrastructureResponse struct { - Metrics *InfrastructureResponseMetrics `json:"metrics,omitempty"` + Metrics *Metrics `json:"metrics,omitempty"` } type InfrastructureResponseOption func(f *InfrastructureResponse) -func WithInfrastructureResponseMetrics(val InfrastructureResponseMetrics) InfrastructureResponseOption { +func WithInfrastructureResponseMetrics(val Metrics) InfrastructureResponseOption { return func(f *InfrastructureResponse) { f.Metrics = &val } @@ -37,9 +37,9 @@ func NewEmptyInfrastructureResponse() *InfrastructureResponse { } // GetMetrics returns the Metrics field value if set, zero value otherwise. -func (o *InfrastructureResponse) GetMetrics() InfrastructureResponseMetrics { +func (o *InfrastructureResponse) GetMetrics() Metrics { if o == nil || o.Metrics == nil { - var ret InfrastructureResponseMetrics + var ret Metrics return ret } return *o.Metrics @@ -47,7 +47,7 @@ func (o *InfrastructureResponse) GetMetrics() InfrastructureResponseMetrics { // GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InfrastructureResponse) GetMetricsOk() (*InfrastructureResponseMetrics, bool) { +func (o *InfrastructureResponse) GetMetricsOk() (*Metrics, bool) { if o == nil || o.Metrics == nil { return nil, false } @@ -63,8 +63,8 @@ func (o *InfrastructureResponse) HasMetrics() bool { return false } -// SetMetrics gets a reference to the given InfrastructureResponseMetrics and assigns it to the Metrics field. -func (o *InfrastructureResponse) SetMetrics(v *InfrastructureResponseMetrics) *InfrastructureResponse { +// SetMetrics gets a reference to the given Metrics and assigns it to the Metrics field. +func (o *InfrastructureResponse) SetMetrics(v *Metrics) *InfrastructureResponse { o.Metrics = v return o } diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_latency_metric.go b/clients/algoliasearch-client-go/algolia/monitoring/model_latency_metric.go new file mode 100644 index 0000000000..551a437d2e --- /dev/null +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_latency_metric.go @@ -0,0 +1,89 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +package monitoring + +import ( + "encoding/json" + "fmt" +) + +// LatencyMetric struct for LatencyMetric. +type LatencyMetric struct { + Latency *map[string][]TimeEntry `json:"latency,omitempty"` +} + +type LatencyMetricOption func(f *LatencyMetric) + +func WithLatencyMetricLatency(val map[string][]TimeEntry) LatencyMetricOption { + return func(f *LatencyMetric) { + f.Latency = &val + } +} + +// NewLatencyMetric instantiates a new LatencyMetric object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewLatencyMetric(opts ...LatencyMetricOption) *LatencyMetric { + this := &LatencyMetric{} + for _, opt := range opts { + opt(this) + } + return this +} + +// NewEmptyLatencyMetric return a pointer to an empty LatencyMetric object. +func NewEmptyLatencyMetric() *LatencyMetric { + return &LatencyMetric{} +} + +// GetLatency returns the Latency field value if set, zero value otherwise. +func (o *LatencyMetric) GetLatency() map[string][]TimeEntry { + if o == nil || o.Latency == nil { + var ret map[string][]TimeEntry + return ret + } + return *o.Latency +} + +// GetLatencyOk returns a tuple with the Latency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LatencyMetric) GetLatencyOk() (*map[string][]TimeEntry, bool) { + if o == nil || o.Latency == nil { + return nil, false + } + return o.Latency, true +} + +// HasLatency returns a boolean if a field has been set. +func (o *LatencyMetric) HasLatency() bool { + if o != nil && o.Latency != nil { + return true + } + + return false +} + +// SetLatency gets a reference to the given map[string][]TimeEntry and assigns it to the Latency field. +func (o *LatencyMetric) SetLatency(v map[string][]TimeEntry) *LatencyMetric { + o.Latency = &v + return o +} + +func (o LatencyMetric) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Latency != nil { + toSerialize["latency"] = o.Latency + } + serialized, err := json.Marshal(toSerialize) + if err != nil { + return nil, fmt.Errorf("failed to marshal LatencyMetric: %w", err) + } + + return serialized, nil +} + +func (o LatencyMetric) String() string { + out := "" + out += fmt.Sprintf(" latency=%v\n", o.Latency) + return fmt.Sprintf("LatencyMetric {\n%s}", out) +} diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_latency_response.go b/clients/algoliasearch-client-go/algolia/monitoring/model_latency_response.go index b46ef1fea6..955e2b5e59 100644 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_latency_response.go +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_latency_response.go @@ -8,12 +8,12 @@ import ( // LatencyResponse struct for LatencyResponse. type LatencyResponse struct { - Metrics *LatencyResponseMetrics `json:"metrics,omitempty"` + Metrics *LatencyMetric `json:"metrics,omitempty"` } type LatencyResponseOption func(f *LatencyResponse) -func WithLatencyResponseMetrics(val LatencyResponseMetrics) LatencyResponseOption { +func WithLatencyResponseMetrics(val LatencyMetric) LatencyResponseOption { return func(f *LatencyResponse) { f.Metrics = &val } @@ -37,9 +37,9 @@ func NewEmptyLatencyResponse() *LatencyResponse { } // GetMetrics returns the Metrics field value if set, zero value otherwise. -func (o *LatencyResponse) GetMetrics() LatencyResponseMetrics { +func (o *LatencyResponse) GetMetrics() LatencyMetric { if o == nil || o.Metrics == nil { - var ret LatencyResponseMetrics + var ret LatencyMetric return ret } return *o.Metrics @@ -47,7 +47,7 @@ func (o *LatencyResponse) GetMetrics() LatencyResponseMetrics { // GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LatencyResponse) GetMetricsOk() (*LatencyResponseMetrics, bool) { +func (o *LatencyResponse) GetMetricsOk() (*LatencyMetric, bool) { if o == nil || o.Metrics == nil { return nil, false } @@ -63,8 +63,8 @@ func (o *LatencyResponse) HasMetrics() bool { return false } -// SetMetrics gets a reference to the given LatencyResponseMetrics and assigns it to the Metrics field. -func (o *LatencyResponse) SetMetrics(v *LatencyResponseMetrics) *LatencyResponse { +// SetMetrics gets a reference to the given LatencyMetric and assigns it to the Metrics field. +func (o *LatencyResponse) SetMetrics(v *LatencyMetric) *LatencyResponse { o.Metrics = v return o } diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_latency_response_metrics.go b/clients/algoliasearch-client-go/algolia/monitoring/model_latency_response_metrics.go deleted file mode 100644 index 3cb60e8601..0000000000 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_latency_response_metrics.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -package monitoring - -import ( - "encoding/json" - "fmt" -) - -// LatencyResponseMetrics struct for LatencyResponseMetrics. -type LatencyResponseMetrics struct { - Latency *map[string][]TimeInner `json:"latency,omitempty"` -} - -type LatencyResponseMetricsOption func(f *LatencyResponseMetrics) - -func WithLatencyResponseMetricsLatency(val map[string][]TimeInner) LatencyResponseMetricsOption { - return func(f *LatencyResponseMetrics) { - f.Latency = &val - } -} - -// NewLatencyResponseMetrics instantiates a new LatencyResponseMetrics object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewLatencyResponseMetrics(opts ...LatencyResponseMetricsOption) *LatencyResponseMetrics { - this := &LatencyResponseMetrics{} - for _, opt := range opts { - opt(this) - } - return this -} - -// NewEmptyLatencyResponseMetrics return a pointer to an empty LatencyResponseMetrics object. -func NewEmptyLatencyResponseMetrics() *LatencyResponseMetrics { - return &LatencyResponseMetrics{} -} - -// GetLatency returns the Latency field value if set, zero value otherwise. -func (o *LatencyResponseMetrics) GetLatency() map[string][]TimeInner { - if o == nil || o.Latency == nil { - var ret map[string][]TimeInner - return ret - } - return *o.Latency -} - -// GetLatencyOk returns a tuple with the Latency field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LatencyResponseMetrics) GetLatencyOk() (*map[string][]TimeInner, bool) { - if o == nil || o.Latency == nil { - return nil, false - } - return o.Latency, true -} - -// HasLatency returns a boolean if a field has been set. -func (o *LatencyResponseMetrics) HasLatency() bool { - if o != nil && o.Latency != nil { - return true - } - - return false -} - -// SetLatency gets a reference to the given map[string][]TimeInner and assigns it to the Latency field. -func (o *LatencyResponseMetrics) SetLatency(v map[string][]TimeInner) *LatencyResponseMetrics { - o.Latency = &v - return o -} - -func (o LatencyResponseMetrics) MarshalJSON() ([]byte, error) { - toSerialize := map[string]any{} - if o.Latency != nil { - toSerialize["latency"] = o.Latency - } - serialized, err := json.Marshal(toSerialize) - if err != nil { - return nil, fmt.Errorf("failed to marshal LatencyResponseMetrics: %w", err) - } - - return serialized, nil -} - -func (o LatencyResponseMetrics) String() string { - out := "" - out += fmt.Sprintf(" latency=%v\n", o.Latency) - return fmt.Sprintf("LatencyResponseMetrics {\n%s}", out) -} diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_infrastructure_response_metrics.go b/clients/algoliasearch-client-go/algolia/monitoring/model_metrics.go similarity index 61% rename from clients/algoliasearch-client-go/algolia/monitoring/model_infrastructure_response_metrics.go rename to clients/algoliasearch-client-go/algolia/monitoring/model_metrics.go index 8ef5630924..212b7ad1d3 100644 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_infrastructure_response_metrics.go +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_metrics.go @@ -6,8 +6,8 @@ import ( "fmt" ) -// InfrastructureResponseMetrics struct for InfrastructureResponseMetrics. -type InfrastructureResponseMetrics struct { +// Metrics struct for Metrics. +type Metrics struct { // CPU idleness in %. CpuUsage *map[string][]ProbesMetric `json:"cpu_usage,omitempty"` // RAM used for indexing in MB. @@ -20,57 +20,57 @@ type InfrastructureResponseMetrics struct { AvgBuildTime *map[string][]ProbesMetric `json:"avg_build_time,omitempty"` } -type InfrastructureResponseMetricsOption func(f *InfrastructureResponseMetrics) +type MetricsOption func(f *Metrics) -func WithInfrastructureResponseMetricsCpuUsage(val map[string][]ProbesMetric) InfrastructureResponseMetricsOption { - return func(f *InfrastructureResponseMetrics) { +func WithMetricsCpuUsage(val map[string][]ProbesMetric) MetricsOption { + return func(f *Metrics) { f.CpuUsage = &val } } -func WithInfrastructureResponseMetricsRamIndexingUsage(val map[string][]ProbesMetric) InfrastructureResponseMetricsOption { - return func(f *InfrastructureResponseMetrics) { +func WithMetricsRamIndexingUsage(val map[string][]ProbesMetric) MetricsOption { + return func(f *Metrics) { f.RamIndexingUsage = &val } } -func WithInfrastructureResponseMetricsRamSearchUsage(val map[string][]ProbesMetric) InfrastructureResponseMetricsOption { - return func(f *InfrastructureResponseMetrics) { +func WithMetricsRamSearchUsage(val map[string][]ProbesMetric) MetricsOption { + return func(f *Metrics) { f.RamSearchUsage = &val } } -func WithInfrastructureResponseMetricsSsdUsage(val map[string][]ProbesMetric) InfrastructureResponseMetricsOption { - return func(f *InfrastructureResponseMetrics) { +func WithMetricsSsdUsage(val map[string][]ProbesMetric) MetricsOption { + return func(f *Metrics) { f.SsdUsage = &val } } -func WithInfrastructureResponseMetricsAvgBuildTime(val map[string][]ProbesMetric) InfrastructureResponseMetricsOption { - return func(f *InfrastructureResponseMetrics) { +func WithMetricsAvgBuildTime(val map[string][]ProbesMetric) MetricsOption { + return func(f *Metrics) { f.AvgBuildTime = &val } } -// NewInfrastructureResponseMetrics instantiates a new InfrastructureResponseMetrics object +// NewMetrics instantiates a new Metrics object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewInfrastructureResponseMetrics(opts ...InfrastructureResponseMetricsOption) *InfrastructureResponseMetrics { - this := &InfrastructureResponseMetrics{} +func NewMetrics(opts ...MetricsOption) *Metrics { + this := &Metrics{} for _, opt := range opts { opt(this) } return this } -// NewEmptyInfrastructureResponseMetrics return a pointer to an empty InfrastructureResponseMetrics object. -func NewEmptyInfrastructureResponseMetrics() *InfrastructureResponseMetrics { - return &InfrastructureResponseMetrics{} +// NewEmptyMetrics return a pointer to an empty Metrics object. +func NewEmptyMetrics() *Metrics { + return &Metrics{} } // GetCpuUsage returns the CpuUsage field value if set, zero value otherwise. -func (o *InfrastructureResponseMetrics) GetCpuUsage() map[string][]ProbesMetric { +func (o *Metrics) GetCpuUsage() map[string][]ProbesMetric { if o == nil || o.CpuUsage == nil { var ret map[string][]ProbesMetric return ret @@ -80,7 +80,7 @@ func (o *InfrastructureResponseMetrics) GetCpuUsage() map[string][]ProbesMetric // GetCpuUsageOk returns a tuple with the CpuUsage field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InfrastructureResponseMetrics) GetCpuUsageOk() (*map[string][]ProbesMetric, bool) { +func (o *Metrics) GetCpuUsageOk() (*map[string][]ProbesMetric, bool) { if o == nil || o.CpuUsage == nil { return nil, false } @@ -88,7 +88,7 @@ func (o *InfrastructureResponseMetrics) GetCpuUsageOk() (*map[string][]ProbesMet } // HasCpuUsage returns a boolean if a field has been set. -func (o *InfrastructureResponseMetrics) HasCpuUsage() bool { +func (o *Metrics) HasCpuUsage() bool { if o != nil && o.CpuUsage != nil { return true } @@ -97,13 +97,13 @@ func (o *InfrastructureResponseMetrics) HasCpuUsage() bool { } // SetCpuUsage gets a reference to the given map[string][]ProbesMetric and assigns it to the CpuUsage field. -func (o *InfrastructureResponseMetrics) SetCpuUsage(v map[string][]ProbesMetric) *InfrastructureResponseMetrics { +func (o *Metrics) SetCpuUsage(v map[string][]ProbesMetric) *Metrics { o.CpuUsage = &v return o } // GetRamIndexingUsage returns the RamIndexingUsage field value if set, zero value otherwise. -func (o *InfrastructureResponseMetrics) GetRamIndexingUsage() map[string][]ProbesMetric { +func (o *Metrics) GetRamIndexingUsage() map[string][]ProbesMetric { if o == nil || o.RamIndexingUsage == nil { var ret map[string][]ProbesMetric return ret @@ -113,7 +113,7 @@ func (o *InfrastructureResponseMetrics) GetRamIndexingUsage() map[string][]Probe // GetRamIndexingUsageOk returns a tuple with the RamIndexingUsage field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InfrastructureResponseMetrics) GetRamIndexingUsageOk() (*map[string][]ProbesMetric, bool) { +func (o *Metrics) GetRamIndexingUsageOk() (*map[string][]ProbesMetric, bool) { if o == nil || o.RamIndexingUsage == nil { return nil, false } @@ -121,7 +121,7 @@ func (o *InfrastructureResponseMetrics) GetRamIndexingUsageOk() (*map[string][]P } // HasRamIndexingUsage returns a boolean if a field has been set. -func (o *InfrastructureResponseMetrics) HasRamIndexingUsage() bool { +func (o *Metrics) HasRamIndexingUsage() bool { if o != nil && o.RamIndexingUsage != nil { return true } @@ -130,13 +130,13 @@ func (o *InfrastructureResponseMetrics) HasRamIndexingUsage() bool { } // SetRamIndexingUsage gets a reference to the given map[string][]ProbesMetric and assigns it to the RamIndexingUsage field. -func (o *InfrastructureResponseMetrics) SetRamIndexingUsage(v map[string][]ProbesMetric) *InfrastructureResponseMetrics { +func (o *Metrics) SetRamIndexingUsage(v map[string][]ProbesMetric) *Metrics { o.RamIndexingUsage = &v return o } // GetRamSearchUsage returns the RamSearchUsage field value if set, zero value otherwise. -func (o *InfrastructureResponseMetrics) GetRamSearchUsage() map[string][]ProbesMetric { +func (o *Metrics) GetRamSearchUsage() map[string][]ProbesMetric { if o == nil || o.RamSearchUsage == nil { var ret map[string][]ProbesMetric return ret @@ -146,7 +146,7 @@ func (o *InfrastructureResponseMetrics) GetRamSearchUsage() map[string][]ProbesM // GetRamSearchUsageOk returns a tuple with the RamSearchUsage field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InfrastructureResponseMetrics) GetRamSearchUsageOk() (*map[string][]ProbesMetric, bool) { +func (o *Metrics) GetRamSearchUsageOk() (*map[string][]ProbesMetric, bool) { if o == nil || o.RamSearchUsage == nil { return nil, false } @@ -154,7 +154,7 @@ func (o *InfrastructureResponseMetrics) GetRamSearchUsageOk() (*map[string][]Pro } // HasRamSearchUsage returns a boolean if a field has been set. -func (o *InfrastructureResponseMetrics) HasRamSearchUsage() bool { +func (o *Metrics) HasRamSearchUsage() bool { if o != nil && o.RamSearchUsage != nil { return true } @@ -163,13 +163,13 @@ func (o *InfrastructureResponseMetrics) HasRamSearchUsage() bool { } // SetRamSearchUsage gets a reference to the given map[string][]ProbesMetric and assigns it to the RamSearchUsage field. -func (o *InfrastructureResponseMetrics) SetRamSearchUsage(v map[string][]ProbesMetric) *InfrastructureResponseMetrics { +func (o *Metrics) SetRamSearchUsage(v map[string][]ProbesMetric) *Metrics { o.RamSearchUsage = &v return o } // GetSsdUsage returns the SsdUsage field value if set, zero value otherwise. -func (o *InfrastructureResponseMetrics) GetSsdUsage() map[string][]ProbesMetric { +func (o *Metrics) GetSsdUsage() map[string][]ProbesMetric { if o == nil || o.SsdUsage == nil { var ret map[string][]ProbesMetric return ret @@ -179,7 +179,7 @@ func (o *InfrastructureResponseMetrics) GetSsdUsage() map[string][]ProbesMetric // GetSsdUsageOk returns a tuple with the SsdUsage field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InfrastructureResponseMetrics) GetSsdUsageOk() (*map[string][]ProbesMetric, bool) { +func (o *Metrics) GetSsdUsageOk() (*map[string][]ProbesMetric, bool) { if o == nil || o.SsdUsage == nil { return nil, false } @@ -187,7 +187,7 @@ func (o *InfrastructureResponseMetrics) GetSsdUsageOk() (*map[string][]ProbesMet } // HasSsdUsage returns a boolean if a field has been set. -func (o *InfrastructureResponseMetrics) HasSsdUsage() bool { +func (o *Metrics) HasSsdUsage() bool { if o != nil && o.SsdUsage != nil { return true } @@ -196,13 +196,13 @@ func (o *InfrastructureResponseMetrics) HasSsdUsage() bool { } // SetSsdUsage gets a reference to the given map[string][]ProbesMetric and assigns it to the SsdUsage field. -func (o *InfrastructureResponseMetrics) SetSsdUsage(v map[string][]ProbesMetric) *InfrastructureResponseMetrics { +func (o *Metrics) SetSsdUsage(v map[string][]ProbesMetric) *Metrics { o.SsdUsage = &v return o } // GetAvgBuildTime returns the AvgBuildTime field value if set, zero value otherwise. -func (o *InfrastructureResponseMetrics) GetAvgBuildTime() map[string][]ProbesMetric { +func (o *Metrics) GetAvgBuildTime() map[string][]ProbesMetric { if o == nil || o.AvgBuildTime == nil { var ret map[string][]ProbesMetric return ret @@ -212,7 +212,7 @@ func (o *InfrastructureResponseMetrics) GetAvgBuildTime() map[string][]ProbesMet // GetAvgBuildTimeOk returns a tuple with the AvgBuildTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InfrastructureResponseMetrics) GetAvgBuildTimeOk() (*map[string][]ProbesMetric, bool) { +func (o *Metrics) GetAvgBuildTimeOk() (*map[string][]ProbesMetric, bool) { if o == nil || o.AvgBuildTime == nil { return nil, false } @@ -220,7 +220,7 @@ func (o *InfrastructureResponseMetrics) GetAvgBuildTimeOk() (*map[string][]Probe } // HasAvgBuildTime returns a boolean if a field has been set. -func (o *InfrastructureResponseMetrics) HasAvgBuildTime() bool { +func (o *Metrics) HasAvgBuildTime() bool { if o != nil && o.AvgBuildTime != nil { return true } @@ -229,12 +229,12 @@ func (o *InfrastructureResponseMetrics) HasAvgBuildTime() bool { } // SetAvgBuildTime gets a reference to the given map[string][]ProbesMetric and assigns it to the AvgBuildTime field. -func (o *InfrastructureResponseMetrics) SetAvgBuildTime(v map[string][]ProbesMetric) *InfrastructureResponseMetrics { +func (o *Metrics) SetAvgBuildTime(v map[string][]ProbesMetric) *Metrics { o.AvgBuildTime = &v return o } -func (o InfrastructureResponseMetrics) MarshalJSON() ([]byte, error) { +func (o Metrics) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.CpuUsage != nil { toSerialize["cpu_usage"] = o.CpuUsage @@ -253,18 +253,18 @@ func (o InfrastructureResponseMetrics) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal InfrastructureResponseMetrics: %w", err) + return nil, fmt.Errorf("failed to marshal Metrics: %w", err) } return serialized, nil } -func (o InfrastructureResponseMetrics) String() string { +func (o Metrics) String() string { out := "" out += fmt.Sprintf(" cpu_usage=%v\n", o.CpuUsage) out += fmt.Sprintf(" ram_indexing_usage=%v\n", o.RamIndexingUsage) out += fmt.Sprintf(" ram_search_usage=%v\n", o.RamSearchUsage) out += fmt.Sprintf(" ssd_usage=%v\n", o.SsdUsage) out += fmt.Sprintf(" avg_build_time=%v\n", o.AvgBuildTime) - return fmt.Sprintf("InfrastructureResponseMetrics {\n%s}", out) + return fmt.Sprintf("Metrics {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_time_inner.go b/clients/algoliasearch-client-go/algolia/monitoring/model_time_entry.go similarity index 67% rename from clients/algoliasearch-client-go/algolia/monitoring/model_time_inner.go rename to clients/algoliasearch-client-go/algolia/monitoring/model_time_entry.go index 5eefc38494..0a8fa68f84 100644 --- a/clients/algoliasearch-client-go/algolia/monitoring/model_time_inner.go +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_time_entry.go @@ -6,47 +6,47 @@ import ( "fmt" ) -// TimeInner struct for TimeInner. -type TimeInner struct { +// TimeEntry struct for TimeEntry. +type TimeEntry struct { // Timestamp, measured in milliseconds since the Unix epoch. T *int64 `json:"t,omitempty"` // Time in ms. V *int32 `json:"v,omitempty"` } -type TimeInnerOption func(f *TimeInner) +type TimeEntryOption func(f *TimeEntry) -func WithTimeInnerT(val int64) TimeInnerOption { - return func(f *TimeInner) { +func WithTimeEntryT(val int64) TimeEntryOption { + return func(f *TimeEntry) { f.T = &val } } -func WithTimeInnerV(val int32) TimeInnerOption { - return func(f *TimeInner) { +func WithTimeEntryV(val int32) TimeEntryOption { + return func(f *TimeEntry) { f.V = &val } } -// NewTimeInner instantiates a new TimeInner object +// NewTimeEntry instantiates a new TimeEntry object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewTimeInner(opts ...TimeInnerOption) *TimeInner { - this := &TimeInner{} +func NewTimeEntry(opts ...TimeEntryOption) *TimeEntry { + this := &TimeEntry{} for _, opt := range opts { opt(this) } return this } -// NewEmptyTimeInner return a pointer to an empty TimeInner object. -func NewEmptyTimeInner() *TimeInner { - return &TimeInner{} +// NewEmptyTimeEntry return a pointer to an empty TimeEntry object. +func NewEmptyTimeEntry() *TimeEntry { + return &TimeEntry{} } // GetT returns the T field value if set, zero value otherwise. -func (o *TimeInner) GetT() int64 { +func (o *TimeEntry) GetT() int64 { if o == nil || o.T == nil { var ret int64 return ret @@ -56,7 +56,7 @@ func (o *TimeInner) GetT() int64 { // GetTOk returns a tuple with the T field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TimeInner) GetTOk() (*int64, bool) { +func (o *TimeEntry) GetTOk() (*int64, bool) { if o == nil || o.T == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *TimeInner) GetTOk() (*int64, bool) { } // HasT returns a boolean if a field has been set. -func (o *TimeInner) HasT() bool { +func (o *TimeEntry) HasT() bool { if o != nil && o.T != nil { return true } @@ -73,13 +73,13 @@ func (o *TimeInner) HasT() bool { } // SetT gets a reference to the given int64 and assigns it to the T field. -func (o *TimeInner) SetT(v int64) *TimeInner { +func (o *TimeEntry) SetT(v int64) *TimeEntry { o.T = &v return o } // GetV returns the V field value if set, zero value otherwise. -func (o *TimeInner) GetV() int32 { +func (o *TimeEntry) GetV() int32 { if o == nil || o.V == nil { var ret int32 return ret @@ -89,7 +89,7 @@ func (o *TimeInner) GetV() int32 { // GetVOk returns a tuple with the V field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TimeInner) GetVOk() (*int32, bool) { +func (o *TimeEntry) GetVOk() (*int32, bool) { if o == nil || o.V == nil { return nil, false } @@ -97,7 +97,7 @@ func (o *TimeInner) GetVOk() (*int32, bool) { } // HasV returns a boolean if a field has been set. -func (o *TimeInner) HasV() bool { +func (o *TimeEntry) HasV() bool { if o != nil && o.V != nil { return true } @@ -106,12 +106,12 @@ func (o *TimeInner) HasV() bool { } // SetV gets a reference to the given int32 and assigns it to the V field. -func (o *TimeInner) SetV(v int32) *TimeInner { +func (o *TimeEntry) SetV(v int32) *TimeEntry { o.V = &v return o } -func (o TimeInner) MarshalJSON() ([]byte, error) { +func (o TimeEntry) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.T != nil { toSerialize["t"] = o.T @@ -121,15 +121,15 @@ func (o TimeInner) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal TimeInner: %w", err) + return nil, fmt.Errorf("failed to marshal TimeEntry: %w", err) } return serialized, nil } -func (o TimeInner) String() string { +func (o TimeEntry) String() string { out := "" out += fmt.Sprintf(" t=%v\n", o.T) out += fmt.Sprintf(" v=%v\n", o.V) - return fmt.Sprintf("TimeInner {\n%s}", out) + return fmt.Sprintf("TimeEntry {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/monitoring/model_unauthorized.go b/clients/algoliasearch-client-go/algolia/monitoring/model_unauthorized.go new file mode 100644 index 0000000000..f910fe1e3a --- /dev/null +++ b/clients/algoliasearch-client-go/algolia/monitoring/model_unauthorized.go @@ -0,0 +1,89 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +package monitoring + +import ( + "encoding/json" + "fmt" +) + +// Unauthorized struct for Unauthorized. +type Unauthorized struct { + Reason *string `json:"reason,omitempty"` +} + +type UnauthorizedOption func(f *Unauthorized) + +func WithUnauthorizedReason(val string) UnauthorizedOption { + return func(f *Unauthorized) { + f.Reason = &val + } +} + +// NewUnauthorized instantiates a new Unauthorized object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewUnauthorized(opts ...UnauthorizedOption) *Unauthorized { + this := &Unauthorized{} + for _, opt := range opts { + opt(this) + } + return this +} + +// NewEmptyUnauthorized return a pointer to an empty Unauthorized object. +func NewEmptyUnauthorized() *Unauthorized { + return &Unauthorized{} +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *Unauthorized) GetReason() string { + if o == nil || o.Reason == nil { + var ret string + return ret + } + return *o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Unauthorized) GetReasonOk() (*string, bool) { + if o == nil || o.Reason == nil { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *Unauthorized) HasReason() bool { + if o != nil && o.Reason != nil { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *Unauthorized) SetReason(v string) *Unauthorized { + o.Reason = &v + return o +} + +func (o Unauthorized) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Reason != nil { + toSerialize["reason"] = o.Reason + } + serialized, err := json.Marshal(toSerialize) + if err != nil { + return nil, fmt.Errorf("failed to marshal Unauthorized: %w", err) + } + + return serialized, nil +} + +func (o Unauthorized) String() string { + out := "" + out += fmt.Sprintf(" reason=%v\n", o.Reason) + return fmt.Sprintf("Unauthorized {\n%s}", out) +} diff --git a/clients/algoliasearch-client-go/algolia/query-suggestions/api_query_suggestions.go b/clients/algoliasearch-client-go/algolia/query-suggestions/api_query_suggestions.go index f8ba3ae04a..d0ce63c6d3 100644 --- a/clients/algoliasearch-client-go/algolia/query-suggestions/api_query_suggestions.go +++ b/clients/algoliasearch-client-go/algolia/query-suggestions/api_query_suggestions.go @@ -1219,10 +1219,10 @@ Required API Key ACLs: Request can be constructed by NewApiGetConfigStatusRequest with parameters below. @param indexName string - Query Suggestions index name. - @return GetConfigStatus200Response + @return ConfigStatus */ -func (c *APIClient) GetConfigStatus(r ApiGetConfigStatusRequest, opts ...RequestOption) (*GetConfigStatus200Response, error) { - var returnValue *GetConfigStatus200Response +func (c *APIClient) GetConfigStatus(r ApiGetConfigStatusRequest, opts ...RequestOption) (*ConfigStatus, error) { + var returnValue *ConfigStatus res, resBody, err := c.GetConfigStatusWithHTTPInfo(r, opts...) if err != nil { @@ -1342,10 +1342,10 @@ Required API Key ACLs: Request can be constructed by NewApiGetLogFileRequest with parameters below. @param indexName string - Query Suggestions index name. - @return GetLogFile200Response + @return LogFile */ -func (c *APIClient) GetLogFile(r ApiGetLogFileRequest, opts ...RequestOption) (*GetLogFile200Response, error) { - var returnValue *GetLogFile200Response +func (c *APIClient) GetLogFile(r ApiGetLogFileRequest, opts ...RequestOption) (*LogFile, error) { + var returnValue *LogFile res, resBody, err := c.GetLogFileWithHTTPInfo(r, opts...) if err != nil { diff --git a/clients/algoliasearch-client-go/algolia/query-suggestions/model_get_config_status_200_response.go b/clients/algoliasearch-client-go/algolia/query-suggestions/model_config_status.go similarity index 65% rename from clients/algoliasearch-client-go/algolia/query-suggestions/model_get_config_status_200_response.go rename to clients/algoliasearch-client-go/algolia/query-suggestions/model_config_status.go index fcc4bbbf41..dfd6d161af 100644 --- a/clients/algoliasearch-client-go/algolia/query-suggestions/model_get_config_status_200_response.go +++ b/clients/algoliasearch-client-go/algolia/query-suggestions/model_config_status.go @@ -6,8 +6,8 @@ import ( "fmt" ) -// GetConfigStatus200Response struct for GetConfigStatus200Response. -type GetConfigStatus200Response struct { +// ConfigStatus struct for ConfigStatus. +type ConfigStatus struct { // Name of the Query Suggestions index (case-sensitive). IndexName *string `json:"indexName,omitempty"` // Whether the creation or update of the Query Suggestions index is in progress. @@ -20,57 +20,57 @@ type GetConfigStatus200Response struct { LastSuccessfulBuildDuration *string `json:"lastSuccessfulBuildDuration,omitempty"` } -type GetConfigStatus200ResponseOption func(f *GetConfigStatus200Response) +type ConfigStatusOption func(f *ConfigStatus) -func WithGetConfigStatus200ResponseIndexName(val string) GetConfigStatus200ResponseOption { - return func(f *GetConfigStatus200Response) { +func WithConfigStatusIndexName(val string) ConfigStatusOption { + return func(f *ConfigStatus) { f.IndexName = &val } } -func WithGetConfigStatus200ResponseIsRunning(val bool) GetConfigStatus200ResponseOption { - return func(f *GetConfigStatus200Response) { +func WithConfigStatusIsRunning(val bool) ConfigStatusOption { + return func(f *ConfigStatus) { f.IsRunning = &val } } -func WithGetConfigStatus200ResponseLastBuiltAt(val string) GetConfigStatus200ResponseOption { - return func(f *GetConfigStatus200Response) { +func WithConfigStatusLastBuiltAt(val string) ConfigStatusOption { + return func(f *ConfigStatus) { f.LastBuiltAt = &val } } -func WithGetConfigStatus200ResponseLastSuccessfulBuiltAt(val string) GetConfigStatus200ResponseOption { - return func(f *GetConfigStatus200Response) { +func WithConfigStatusLastSuccessfulBuiltAt(val string) ConfigStatusOption { + return func(f *ConfigStatus) { f.LastSuccessfulBuiltAt = &val } } -func WithGetConfigStatus200ResponseLastSuccessfulBuildDuration(val string) GetConfigStatus200ResponseOption { - return func(f *GetConfigStatus200Response) { +func WithConfigStatusLastSuccessfulBuildDuration(val string) ConfigStatusOption { + return func(f *ConfigStatus) { f.LastSuccessfulBuildDuration = &val } } -// NewGetConfigStatus200Response instantiates a new GetConfigStatus200Response object +// NewConfigStatus instantiates a new ConfigStatus object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewGetConfigStatus200Response(opts ...GetConfigStatus200ResponseOption) *GetConfigStatus200Response { - this := &GetConfigStatus200Response{} +func NewConfigStatus(opts ...ConfigStatusOption) *ConfigStatus { + this := &ConfigStatus{} for _, opt := range opts { opt(this) } return this } -// NewEmptyGetConfigStatus200Response return a pointer to an empty GetConfigStatus200Response object. -func NewEmptyGetConfigStatus200Response() *GetConfigStatus200Response { - return &GetConfigStatus200Response{} +// NewEmptyConfigStatus return a pointer to an empty ConfigStatus object. +func NewEmptyConfigStatus() *ConfigStatus { + return &ConfigStatus{} } // GetIndexName returns the IndexName field value if set, zero value otherwise. -func (o *GetConfigStatus200Response) GetIndexName() string { +func (o *ConfigStatus) GetIndexName() string { if o == nil || o.IndexName == nil { var ret string return ret @@ -80,7 +80,7 @@ func (o *GetConfigStatus200Response) GetIndexName() string { // GetIndexNameOk returns a tuple with the IndexName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetConfigStatus200Response) GetIndexNameOk() (*string, bool) { +func (o *ConfigStatus) GetIndexNameOk() (*string, bool) { if o == nil || o.IndexName == nil { return nil, false } @@ -88,7 +88,7 @@ func (o *GetConfigStatus200Response) GetIndexNameOk() (*string, bool) { } // HasIndexName returns a boolean if a field has been set. -func (o *GetConfigStatus200Response) HasIndexName() bool { +func (o *ConfigStatus) HasIndexName() bool { if o != nil && o.IndexName != nil { return true } @@ -97,13 +97,13 @@ func (o *GetConfigStatus200Response) HasIndexName() bool { } // SetIndexName gets a reference to the given string and assigns it to the IndexName field. -func (o *GetConfigStatus200Response) SetIndexName(v string) *GetConfigStatus200Response { +func (o *ConfigStatus) SetIndexName(v string) *ConfigStatus { o.IndexName = &v return o } // GetIsRunning returns the IsRunning field value if set, zero value otherwise. -func (o *GetConfigStatus200Response) GetIsRunning() bool { +func (o *ConfigStatus) GetIsRunning() bool { if o == nil || o.IsRunning == nil { var ret bool return ret @@ -113,7 +113,7 @@ func (o *GetConfigStatus200Response) GetIsRunning() bool { // GetIsRunningOk returns a tuple with the IsRunning field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetConfigStatus200Response) GetIsRunningOk() (*bool, bool) { +func (o *ConfigStatus) GetIsRunningOk() (*bool, bool) { if o == nil || o.IsRunning == nil { return nil, false } @@ -121,7 +121,7 @@ func (o *GetConfigStatus200Response) GetIsRunningOk() (*bool, bool) { } // HasIsRunning returns a boolean if a field has been set. -func (o *GetConfigStatus200Response) HasIsRunning() bool { +func (o *ConfigStatus) HasIsRunning() bool { if o != nil && o.IsRunning != nil { return true } @@ -130,13 +130,13 @@ func (o *GetConfigStatus200Response) HasIsRunning() bool { } // SetIsRunning gets a reference to the given bool and assigns it to the IsRunning field. -func (o *GetConfigStatus200Response) SetIsRunning(v bool) *GetConfigStatus200Response { +func (o *ConfigStatus) SetIsRunning(v bool) *ConfigStatus { o.IsRunning = &v return o } // GetLastBuiltAt returns the LastBuiltAt field value if set, zero value otherwise. -func (o *GetConfigStatus200Response) GetLastBuiltAt() string { +func (o *ConfigStatus) GetLastBuiltAt() string { if o == nil || o.LastBuiltAt == nil { var ret string return ret @@ -146,7 +146,7 @@ func (o *GetConfigStatus200Response) GetLastBuiltAt() string { // GetLastBuiltAtOk returns a tuple with the LastBuiltAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetConfigStatus200Response) GetLastBuiltAtOk() (*string, bool) { +func (o *ConfigStatus) GetLastBuiltAtOk() (*string, bool) { if o == nil || o.LastBuiltAt == nil { return nil, false } @@ -154,7 +154,7 @@ func (o *GetConfigStatus200Response) GetLastBuiltAtOk() (*string, bool) { } // HasLastBuiltAt returns a boolean if a field has been set. -func (o *GetConfigStatus200Response) HasLastBuiltAt() bool { +func (o *ConfigStatus) HasLastBuiltAt() bool { if o != nil && o.LastBuiltAt != nil { return true } @@ -163,13 +163,13 @@ func (o *GetConfigStatus200Response) HasLastBuiltAt() bool { } // SetLastBuiltAt gets a reference to the given string and assigns it to the LastBuiltAt field. -func (o *GetConfigStatus200Response) SetLastBuiltAt(v string) *GetConfigStatus200Response { +func (o *ConfigStatus) SetLastBuiltAt(v string) *ConfigStatus { o.LastBuiltAt = &v return o } // GetLastSuccessfulBuiltAt returns the LastSuccessfulBuiltAt field value if set, zero value otherwise. -func (o *GetConfigStatus200Response) GetLastSuccessfulBuiltAt() string { +func (o *ConfigStatus) GetLastSuccessfulBuiltAt() string { if o == nil || o.LastSuccessfulBuiltAt == nil { var ret string return ret @@ -179,7 +179,7 @@ func (o *GetConfigStatus200Response) GetLastSuccessfulBuiltAt() string { // GetLastSuccessfulBuiltAtOk returns a tuple with the LastSuccessfulBuiltAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetConfigStatus200Response) GetLastSuccessfulBuiltAtOk() (*string, bool) { +func (o *ConfigStatus) GetLastSuccessfulBuiltAtOk() (*string, bool) { if o == nil || o.LastSuccessfulBuiltAt == nil { return nil, false } @@ -187,7 +187,7 @@ func (o *GetConfigStatus200Response) GetLastSuccessfulBuiltAtOk() (*string, bool } // HasLastSuccessfulBuiltAt returns a boolean if a field has been set. -func (o *GetConfigStatus200Response) HasLastSuccessfulBuiltAt() bool { +func (o *ConfigStatus) HasLastSuccessfulBuiltAt() bool { if o != nil && o.LastSuccessfulBuiltAt != nil { return true } @@ -196,13 +196,13 @@ func (o *GetConfigStatus200Response) HasLastSuccessfulBuiltAt() bool { } // SetLastSuccessfulBuiltAt gets a reference to the given string and assigns it to the LastSuccessfulBuiltAt field. -func (o *GetConfigStatus200Response) SetLastSuccessfulBuiltAt(v string) *GetConfigStatus200Response { +func (o *ConfigStatus) SetLastSuccessfulBuiltAt(v string) *ConfigStatus { o.LastSuccessfulBuiltAt = &v return o } // GetLastSuccessfulBuildDuration returns the LastSuccessfulBuildDuration field value if set, zero value otherwise. -func (o *GetConfigStatus200Response) GetLastSuccessfulBuildDuration() string { +func (o *ConfigStatus) GetLastSuccessfulBuildDuration() string { if o == nil || o.LastSuccessfulBuildDuration == nil { var ret string return ret @@ -212,7 +212,7 @@ func (o *GetConfigStatus200Response) GetLastSuccessfulBuildDuration() string { // GetLastSuccessfulBuildDurationOk returns a tuple with the LastSuccessfulBuildDuration field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetConfigStatus200Response) GetLastSuccessfulBuildDurationOk() (*string, bool) { +func (o *ConfigStatus) GetLastSuccessfulBuildDurationOk() (*string, bool) { if o == nil || o.LastSuccessfulBuildDuration == nil { return nil, false } @@ -220,7 +220,7 @@ func (o *GetConfigStatus200Response) GetLastSuccessfulBuildDurationOk() (*string } // HasLastSuccessfulBuildDuration returns a boolean if a field has been set. -func (o *GetConfigStatus200Response) HasLastSuccessfulBuildDuration() bool { +func (o *ConfigStatus) HasLastSuccessfulBuildDuration() bool { if o != nil && o.LastSuccessfulBuildDuration != nil { return true } @@ -229,12 +229,12 @@ func (o *GetConfigStatus200Response) HasLastSuccessfulBuildDuration() bool { } // SetLastSuccessfulBuildDuration gets a reference to the given string and assigns it to the LastSuccessfulBuildDuration field. -func (o *GetConfigStatus200Response) SetLastSuccessfulBuildDuration(v string) *GetConfigStatus200Response { +func (o *ConfigStatus) SetLastSuccessfulBuildDuration(v string) *ConfigStatus { o.LastSuccessfulBuildDuration = &v return o } -func (o GetConfigStatus200Response) MarshalJSON() ([]byte, error) { +func (o ConfigStatus) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.IndexName != nil { toSerialize["indexName"] = o.IndexName @@ -253,18 +253,18 @@ func (o GetConfigStatus200Response) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal GetConfigStatus200Response: %w", err) + return nil, fmt.Errorf("failed to marshal ConfigStatus: %w", err) } return serialized, nil } -func (o GetConfigStatus200Response) String() string { +func (o ConfigStatus) String() string { out := "" out += fmt.Sprintf(" indexName=%v\n", o.IndexName) out += fmt.Sprintf(" isRunning=%v\n", o.IsRunning) out += fmt.Sprintf(" lastBuiltAt=%v\n", o.LastBuiltAt) out += fmt.Sprintf(" lastSuccessfulBuiltAt=%v\n", o.LastSuccessfulBuiltAt) out += fmt.Sprintf(" lastSuccessfulBuildDuration=%v\n", o.LastSuccessfulBuildDuration) - return fmt.Sprintf("GetConfigStatus200Response {\n%s}", out) + return fmt.Sprintf("ConfigStatus {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/query-suggestions/model_get_log_file_200_response.go b/clients/algoliasearch-client-go/algolia/query-suggestions/model_log_file.go similarity index 65% rename from clients/algoliasearch-client-go/algolia/query-suggestions/model_get_log_file_200_response.go rename to clients/algoliasearch-client-go/algolia/query-suggestions/model_log_file.go index 64503ed9f0..e7790c4d18 100644 --- a/clients/algoliasearch-client-go/algolia/query-suggestions/model_get_log_file_200_response.go +++ b/clients/algoliasearch-client-go/algolia/query-suggestions/model_log_file.go @@ -6,8 +6,8 @@ import ( "fmt" ) -// GetLogFile200Response struct for GetLogFile200Response. -type GetLogFile200Response struct { +// LogFile struct for LogFile. +type LogFile struct { // Date and time of the log entry, in RFC 3339 format. Timestamp *string `json:"timestamp,omitempty"` Level *LogLevel `json:"level,omitempty"` @@ -17,51 +17,51 @@ type GetLogFile200Response struct { ContextLevel *int32 `json:"contextLevel,omitempty"` } -type GetLogFile200ResponseOption func(f *GetLogFile200Response) +type LogFileOption func(f *LogFile) -func WithGetLogFile200ResponseTimestamp(val string) GetLogFile200ResponseOption { - return func(f *GetLogFile200Response) { +func WithLogFileTimestamp(val string) LogFileOption { + return func(f *LogFile) { f.Timestamp = &val } } -func WithGetLogFile200ResponseLevel(val LogLevel) GetLogFile200ResponseOption { - return func(f *GetLogFile200Response) { +func WithLogFileLevel(val LogLevel) LogFileOption { + return func(f *LogFile) { f.Level = &val } } -func WithGetLogFile200ResponseMessage(val string) GetLogFile200ResponseOption { - return func(f *GetLogFile200Response) { +func WithLogFileMessage(val string) LogFileOption { + return func(f *LogFile) { f.Message = &val } } -func WithGetLogFile200ResponseContextLevel(val int32) GetLogFile200ResponseOption { - return func(f *GetLogFile200Response) { +func WithLogFileContextLevel(val int32) LogFileOption { + return func(f *LogFile) { f.ContextLevel = &val } } -// NewGetLogFile200Response instantiates a new GetLogFile200Response object +// NewLogFile instantiates a new LogFile object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewGetLogFile200Response(opts ...GetLogFile200ResponseOption) *GetLogFile200Response { - this := &GetLogFile200Response{} +func NewLogFile(opts ...LogFileOption) *LogFile { + this := &LogFile{} for _, opt := range opts { opt(this) } return this } -// NewEmptyGetLogFile200Response return a pointer to an empty GetLogFile200Response object. -func NewEmptyGetLogFile200Response() *GetLogFile200Response { - return &GetLogFile200Response{} +// NewEmptyLogFile return a pointer to an empty LogFile object. +func NewEmptyLogFile() *LogFile { + return &LogFile{} } // GetTimestamp returns the Timestamp field value if set, zero value otherwise. -func (o *GetLogFile200Response) GetTimestamp() string { +func (o *LogFile) GetTimestamp() string { if o == nil || o.Timestamp == nil { var ret string return ret @@ -71,7 +71,7 @@ func (o *GetLogFile200Response) GetTimestamp() string { // GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetLogFile200Response) GetTimestampOk() (*string, bool) { +func (o *LogFile) GetTimestampOk() (*string, bool) { if o == nil || o.Timestamp == nil { return nil, false } @@ -79,7 +79,7 @@ func (o *GetLogFile200Response) GetTimestampOk() (*string, bool) { } // HasTimestamp returns a boolean if a field has been set. -func (o *GetLogFile200Response) HasTimestamp() bool { +func (o *LogFile) HasTimestamp() bool { if o != nil && o.Timestamp != nil { return true } @@ -88,13 +88,13 @@ func (o *GetLogFile200Response) HasTimestamp() bool { } // SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. -func (o *GetLogFile200Response) SetTimestamp(v string) *GetLogFile200Response { +func (o *LogFile) SetTimestamp(v string) *LogFile { o.Timestamp = &v return o } // GetLevel returns the Level field value if set, zero value otherwise. -func (o *GetLogFile200Response) GetLevel() LogLevel { +func (o *LogFile) GetLevel() LogLevel { if o == nil || o.Level == nil { var ret LogLevel return ret @@ -104,7 +104,7 @@ func (o *GetLogFile200Response) GetLevel() LogLevel { // GetLevelOk returns a tuple with the Level field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetLogFile200Response) GetLevelOk() (*LogLevel, bool) { +func (o *LogFile) GetLevelOk() (*LogLevel, bool) { if o == nil || o.Level == nil { return nil, false } @@ -112,7 +112,7 @@ func (o *GetLogFile200Response) GetLevelOk() (*LogLevel, bool) { } // HasLevel returns a boolean if a field has been set. -func (o *GetLogFile200Response) HasLevel() bool { +func (o *LogFile) HasLevel() bool { if o != nil && o.Level != nil { return true } @@ -121,13 +121,13 @@ func (o *GetLogFile200Response) HasLevel() bool { } // SetLevel gets a reference to the given LogLevel and assigns it to the Level field. -func (o *GetLogFile200Response) SetLevel(v LogLevel) *GetLogFile200Response { +func (o *LogFile) SetLevel(v LogLevel) *LogFile { o.Level = &v return o } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *GetLogFile200Response) GetMessage() string { +func (o *LogFile) GetMessage() string { if o == nil || o.Message == nil { var ret string return ret @@ -137,7 +137,7 @@ func (o *GetLogFile200Response) GetMessage() string { // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetLogFile200Response) GetMessageOk() (*string, bool) { +func (o *LogFile) GetMessageOk() (*string, bool) { if o == nil || o.Message == nil { return nil, false } @@ -145,7 +145,7 @@ func (o *GetLogFile200Response) GetMessageOk() (*string, bool) { } // HasMessage returns a boolean if a field has been set. -func (o *GetLogFile200Response) HasMessage() bool { +func (o *LogFile) HasMessage() bool { if o != nil && o.Message != nil { return true } @@ -154,13 +154,13 @@ func (o *GetLogFile200Response) HasMessage() bool { } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *GetLogFile200Response) SetMessage(v string) *GetLogFile200Response { +func (o *LogFile) SetMessage(v string) *LogFile { o.Message = &v return o } // GetContextLevel returns the ContextLevel field value if set, zero value otherwise. -func (o *GetLogFile200Response) GetContextLevel() int32 { +func (o *LogFile) GetContextLevel() int32 { if o == nil || o.ContextLevel == nil { var ret int32 return ret @@ -170,7 +170,7 @@ func (o *GetLogFile200Response) GetContextLevel() int32 { // GetContextLevelOk returns a tuple with the ContextLevel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetLogFile200Response) GetContextLevelOk() (*int32, bool) { +func (o *LogFile) GetContextLevelOk() (*int32, bool) { if o == nil || o.ContextLevel == nil { return nil, false } @@ -178,7 +178,7 @@ func (o *GetLogFile200Response) GetContextLevelOk() (*int32, bool) { } // HasContextLevel returns a boolean if a field has been set. -func (o *GetLogFile200Response) HasContextLevel() bool { +func (o *LogFile) HasContextLevel() bool { if o != nil && o.ContextLevel != nil { return true } @@ -187,12 +187,12 @@ func (o *GetLogFile200Response) HasContextLevel() bool { } // SetContextLevel gets a reference to the given int32 and assigns it to the ContextLevel field. -func (o *GetLogFile200Response) SetContextLevel(v int32) *GetLogFile200Response { +func (o *LogFile) SetContextLevel(v int32) *LogFile { o.ContextLevel = &v return o } -func (o GetLogFile200Response) MarshalJSON() ([]byte, error) { +func (o LogFile) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Timestamp != nil { toSerialize["timestamp"] = o.Timestamp @@ -208,17 +208,17 @@ func (o GetLogFile200Response) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal GetLogFile200Response: %w", err) + return nil, fmt.Errorf("failed to marshal LogFile: %w", err) } return serialized, nil } -func (o GetLogFile200Response) String() string { +func (o LogFile) String() string { out := "" out += fmt.Sprintf(" timestamp=%v\n", o.Timestamp) out += fmt.Sprintf(" level=%v\n", o.Level) out += fmt.Sprintf(" message=%v\n", o.Message) out += fmt.Sprintf(" contextLevel=%v\n", o.ContextLevel) - return fmt.Sprintf("GetLogFile200Response {\n%s}", out) + return fmt.Sprintf("LogFile {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_around_precision.go b/clients/algoliasearch-client-go/algolia/recommend/model_around_precision.go index 505d693b83..9398b5d5d7 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_around_precision.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_around_precision.go @@ -8,8 +8,8 @@ import ( // AroundPrecision - Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. type AroundPrecision struct { - ArrayOfAroundPrecisionFromValueInner *[]AroundPrecisionFromValueInner - Int32 *int32 + ArrayOfModelRange *[]ModelRange + Int32 *int32 } // int32AsAroundPrecision is a convenience function that returns int32 wrapped in AroundPrecision. @@ -19,27 +19,27 @@ func Int32AsAroundPrecision(v int32) *AroundPrecision { } } -// []AroundPrecisionFromValueInnerAsAroundPrecision is a convenience function that returns []AroundPrecisionFromValueInner wrapped in AroundPrecision. -func ArrayOfAroundPrecisionFromValueInnerAsAroundPrecision(v []AroundPrecisionFromValueInner) *AroundPrecision { +// []ModelRangeAsAroundPrecision is a convenience function that returns []ModelRange wrapped in AroundPrecision. +func ArrayOfModelRangeAsAroundPrecision(v []ModelRange) *AroundPrecision { return &AroundPrecision{ - ArrayOfAroundPrecisionFromValueInner: &v, + ArrayOfModelRange: &v, } } // Unmarshal JSON data into one of the pointers in the struct. func (dst *AroundPrecision) UnmarshalJSON(data []byte) error { var err error - // try to unmarshal data into ArrayOfAroundPrecisionFromValueInner - err = newStrictDecoder(data).Decode(&dst.ArrayOfAroundPrecisionFromValueInner) - if err == nil && validateStruct(dst.ArrayOfAroundPrecisionFromValueInner) == nil { - jsonArrayOfAroundPrecisionFromValueInner, _ := json.Marshal(dst.ArrayOfAroundPrecisionFromValueInner) - if string(jsonArrayOfAroundPrecisionFromValueInner) == "{}" { // empty struct - dst.ArrayOfAroundPrecisionFromValueInner = nil + // try to unmarshal data into ArrayOfModelRange + err = newStrictDecoder(data).Decode(&dst.ArrayOfModelRange) + if err == nil && validateStruct(dst.ArrayOfModelRange) == nil { + jsonArrayOfModelRange, _ := json.Marshal(dst.ArrayOfModelRange) + if string(jsonArrayOfModelRange) == "{}" { // empty struct + dst.ArrayOfModelRange = nil } else { return nil } } else { - dst.ArrayOfAroundPrecisionFromValueInner = nil + dst.ArrayOfModelRange = nil } // try to unmarshal data into Int32 @@ -60,10 +60,10 @@ func (dst *AroundPrecision) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON. func (src AroundPrecision) MarshalJSON() ([]byte, error) { - if src.ArrayOfAroundPrecisionFromValueInner != nil { - serialized, err := json.Marshal(&src.ArrayOfAroundPrecisionFromValueInner) + if src.ArrayOfModelRange != nil { + serialized, err := json.Marshal(&src.ArrayOfModelRange) if err != nil { - return nil, fmt.Errorf("failed to unmarshal one of ArrayOfAroundPrecisionFromValueInner of AroundPrecision: %w", err) + return nil, fmt.Errorf("failed to unmarshal one of ArrayOfModelRange of AroundPrecision: %w", err) } return serialized, nil @@ -83,8 +83,8 @@ func (src AroundPrecision) MarshalJSON() ([]byte, error) { // Get the actual instance. func (obj AroundPrecision) GetActualInstance() any { - if obj.ArrayOfAroundPrecisionFromValueInner != nil { - return *obj.ArrayOfAroundPrecisionFromValueInner + if obj.ArrayOfModelRange != nil { + return *obj.ArrayOfModelRange } if obj.Int32 != nil { diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_around_precision_from_value_inner.go b/clients/algoliasearch-client-go/algolia/recommend/model_range.go similarity index 57% rename from clients/algoliasearch-client-go/algolia/recommend/model_around_precision_from_value_inner.go rename to clients/algoliasearch-client-go/algolia/recommend/model_range.go index 09e0c473df..7e8242c493 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_around_precision_from_value_inner.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_range.go @@ -6,47 +6,47 @@ import ( "fmt" ) -// AroundPrecisionFromValueInner Range object with lower and upper values in meters to define custom ranges. -type AroundPrecisionFromValueInner struct { +// ModelRange Range object with lower and upper values in meters to define custom ranges. +type ModelRange struct { // Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. From *int32 `json:"from,omitempty"` // Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. Value *int32 `json:"value,omitempty"` } -type AroundPrecisionFromValueInnerOption func(f *AroundPrecisionFromValueInner) +type ModelRangeOption func(f *ModelRange) -func WithAroundPrecisionFromValueInnerFrom(val int32) AroundPrecisionFromValueInnerOption { - return func(f *AroundPrecisionFromValueInner) { +func WithModelRangeFrom(val int32) ModelRangeOption { + return func(f *ModelRange) { f.From = &val } } -func WithAroundPrecisionFromValueInnerValue(val int32) AroundPrecisionFromValueInnerOption { - return func(f *AroundPrecisionFromValueInner) { +func WithModelRangeValue(val int32) ModelRangeOption { + return func(f *ModelRange) { f.Value = &val } } -// NewAroundPrecisionFromValueInner instantiates a new AroundPrecisionFromValueInner object +// NewModelRange instantiates a new ModelRange object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewAroundPrecisionFromValueInner(opts ...AroundPrecisionFromValueInnerOption) *AroundPrecisionFromValueInner { - this := &AroundPrecisionFromValueInner{} +func NewModelRange(opts ...ModelRangeOption) *ModelRange { + this := &ModelRange{} for _, opt := range opts { opt(this) } return this } -// NewEmptyAroundPrecisionFromValueInner return a pointer to an empty AroundPrecisionFromValueInner object. -func NewEmptyAroundPrecisionFromValueInner() *AroundPrecisionFromValueInner { - return &AroundPrecisionFromValueInner{} +// NewEmptyModelRange return a pointer to an empty ModelRange object. +func NewEmptyModelRange() *ModelRange { + return &ModelRange{} } // GetFrom returns the From field value if set, zero value otherwise. -func (o *AroundPrecisionFromValueInner) GetFrom() int32 { +func (o *ModelRange) GetFrom() int32 { if o == nil || o.From == nil { var ret int32 return ret @@ -56,7 +56,7 @@ func (o *AroundPrecisionFromValueInner) GetFrom() int32 { // GetFromOk returns a tuple with the From field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AroundPrecisionFromValueInner) GetFromOk() (*int32, bool) { +func (o *ModelRange) GetFromOk() (*int32, bool) { if o == nil || o.From == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *AroundPrecisionFromValueInner) GetFromOk() (*int32, bool) { } // HasFrom returns a boolean if a field has been set. -func (o *AroundPrecisionFromValueInner) HasFrom() bool { +func (o *ModelRange) HasFrom() bool { if o != nil && o.From != nil { return true } @@ -73,13 +73,13 @@ func (o *AroundPrecisionFromValueInner) HasFrom() bool { } // SetFrom gets a reference to the given int32 and assigns it to the From field. -func (o *AroundPrecisionFromValueInner) SetFrom(v int32) *AroundPrecisionFromValueInner { +func (o *ModelRange) SetFrom(v int32) *ModelRange { o.From = &v return o } // GetValue returns the Value field value if set, zero value otherwise. -func (o *AroundPrecisionFromValueInner) GetValue() int32 { +func (o *ModelRange) GetValue() int32 { if o == nil || o.Value == nil { var ret int32 return ret @@ -89,7 +89,7 @@ func (o *AroundPrecisionFromValueInner) GetValue() int32 { // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AroundPrecisionFromValueInner) GetValueOk() (*int32, bool) { +func (o *ModelRange) GetValueOk() (*int32, bool) { if o == nil || o.Value == nil { return nil, false } @@ -97,7 +97,7 @@ func (o *AroundPrecisionFromValueInner) GetValueOk() (*int32, bool) { } // HasValue returns a boolean if a field has been set. -func (o *AroundPrecisionFromValueInner) HasValue() bool { +func (o *ModelRange) HasValue() bool { if o != nil && o.Value != nil { return true } @@ -106,12 +106,12 @@ func (o *AroundPrecisionFromValueInner) HasValue() bool { } // SetValue gets a reference to the given int32 and assigns it to the Value field. -func (o *AroundPrecisionFromValueInner) SetValue(v int32) *AroundPrecisionFromValueInner { +func (o *ModelRange) SetValue(v int32) *ModelRange { o.Value = &v return o } -func (o AroundPrecisionFromValueInner) MarshalJSON() ([]byte, error) { +func (o ModelRange) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.From != nil { toSerialize["from"] = o.From @@ -121,15 +121,15 @@ func (o AroundPrecisionFromValueInner) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal AroundPrecisionFromValueInner: %w", err) + return nil, fmt.Errorf("failed to marshal ModelRange: %w", err) } return serialized, nil } -func (o AroundPrecisionFromValueInner) String() string { +func (o ModelRange) String() string { out := "" out += fmt.Sprintf(" from=%v\n", o.From) out += fmt.Sprintf(" value=%v\n", o.Value) - return fmt.Sprintf("AroundPrecisionFromValueInner {\n%s}", out) + return fmt.Sprintf("ModelRange {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_recommend_rule.go b/clients/algoliasearch-client-go/algolia/recommend/model_recommend_rule.go index 901821eaaf..7d78f65ab6 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_recommend_rule.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_recommend_rule.go @@ -8,7 +8,7 @@ import ( // RecommendRule Recommend rule. type RecommendRule struct { - Metadata *RecommendRuleMetadata `json:"_metadata,omitempty"` + Metadata *RuleMetadata `json:"_metadata,omitempty"` // Unique identifier of a rule object. ObjectID *string `json:"objectID,omitempty"` Condition *Condition `json:"condition,omitempty"` @@ -21,7 +21,7 @@ type RecommendRule struct { type RecommendRuleOption func(f *RecommendRule) -func WithRecommendRuleMetadata(val RecommendRuleMetadata) RecommendRuleOption { +func WithRecommendRuleMetadata(val RuleMetadata) RecommendRuleOption { return func(f *RecommendRule) { f.Metadata = &val } @@ -75,9 +75,9 @@ func NewEmptyRecommendRule() *RecommendRule { } // GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *RecommendRule) GetMetadata() RecommendRuleMetadata { +func (o *RecommendRule) GetMetadata() RuleMetadata { if o == nil || o.Metadata == nil { - var ret RecommendRuleMetadata + var ret RuleMetadata return ret } return *o.Metadata @@ -85,7 +85,7 @@ func (o *RecommendRule) GetMetadata() RecommendRuleMetadata { // GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecommendRule) GetMetadataOk() (*RecommendRuleMetadata, bool) { +func (o *RecommendRule) GetMetadataOk() (*RuleMetadata, bool) { if o == nil || o.Metadata == nil { return nil, false } @@ -101,8 +101,8 @@ func (o *RecommendRule) HasMetadata() bool { return false } -// SetMetadata gets a reference to the given RecommendRuleMetadata and assigns it to the Metadata field. -func (o *RecommendRule) SetMetadata(v *RecommendRuleMetadata) *RecommendRule { +// SetMetadata gets a reference to the given RuleMetadata and assigns it to the Metadata field. +func (o *RecommendRule) SetMetadata(v *RuleMetadata) *RecommendRule { o.Metadata = v return o } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_metadata_data.go b/clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_data.go similarity index 53% rename from clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_metadata_data.go rename to clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_data.go index 78653b2e4f..70fcb68b51 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_metadata_data.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_data.go @@ -6,28 +6,28 @@ import ( "fmt" ) -// RedirectRuleIndexMetadataData Redirect rule data. -type RedirectRuleIndexMetadataData struct { +// RedirectRuleIndexData Redirect rule data. +type RedirectRuleIndexData struct { RuleObjectID string `json:"ruleObjectID"` } -// NewRedirectRuleIndexMetadataData instantiates a new RedirectRuleIndexMetadataData object +// NewRedirectRuleIndexData instantiates a new RedirectRuleIndexData object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewRedirectRuleIndexMetadataData(ruleObjectID string) *RedirectRuleIndexMetadataData { - this := &RedirectRuleIndexMetadataData{} +func NewRedirectRuleIndexData(ruleObjectID string) *RedirectRuleIndexData { + this := &RedirectRuleIndexData{} this.RuleObjectID = ruleObjectID return this } -// NewEmptyRedirectRuleIndexMetadataData return a pointer to an empty RedirectRuleIndexMetadataData object. -func NewEmptyRedirectRuleIndexMetadataData() *RedirectRuleIndexMetadataData { - return &RedirectRuleIndexMetadataData{} +// NewEmptyRedirectRuleIndexData return a pointer to an empty RedirectRuleIndexData object. +func NewEmptyRedirectRuleIndexData() *RedirectRuleIndexData { + return &RedirectRuleIndexData{} } // GetRuleObjectID returns the RuleObjectID field value. -func (o *RedirectRuleIndexMetadataData) GetRuleObjectID() string { +func (o *RedirectRuleIndexData) GetRuleObjectID() string { if o == nil { var ret string return ret @@ -38,7 +38,7 @@ func (o *RedirectRuleIndexMetadataData) GetRuleObjectID() string { // GetRuleObjectIDOk returns a tuple with the RuleObjectID field value // and a boolean to check if the value has been set. -func (o *RedirectRuleIndexMetadataData) GetRuleObjectIDOk() (*string, bool) { +func (o *RedirectRuleIndexData) GetRuleObjectIDOk() (*string, bool) { if o == nil { return nil, false } @@ -46,26 +46,26 @@ func (o *RedirectRuleIndexMetadataData) GetRuleObjectIDOk() (*string, bool) { } // SetRuleObjectID sets field value. -func (o *RedirectRuleIndexMetadataData) SetRuleObjectID(v string) *RedirectRuleIndexMetadataData { +func (o *RedirectRuleIndexData) SetRuleObjectID(v string) *RedirectRuleIndexData { o.RuleObjectID = v return o } -func (o RedirectRuleIndexMetadataData) MarshalJSON() ([]byte, error) { +func (o RedirectRuleIndexData) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if true { toSerialize["ruleObjectID"] = o.RuleObjectID } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal RedirectRuleIndexMetadataData: %w", err) + return nil, fmt.Errorf("failed to marshal RedirectRuleIndexData: %w", err) } return serialized, nil } -func (o RedirectRuleIndexMetadataData) String() string { +func (o RedirectRuleIndexData) String() string { out := "" out += fmt.Sprintf(" ruleObjectID=%v\n", o.RuleObjectID) - return fmt.Sprintf("RedirectRuleIndexMetadataData {\n%s}", out) + return fmt.Sprintf("RedirectRuleIndexData {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_metadata.go b/clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_metadata.go index 5478e4b18e..4bf342d060 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_metadata.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_redirect_rule_index_metadata.go @@ -15,15 +15,15 @@ type RedirectRuleIndexMetadata struct { // Reason for the redirect rule. Reason string `json:"reason"` // Redirect rule status. - Succeed bool `json:"succeed"` - Data RedirectRuleIndexMetadataData `json:"data"` + Succeed bool `json:"succeed"` + Data RedirectRuleIndexData `json:"data"` } // NewRedirectRuleIndexMetadata instantiates a new RedirectRuleIndexMetadata object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewRedirectRuleIndexMetadata(source string, dest string, reason string, succeed bool, data RedirectRuleIndexMetadataData) *RedirectRuleIndexMetadata { +func NewRedirectRuleIndexMetadata(source string, dest string, reason string, succeed bool, data RedirectRuleIndexData) *RedirectRuleIndexMetadata { this := &RedirectRuleIndexMetadata{} this.Source = source this.Dest = dest @@ -139,9 +139,9 @@ func (o *RedirectRuleIndexMetadata) SetSucceed(v bool) *RedirectRuleIndexMetadat } // GetData returns the Data field value. -func (o *RedirectRuleIndexMetadata) GetData() RedirectRuleIndexMetadataData { +func (o *RedirectRuleIndexMetadata) GetData() RedirectRuleIndexData { if o == nil { - var ret RedirectRuleIndexMetadataData + var ret RedirectRuleIndexData return ret } @@ -150,7 +150,7 @@ func (o *RedirectRuleIndexMetadata) GetData() RedirectRuleIndexMetadataData { // GetDataOk returns a tuple with the Data field value // and a boolean to check if the value has been set. -func (o *RedirectRuleIndexMetadata) GetDataOk() (*RedirectRuleIndexMetadataData, bool) { +func (o *RedirectRuleIndexMetadata) GetDataOk() (*RedirectRuleIndexData, bool) { if o == nil { return nil, false } @@ -158,7 +158,7 @@ func (o *RedirectRuleIndexMetadata) GetDataOk() (*RedirectRuleIndexMetadataData, } // SetData sets field value. -func (o *RedirectRuleIndexMetadata) SetData(v *RedirectRuleIndexMetadataData) *RedirectRuleIndexMetadata { +func (o *RedirectRuleIndexMetadata) SetData(v *RedirectRuleIndexData) *RedirectRuleIndexMetadata { o.Data = *v return o } diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_recommend_rule__metadata.go b/clients/algoliasearch-client-go/algolia/recommend/model_rule_metadata.go similarity index 58% rename from clients/algoliasearch-client-go/algolia/recommend/model_recommend_rule__metadata.go rename to clients/algoliasearch-client-go/algolia/recommend/model_rule_metadata.go index 8bb2c5f362..0543137900 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_recommend_rule__metadata.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_rule_metadata.go @@ -6,39 +6,39 @@ import ( "fmt" ) -// RecommendRuleMetadata Rule metadata. -type RecommendRuleMetadata struct { +// RuleMetadata Rule metadata. +type RuleMetadata struct { // Date and time when the object was updated, in RFC 3339 format. LastUpdate *string `json:"lastUpdate,omitempty"` } -type RecommendRuleMetadataOption func(f *RecommendRuleMetadata) +type RuleMetadataOption func(f *RuleMetadata) -func WithRecommendRuleMetadataLastUpdate(val string) RecommendRuleMetadataOption { - return func(f *RecommendRuleMetadata) { +func WithRuleMetadataLastUpdate(val string) RuleMetadataOption { + return func(f *RuleMetadata) { f.LastUpdate = &val } } -// NewRecommendRuleMetadata instantiates a new RecommendRuleMetadata object +// NewRuleMetadata instantiates a new RuleMetadata object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewRecommendRuleMetadata(opts ...RecommendRuleMetadataOption) *RecommendRuleMetadata { - this := &RecommendRuleMetadata{} +func NewRuleMetadata(opts ...RuleMetadataOption) *RuleMetadata { + this := &RuleMetadata{} for _, opt := range opts { opt(this) } return this } -// NewEmptyRecommendRuleMetadata return a pointer to an empty RecommendRuleMetadata object. -func NewEmptyRecommendRuleMetadata() *RecommendRuleMetadata { - return &RecommendRuleMetadata{} +// NewEmptyRuleMetadata return a pointer to an empty RuleMetadata object. +func NewEmptyRuleMetadata() *RuleMetadata { + return &RuleMetadata{} } // GetLastUpdate returns the LastUpdate field value if set, zero value otherwise. -func (o *RecommendRuleMetadata) GetLastUpdate() string { +func (o *RuleMetadata) GetLastUpdate() string { if o == nil || o.LastUpdate == nil { var ret string return ret @@ -48,7 +48,7 @@ func (o *RecommendRuleMetadata) GetLastUpdate() string { // GetLastUpdateOk returns a tuple with the LastUpdate field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RecommendRuleMetadata) GetLastUpdateOk() (*string, bool) { +func (o *RuleMetadata) GetLastUpdateOk() (*string, bool) { if o == nil || o.LastUpdate == nil { return nil, false } @@ -56,7 +56,7 @@ func (o *RecommendRuleMetadata) GetLastUpdateOk() (*string, bool) { } // HasLastUpdate returns a boolean if a field has been set. -func (o *RecommendRuleMetadata) HasLastUpdate() bool { +func (o *RuleMetadata) HasLastUpdate() bool { if o != nil && o.LastUpdate != nil { return true } @@ -65,26 +65,26 @@ func (o *RecommendRuleMetadata) HasLastUpdate() bool { } // SetLastUpdate gets a reference to the given string and assigns it to the LastUpdate field. -func (o *RecommendRuleMetadata) SetLastUpdate(v string) *RecommendRuleMetadata { +func (o *RuleMetadata) SetLastUpdate(v string) *RuleMetadata { o.LastUpdate = &v return o } -func (o RecommendRuleMetadata) MarshalJSON() ([]byte, error) { +func (o RuleMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.LastUpdate != nil { toSerialize["lastUpdate"] = o.LastUpdate } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal RecommendRuleMetadata: %w", err) + return nil, fmt.Errorf("failed to marshal RuleMetadata: %w", err) } return serialized, nil } -func (o RecommendRuleMetadata) String() string { +func (o RuleMetadata) String() string { out := "" out += fmt.Sprintf(" lastUpdate=%v\n", o.LastUpdate) - return fmt.Sprintf("RecommendRuleMetadata {\n%s}", out) + return fmt.Sprintf("RuleMetadata {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/search/model_around_precision.go b/clients/algoliasearch-client-go/algolia/search/model_around_precision.go index cbd2a081b3..2ad97c2510 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_around_precision.go +++ b/clients/algoliasearch-client-go/algolia/search/model_around_precision.go @@ -8,8 +8,8 @@ import ( // AroundPrecision - Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. type AroundPrecision struct { - ArrayOfAroundPrecisionFromValueInner *[]AroundPrecisionFromValueInner - Int32 *int32 + ArrayOfModelRange *[]ModelRange + Int32 *int32 } // int32AsAroundPrecision is a convenience function that returns int32 wrapped in AroundPrecision. @@ -19,27 +19,27 @@ func Int32AsAroundPrecision(v int32) *AroundPrecision { } } -// []AroundPrecisionFromValueInnerAsAroundPrecision is a convenience function that returns []AroundPrecisionFromValueInner wrapped in AroundPrecision. -func ArrayOfAroundPrecisionFromValueInnerAsAroundPrecision(v []AroundPrecisionFromValueInner) *AroundPrecision { +// []ModelRangeAsAroundPrecision is a convenience function that returns []ModelRange wrapped in AroundPrecision. +func ArrayOfModelRangeAsAroundPrecision(v []ModelRange) *AroundPrecision { return &AroundPrecision{ - ArrayOfAroundPrecisionFromValueInner: &v, + ArrayOfModelRange: &v, } } // Unmarshal JSON data into one of the pointers in the struct. func (dst *AroundPrecision) UnmarshalJSON(data []byte) error { var err error - // try to unmarshal data into ArrayOfAroundPrecisionFromValueInner - err = newStrictDecoder(data).Decode(&dst.ArrayOfAroundPrecisionFromValueInner) - if err == nil && validateStruct(dst.ArrayOfAroundPrecisionFromValueInner) == nil { - jsonArrayOfAroundPrecisionFromValueInner, _ := json.Marshal(dst.ArrayOfAroundPrecisionFromValueInner) - if string(jsonArrayOfAroundPrecisionFromValueInner) == "{}" { // empty struct - dst.ArrayOfAroundPrecisionFromValueInner = nil + // try to unmarshal data into ArrayOfModelRange + err = newStrictDecoder(data).Decode(&dst.ArrayOfModelRange) + if err == nil && validateStruct(dst.ArrayOfModelRange) == nil { + jsonArrayOfModelRange, _ := json.Marshal(dst.ArrayOfModelRange) + if string(jsonArrayOfModelRange) == "{}" { // empty struct + dst.ArrayOfModelRange = nil } else { return nil } } else { - dst.ArrayOfAroundPrecisionFromValueInner = nil + dst.ArrayOfModelRange = nil } // try to unmarshal data into Int32 @@ -60,10 +60,10 @@ func (dst *AroundPrecision) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON. func (src AroundPrecision) MarshalJSON() ([]byte, error) { - if src.ArrayOfAroundPrecisionFromValueInner != nil { - serialized, err := json.Marshal(&src.ArrayOfAroundPrecisionFromValueInner) + if src.ArrayOfModelRange != nil { + serialized, err := json.Marshal(&src.ArrayOfModelRange) if err != nil { - return nil, fmt.Errorf("failed to unmarshal one of ArrayOfAroundPrecisionFromValueInner of AroundPrecision: %w", err) + return nil, fmt.Errorf("failed to unmarshal one of ArrayOfModelRange of AroundPrecision: %w", err) } return serialized, nil @@ -83,8 +83,8 @@ func (src AroundPrecision) MarshalJSON() ([]byte, error) { // Get the actual instance. func (obj AroundPrecision) GetActualInstance() any { - if obj.ArrayOfAroundPrecisionFromValueInner != nil { - return *obj.ArrayOfAroundPrecisionFromValueInner + if obj.ArrayOfModelRange != nil { + return *obj.ArrayOfModelRange } if obj.Int32 != nil { diff --git a/clients/algoliasearch-client-go/algolia/search/model_around_precision_from_value_inner.go b/clients/algoliasearch-client-go/algolia/search/model_range.go similarity index 56% rename from clients/algoliasearch-client-go/algolia/search/model_around_precision_from_value_inner.go rename to clients/algoliasearch-client-go/algolia/search/model_range.go index 634e3ff205..0aa6978cca 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_around_precision_from_value_inner.go +++ b/clients/algoliasearch-client-go/algolia/search/model_range.go @@ -6,47 +6,47 @@ import ( "fmt" ) -// AroundPrecisionFromValueInner Range object with lower and upper values in meters to define custom ranges. -type AroundPrecisionFromValueInner struct { +// ModelRange Range object with lower and upper values in meters to define custom ranges. +type ModelRange struct { // Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. From *int32 `json:"from,omitempty"` // Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. Value *int32 `json:"value,omitempty"` } -type AroundPrecisionFromValueInnerOption func(f *AroundPrecisionFromValueInner) +type ModelRangeOption func(f *ModelRange) -func WithAroundPrecisionFromValueInnerFrom(val int32) AroundPrecisionFromValueInnerOption { - return func(f *AroundPrecisionFromValueInner) { +func WithModelRangeFrom(val int32) ModelRangeOption { + return func(f *ModelRange) { f.From = &val } } -func WithAroundPrecisionFromValueInnerValue(val int32) AroundPrecisionFromValueInnerOption { - return func(f *AroundPrecisionFromValueInner) { +func WithModelRangeValue(val int32) ModelRangeOption { + return func(f *ModelRange) { f.Value = &val } } -// NewAroundPrecisionFromValueInner instantiates a new AroundPrecisionFromValueInner object +// NewModelRange instantiates a new ModelRange object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewAroundPrecisionFromValueInner(opts ...AroundPrecisionFromValueInnerOption) *AroundPrecisionFromValueInner { - this := &AroundPrecisionFromValueInner{} +func NewModelRange(opts ...ModelRangeOption) *ModelRange { + this := &ModelRange{} for _, opt := range opts { opt(this) } return this } -// NewEmptyAroundPrecisionFromValueInner return a pointer to an empty AroundPrecisionFromValueInner object. -func NewEmptyAroundPrecisionFromValueInner() *AroundPrecisionFromValueInner { - return &AroundPrecisionFromValueInner{} +// NewEmptyModelRange return a pointer to an empty ModelRange object. +func NewEmptyModelRange() *ModelRange { + return &ModelRange{} } // GetFrom returns the From field value if set, zero value otherwise. -func (o *AroundPrecisionFromValueInner) GetFrom() int32 { +func (o *ModelRange) GetFrom() int32 { if o == nil || o.From == nil { var ret int32 return ret @@ -56,7 +56,7 @@ func (o *AroundPrecisionFromValueInner) GetFrom() int32 { // GetFromOk returns a tuple with the From field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AroundPrecisionFromValueInner) GetFromOk() (*int32, bool) { +func (o *ModelRange) GetFromOk() (*int32, bool) { if o == nil || o.From == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *AroundPrecisionFromValueInner) GetFromOk() (*int32, bool) { } // HasFrom returns a boolean if a field has been set. -func (o *AroundPrecisionFromValueInner) HasFrom() bool { +func (o *ModelRange) HasFrom() bool { if o != nil && o.From != nil { return true } @@ -73,13 +73,13 @@ func (o *AroundPrecisionFromValueInner) HasFrom() bool { } // SetFrom gets a reference to the given int32 and assigns it to the From field. -func (o *AroundPrecisionFromValueInner) SetFrom(v int32) *AroundPrecisionFromValueInner { +func (o *ModelRange) SetFrom(v int32) *ModelRange { o.From = &v return o } // GetValue returns the Value field value if set, zero value otherwise. -func (o *AroundPrecisionFromValueInner) GetValue() int32 { +func (o *ModelRange) GetValue() int32 { if o == nil || o.Value == nil { var ret int32 return ret @@ -89,7 +89,7 @@ func (o *AroundPrecisionFromValueInner) GetValue() int32 { // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AroundPrecisionFromValueInner) GetValueOk() (*int32, bool) { +func (o *ModelRange) GetValueOk() (*int32, bool) { if o == nil || o.Value == nil { return nil, false } @@ -97,7 +97,7 @@ func (o *AroundPrecisionFromValueInner) GetValueOk() (*int32, bool) { } // HasValue returns a boolean if a field has been set. -func (o *AroundPrecisionFromValueInner) HasValue() bool { +func (o *ModelRange) HasValue() bool { if o != nil && o.Value != nil { return true } @@ -106,12 +106,12 @@ func (o *AroundPrecisionFromValueInner) HasValue() bool { } // SetValue gets a reference to the given int32 and assigns it to the Value field. -func (o *AroundPrecisionFromValueInner) SetValue(v int32) *AroundPrecisionFromValueInner { +func (o *ModelRange) SetValue(v int32) *ModelRange { o.Value = &v return o } -func (o AroundPrecisionFromValueInner) MarshalJSON() ([]byte, error) { +func (o ModelRange) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.From != nil { toSerialize["from"] = o.From @@ -121,15 +121,15 @@ func (o AroundPrecisionFromValueInner) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal AroundPrecisionFromValueInner: %w", err) + return nil, fmt.Errorf("failed to marshal ModelRange: %w", err) } return serialized, nil } -func (o AroundPrecisionFromValueInner) String() string { +func (o ModelRange) String() string { out := "" out += fmt.Sprintf(" from=%v\n", o.From) out += fmt.Sprintf(" value=%v\n", o.Value) - return fmt.Sprintf("AroundPrecisionFromValueInner {\n%s}", out) + return fmt.Sprintf("ModelRange {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_metadata_data.go b/clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_data.go similarity index 53% rename from clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_metadata_data.go rename to clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_data.go index 8f31322ac6..99859fbc8c 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_metadata_data.go +++ b/clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_data.go @@ -6,28 +6,28 @@ import ( "fmt" ) -// RedirectRuleIndexMetadataData Redirect rule data. -type RedirectRuleIndexMetadataData struct { +// RedirectRuleIndexData Redirect rule data. +type RedirectRuleIndexData struct { RuleObjectID string `json:"ruleObjectID"` } -// NewRedirectRuleIndexMetadataData instantiates a new RedirectRuleIndexMetadataData object +// NewRedirectRuleIndexData instantiates a new RedirectRuleIndexData object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewRedirectRuleIndexMetadataData(ruleObjectID string) *RedirectRuleIndexMetadataData { - this := &RedirectRuleIndexMetadataData{} +func NewRedirectRuleIndexData(ruleObjectID string) *RedirectRuleIndexData { + this := &RedirectRuleIndexData{} this.RuleObjectID = ruleObjectID return this } -// NewEmptyRedirectRuleIndexMetadataData return a pointer to an empty RedirectRuleIndexMetadataData object. -func NewEmptyRedirectRuleIndexMetadataData() *RedirectRuleIndexMetadataData { - return &RedirectRuleIndexMetadataData{} +// NewEmptyRedirectRuleIndexData return a pointer to an empty RedirectRuleIndexData object. +func NewEmptyRedirectRuleIndexData() *RedirectRuleIndexData { + return &RedirectRuleIndexData{} } // GetRuleObjectID returns the RuleObjectID field value. -func (o *RedirectRuleIndexMetadataData) GetRuleObjectID() string { +func (o *RedirectRuleIndexData) GetRuleObjectID() string { if o == nil { var ret string return ret @@ -38,7 +38,7 @@ func (o *RedirectRuleIndexMetadataData) GetRuleObjectID() string { // GetRuleObjectIDOk returns a tuple with the RuleObjectID field value // and a boolean to check if the value has been set. -func (o *RedirectRuleIndexMetadataData) GetRuleObjectIDOk() (*string, bool) { +func (o *RedirectRuleIndexData) GetRuleObjectIDOk() (*string, bool) { if o == nil { return nil, false } @@ -46,26 +46,26 @@ func (o *RedirectRuleIndexMetadataData) GetRuleObjectIDOk() (*string, bool) { } // SetRuleObjectID sets field value. -func (o *RedirectRuleIndexMetadataData) SetRuleObjectID(v string) *RedirectRuleIndexMetadataData { +func (o *RedirectRuleIndexData) SetRuleObjectID(v string) *RedirectRuleIndexData { o.RuleObjectID = v return o } -func (o RedirectRuleIndexMetadataData) MarshalJSON() ([]byte, error) { +func (o RedirectRuleIndexData) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if true { toSerialize["ruleObjectID"] = o.RuleObjectID } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal RedirectRuleIndexMetadataData: %w", err) + return nil, fmt.Errorf("failed to marshal RedirectRuleIndexData: %w", err) } return serialized, nil } -func (o RedirectRuleIndexMetadataData) String() string { +func (o RedirectRuleIndexData) String() string { out := "" out += fmt.Sprintf(" ruleObjectID=%v\n", o.RuleObjectID) - return fmt.Sprintf("RedirectRuleIndexMetadataData {\n%s}", out) + return fmt.Sprintf("RedirectRuleIndexData {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_metadata.go b/clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_metadata.go index 9b79ead396..b5b5c410a0 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_metadata.go +++ b/clients/algoliasearch-client-go/algolia/search/model_redirect_rule_index_metadata.go @@ -15,15 +15,15 @@ type RedirectRuleIndexMetadata struct { // Reason for the redirect rule. Reason string `json:"reason"` // Redirect rule status. - Succeed bool `json:"succeed"` - Data RedirectRuleIndexMetadataData `json:"data"` + Succeed bool `json:"succeed"` + Data RedirectRuleIndexData `json:"data"` } // NewRedirectRuleIndexMetadata instantiates a new RedirectRuleIndexMetadata object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewRedirectRuleIndexMetadata(source string, dest string, reason string, succeed bool, data RedirectRuleIndexMetadataData) *RedirectRuleIndexMetadata { +func NewRedirectRuleIndexMetadata(source string, dest string, reason string, succeed bool, data RedirectRuleIndexData) *RedirectRuleIndexMetadata { this := &RedirectRuleIndexMetadata{} this.Source = source this.Dest = dest @@ -139,9 +139,9 @@ func (o *RedirectRuleIndexMetadata) SetSucceed(v bool) *RedirectRuleIndexMetadat } // GetData returns the Data field value. -func (o *RedirectRuleIndexMetadata) GetData() RedirectRuleIndexMetadataData { +func (o *RedirectRuleIndexMetadata) GetData() RedirectRuleIndexData { if o == nil { - var ret RedirectRuleIndexMetadataData + var ret RedirectRuleIndexData return ret } @@ -150,7 +150,7 @@ func (o *RedirectRuleIndexMetadata) GetData() RedirectRuleIndexMetadataData { // GetDataOk returns a tuple with the Data field value // and a boolean to check if the value has been set. -func (o *RedirectRuleIndexMetadata) GetDataOk() (*RedirectRuleIndexMetadataData, bool) { +func (o *RedirectRuleIndexMetadata) GetDataOk() (*RedirectRuleIndexData, bool) { if o == nil { return nil, false } @@ -158,7 +158,7 @@ func (o *RedirectRuleIndexMetadata) GetDataOk() (*RedirectRuleIndexMetadataData, } // SetData sets field value. -func (o *RedirectRuleIndexMetadata) SetData(v *RedirectRuleIndexMetadataData) *RedirectRuleIndexMetadata { +func (o *RedirectRuleIndexMetadata) SetData(v *RedirectRuleIndexData) *RedirectRuleIndexMetadata { o.Data = *v return o } diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_params_string.go b/clients/algoliasearch-client-go/algolia/search/model_search_params_string.go index 0d560528f3..88a1c08dd9 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_params_string.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_params_string.go @@ -6,7 +6,7 @@ import ( "fmt" ) -// SearchParamsString struct for SearchParamsString. +// SearchParamsString Search parameters as query string. type SearchParamsString struct { // Search parameters as a URL-encoded query string. Params *string `json:"params,omitempty"` diff --git a/clients/algoliasearch-client-go/algolia/usage/api_usage.go b/clients/algoliasearch-client-go/algolia/usage/api_usage.go index 60a26b163c..abc8a3ffe6 100644 --- a/clients/algoliasearch-client-go/algolia/usage/api_usage.go +++ b/clients/algoliasearch-client-go/algolia/usage/api_usage.go @@ -815,10 +815,10 @@ Request can be constructed by NewApiGetIndexUsageRequest with parameters below. @param startDate string - Start date of the period to analyze, in `YYYY-MM-DD` format. @param endDate string - End date of the period to analyze, in `YYYY-MM-DD` format. @param granularity Granularity - Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. - @return GetUsage200Response + @return IndexUsage */ -func (c *APIClient) GetIndexUsage(r ApiGetIndexUsageRequest, opts ...RequestOption) (*GetUsage200Response, error) { - var returnValue *GetUsage200Response +func (c *APIClient) GetIndexUsage(r ApiGetIndexUsageRequest, opts ...RequestOption) (*IndexUsage, error) { + var returnValue *IndexUsage res, resBody, err := c.GetIndexUsageWithHTTPInfo(r, opts...) if err != nil { @@ -987,10 +987,10 @@ Request can be constructed by NewApiGetUsageRequest with parameters below. @param startDate string - Start date of the period to analyze, in `YYYY-MM-DD` format. @param endDate string - End date of the period to analyze, in `YYYY-MM-DD` format. @param granularity Granularity - Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. - @return GetUsage200Response + @return IndexUsage */ -func (c *APIClient) GetUsage(r ApiGetUsageRequest, opts ...RequestOption) (*GetUsage200Response, error) { - var returnValue *GetUsage200Response +func (c *APIClient) GetUsage(r ApiGetUsageRequest, opts ...RequestOption) (*IndexUsage, error) { + var returnValue *IndexUsage res, resBody, err := c.GetUsageWithHTTPInfo(r, opts...) if err != nil { diff --git a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_400_response_error_errors_inner.go b/clients/algoliasearch-client-go/algolia/usage/model_error_item.go similarity index 56% rename from clients/algoliasearch-client-go/algolia/usage/model_get_usage_400_response_error_errors_inner.go rename to clients/algoliasearch-client-go/algolia/usage/model_error_item.go index c262cafc3a..be4db45fae 100644 --- a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_400_response_error_errors_inner.go +++ b/clients/algoliasearch-client-go/algolia/usage/model_error_item.go @@ -6,40 +6,40 @@ import ( "fmt" ) -// GetUsage400ResponseErrorErrorsInner struct for GetUsage400ResponseErrorErrorsInner. -type GetUsage400ResponseErrorErrorsInner struct { +// ErrorItem struct for ErrorItem. +type ErrorItem struct { Code *string `json:"code,omitempty"` Message string `json:"message"` Line *int32 `json:"line,omitempty"` Position *int32 `json:"position,omitempty"` } -type GetUsage400ResponseErrorErrorsInnerOption func(f *GetUsage400ResponseErrorErrorsInner) +type ErrorItemOption func(f *ErrorItem) -func WithGetUsage400ResponseErrorErrorsInnerCode(val string) GetUsage400ResponseErrorErrorsInnerOption { - return func(f *GetUsage400ResponseErrorErrorsInner) { +func WithErrorItemCode(val string) ErrorItemOption { + return func(f *ErrorItem) { f.Code = &val } } -func WithGetUsage400ResponseErrorErrorsInnerLine(val int32) GetUsage400ResponseErrorErrorsInnerOption { - return func(f *GetUsage400ResponseErrorErrorsInner) { +func WithErrorItemLine(val int32) ErrorItemOption { + return func(f *ErrorItem) { f.Line = &val } } -func WithGetUsage400ResponseErrorErrorsInnerPosition(val int32) GetUsage400ResponseErrorErrorsInnerOption { - return func(f *GetUsage400ResponseErrorErrorsInner) { +func WithErrorItemPosition(val int32) ErrorItemOption { + return func(f *ErrorItem) { f.Position = &val } } -// NewGetUsage400ResponseErrorErrorsInner instantiates a new GetUsage400ResponseErrorErrorsInner object +// NewErrorItem instantiates a new ErrorItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewGetUsage400ResponseErrorErrorsInner(message string, opts ...GetUsage400ResponseErrorErrorsInnerOption) *GetUsage400ResponseErrorErrorsInner { - this := &GetUsage400ResponseErrorErrorsInner{} +func NewErrorItem(message string, opts ...ErrorItemOption) *ErrorItem { + this := &ErrorItem{} this.Message = message for _, opt := range opts { opt(this) @@ -47,13 +47,13 @@ func NewGetUsage400ResponseErrorErrorsInner(message string, opts ...GetUsage400R return this } -// NewEmptyGetUsage400ResponseErrorErrorsInner return a pointer to an empty GetUsage400ResponseErrorErrorsInner object. -func NewEmptyGetUsage400ResponseErrorErrorsInner() *GetUsage400ResponseErrorErrorsInner { - return &GetUsage400ResponseErrorErrorsInner{} +// NewEmptyErrorItem return a pointer to an empty ErrorItem object. +func NewEmptyErrorItem() *ErrorItem { + return &ErrorItem{} } // GetCode returns the Code field value if set, zero value otherwise. -func (o *GetUsage400ResponseErrorErrorsInner) GetCode() string { +func (o *ErrorItem) GetCode() string { if o == nil || o.Code == nil { var ret string return ret @@ -63,7 +63,7 @@ func (o *GetUsage400ResponseErrorErrorsInner) GetCode() string { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetUsage400ResponseErrorErrorsInner) GetCodeOk() (*string, bool) { +func (o *ErrorItem) GetCodeOk() (*string, bool) { if o == nil || o.Code == nil { return nil, false } @@ -71,7 +71,7 @@ func (o *GetUsage400ResponseErrorErrorsInner) GetCodeOk() (*string, bool) { } // HasCode returns a boolean if a field has been set. -func (o *GetUsage400ResponseErrorErrorsInner) HasCode() bool { +func (o *ErrorItem) HasCode() bool { if o != nil && o.Code != nil { return true } @@ -80,13 +80,13 @@ func (o *GetUsage400ResponseErrorErrorsInner) HasCode() bool { } // SetCode gets a reference to the given string and assigns it to the Code field. -func (o *GetUsage400ResponseErrorErrorsInner) SetCode(v string) *GetUsage400ResponseErrorErrorsInner { +func (o *ErrorItem) SetCode(v string) *ErrorItem { o.Code = &v return o } // GetMessage returns the Message field value. -func (o *GetUsage400ResponseErrorErrorsInner) GetMessage() string { +func (o *ErrorItem) GetMessage() string { if o == nil { var ret string return ret @@ -97,7 +97,7 @@ func (o *GetUsage400ResponseErrorErrorsInner) GetMessage() string { // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. -func (o *GetUsage400ResponseErrorErrorsInner) GetMessageOk() (*string, bool) { +func (o *ErrorItem) GetMessageOk() (*string, bool) { if o == nil { return nil, false } @@ -105,13 +105,13 @@ func (o *GetUsage400ResponseErrorErrorsInner) GetMessageOk() (*string, bool) { } // SetMessage sets field value. -func (o *GetUsage400ResponseErrorErrorsInner) SetMessage(v string) *GetUsage400ResponseErrorErrorsInner { +func (o *ErrorItem) SetMessage(v string) *ErrorItem { o.Message = v return o } // GetLine returns the Line field value if set, zero value otherwise. -func (o *GetUsage400ResponseErrorErrorsInner) GetLine() int32 { +func (o *ErrorItem) GetLine() int32 { if o == nil || o.Line == nil { var ret int32 return ret @@ -121,7 +121,7 @@ func (o *GetUsage400ResponseErrorErrorsInner) GetLine() int32 { // GetLineOk returns a tuple with the Line field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetUsage400ResponseErrorErrorsInner) GetLineOk() (*int32, bool) { +func (o *ErrorItem) GetLineOk() (*int32, bool) { if o == nil || o.Line == nil { return nil, false } @@ -129,7 +129,7 @@ func (o *GetUsage400ResponseErrorErrorsInner) GetLineOk() (*int32, bool) { } // HasLine returns a boolean if a field has been set. -func (o *GetUsage400ResponseErrorErrorsInner) HasLine() bool { +func (o *ErrorItem) HasLine() bool { if o != nil && o.Line != nil { return true } @@ -138,13 +138,13 @@ func (o *GetUsage400ResponseErrorErrorsInner) HasLine() bool { } // SetLine gets a reference to the given int32 and assigns it to the Line field. -func (o *GetUsage400ResponseErrorErrorsInner) SetLine(v int32) *GetUsage400ResponseErrorErrorsInner { +func (o *ErrorItem) SetLine(v int32) *ErrorItem { o.Line = &v return o } // GetPosition returns the Position field value if set, zero value otherwise. -func (o *GetUsage400ResponseErrorErrorsInner) GetPosition() int32 { +func (o *ErrorItem) GetPosition() int32 { if o == nil || o.Position == nil { var ret int32 return ret @@ -154,7 +154,7 @@ func (o *GetUsage400ResponseErrorErrorsInner) GetPosition() int32 { // GetPositionOk returns a tuple with the Position field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetUsage400ResponseErrorErrorsInner) GetPositionOk() (*int32, bool) { +func (o *ErrorItem) GetPositionOk() (*int32, bool) { if o == nil || o.Position == nil { return nil, false } @@ -162,7 +162,7 @@ func (o *GetUsage400ResponseErrorErrorsInner) GetPositionOk() (*int32, bool) { } // HasPosition returns a boolean if a field has been set. -func (o *GetUsage400ResponseErrorErrorsInner) HasPosition() bool { +func (o *ErrorItem) HasPosition() bool { if o != nil && o.Position != nil { return true } @@ -171,12 +171,12 @@ func (o *GetUsage400ResponseErrorErrorsInner) HasPosition() bool { } // SetPosition gets a reference to the given int32 and assigns it to the Position field. -func (o *GetUsage400ResponseErrorErrorsInner) SetPosition(v int32) *GetUsage400ResponseErrorErrorsInner { +func (o *ErrorItem) SetPosition(v int32) *ErrorItem { o.Position = &v return o } -func (o GetUsage400ResponseErrorErrorsInner) MarshalJSON() ([]byte, error) { +func (o ErrorItem) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Code != nil { toSerialize["code"] = o.Code @@ -192,17 +192,17 @@ func (o GetUsage400ResponseErrorErrorsInner) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal GetUsage400ResponseErrorErrorsInner: %w", err) + return nil, fmt.Errorf("failed to marshal ErrorItem: %w", err) } return serialized, nil } -func (o GetUsage400ResponseErrorErrorsInner) String() string { +func (o ErrorItem) String() string { out := "" out += fmt.Sprintf(" code=%v\n", o.Code) out += fmt.Sprintf(" message=%v\n", o.Message) out += fmt.Sprintf(" line=%v\n", o.Line) out += fmt.Sprintf(" position=%v\n", o.Position) - return fmt.Sprintf("GetUsage400ResponseErrorErrorsInner {\n%s}", out) + return fmt.Sprintf("ErrorItem {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_400_response.go b/clients/algoliasearch-client-go/algolia/usage/model_forbidden.go similarity index 51% rename from clients/algoliasearch-client-go/algolia/usage/model_get_usage_400_response.go rename to clients/algoliasearch-client-go/algolia/usage/model_forbidden.go index 00aeb36b76..ad02d80d23 100644 --- a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_400_response.go +++ b/clients/algoliasearch-client-go/algolia/usage/model_forbidden.go @@ -6,30 +6,30 @@ import ( "fmt" ) -// GetUsage400Response struct for GetUsage400Response. -type GetUsage400Response struct { - Error GetUsage400ResponseError `json:"error"` +// Forbidden struct for Forbidden. +type Forbidden struct { + Error ForbiddenError `json:"error"` } -// NewGetUsage400Response instantiates a new GetUsage400Response object +// NewForbidden instantiates a new Forbidden object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewGetUsage400Response(error_ GetUsage400ResponseError) *GetUsage400Response { - this := &GetUsage400Response{} +func NewForbidden(error_ ForbiddenError) *Forbidden { + this := &Forbidden{} this.Error = error_ return this } -// NewEmptyGetUsage400Response return a pointer to an empty GetUsage400Response object. -func NewEmptyGetUsage400Response() *GetUsage400Response { - return &GetUsage400Response{} +// NewEmptyForbidden return a pointer to an empty Forbidden object. +func NewEmptyForbidden() *Forbidden { + return &Forbidden{} } // GetError returns the Error field value. -func (o *GetUsage400Response) GetError() GetUsage400ResponseError { +func (o *Forbidden) GetError() ForbiddenError { if o == nil { - var ret GetUsage400ResponseError + var ret ForbiddenError return ret } @@ -38,7 +38,7 @@ func (o *GetUsage400Response) GetError() GetUsage400ResponseError { // GetErrorOk returns a tuple with the Error field value // and a boolean to check if the value has been set. -func (o *GetUsage400Response) GetErrorOk() (*GetUsage400ResponseError, bool) { +func (o *Forbidden) GetErrorOk() (*ForbiddenError, bool) { if o == nil { return nil, false } @@ -46,26 +46,26 @@ func (o *GetUsage400Response) GetErrorOk() (*GetUsage400ResponseError, bool) { } // SetError sets field value. -func (o *GetUsage400Response) SetError(v *GetUsage400ResponseError) *GetUsage400Response { +func (o *Forbidden) SetError(v *ForbiddenError) *Forbidden { o.Error = *v return o } -func (o GetUsage400Response) MarshalJSON() ([]byte, error) { +func (o Forbidden) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if true { toSerialize["error"] = o.Error } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal GetUsage400Response: %w", err) + return nil, fmt.Errorf("failed to marshal Forbidden: %w", err) } return serialized, nil } -func (o GetUsage400Response) String() string { +func (o Forbidden) String() string { out := "" out += fmt.Sprintf(" error=%v\n", o.Error) - return fmt.Sprintf("GetUsage400Response {\n%s}", out) + return fmt.Sprintf("Forbidden {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_400_response_error.go b/clients/algoliasearch-client-go/algolia/usage/model_forbidden_error.go similarity index 52% rename from clients/algoliasearch-client-go/algolia/usage/model_get_usage_400_response_error.go rename to clients/algoliasearch-client-go/algolia/usage/model_forbidden_error.go index 05678bdfb9..b1c3a8aa3b 100644 --- a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_400_response_error.go +++ b/clients/algoliasearch-client-go/algolia/usage/model_forbidden_error.go @@ -6,52 +6,52 @@ import ( "fmt" ) -// GetUsage400ResponseError struct for GetUsage400ResponseError. -type GetUsage400ResponseError struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Errors []GetUsage400ResponseErrorErrorsInner `json:"errors,omitempty"` +// ForbiddenError struct for ForbiddenError. +type ForbiddenError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Errors []ErrorItem `json:"errors,omitempty"` } -type GetUsage400ResponseErrorOption func(f *GetUsage400ResponseError) +type ForbiddenErrorOption func(f *ForbiddenError) -func WithGetUsage400ResponseErrorCode(val string) GetUsage400ResponseErrorOption { - return func(f *GetUsage400ResponseError) { +func WithForbiddenErrorCode(val string) ForbiddenErrorOption { + return func(f *ForbiddenError) { f.Code = &val } } -func WithGetUsage400ResponseErrorMessage(val string) GetUsage400ResponseErrorOption { - return func(f *GetUsage400ResponseError) { +func WithForbiddenErrorMessage(val string) ForbiddenErrorOption { + return func(f *ForbiddenError) { f.Message = &val } } -func WithGetUsage400ResponseErrorErrors(val []GetUsage400ResponseErrorErrorsInner) GetUsage400ResponseErrorOption { - return func(f *GetUsage400ResponseError) { +func WithForbiddenErrorErrors(val []ErrorItem) ForbiddenErrorOption { + return func(f *ForbiddenError) { f.Errors = val } } -// NewGetUsage400ResponseError instantiates a new GetUsage400ResponseError object +// NewForbiddenError instantiates a new ForbiddenError object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewGetUsage400ResponseError(opts ...GetUsage400ResponseErrorOption) *GetUsage400ResponseError { - this := &GetUsage400ResponseError{} +func NewForbiddenError(opts ...ForbiddenErrorOption) *ForbiddenError { + this := &ForbiddenError{} for _, opt := range opts { opt(this) } return this } -// NewEmptyGetUsage400ResponseError return a pointer to an empty GetUsage400ResponseError object. -func NewEmptyGetUsage400ResponseError() *GetUsage400ResponseError { - return &GetUsage400ResponseError{} +// NewEmptyForbiddenError return a pointer to an empty ForbiddenError object. +func NewEmptyForbiddenError() *ForbiddenError { + return &ForbiddenError{} } // GetCode returns the Code field value if set, zero value otherwise. -func (o *GetUsage400ResponseError) GetCode() string { +func (o *ForbiddenError) GetCode() string { if o == nil || o.Code == nil { var ret string return ret @@ -61,7 +61,7 @@ func (o *GetUsage400ResponseError) GetCode() string { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetUsage400ResponseError) GetCodeOk() (*string, bool) { +func (o *ForbiddenError) GetCodeOk() (*string, bool) { if o == nil || o.Code == nil { return nil, false } @@ -69,7 +69,7 @@ func (o *GetUsage400ResponseError) GetCodeOk() (*string, bool) { } // HasCode returns a boolean if a field has been set. -func (o *GetUsage400ResponseError) HasCode() bool { +func (o *ForbiddenError) HasCode() bool { if o != nil && o.Code != nil { return true } @@ -78,13 +78,13 @@ func (o *GetUsage400ResponseError) HasCode() bool { } // SetCode gets a reference to the given string and assigns it to the Code field. -func (o *GetUsage400ResponseError) SetCode(v string) *GetUsage400ResponseError { +func (o *ForbiddenError) SetCode(v string) *ForbiddenError { o.Code = &v return o } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *GetUsage400ResponseError) GetMessage() string { +func (o *ForbiddenError) GetMessage() string { if o == nil || o.Message == nil { var ret string return ret @@ -94,7 +94,7 @@ func (o *GetUsage400ResponseError) GetMessage() string { // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetUsage400ResponseError) GetMessageOk() (*string, bool) { +func (o *ForbiddenError) GetMessageOk() (*string, bool) { if o == nil || o.Message == nil { return nil, false } @@ -102,7 +102,7 @@ func (o *GetUsage400ResponseError) GetMessageOk() (*string, bool) { } // HasMessage returns a boolean if a field has been set. -func (o *GetUsage400ResponseError) HasMessage() bool { +func (o *ForbiddenError) HasMessage() bool { if o != nil && o.Message != nil { return true } @@ -111,15 +111,15 @@ func (o *GetUsage400ResponseError) HasMessage() bool { } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *GetUsage400ResponseError) SetMessage(v string) *GetUsage400ResponseError { +func (o *ForbiddenError) SetMessage(v string) *ForbiddenError { o.Message = &v return o } // GetErrors returns the Errors field value if set, zero value otherwise. -func (o *GetUsage400ResponseError) GetErrors() []GetUsage400ResponseErrorErrorsInner { +func (o *ForbiddenError) GetErrors() []ErrorItem { if o == nil || o.Errors == nil { - var ret []GetUsage400ResponseErrorErrorsInner + var ret []ErrorItem return ret } return o.Errors @@ -127,7 +127,7 @@ func (o *GetUsage400ResponseError) GetErrors() []GetUsage400ResponseErrorErrorsI // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetUsage400ResponseError) GetErrorsOk() ([]GetUsage400ResponseErrorErrorsInner, bool) { +func (o *ForbiddenError) GetErrorsOk() ([]ErrorItem, bool) { if o == nil || o.Errors == nil { return nil, false } @@ -135,7 +135,7 @@ func (o *GetUsage400ResponseError) GetErrorsOk() ([]GetUsage400ResponseErrorErro } // HasErrors returns a boolean if a field has been set. -func (o *GetUsage400ResponseError) HasErrors() bool { +func (o *ForbiddenError) HasErrors() bool { if o != nil && o.Errors != nil { return true } @@ -143,13 +143,13 @@ func (o *GetUsage400ResponseError) HasErrors() bool { return false } -// SetErrors gets a reference to the given []GetUsage400ResponseErrorErrorsInner and assigns it to the Errors field. -func (o *GetUsage400ResponseError) SetErrors(v []GetUsage400ResponseErrorErrorsInner) *GetUsage400ResponseError { +// SetErrors gets a reference to the given []ErrorItem and assigns it to the Errors field. +func (o *ForbiddenError) SetErrors(v []ErrorItem) *ForbiddenError { o.Errors = v return o } -func (o GetUsage400ResponseError) MarshalJSON() ([]byte, error) { +func (o ForbiddenError) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Code != nil { toSerialize["code"] = o.Code @@ -162,16 +162,16 @@ func (o GetUsage400ResponseError) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal GetUsage400ResponseError: %w", err) + return nil, fmt.Errorf("failed to marshal ForbiddenError: %w", err) } return serialized, nil } -func (o GetUsage400ResponseError) String() string { +func (o ForbiddenError) String() string { out := "" out += fmt.Sprintf(" code=%v\n", o.Code) out += fmt.Sprintf(" message=%v\n", o.Message) out += fmt.Sprintf(" errors=%v\n", o.Errors) - return fmt.Sprintf("GetUsage400ResponseError {\n%s}", out) + return fmt.Sprintf("ForbiddenError {\n%s}", out) } diff --git a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_200_response.go b/clients/algoliasearch-client-go/algolia/usage/model_get_usage_200_response.go deleted file mode 100644 index a9b3b72d57..0000000000 --- a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_200_response.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -package usage - -import ( - "encoding/json" - "fmt" -) - -// GetUsage200Response struct for GetUsage200Response. -type GetUsage200Response struct { - Statistics []GetUsage200ResponseStatisticsInner `json:"statistics,omitempty"` -} - -type GetUsage200ResponseOption func(f *GetUsage200Response) - -func WithGetUsage200ResponseStatistics(val []GetUsage200ResponseStatisticsInner) GetUsage200ResponseOption { - return func(f *GetUsage200Response) { - f.Statistics = val - } -} - -// NewGetUsage200Response instantiates a new GetUsage200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewGetUsage200Response(opts ...GetUsage200ResponseOption) *GetUsage200Response { - this := &GetUsage200Response{} - for _, opt := range opts { - opt(this) - } - return this -} - -// NewEmptyGetUsage200Response return a pointer to an empty GetUsage200Response object. -func NewEmptyGetUsage200Response() *GetUsage200Response { - return &GetUsage200Response{} -} - -// GetStatistics returns the Statistics field value if set, zero value otherwise. -func (o *GetUsage200Response) GetStatistics() []GetUsage200ResponseStatisticsInner { - if o == nil || o.Statistics == nil { - var ret []GetUsage200ResponseStatisticsInner - return ret - } - return o.Statistics -} - -// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUsage200Response) GetStatisticsOk() ([]GetUsage200ResponseStatisticsInner, bool) { - if o == nil || o.Statistics == nil { - return nil, false - } - return o.Statistics, true -} - -// HasStatistics returns a boolean if a field has been set. -func (o *GetUsage200Response) HasStatistics() bool { - if o != nil && o.Statistics != nil { - return true - } - - return false -} - -// SetStatistics gets a reference to the given []GetUsage200ResponseStatisticsInner and assigns it to the Statistics field. -func (o *GetUsage200Response) SetStatistics(v []GetUsage200ResponseStatisticsInner) *GetUsage200Response { - o.Statistics = v - return o -} - -func (o GetUsage200Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]any{} - if o.Statistics != nil { - toSerialize["statistics"] = o.Statistics - } - serialized, err := json.Marshal(toSerialize) - if err != nil { - return nil, fmt.Errorf("failed to marshal GetUsage200Response: %w", err) - } - - return serialized, nil -} - -func (o GetUsage200Response) String() string { - out := "" - out += fmt.Sprintf(" statistics=%v\n", o.Statistics) - return fmt.Sprintf("GetUsage200Response {\n%s}", out) -} diff --git a/clients/algoliasearch-client-go/algolia/usage/model_index_usage.go b/clients/algoliasearch-client-go/algolia/usage/model_index_usage.go new file mode 100644 index 0000000000..19fe1b7e46 --- /dev/null +++ b/clients/algoliasearch-client-go/algolia/usage/model_index_usage.go @@ -0,0 +1,89 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +package usage + +import ( + "encoding/json" + "fmt" +) + +// IndexUsage struct for IndexUsage. +type IndexUsage struct { + Statistics []StatisticEntry `json:"statistics,omitempty"` +} + +type IndexUsageOption func(f *IndexUsage) + +func WithIndexUsageStatistics(val []StatisticEntry) IndexUsageOption { + return func(f *IndexUsage) { + f.Statistics = val + } +} + +// NewIndexUsage instantiates a new IndexUsage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewIndexUsage(opts ...IndexUsageOption) *IndexUsage { + this := &IndexUsage{} + for _, opt := range opts { + opt(this) + } + return this +} + +// NewEmptyIndexUsage return a pointer to an empty IndexUsage object. +func NewEmptyIndexUsage() *IndexUsage { + return &IndexUsage{} +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +func (o *IndexUsage) GetStatistics() []StatisticEntry { + if o == nil || o.Statistics == nil { + var ret []StatisticEntry + return ret + } + return o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndexUsage) GetStatisticsOk() ([]StatisticEntry, bool) { + if o == nil || o.Statistics == nil { + return nil, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *IndexUsage) HasStatistics() bool { + if o != nil && o.Statistics != nil { + return true + } + + return false +} + +// SetStatistics gets a reference to the given []StatisticEntry and assigns it to the Statistics field. +func (o *IndexUsage) SetStatistics(v []StatisticEntry) *IndexUsage { + o.Statistics = v + return o +} + +func (o IndexUsage) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Statistics != nil { + toSerialize["statistics"] = o.Statistics + } + serialized, err := json.Marshal(toSerialize) + if err != nil { + return nil, fmt.Errorf("failed to marshal IndexUsage: %w", err) + } + + return serialized, nil +} + +func (o IndexUsage) String() string { + out := "" + out += fmt.Sprintf(" statistics=%v\n", o.Statistics) + return fmt.Sprintf("IndexUsage {\n%s}", out) +} diff --git a/clients/algoliasearch-client-go/algolia/usage/model_invalid_request.go b/clients/algoliasearch-client-go/algolia/usage/model_invalid_request.go new file mode 100644 index 0000000000..41794dec85 --- /dev/null +++ b/clients/algoliasearch-client-go/algolia/usage/model_invalid_request.go @@ -0,0 +1,71 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +package usage + +import ( + "encoding/json" + "fmt" +) + +// InvalidRequest struct for InvalidRequest. +type InvalidRequest struct { + Error InvalidRequestError `json:"error"` +} + +// NewInvalidRequest instantiates a new InvalidRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewInvalidRequest(error_ InvalidRequestError) *InvalidRequest { + this := &InvalidRequest{} + this.Error = error_ + return this +} + +// NewEmptyInvalidRequest return a pointer to an empty InvalidRequest object. +func NewEmptyInvalidRequest() *InvalidRequest { + return &InvalidRequest{} +} + +// GetError returns the Error field value. +func (o *InvalidRequest) GetError() InvalidRequestError { + if o == nil { + var ret InvalidRequestError + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *InvalidRequest) GetErrorOk() (*InvalidRequestError, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value. +func (o *InvalidRequest) SetError(v *InvalidRequestError) *InvalidRequest { + o.Error = *v + return o +} + +func (o InvalidRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if true { + toSerialize["error"] = o.Error + } + serialized, err := json.Marshal(toSerialize) + if err != nil { + return nil, fmt.Errorf("failed to marshal InvalidRequest: %w", err) + } + + return serialized, nil +} + +func (o InvalidRequest) String() string { + out := "" + out += fmt.Sprintf(" error=%v\n", o.Error) + return fmt.Sprintf("InvalidRequest {\n%s}", out) +} diff --git a/clients/algoliasearch-client-go/algolia/usage/model_invalid_request_error.go b/clients/algoliasearch-client-go/algolia/usage/model_invalid_request_error.go new file mode 100644 index 0000000000..5c6a335334 --- /dev/null +++ b/clients/algoliasearch-client-go/algolia/usage/model_invalid_request_error.go @@ -0,0 +1,177 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +package usage + +import ( + "encoding/json" + "fmt" +) + +// InvalidRequestError struct for InvalidRequestError. +type InvalidRequestError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Errors []ErrorItem `json:"errors,omitempty"` +} + +type InvalidRequestErrorOption func(f *InvalidRequestError) + +func WithInvalidRequestErrorCode(val string) InvalidRequestErrorOption { + return func(f *InvalidRequestError) { + f.Code = &val + } +} + +func WithInvalidRequestErrorMessage(val string) InvalidRequestErrorOption { + return func(f *InvalidRequestError) { + f.Message = &val + } +} + +func WithInvalidRequestErrorErrors(val []ErrorItem) InvalidRequestErrorOption { + return func(f *InvalidRequestError) { + f.Errors = val + } +} + +// NewInvalidRequestError instantiates a new InvalidRequestError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewInvalidRequestError(opts ...InvalidRequestErrorOption) *InvalidRequestError { + this := &InvalidRequestError{} + for _, opt := range opts { + opt(this) + } + return this +} + +// NewEmptyInvalidRequestError return a pointer to an empty InvalidRequestError object. +func NewEmptyInvalidRequestError() *InvalidRequestError { + return &InvalidRequestError{} +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *InvalidRequestError) GetCode() string { + if o == nil || o.Code == nil { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvalidRequestError) GetCodeOk() (*string, bool) { + if o == nil || o.Code == nil { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *InvalidRequestError) HasCode() bool { + if o != nil && o.Code != nil { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *InvalidRequestError) SetCode(v string) *InvalidRequestError { + o.Code = &v + return o +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *InvalidRequestError) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvalidRequestError) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *InvalidRequestError) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *InvalidRequestError) SetMessage(v string) *InvalidRequestError { + o.Message = &v + return o +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *InvalidRequestError) GetErrors() []ErrorItem { + if o == nil || o.Errors == nil { + var ret []ErrorItem + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvalidRequestError) GetErrorsOk() ([]ErrorItem, bool) { + if o == nil || o.Errors == nil { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *InvalidRequestError) HasErrors() bool { + if o != nil && o.Errors != nil { + return true + } + + return false +} + +// SetErrors gets a reference to the given []ErrorItem and assigns it to the Errors field. +func (o *InvalidRequestError) SetErrors(v []ErrorItem) *InvalidRequestError { + o.Errors = v + return o +} + +func (o InvalidRequestError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Code != nil { + toSerialize["code"] = o.Code + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + serialized, err := json.Marshal(toSerialize) + if err != nil { + return nil, fmt.Errorf("failed to marshal InvalidRequestError: %w", err) + } + + return serialized, nil +} + +func (o InvalidRequestError) String() string { + out := "" + out += fmt.Sprintf(" code=%v\n", o.Code) + out += fmt.Sprintf(" message=%v\n", o.Message) + out += fmt.Sprintf(" errors=%v\n", o.Errors) + return fmt.Sprintf("InvalidRequestError {\n%s}", out) +} diff --git a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_200_response_statistics_inner.go b/clients/algoliasearch-client-go/algolia/usage/model_statistic_entry.go similarity index 51% rename from clients/algoliasearch-client-go/algolia/usage/model_get_usage_200_response_statistics_inner.go rename to clients/algoliasearch-client-go/algolia/usage/model_statistic_entry.go index ca47230bea..ff536f4ea5 100644 --- a/clients/algoliasearch-client-go/algolia/usage/model_get_usage_200_response_statistics_inner.go +++ b/clients/algoliasearch-client-go/algolia/usage/model_statistic_entry.go @@ -6,46 +6,46 @@ import ( "fmt" ) -// GetUsage200ResponseStatisticsInner struct for GetUsage200ResponseStatisticsInner. -type GetUsage200ResponseStatisticsInner struct { +// StatisticEntry struct for StatisticEntry. +type StatisticEntry struct { // Timestamp, measured in milliseconds since the Unix epoch. T *int32 `json:"t,omitempty"` V *StatisticValue `json:"v,omitempty"` } -type GetUsage200ResponseStatisticsInnerOption func(f *GetUsage200ResponseStatisticsInner) +type StatisticEntryOption func(f *StatisticEntry) -func WithGetUsage200ResponseStatisticsInnerT(val int32) GetUsage200ResponseStatisticsInnerOption { - return func(f *GetUsage200ResponseStatisticsInner) { +func WithStatisticEntryT(val int32) StatisticEntryOption { + return func(f *StatisticEntry) { f.T = &val } } -func WithGetUsage200ResponseStatisticsInnerV(val StatisticValue) GetUsage200ResponseStatisticsInnerOption { - return func(f *GetUsage200ResponseStatisticsInner) { +func WithStatisticEntryV(val StatisticValue) StatisticEntryOption { + return func(f *StatisticEntry) { f.V = &val } } -// NewGetUsage200ResponseStatisticsInner instantiates a new GetUsage200ResponseStatisticsInner object +// NewStatisticEntry instantiates a new StatisticEntry object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewGetUsage200ResponseStatisticsInner(opts ...GetUsage200ResponseStatisticsInnerOption) *GetUsage200ResponseStatisticsInner { - this := &GetUsage200ResponseStatisticsInner{} +func NewStatisticEntry(opts ...StatisticEntryOption) *StatisticEntry { + this := &StatisticEntry{} for _, opt := range opts { opt(this) } return this } -// NewEmptyGetUsage200ResponseStatisticsInner return a pointer to an empty GetUsage200ResponseStatisticsInner object. -func NewEmptyGetUsage200ResponseStatisticsInner() *GetUsage200ResponseStatisticsInner { - return &GetUsage200ResponseStatisticsInner{} +// NewEmptyStatisticEntry return a pointer to an empty StatisticEntry object. +func NewEmptyStatisticEntry() *StatisticEntry { + return &StatisticEntry{} } // GetT returns the T field value if set, zero value otherwise. -func (o *GetUsage200ResponseStatisticsInner) GetT() int32 { +func (o *StatisticEntry) GetT() int32 { if o == nil || o.T == nil { var ret int32 return ret @@ -55,7 +55,7 @@ func (o *GetUsage200ResponseStatisticsInner) GetT() int32 { // GetTOk returns a tuple with the T field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetUsage200ResponseStatisticsInner) GetTOk() (*int32, bool) { +func (o *StatisticEntry) GetTOk() (*int32, bool) { if o == nil || o.T == nil { return nil, false } @@ -63,7 +63,7 @@ func (o *GetUsage200ResponseStatisticsInner) GetTOk() (*int32, bool) { } // HasT returns a boolean if a field has been set. -func (o *GetUsage200ResponseStatisticsInner) HasT() bool { +func (o *StatisticEntry) HasT() bool { if o != nil && o.T != nil { return true } @@ -72,13 +72,13 @@ func (o *GetUsage200ResponseStatisticsInner) HasT() bool { } // SetT gets a reference to the given int32 and assigns it to the T field. -func (o *GetUsage200ResponseStatisticsInner) SetT(v int32) *GetUsage200ResponseStatisticsInner { +func (o *StatisticEntry) SetT(v int32) *StatisticEntry { o.T = &v return o } // GetV returns the V field value if set, zero value otherwise. -func (o *GetUsage200ResponseStatisticsInner) GetV() StatisticValue { +func (o *StatisticEntry) GetV() StatisticValue { if o == nil || o.V == nil { var ret StatisticValue return ret @@ -88,7 +88,7 @@ func (o *GetUsage200ResponseStatisticsInner) GetV() StatisticValue { // GetVOk returns a tuple with the V field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetUsage200ResponseStatisticsInner) GetVOk() (*StatisticValue, bool) { +func (o *StatisticEntry) GetVOk() (*StatisticValue, bool) { if o == nil || o.V == nil { return nil, false } @@ -96,7 +96,7 @@ func (o *GetUsage200ResponseStatisticsInner) GetVOk() (*StatisticValue, bool) { } // HasV returns a boolean if a field has been set. -func (o *GetUsage200ResponseStatisticsInner) HasV() bool { +func (o *StatisticEntry) HasV() bool { if o != nil && o.V != nil { return true } @@ -105,12 +105,12 @@ func (o *GetUsage200ResponseStatisticsInner) HasV() bool { } // SetV gets a reference to the given StatisticValue and assigns it to the V field. -func (o *GetUsage200ResponseStatisticsInner) SetV(v *StatisticValue) *GetUsage200ResponseStatisticsInner { +func (o *StatisticEntry) SetV(v *StatisticValue) *StatisticEntry { o.V = v return o } -func (o GetUsage200ResponseStatisticsInner) MarshalJSON() ([]byte, error) { +func (o StatisticEntry) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.T != nil { toSerialize["t"] = o.T @@ -120,15 +120,15 @@ func (o GetUsage200ResponseStatisticsInner) MarshalJSON() ([]byte, error) { } serialized, err := json.Marshal(toSerialize) if err != nil { - return nil, fmt.Errorf("failed to marshal GetUsage200ResponseStatisticsInner: %w", err) + return nil, fmt.Errorf("failed to marshal StatisticEntry: %w", err) } return serialized, nil } -func (o GetUsage200ResponseStatisticsInner) String() string { +func (o StatisticEntry) String() string { out := "" out += fmt.Sprintf(" t=%v\n", o.T) out += fmt.Sprintf(" v=%v\n", o.V) - return fmt.Sprintf("GetUsage200ResponseStatisticsInner {\n%s}", out) + return fmt.Sprintf("StatisticEntry {\n%s}", out) } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/QuerySuggestionsClient.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/QuerySuggestionsClient.java index b4b35c7257..1ce4101fc4 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/QuerySuggestionsClient.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/QuerySuggestionsClient.java @@ -683,8 +683,7 @@ public CompletableFuture getConfigAsync(@Nonnull String i * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetConfigStatus200Response getConfigStatus(@Nonnull String indexName, RequestOptions requestOptions) - throws AlgoliaRuntimeException { + public ConfigStatus getConfigStatus(@Nonnull String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { return LaunderThrowable.await(getConfigStatusAsync(indexName, requestOptions)); } @@ -694,7 +693,7 @@ public GetConfigStatus200Response getConfigStatus(@Nonnull String indexName, Req * @param indexName Query Suggestions index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetConfigStatus200Response getConfigStatus(@Nonnull String indexName) throws AlgoliaRuntimeException { + public ConfigStatus getConfigStatus(@Nonnull String indexName) throws AlgoliaRuntimeException { return this.getConfigStatus(indexName, null); } @@ -706,12 +705,12 @@ public GetConfigStatus200Response getConfigStatus(@Nonnull String indexName) thr * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getConfigStatusAsync(@Nonnull String indexName, RequestOptions requestOptions) + public CompletableFuture getConfigStatusAsync(@Nonnull String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { Parameters.requireNonNull(indexName, "Parameter `indexName` is required when calling `getConfigStatus`."); HttpRequest request = HttpRequest.builder().setPath("/1/configs/{indexName}/status", indexName).setMethod("GET").build(); - return executeAsync(request, requestOptions, new TypeReference() {}); + return executeAsync(request, requestOptions, new TypeReference() {}); } /** @@ -720,7 +719,7 @@ public CompletableFuture getConfigStatusAsync(@Nonnu * @param indexName Query Suggestions index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getConfigStatusAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { + public CompletableFuture getConfigStatusAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { return this.getConfigStatusAsync(indexName, null); } @@ -732,7 +731,7 @@ public CompletableFuture getConfigStatusAsync(@Nonnu * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetLogFile200Response getLogFile(@Nonnull String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { + public LogFile getLogFile(@Nonnull String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { return LaunderThrowable.await(getLogFileAsync(indexName, requestOptions)); } @@ -742,7 +741,7 @@ public GetLogFile200Response getLogFile(@Nonnull String indexName, RequestOption * @param indexName Query Suggestions index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetLogFile200Response getLogFile(@Nonnull String indexName) throws AlgoliaRuntimeException { + public LogFile getLogFile(@Nonnull String indexName) throws AlgoliaRuntimeException { return this.getLogFile(indexName, null); } @@ -754,13 +753,13 @@ public GetLogFile200Response getLogFile(@Nonnull String indexName) throws Algoli * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getLogFileAsync(@Nonnull String indexName, RequestOptions requestOptions) + public CompletableFuture getLogFileAsync(@Nonnull String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException { Parameters.requireNonNull(indexName, "Parameter `indexName` is required when calling `getLogFile`."); HttpRequest request = HttpRequest.builder().setPath("/1/logs/{indexName}", indexName).setMethod("GET").build(); - return executeAsync(request, requestOptions, new TypeReference() {}); + return executeAsync(request, requestOptions, new TypeReference() {}); } /** @@ -769,7 +768,7 @@ public CompletableFuture getLogFileAsync(@Nonnull String * @param indexName Query Suggestions index name. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getLogFileAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { + public CompletableFuture getLogFileAsync(@Nonnull String indexName) throws AlgoliaRuntimeException { return this.getLogFileAsync(indexName, null); } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/UsageClient.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/UsageClient.java index 54cc63527a..3ef2b67cdf 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/UsageClient.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/UsageClient.java @@ -594,7 +594,7 @@ public CompletableFuture customPutAsync(@Nonnull String path) throws Alg * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetUsage200Response getIndexUsage( + public IndexUsage getIndexUsage( @Nonnull Statistic statistic, @Nonnull String indexName, @Nonnull String startDate, @@ -735,7 +735,7 @@ public GetUsage200Response getIndexUsage( * days. (optional, default to daily) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetUsage200Response getIndexUsage( + public IndexUsage getIndexUsage( @Nonnull Statistic statistic, @Nonnull String indexName, @Nonnull String startDate, @@ -874,7 +874,7 @@ public GetUsage200Response getIndexUsage( * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetUsage200Response getIndexUsage( + public IndexUsage getIndexUsage( @Nonnull Statistic statistic, @Nonnull String indexName, @Nonnull String startDate, @@ -1011,7 +1011,7 @@ public GetUsage200Response getIndexUsage( * @param endDate End date of the period to analyze, in `YYYY-MM-DD` format. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetUsage200Response getIndexUsage( + public IndexUsage getIndexUsage( @Nonnull Statistic statistic, @Nonnull String indexName, @Nonnull String startDate, @@ -1152,7 +1152,7 @@ public GetUsage200Response getIndexUsage( * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getIndexUsageAsync( + public CompletableFuture getIndexUsageAsync( @Nonnull Statistic statistic, @Nonnull String indexName, @Nonnull String startDate, @@ -1175,7 +1175,7 @@ public CompletableFuture getIndexUsageAsync( .addQueryParameter("endDate", endDate) .addQueryParameter("granularity", granularity) .build(); - return executeAsync(request, requestOptions, new TypeReference() {}); + return executeAsync(request, requestOptions, new TypeReference() {}); } /** @@ -1308,7 +1308,7 @@ public CompletableFuture getIndexUsageAsync( * days. (optional, default to daily) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getIndexUsageAsync( + public CompletableFuture getIndexUsageAsync( @Nonnull Statistic statistic, @Nonnull String indexName, @Nonnull String startDate, @@ -1447,7 +1447,7 @@ public CompletableFuture getIndexUsageAsync( * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getIndexUsageAsync( + public CompletableFuture getIndexUsageAsync( @Nonnull Statistic statistic, @Nonnull String indexName, @Nonnull String startDate, @@ -1584,7 +1584,7 @@ public CompletableFuture getIndexUsageAsync( * @param endDate End date of the period to analyze, in `YYYY-MM-DD` format. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getIndexUsageAsync( + public CompletableFuture getIndexUsageAsync( @Nonnull Statistic statistic, @Nonnull String indexName, @Nonnull String startDate, @@ -1724,7 +1724,7 @@ public CompletableFuture getIndexUsageAsync( * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetUsage200Response getUsage( + public IndexUsage getUsage( @Nonnull Statistic statistic, @Nonnull String startDate, @Nonnull String endDate, @@ -1863,12 +1863,8 @@ public GetUsage200Response getUsage( * days. (optional, default to daily) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetUsage200Response getUsage( - @Nonnull Statistic statistic, - @Nonnull String startDate, - @Nonnull String endDate, - Granularity granularity - ) throws AlgoliaRuntimeException { + public IndexUsage getUsage(@Nonnull Statistic statistic, @Nonnull String startDate, @Nonnull String endDate, Granularity granularity) + throws AlgoliaRuntimeException { return this.getUsage(statistic, startDate, endDate, granularity, null); } @@ -2000,7 +1996,7 @@ public GetUsage200Response getUsage( * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetUsage200Response getUsage( + public IndexUsage getUsage( @Nonnull Statistic statistic, @Nonnull String startDate, @Nonnull String endDate, @@ -2135,7 +2131,7 @@ public GetUsage200Response getUsage( * @param endDate End date of the period to analyze, in `YYYY-MM-DD` format. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public GetUsage200Response getUsage(@Nonnull Statistic statistic, @Nonnull String startDate, @Nonnull String endDate) + public IndexUsage getUsage(@Nonnull Statistic statistic, @Nonnull String startDate, @Nonnull String endDate) throws AlgoliaRuntimeException { return this.getUsage(statistic, startDate, endDate, null, null); } @@ -2271,7 +2267,7 @@ public GetUsage200Response getUsage(@Nonnull Statistic statistic, @Nonnull Strin * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getUsageAsync( + public CompletableFuture getUsageAsync( @Nonnull Statistic statistic, @Nonnull String startDate, @Nonnull String endDate, @@ -2291,7 +2287,7 @@ public CompletableFuture getUsageAsync( .addQueryParameter("endDate", endDate) .addQueryParameter("granularity", granularity) .build(); - return executeAsync(request, requestOptions, new TypeReference() {}); + return executeAsync(request, requestOptions, new TypeReference() {}); } /** @@ -2423,7 +2419,7 @@ public CompletableFuture getUsageAsync( * days. (optional, default to daily) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getUsageAsync( + public CompletableFuture getUsageAsync( @Nonnull Statistic statistic, @Nonnull String startDate, @Nonnull String endDate, @@ -2560,7 +2556,7 @@ public CompletableFuture getUsageAsync( * the transporter requestOptions. * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getUsageAsync( + public CompletableFuture getUsageAsync( @Nonnull Statistic statistic, @Nonnull String startDate, @Nonnull String endDate, @@ -2695,11 +2691,8 @@ public CompletableFuture getUsageAsync( * @param endDate End date of the period to analyze, in `YYYY-MM-DD` format. (required) * @throws AlgoliaRuntimeException If it fails to process the API call */ - public CompletableFuture getUsageAsync( - @Nonnull Statistic statistic, - @Nonnull String startDate, - @Nonnull String endDate - ) throws AlgoliaRuntimeException { + public CompletableFuture getUsageAsync(@Nonnull Statistic statistic, @Nonnull String startDate, @Nonnull String endDate) + throws AlgoliaRuntimeException { return this.getUsageAsync(statistic, startDate, endDate, null, null); } } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsEmptySearch.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/EmptySearchFilter.java similarity index 78% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsEmptySearch.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/EmptySearchFilter.java index a5d686c0a7..17d033eb38 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsEmptySearch.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/EmptySearchFilter.java @@ -8,7 +8,7 @@ import java.util.Objects; /** Empty searches removed from the A/B test as a result of configuration settings. */ -public class FilterEffectsEmptySearch { +public class EmptySearchFilter { @JsonProperty("usersCount") private Integer usersCount; @@ -16,7 +16,7 @@ public class FilterEffectsEmptySearch { @JsonProperty("trackedSearchesCount") private Integer trackedSearchesCount; - public FilterEffectsEmptySearch setUsersCount(Integer usersCount) { + public EmptySearchFilter setUsersCount(Integer usersCount) { this.usersCount = usersCount; return this; } @@ -27,7 +27,7 @@ public Integer getUsersCount() { return usersCount; } - public FilterEffectsEmptySearch setTrackedSearchesCount(Integer trackedSearchesCount) { + public EmptySearchFilter setTrackedSearchesCount(Integer trackedSearchesCount) { this.trackedSearchesCount = trackedSearchesCount; return this; } @@ -46,10 +46,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FilterEffectsEmptySearch filterEffectsEmptySearch = (FilterEffectsEmptySearch) o; + EmptySearchFilter emptySearchFilter = (EmptySearchFilter) o; return ( - Objects.equals(this.usersCount, filterEffectsEmptySearch.usersCount) && - Objects.equals(this.trackedSearchesCount, filterEffectsEmptySearch.trackedSearchesCount) + Objects.equals(this.usersCount, emptySearchFilter.usersCount) && + Objects.equals(this.trackedSearchesCount, emptySearchFilter.trackedSearchesCount) ); } @@ -61,7 +61,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FilterEffectsEmptySearch {\n"); + sb.append("class EmptySearchFilter {\n"); sb.append(" usersCount: ").append(toIndentedString(usersCount)).append("\n"); sb.append(" trackedSearchesCount: ").append(toIndentedString(trackedSearchesCount)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffects.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffects.java index 26188c95f7..84d78b06f9 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffects.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffects.java @@ -11,30 +11,30 @@ public class FilterEffects { @JsonProperty("outliers") - private FilterEffectsOutliers outliers; + private OutliersFilter outliers; @JsonProperty("emptySearch") - private FilterEffectsEmptySearch emptySearch; + private EmptySearchFilter emptySearch; - public FilterEffects setOutliers(FilterEffectsOutliers outliers) { + public FilterEffects setOutliers(OutliersFilter outliers) { this.outliers = outliers; return this; } /** Get outliers */ @javax.annotation.Nullable - public FilterEffectsOutliers getOutliers() { + public OutliersFilter getOutliers() { return outliers; } - public FilterEffects setEmptySearch(FilterEffectsEmptySearch emptySearch) { + public FilterEffects setEmptySearch(EmptySearchFilter emptySearch) { this.emptySearch = emptySearch; return this; } /** Get emptySearch */ @javax.annotation.Nullable - public FilterEffectsEmptySearch getEmptySearch() { + public EmptySearchFilter getEmptySearch() { return emptySearch; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsOutliers.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/OutliersFilter.java similarity index 79% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsOutliers.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/OutliersFilter.java index dbf2ed48da..c57446cf4b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsOutliers.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/abtesting/OutliersFilter.java @@ -8,7 +8,7 @@ import java.util.Objects; /** Outliers removed from the A/B test as a result of configuration settings. */ -public class FilterEffectsOutliers { +public class OutliersFilter { @JsonProperty("usersCount") private Integer usersCount; @@ -16,7 +16,7 @@ public class FilterEffectsOutliers { @JsonProperty("trackedSearchesCount") private Integer trackedSearchesCount; - public FilterEffectsOutliers setUsersCount(Integer usersCount) { + public OutliersFilter setUsersCount(Integer usersCount) { this.usersCount = usersCount; return this; } @@ -27,7 +27,7 @@ public Integer getUsersCount() { return usersCount; } - public FilterEffectsOutliers setTrackedSearchesCount(Integer trackedSearchesCount) { + public OutliersFilter setTrackedSearchesCount(Integer trackedSearchesCount) { this.trackedSearchesCount = trackedSearchesCount; return this; } @@ -46,10 +46,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FilterEffectsOutliers filterEffectsOutliers = (FilterEffectsOutliers) o; + OutliersFilter outliersFilter = (OutliersFilter) o; return ( - Objects.equals(this.usersCount, filterEffectsOutliers.usersCount) && - Objects.equals(this.trackedSearchesCount, filterEffectsOutliers.trackedSearchesCount) + Objects.equals(this.usersCount, outliersFilter.usersCount) && + Objects.equals(this.trackedSearchesCount, outliersFilter.trackedSearchesCount) ); } @@ -61,7 +61,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FilterEffectsOutliers {\n"); + sb.append("class OutliersFilter {\n"); sb.append(" usersCount: ").append(toIndentedString(usersCount)).append("\n"); sb.append(" trackedSearchesCount: ").append(toIndentedString(trackedSearchesCount)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/ClickPositionsInner.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/ClickPosition.java similarity index 81% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/ClickPositionsInner.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/ClickPosition.java index 13177c55e6..74024a2e1f 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/ClickPositionsInner.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/ClickPosition.java @@ -10,7 +10,7 @@ import java.util.Objects; /** Click position. */ -public class ClickPositionsInner { +public class ClickPosition { @JsonProperty("position") private List position; @@ -18,12 +18,12 @@ public class ClickPositionsInner { @JsonProperty("clickCount") private Integer clickCount; - public ClickPositionsInner setPosition(List position) { + public ClickPosition setPosition(List position) { this.position = position; return this; } - public ClickPositionsInner addPosition(Integer positionItem) { + public ClickPosition addPosition(Integer positionItem) { if (this.position == null) { this.position = new ArrayList<>(); } @@ -41,7 +41,7 @@ public List getPosition() { return position; } - public ClickPositionsInner setClickCount(Integer clickCount) { + public ClickPosition setClickCount(Integer clickCount) { this.clickCount = clickCount; return this; } @@ -60,8 +60,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ClickPositionsInner clickPositionsInner = (ClickPositionsInner) o; - return Objects.equals(this.position, clickPositionsInner.position) && Objects.equals(this.clickCount, clickPositionsInner.clickCount); + ClickPosition clickPosition = (ClickPosition) o; + return Objects.equals(this.position, clickPosition.position) && Objects.equals(this.clickCount, clickPosition.clickCount); } @Override @@ -72,7 +72,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ClickPositionsInner {\n"); + sb.append("class ClickPosition {\n"); sb.append(" position: ").append(toIndentedString(position)).append("\n"); sb.append(" clickCount: ").append(toIndentedString(clickCount)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java index 866e72bef9..4213974b65 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java @@ -13,21 +13,21 @@ public class GetClickPositionsResponse { @JsonProperty("positions") - private List positions = new ArrayList<>(); + private List positions = new ArrayList<>(); - public GetClickPositionsResponse setPositions(List positions) { + public GetClickPositionsResponse setPositions(List positions) { this.positions = positions; return this; } - public GetClickPositionsResponse addPositions(ClickPositionsInner positionsItem) { + public GetClickPositionsResponse addPositions(ClickPosition positionsItem) { this.positions.add(positionsItem); return this; } /** List of positions in the search results and clicks associated with this search. */ @javax.annotation.Nonnull - public List getPositions() { + public List getPositions() { return positions; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java index eb2602b4f6..f17b8a809c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java @@ -25,7 +25,7 @@ public class TopSearchWithAnalytics { private Double averageClickPosition; @JsonProperty("clickPositions") - private List clickPositions = new ArrayList<>(); + private List clickPositions = new ArrayList<>(); @JsonProperty("conversionRate") private Double conversionRate; @@ -93,19 +93,19 @@ public Double getAverageClickPosition() { return averageClickPosition; } - public TopSearchWithAnalytics setClickPositions(List clickPositions) { + public TopSearchWithAnalytics setClickPositions(List clickPositions) { this.clickPositions = clickPositions; return this; } - public TopSearchWithAnalytics addClickPositions(ClickPositionsInner clickPositionsItem) { + public TopSearchWithAnalytics addClickPositions(ClickPosition clickPositionsItem) { this.clickPositions.add(clickPositionsItem); return this; } /** List of positions in the search results and clicks associated with this search. */ @javax.annotation.Nonnull - public List getClickPositions() { + public List getClickPositions() { return clickPositions; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithRevenueAnalytics.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithRevenueAnalytics.java index f91ef9e4a1..b9f00ff1d8 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithRevenueAnalytics.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithRevenueAnalytics.java @@ -27,7 +27,7 @@ public class TopSearchWithRevenueAnalytics { private Double averageClickPosition; @JsonProperty("clickPositions") - private List clickPositions = new ArrayList<>(); + private List clickPositions = new ArrayList<>(); @JsonProperty("conversionRate") private Double conversionRate; @@ -110,19 +110,19 @@ public Double getAverageClickPosition() { return averageClickPosition; } - public TopSearchWithRevenueAnalytics setClickPositions(List clickPositions) { + public TopSearchWithRevenueAnalytics setClickPositions(List clickPositions) { this.clickPositions = clickPositions; return this; } - public TopSearchWithRevenueAnalytics addClickPositions(ClickPositionsInner clickPositionsItem) { + public TopSearchWithRevenueAnalytics addClickPositions(ClickPosition clickPositionsItem) { this.clickPositions.add(clickPositionsItem); return this; } /** List of positions in the search results and clicks associated with this search. */ @javax.annotation.Nonnull - public List getClickPositions() { + public List getClickPositions() { return clickPositions; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DockerStreamsInput.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DockerStreamsInput.java index 274ac84f8c..4331bed030 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DockerStreamsInput.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DockerStreamsInput.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** DockerStreamsInput */ +/** The selected streams of a singer or airbyte connector. */ @JsonDeserialize(as = DockerStreamsInput.class) public class DockerStreamsInput implements TaskInput { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponseError.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationError.java similarity index 76% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponseError.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationError.java index f921af52c2..97e19b1256 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponseError.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationError.java @@ -8,7 +8,7 @@ import java.util.Objects; /** The error if the transformation failed. */ -public class TransformationTryResponseError { +public class TransformationError { @JsonProperty("code") private Integer code; @@ -16,7 +16,7 @@ public class TransformationTryResponseError { @JsonProperty("message") private String message; - public TransformationTryResponseError setCode(Integer code) { + public TransformationError setCode(Integer code) { this.code = code; return this; } @@ -27,7 +27,7 @@ public Integer getCode() { return code; } - public TransformationTryResponseError setMessage(String message) { + public TransformationError setMessage(String message) { this.message = message; return this; } @@ -46,10 +46,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TransformationTryResponseError transformationTryResponseError = (TransformationTryResponseError) o; - return ( - Objects.equals(this.code, transformationTryResponseError.code) && Objects.equals(this.message, transformationTryResponseError.message) - ); + TransformationError transformationError = (TransformationError) o; + return Objects.equals(this.code, transformationError.code) && Objects.equals(this.message, transformationError.message); } @Override @@ -60,7 +58,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class TransformationTryResponseError {\n"); + sb.append("class TransformationError {\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponse.java index 001a464b25..719c0f1c0b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponse.java @@ -16,7 +16,7 @@ public class TransformationTryResponse { private List payloads = new ArrayList<>(); @JsonProperty("error") - private TransformationTryResponseError error; + private TransformationError error; public TransformationTryResponse setPayloads(List payloads) { this.payloads = payloads; @@ -34,14 +34,14 @@ public List getPayloads() { return payloads; } - public TransformationTryResponse setError(TransformationTryResponseError error) { + public TransformationTryResponse setError(TransformationError error) { this.error = error; return this; } /** Get error */ @javax.annotation.Nullable - public TransformationTryResponseError getError() { + public TransformationError getError() { return error; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/GetServers403Response.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/BadRequest.java similarity index 79% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/GetServers403Response.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/BadRequest.java index 128b637cd4..16e1c190bf 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/GetServers403Response.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/BadRequest.java @@ -7,13 +7,13 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** GetServers403Response */ -public class GetServers403Response { +/** BadRequest */ +public class BadRequest { @JsonProperty("reason") private String reason; - public GetServers403Response setReason(String reason) { + public BadRequest setReason(String reason) { this.reason = reason; return this; } @@ -32,8 +32,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetServers403Response getServers403Response = (GetServers403Response) o; - return Objects.equals(this.reason, getServers403Response.reason); + BadRequest badRequest = (BadRequest) o; + return Objects.equals(this.reason, badRequest.reason); } @Override @@ -44,7 +44,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetServers403Response {\n"); + sb.append("class BadRequest {\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Forbidden.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Forbidden.java new file mode 100644 index 0000000000..b0c701487f --- /dev/null +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Forbidden.java @@ -0,0 +1,62 @@ +// Code generated by OpenAPI Generator (https://openapi-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.databind.annotation.*; +import java.util.Objects; + +/** Forbidden */ +public class Forbidden { + + @JsonProperty("reason") + private String reason; + + public Forbidden setReason(String reason) { + this.reason = reason; + return this; + } + + /** Get 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; + } + Forbidden forbidden = (Forbidden) o; + return Objects.equals(this.reason, forbidden.reason); + } + + @Override + public int hashCode() { + return Objects.hash(reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Forbidden {\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/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsInner.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentEntry.java similarity index 82% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsInner.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentEntry.java index 473f284791..4da2412f97 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsInner.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentEntry.java @@ -7,8 +7,8 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** IncidentsInner */ -public class IncidentsInner { +/** IncidentEntry */ +public class IncidentEntry { @JsonProperty("t") private Long t; @@ -16,7 +16,7 @@ public class IncidentsInner { @JsonProperty("v") private Incident v; - public IncidentsInner setT(Long t) { + public IncidentEntry setT(Long t) { this.t = t; return this; } @@ -27,7 +27,7 @@ public Long getT() { return t; } - public IncidentsInner setV(Incident v) { + public IncidentEntry setV(Incident v) { this.v = v; return this; } @@ -46,8 +46,8 @@ public boolean equals(Object o) { 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); + IncidentEntry incidentEntry = (IncidentEntry) o; + return Objects.equals(this.t, incidentEntry.t) && Objects.equals(this.v, incidentEntry.v); } @Override @@ -58,7 +58,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentsInner {\n"); + sb.append("class IncidentEntry {\n"); sb.append(" t: ").append(toIndentedString(t)).append("\n"); sb.append(" v: ").append(toIndentedString(v)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java index 28cef1cf28..5b6d495cbd 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java @@ -14,14 +14,14 @@ public class IncidentsResponse { @JsonProperty("incidents") - private Map> incidents; + private Map> incidents; - public IncidentsResponse setIncidents(Map> incidents) { + public IncidentsResponse setIncidents(Map> incidents) { this.incidents = incidents; return this; } - public IncidentsResponse putIncidents(String key, List incidentsItem) { + public IncidentsResponse putIncidents(String key, List incidentsItem) { if (this.incidents == null) { this.incidents = new HashMap<>(); } @@ -31,7 +31,7 @@ public IncidentsResponse putIncidents(String key, List incidents /** Get incidents */ @javax.annotation.Nullable - public Map> getIncidents() { + public Map> getIncidents() { return incidents; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingMetric.java similarity index 70% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingMetric.java index c3bf5a198d..951ff9c8ad 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingMetric.java @@ -10,18 +10,18 @@ import java.util.Map; import java.util.Objects; -/** IndexingTimeResponseMetrics */ -public class IndexingTimeResponseMetrics { +/** IndexingMetric */ +public class IndexingMetric { @JsonProperty("indexing") - private Map> indexing; + private Map> indexing; - public IndexingTimeResponseMetrics setIndexing(Map> indexing) { + public IndexingMetric setIndexing(Map> indexing) { this.indexing = indexing; return this; } - public IndexingTimeResponseMetrics putIndexing(String key, List indexingItem) { + public IndexingMetric putIndexing(String key, List indexingItem) { if (this.indexing == null) { this.indexing = new HashMap<>(); } @@ -31,7 +31,7 @@ public IndexingTimeResponseMetrics putIndexing(String key, List index /** Get indexing */ @javax.annotation.Nullable - public Map> getIndexing() { + public Map> getIndexing() { return indexing; } @@ -43,8 +43,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IndexingTimeResponseMetrics indexingTimeResponseMetrics = (IndexingTimeResponseMetrics) o; - return Objects.equals(this.indexing, indexingTimeResponseMetrics.indexing); + IndexingMetric indexingMetric = (IndexingMetric) o; + return Objects.equals(this.indexing, indexingMetric.indexing); } @Override @@ -55,7 +55,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IndexingTimeResponseMetrics {\n"); + sb.append("class IndexingMetric {\n"); sb.append(" indexing: ").append(toIndentedString(indexing)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java index aa6c906878..84f58a2157 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java @@ -11,16 +11,16 @@ public class IndexingTimeResponse { @JsonProperty("metrics") - private IndexingTimeResponseMetrics metrics; + private IndexingMetric metrics; - public IndexingTimeResponse setMetrics(IndexingTimeResponseMetrics metrics) { + public IndexingTimeResponse setMetrics(IndexingMetric metrics) { this.metrics = metrics; return this; } /** Get metrics */ @javax.annotation.Nullable - public IndexingTimeResponseMetrics getMetrics() { + public IndexingMetric getMetrics() { return metrics; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java index c2443051a7..6cd6724a4b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java @@ -11,16 +11,16 @@ public class InfrastructureResponse { @JsonProperty("metrics") - private InfrastructureResponseMetrics metrics; + private Metrics metrics; - public InfrastructureResponse setMetrics(InfrastructureResponseMetrics metrics) { + public InfrastructureResponse setMetrics(Metrics metrics) { this.metrics = metrics; return this; } /** Get metrics */ @javax.annotation.Nullable - public InfrastructureResponseMetrics getMetrics() { + public Metrics getMetrics() { return metrics; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyMetric.java similarity index 72% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyMetric.java index e602ed5ccd..4f8ab682cb 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyMetric.java @@ -10,18 +10,18 @@ import java.util.Map; import java.util.Objects; -/** LatencyResponseMetrics */ -public class LatencyResponseMetrics { +/** LatencyMetric */ +public class LatencyMetric { @JsonProperty("latency") - private Map> latency; + private Map> latency; - public LatencyResponseMetrics setLatency(Map> latency) { + public LatencyMetric setLatency(Map> latency) { this.latency = latency; return this; } - public LatencyResponseMetrics putLatency(String key, List latencyItem) { + public LatencyMetric putLatency(String key, List latencyItem) { if (this.latency == null) { this.latency = new HashMap<>(); } @@ -31,7 +31,7 @@ public LatencyResponseMetrics putLatency(String key, List latencyItem /** Get latency */ @javax.annotation.Nullable - public Map> getLatency() { + public Map> getLatency() { return latency; } @@ -43,8 +43,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LatencyResponseMetrics latencyResponseMetrics = (LatencyResponseMetrics) o; - return Objects.equals(this.latency, latencyResponseMetrics.latency); + LatencyMetric latencyMetric = (LatencyMetric) o; + return Objects.equals(this.latency, latencyMetric.latency); } @Override @@ -55,7 +55,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LatencyResponseMetrics {\n"); + sb.append("class LatencyMetric {\n"); sb.append(" latency: ").append(toIndentedString(latency)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponse.java index f47050281c..9522d5f752 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponse.java @@ -11,16 +11,16 @@ public class LatencyResponse { @JsonProperty("metrics") - private LatencyResponseMetrics metrics; + private LatencyMetric metrics; - public LatencyResponse setMetrics(LatencyResponseMetrics metrics) { + public LatencyResponse setMetrics(LatencyMetric metrics) { this.metrics = metrics; return this; } /** Get metrics */ @javax.annotation.Nullable - public LatencyResponseMetrics getMetrics() { + public LatencyMetric getMetrics() { return metrics; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Metrics.java similarity index 70% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Metrics.java index 60eaabd04e..9695d96371 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Metrics.java @@ -10,8 +10,8 @@ import java.util.Map; import java.util.Objects; -/** InfrastructureResponseMetrics */ -public class InfrastructureResponseMetrics { +/** Metrics */ +public class Metrics { @JsonProperty("cpu_usage") private Map> cpuUsage; @@ -28,12 +28,12 @@ public class InfrastructureResponseMetrics { @JsonProperty("avg_build_time") private Map> avgBuildTime; - public InfrastructureResponseMetrics setCpuUsage(Map> cpuUsage) { + public Metrics setCpuUsage(Map> cpuUsage) { this.cpuUsage = cpuUsage; return this; } - public InfrastructureResponseMetrics putCpuUsage(String key, List cpuUsageItem) { + public Metrics putCpuUsage(String key, List cpuUsageItem) { if (this.cpuUsage == null) { this.cpuUsage = new HashMap<>(); } @@ -47,12 +47,12 @@ public Map> getCpuUsage() { return cpuUsage; } - public InfrastructureResponseMetrics setRamIndexingUsage(Map> ramIndexingUsage) { + public Metrics setRamIndexingUsage(Map> ramIndexingUsage) { this.ramIndexingUsage = ramIndexingUsage; return this; } - public InfrastructureResponseMetrics putRamIndexingUsage(String key, List ramIndexingUsageItem) { + public Metrics putRamIndexingUsage(String key, List ramIndexingUsageItem) { if (this.ramIndexingUsage == null) { this.ramIndexingUsage = new HashMap<>(); } @@ -66,12 +66,12 @@ public Map> getRamIndexingUsage() { return ramIndexingUsage; } - public InfrastructureResponseMetrics setRamSearchUsage(Map> ramSearchUsage) { + public Metrics setRamSearchUsage(Map> ramSearchUsage) { this.ramSearchUsage = ramSearchUsage; return this; } - public InfrastructureResponseMetrics putRamSearchUsage(String key, List ramSearchUsageItem) { + public Metrics putRamSearchUsage(String key, List ramSearchUsageItem) { if (this.ramSearchUsage == null) { this.ramSearchUsage = new HashMap<>(); } @@ -85,12 +85,12 @@ public Map> getRamSearchUsage() { return ramSearchUsage; } - public InfrastructureResponseMetrics setSsdUsage(Map> ssdUsage) { + public Metrics setSsdUsage(Map> ssdUsage) { this.ssdUsage = ssdUsage; return this; } - public InfrastructureResponseMetrics putSsdUsage(String key, List ssdUsageItem) { + public Metrics putSsdUsage(String key, List ssdUsageItem) { if (this.ssdUsage == null) { this.ssdUsage = new HashMap<>(); } @@ -107,12 +107,12 @@ public Map> getSsdUsage() { return ssdUsage; } - public InfrastructureResponseMetrics setAvgBuildTime(Map> avgBuildTime) { + public Metrics setAvgBuildTime(Map> avgBuildTime) { this.avgBuildTime = avgBuildTime; return this; } - public InfrastructureResponseMetrics putAvgBuildTime(String key, List avgBuildTimeItem) { + public Metrics putAvgBuildTime(String key, List avgBuildTimeItem) { if (this.avgBuildTime == null) { this.avgBuildTime = new HashMap<>(); } @@ -134,13 +134,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - InfrastructureResponseMetrics infrastructureResponseMetrics = (InfrastructureResponseMetrics) o; + Metrics metrics = (Metrics) 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) + Objects.equals(this.cpuUsage, metrics.cpuUsage) && + Objects.equals(this.ramIndexingUsage, metrics.ramIndexingUsage) && + Objects.equals(this.ramSearchUsage, metrics.ramSearchUsage) && + Objects.equals(this.ssdUsage, metrics.ssdUsage) && + Objects.equals(this.avgBuildTime, metrics.avgBuildTime) ); } @@ -152,7 +152,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class InfrastructureResponseMetrics {\n"); + sb.append("class Metrics {\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"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/TimeInner.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/TimeEntry.java similarity index 84% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/TimeInner.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/TimeEntry.java index 4d838f1e19..de463f614b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/TimeInner.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/TimeEntry.java @@ -7,8 +7,8 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** TimeInner */ -public class TimeInner { +/** TimeEntry */ +public class TimeEntry { @JsonProperty("t") private Long t; @@ -16,7 +16,7 @@ public class TimeInner { @JsonProperty("v") private Integer v; - public TimeInner setT(Long t) { + public TimeEntry setT(Long t) { this.t = t; return this; } @@ -27,7 +27,7 @@ public Long getT() { return t; } - public TimeInner setV(Integer v) { + public TimeEntry setV(Integer v) { this.v = v; return this; } @@ -46,8 +46,8 @@ public boolean equals(Object o) { 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); + TimeEntry timeEntry = (TimeEntry) o; + return Objects.equals(this.t, timeEntry.t) && Objects.equals(this.v, timeEntry.v); } @Override @@ -58,7 +58,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class TimeInner {\n"); + sb.append("class TimeEntry {\n"); sb.append(" t: ").append(toIndentedString(t)).append("\n"); sb.append(" v: ").append(toIndentedString(v)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Unauthorized.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Unauthorized.java new file mode 100644 index 0000000000..d0e161531e --- /dev/null +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/monitoring/Unauthorized.java @@ -0,0 +1,62 @@ +// Code generated by OpenAPI Generator (https://openapi-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.databind.annotation.*; +import java.util.Objects; + +/** Unauthorized */ +public class Unauthorized { + + @JsonProperty("reason") + private String reason; + + public Unauthorized setReason(String reason) { + this.reason = reason; + return this; + } + + /** Get 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; + } + Unauthorized unauthorized = (Unauthorized) o; + return Objects.equals(this.reason, unauthorized.reason); + } + + @Override + public int hashCode() { + return Objects.hash(reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Unauthorized {\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/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/ConfigStatus.java similarity index 74% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/ConfigStatus.java index d6b396e910..b472634c56 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/ConfigStatus.java @@ -7,8 +7,8 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** GetConfigStatus200Response */ -public class GetConfigStatus200Response { +/** ConfigStatus */ +public class ConfigStatus { @JsonProperty("indexName") private String indexName; @@ -25,7 +25,7 @@ public class GetConfigStatus200Response { @JsonProperty("lastSuccessfulBuildDuration") private String lastSuccessfulBuildDuration; - public GetConfigStatus200Response setIndexName(String indexName) { + public ConfigStatus setIndexName(String indexName) { this.indexName = indexName; return this; } @@ -36,7 +36,7 @@ public String getIndexName() { return indexName; } - public GetConfigStatus200Response setIsRunning(Boolean isRunning) { + public ConfigStatus setIsRunning(Boolean isRunning) { this.isRunning = isRunning; return this; } @@ -47,7 +47,7 @@ public Boolean getIsRunning() { return isRunning; } - public GetConfigStatus200Response setLastBuiltAt(String lastBuiltAt) { + public ConfigStatus setLastBuiltAt(String lastBuiltAt) { this.lastBuiltAt = lastBuiltAt; return this; } @@ -58,7 +58,7 @@ public String getLastBuiltAt() { return lastBuiltAt; } - public GetConfigStatus200Response setLastSuccessfulBuiltAt(String lastSuccessfulBuiltAt) { + public ConfigStatus setLastSuccessfulBuiltAt(String lastSuccessfulBuiltAt) { this.lastSuccessfulBuiltAt = lastSuccessfulBuiltAt; return this; } @@ -69,7 +69,7 @@ public String getLastSuccessfulBuiltAt() { return lastSuccessfulBuiltAt; } - public GetConfigStatus200Response setLastSuccessfulBuildDuration(String lastSuccessfulBuildDuration) { + public ConfigStatus setLastSuccessfulBuildDuration(String lastSuccessfulBuildDuration) { this.lastSuccessfulBuildDuration = lastSuccessfulBuildDuration; return this; } @@ -88,13 +88,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetConfigStatus200Response getConfigStatus200Response = (GetConfigStatus200Response) o; + ConfigStatus configStatus = (ConfigStatus) 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) + Objects.equals(this.indexName, configStatus.indexName) && + Objects.equals(this.isRunning, configStatus.isRunning) && + Objects.equals(this.lastBuiltAt, configStatus.lastBuiltAt) && + Objects.equals(this.lastSuccessfulBuiltAt, configStatus.lastSuccessfulBuiltAt) && + Objects.equals(this.lastSuccessfulBuildDuration, configStatus.lastSuccessfulBuildDuration) ); } @@ -106,7 +106,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetConfigStatus200Response {\n"); + sb.append("class ConfigStatus {\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"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/LogFile.java similarity index 77% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/LogFile.java index 0f4b93f431..98ab0eb5aa 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/querysuggestions/LogFile.java @@ -7,8 +7,8 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** GetLogFile200Response */ -public class GetLogFile200Response { +/** LogFile */ +public class LogFile { @JsonProperty("timestamp") private String timestamp; @@ -22,7 +22,7 @@ public class GetLogFile200Response { @JsonProperty("contextLevel") private Integer contextLevel; - public GetLogFile200Response setTimestamp(String timestamp) { + public LogFile setTimestamp(String timestamp) { this.timestamp = timestamp; return this; } @@ -33,7 +33,7 @@ public String getTimestamp() { return timestamp; } - public GetLogFile200Response setLevel(LogLevel level) { + public LogFile setLevel(LogLevel level) { this.level = level; return this; } @@ -44,7 +44,7 @@ public LogLevel getLevel() { return level; } - public GetLogFile200Response setMessage(String message) { + public LogFile setMessage(String message) { this.message = message; return this; } @@ -55,7 +55,7 @@ public String getMessage() { return message; } - public GetLogFile200Response setContextLevel(Integer contextLevel) { + public LogFile setContextLevel(Integer contextLevel) { this.contextLevel = contextLevel; return this; } @@ -78,12 +78,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetLogFile200Response getLogFile200Response = (GetLogFile200Response) o; + LogFile logFile = (LogFile) 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) + Objects.equals(this.timestamp, logFile.timestamp) && + Objects.equals(this.level, logFile.level) && + Objects.equals(this.message, logFile.message) && + Objects.equals(this.contextLevel, logFile.contextLevel) ); } @@ -95,7 +95,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetLogFile200Response {\n"); + sb.append("class LogFile {\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"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java index 16a56f3e2e..41cb1838e9 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java @@ -24,9 +24,9 @@ static AroundPrecision of(Integer value) { return new IntegerWrapper(value); } - // AroundPrecision as List wrapper. - static AroundPrecision of(List value) { - return new ListOfAroundPrecisionFromValueInnerWrapper(value); + // AroundPrecision as List wrapper. + static AroundPrecision of(List value) { + return new ListOfRangeWrapper(value); } // AroundPrecision as Integer wrapper. @@ -52,25 +52,24 @@ public void serialize(IntegerWrapper value, JsonGenerator gen, SerializerProvide } } - // AroundPrecision as List wrapper. - @JsonSerialize(using = ListOfAroundPrecisionFromValueInnerWrapper.Serializer.class) - class ListOfAroundPrecisionFromValueInnerWrapper implements AroundPrecision { + // AroundPrecision as List wrapper. + @JsonSerialize(using = ListOfRangeWrapper.Serializer.class) + class ListOfRangeWrapper implements AroundPrecision { - private final List value; + private final List value; - ListOfAroundPrecisionFromValueInnerWrapper(List value) { + ListOfRangeWrapper(List value) { this.value = value; } - public List getValue() { + public List getValue() { return value; } - static class Serializer extends JsonSerializer { + static class Serializer extends JsonSerializer { @Override - public void serialize(ListOfAroundPrecisionFromValueInnerWrapper value, JsonGenerator gen, SerializerProvider provider) - throws IOException { + public void serialize(ListOfRangeWrapper value, JsonGenerator gen, SerializerProvider provider) throws IOException { gen.writeObject(value.getValue()); } } @@ -93,18 +92,14 @@ public AroundPrecision deserialize(JsonParser jp, DeserializationContext ctxt) t LOGGER.finest("Failed to deserialize oneOf Integer (error: " + e.getMessage() + ") (type: Integer)"); } } - // deserialize List + // deserialize List if (tree.isArray()) { try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return new AroundPrecision.ListOfAroundPrecisionFromValueInnerWrapper(value); + List value = parser.readValueAs(new TypeReference>() {}); + return new AroundPrecision.ListOfRangeWrapper(value); } catch (Exception e) { // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + - e.getMessage() + - ") (type: List)" - ); + LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); } } throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Range.java similarity index 79% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Range.java index 280aca7e22..6111e0ffe8 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/Range.java @@ -8,7 +8,7 @@ import java.util.Objects; /** Range object with lower and upper values in meters to define custom ranges. */ -public class AroundPrecisionFromValueInner { +public class Range { @JsonProperty("from") private Integer from; @@ -16,7 +16,7 @@ public class AroundPrecisionFromValueInner { @JsonProperty("value") private Integer value; - public AroundPrecisionFromValueInner setFrom(Integer from) { + public Range setFrom(Integer from) { this.from = from; return this; } @@ -30,7 +30,7 @@ public Integer getFrom() { return from; } - public AroundPrecisionFromValueInner setValue(Integer value) { + public Range setValue(Integer value) { this.value = value; return this; } @@ -52,8 +52,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AroundPrecisionFromValueInner aroundPrecisionFromValueInner = (AroundPrecisionFromValueInner) o; - return Objects.equals(this.from, aroundPrecisionFromValueInner.from) && Objects.equals(this.value, aroundPrecisionFromValueInner.value); + Range range = (Range) o; + return Objects.equals(this.from, range.from) && Objects.equals(this.value, range.value); } @Override @@ -64,7 +64,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AroundPrecisionFromValueInner {\n"); + sb.append("class Range {\n"); sb.append(" from: ").append(toIndentedString(from)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRule.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRule.java index e817e0d884..d1afdce680 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRule.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRule.java @@ -11,7 +11,7 @@ public class RecommendRule { @JsonProperty("_metadata") - private RecommendRuleMetadata metadata; + private RuleMetadata metadata; @JsonProperty("objectID") private String objectID; @@ -28,14 +28,14 @@ public class RecommendRule { @JsonProperty("enabled") private Boolean enabled; - public RecommendRule setMetadata(RecommendRuleMetadata metadata) { + public RecommendRule setMetadata(RuleMetadata metadata) { this.metadata = metadata; return this; } /** Get metadata */ @javax.annotation.Nullable - public RecommendRuleMetadata getMetadata() { + public RuleMetadata getMetadata() { return metadata; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexData.java similarity index 78% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexData.java index 0dcc4276a4..4a98cb1003 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexData.java @@ -8,12 +8,12 @@ import java.util.Objects; /** Redirect rule data. */ -public class RedirectRuleIndexMetadataData { +public class RedirectRuleIndexData { @JsonProperty("ruleObjectID") private String ruleObjectID; - public RedirectRuleIndexMetadataData setRuleObjectID(String ruleObjectID) { + public RedirectRuleIndexData setRuleObjectID(String ruleObjectID) { this.ruleObjectID = ruleObjectID; return this; } @@ -32,8 +32,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RedirectRuleIndexMetadataData redirectRuleIndexMetadataData = (RedirectRuleIndexMetadataData) o; - return Objects.equals(this.ruleObjectID, redirectRuleIndexMetadataData.ruleObjectID); + RedirectRuleIndexData redirectRuleIndexData = (RedirectRuleIndexData) o; + return Objects.equals(this.ruleObjectID, redirectRuleIndexData.ruleObjectID); } @Override @@ -44,7 +44,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RedirectRuleIndexMetadataData {\n"); + sb.append("class RedirectRuleIndexData {\n"); sb.append(" ruleObjectID: ").append(toIndentedString(ruleObjectID)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java index 34541bf599..b97322a393 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java @@ -23,7 +23,7 @@ public class RedirectRuleIndexMetadata { private Boolean succeed; @JsonProperty("data") - private RedirectRuleIndexMetadataData data; + private RedirectRuleIndexData data; public RedirectRuleIndexMetadata setSource(String source) { this.source = source; @@ -69,14 +69,14 @@ public Boolean getSucceed() { return succeed; } - public RedirectRuleIndexMetadata setData(RedirectRuleIndexMetadataData data) { + public RedirectRuleIndexMetadata setData(RedirectRuleIndexData data) { this.data = data; return this; } /** Get data */ @javax.annotation.Nonnull - public RedirectRuleIndexMetadataData getData() { + public RedirectRuleIndexData getData() { return data; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRuleMetadata.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RuleMetadata.java similarity index 81% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRuleMetadata.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RuleMetadata.java index d086c7b686..45dd5d9c2c 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRuleMetadata.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RuleMetadata.java @@ -8,12 +8,12 @@ import java.util.Objects; /** Rule metadata. */ -public class RecommendRuleMetadata { +public class RuleMetadata { @JsonProperty("lastUpdate") private String lastUpdate; - public RecommendRuleMetadata setLastUpdate(String lastUpdate) { + public RuleMetadata setLastUpdate(String lastUpdate) { this.lastUpdate = lastUpdate; return this; } @@ -32,8 +32,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RecommendRuleMetadata recommendRuleMetadata = (RecommendRuleMetadata) o; - return Objects.equals(this.lastUpdate, recommendRuleMetadata.lastUpdate); + RuleMetadata ruleMetadata = (RuleMetadata) o; + return Objects.equals(this.lastUpdate, ruleMetadata.lastUpdate); } @Override @@ -44,7 +44,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RecommendRuleMetadata {\n"); + sb.append("class RuleMetadata {\n"); sb.append(" lastUpdate: ").append(toIndentedString(lastUpdate)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java index a426bb487f..5f5d692b5e 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java @@ -24,9 +24,9 @@ static AroundPrecision of(Integer value) { return new IntegerWrapper(value); } - // AroundPrecision as List wrapper. - static AroundPrecision of(List value) { - return new ListOfAroundPrecisionFromValueInnerWrapper(value); + // AroundPrecision as List wrapper. + static AroundPrecision of(List value) { + return new ListOfRangeWrapper(value); } // AroundPrecision as Integer wrapper. @@ -52,25 +52,24 @@ public void serialize(IntegerWrapper value, JsonGenerator gen, SerializerProvide } } - // AroundPrecision as List wrapper. - @JsonSerialize(using = ListOfAroundPrecisionFromValueInnerWrapper.Serializer.class) - class ListOfAroundPrecisionFromValueInnerWrapper implements AroundPrecision { + // AroundPrecision as List wrapper. + @JsonSerialize(using = ListOfRangeWrapper.Serializer.class) + class ListOfRangeWrapper implements AroundPrecision { - private final List value; + private final List value; - ListOfAroundPrecisionFromValueInnerWrapper(List value) { + ListOfRangeWrapper(List value) { this.value = value; } - public List getValue() { + public List getValue() { return value; } - static class Serializer extends JsonSerializer { + static class Serializer extends JsonSerializer { @Override - public void serialize(ListOfAroundPrecisionFromValueInnerWrapper value, JsonGenerator gen, SerializerProvider provider) - throws IOException { + public void serialize(ListOfRangeWrapper value, JsonGenerator gen, SerializerProvider provider) throws IOException { gen.writeObject(value.getValue()); } } @@ -93,18 +92,14 @@ public AroundPrecision deserialize(JsonParser jp, DeserializationContext ctxt) t LOGGER.finest("Failed to deserialize oneOf Integer (error: " + e.getMessage() + ") (type: Integer)"); } } - // deserialize List + // deserialize List if (tree.isArray()) { try (JsonParser parser = tree.traverse(jp.getCodec())) { - List value = parser.readValueAs(new TypeReference>() {}); - return new AroundPrecision.ListOfAroundPrecisionFromValueInnerWrapper(value); + List value = parser.readValueAs(new TypeReference>() {}); + return new AroundPrecision.ListOfRangeWrapper(value); } catch (Exception e) { // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf List (error: " + - e.getMessage() + - ") (type: List)" - ); + LOGGER.finest("Failed to deserialize oneOf List (error: " + e.getMessage() + ") (type: List)"); } } throw new AlgoliaRuntimeException(String.format("Failed to deserialize json element: %s", tree)); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Range.java similarity index 79% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Range.java index d08ee2efbe..1edbbf02ec 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Range.java @@ -8,7 +8,7 @@ import java.util.Objects; /** Range object with lower and upper values in meters to define custom ranges. */ -public class AroundPrecisionFromValueInner { +public class Range { @JsonProperty("from") private Integer from; @@ -16,7 +16,7 @@ public class AroundPrecisionFromValueInner { @JsonProperty("value") private Integer value; - public AroundPrecisionFromValueInner setFrom(Integer from) { + public Range setFrom(Integer from) { this.from = from; return this; } @@ -30,7 +30,7 @@ public Integer getFrom() { return from; } - public AroundPrecisionFromValueInner setValue(Integer value) { + public Range setValue(Integer value) { this.value = value; return this; } @@ -52,8 +52,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AroundPrecisionFromValueInner aroundPrecisionFromValueInner = (AroundPrecisionFromValueInner) o; - return Objects.equals(this.from, aroundPrecisionFromValueInner.from) && Objects.equals(this.value, aroundPrecisionFromValueInner.value); + Range range = (Range) o; + return Objects.equals(this.from, range.from) && Objects.equals(this.value, range.value); } @Override @@ -64,7 +64,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AroundPrecisionFromValueInner {\n"); + sb.append("class Range {\n"); sb.append(" from: ").append(toIndentedString(from)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexData.java similarity index 78% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexData.java index 86297100d7..2ce3c80f75 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexData.java @@ -8,12 +8,12 @@ import java.util.Objects; /** Redirect rule data. */ -public class RedirectRuleIndexMetadataData { +public class RedirectRuleIndexData { @JsonProperty("ruleObjectID") private String ruleObjectID; - public RedirectRuleIndexMetadataData setRuleObjectID(String ruleObjectID) { + public RedirectRuleIndexData setRuleObjectID(String ruleObjectID) { this.ruleObjectID = ruleObjectID; return this; } @@ -32,8 +32,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RedirectRuleIndexMetadataData redirectRuleIndexMetadataData = (RedirectRuleIndexMetadataData) o; - return Objects.equals(this.ruleObjectID, redirectRuleIndexMetadataData.ruleObjectID); + RedirectRuleIndexData redirectRuleIndexData = (RedirectRuleIndexData) o; + return Objects.equals(this.ruleObjectID, redirectRuleIndexData.ruleObjectID); } @Override @@ -44,7 +44,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RedirectRuleIndexMetadataData {\n"); + sb.append("class RedirectRuleIndexData {\n"); sb.append(" ruleObjectID: ").append(toIndentedString(ruleObjectID)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java index 3820ccd18c..c3e708d63e 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java @@ -23,7 +23,7 @@ public class RedirectRuleIndexMetadata { private Boolean succeed; @JsonProperty("data") - private RedirectRuleIndexMetadataData data; + private RedirectRuleIndexData data; public RedirectRuleIndexMetadata setSource(String source) { this.source = source; @@ -69,14 +69,14 @@ public Boolean getSucceed() { return succeed; } - public RedirectRuleIndexMetadata setData(RedirectRuleIndexMetadataData data) { + public RedirectRuleIndexMetadata setData(RedirectRuleIndexData data) { this.data = data; return this; } /** Get data */ @javax.annotation.Nonnull - public RedirectRuleIndexMetadataData getData() { + public RedirectRuleIndexData getData() { return data; } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsString.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsString.java index 2ecffd51c1..43088251f1 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsString.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsString.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** SearchParamsString */ +/** Search parameters as query string. */ @JsonDeserialize(as = SearchParamsString.class) public class SearchParamsString implements SearchParams, BrowseParams { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseErrorErrorsInner.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/ErrorItem.java similarity index 70% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseErrorErrorsInner.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/ErrorItem.java index 08f07b8ac6..c406b5dc2e 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseErrorErrorsInner.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/ErrorItem.java @@ -7,8 +7,8 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** GetUsage400ResponseErrorErrorsInner */ -public class GetUsage400ResponseErrorErrorsInner { +/** ErrorItem */ +public class ErrorItem { @JsonProperty("code") private String code; @@ -22,7 +22,7 @@ public class GetUsage400ResponseErrorErrorsInner { @JsonProperty("position") private Integer position; - public GetUsage400ResponseErrorErrorsInner setCode(String code) { + public ErrorItem setCode(String code) { this.code = code; return this; } @@ -33,7 +33,7 @@ public String getCode() { return code; } - public GetUsage400ResponseErrorErrorsInner setMessage(String message) { + public ErrorItem setMessage(String message) { this.message = message; return this; } @@ -44,7 +44,7 @@ public String getMessage() { return message; } - public GetUsage400ResponseErrorErrorsInner setLine(Integer line) { + public ErrorItem setLine(Integer line) { this.line = line; return this; } @@ -55,7 +55,7 @@ public Integer getLine() { return line; } - public GetUsage400ResponseErrorErrorsInner setPosition(Integer position) { + public ErrorItem setPosition(Integer position) { this.position = position; return this; } @@ -74,12 +74,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetUsage400ResponseErrorErrorsInner getUsage400ResponseErrorErrorsInner = (GetUsage400ResponseErrorErrorsInner) o; + ErrorItem errorItem = (ErrorItem) o; return ( - Objects.equals(this.code, getUsage400ResponseErrorErrorsInner.code) && - Objects.equals(this.message, getUsage400ResponseErrorErrorsInner.message) && - Objects.equals(this.line, getUsage400ResponseErrorErrorsInner.line) && - Objects.equals(this.position, getUsage400ResponseErrorErrorsInner.position) + Objects.equals(this.code, errorItem.code) && + Objects.equals(this.message, errorItem.message) && + Objects.equals(this.line, errorItem.line) && + Objects.equals(this.position, errorItem.position) ); } @@ -91,7 +91,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetUsage400ResponseErrorErrorsInner {\n"); + sb.append("class ErrorItem {\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" line: ").append(toIndentedString(line)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400Response.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/Forbidden.java similarity index 74% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400Response.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/Forbidden.java index 42e6f8b641..7be9dee8ee 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400Response.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/Forbidden.java @@ -7,20 +7,20 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** GetUsage400Response */ -public class GetUsage400Response { +/** Forbidden */ +public class Forbidden { @JsonProperty("error") - private GetUsage400ResponseError error; + private ForbiddenError error; - public GetUsage400Response setError(GetUsage400ResponseError error) { + public Forbidden setError(ForbiddenError error) { this.error = error; return this; } /** Get error */ @javax.annotation.Nonnull - public GetUsage400ResponseError getError() { + public ForbiddenError getError() { return error; } @@ -32,8 +32,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetUsage400Response getUsage400Response = (GetUsage400Response) o; - return Objects.equals(this.error, getUsage400Response.error); + Forbidden forbidden = (Forbidden) o; + return Objects.equals(this.error, forbidden.error); } @Override @@ -44,7 +44,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetUsage400Response {\n"); + sb.append("class Forbidden {\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/ForbiddenError.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/ForbiddenError.java new file mode 100644 index 0000000000..a5b4fa0349 --- /dev/null +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/ForbiddenError.java @@ -0,0 +1,106 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost +// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +package com.algolia.model.usage; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** ForbiddenError */ +public class ForbiddenError { + + @JsonProperty("code") + private String code; + + @JsonProperty("message") + private String message; + + @JsonProperty("errors") + private List errors; + + public ForbiddenError setCode(String code) { + this.code = code; + return this; + } + + /** Get code */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public ForbiddenError setMessage(String message) { + this.message = message; + return this; + } + + /** Get message */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public ForbiddenError setErrors(List errors) { + this.errors = errors; + return this; + } + + public ForbiddenError addErrors(ErrorItem errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** Get errors */ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ForbiddenError forbiddenError = (ForbiddenError) o; + return ( + Objects.equals(this.code, forbiddenError.code) && + Objects.equals(this.message, forbiddenError.message) && + Objects.equals(this.errors, forbiddenError.errors) + ); + } + + @Override + public int hashCode() { + return Objects.hash(code, message, errors); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ForbiddenError {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200Response.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/IndexUsage.java similarity index 71% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200Response.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/IndexUsage.java index a0ee804253..62facd5207 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200Response.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/IndexUsage.java @@ -9,18 +9,18 @@ import java.util.List; import java.util.Objects; -/** GetUsage200Response */ -public class GetUsage200Response { +/** IndexUsage */ +public class IndexUsage { @JsonProperty("statistics") - private List statistics; + private List statistics; - public GetUsage200Response setStatistics(List statistics) { + public IndexUsage setStatistics(List statistics) { this.statistics = statistics; return this; } - public GetUsage200Response addStatistics(GetUsage200ResponseStatisticsInner statisticsItem) { + public IndexUsage addStatistics(StatisticEntry statisticsItem) { if (this.statistics == null) { this.statistics = new ArrayList<>(); } @@ -30,7 +30,7 @@ public GetUsage200Response addStatistics(GetUsage200ResponseStatisticsInner stat /** Get statistics */ @javax.annotation.Nullable - public List getStatistics() { + public List getStatistics() { return statistics; } @@ -42,8 +42,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetUsage200Response getUsage200Response = (GetUsage200Response) o; - return Objects.equals(this.statistics, getUsage200Response.statistics); + IndexUsage indexUsage = (IndexUsage) o; + return Objects.equals(this.statistics, indexUsage.statistics); } @Override @@ -54,7 +54,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetUsage200Response {\n"); + sb.append("class IndexUsage {\n"); sb.append(" statistics: ").append(toIndentedString(statistics)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequest.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequest.java new file mode 100644 index 0000000000..cf003ccf50 --- /dev/null +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequest.java @@ -0,0 +1,62 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost +// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +package com.algolia.model.usage; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; +import java.util.Objects; + +/** InvalidRequest */ +public class InvalidRequest { + + @JsonProperty("error") + private InvalidRequestError error; + + public InvalidRequest setError(InvalidRequestError error) { + this.error = error; + return this; + } + + /** Get error */ + @javax.annotation.Nonnull + public InvalidRequestError getError() { + return error; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvalidRequest invalidRequest = (InvalidRequest) o; + return Objects.equals(this.error, invalidRequest.error); + } + + @Override + public int hashCode() { + return Objects.hash(error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvalidRequest {\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/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseError.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequestError.java similarity index 70% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseError.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequestError.java index 111fbf37cf..22d7bb7914 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseError.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequestError.java @@ -9,8 +9,8 @@ import java.util.List; import java.util.Objects; -/** GetUsage400ResponseError */ -public class GetUsage400ResponseError { +/** InvalidRequestError */ +public class InvalidRequestError { @JsonProperty("code") private String code; @@ -19,9 +19,9 @@ public class GetUsage400ResponseError { private String message; @JsonProperty("errors") - private List errors; + private List errors; - public GetUsage400ResponseError setCode(String code) { + public InvalidRequestError setCode(String code) { this.code = code; return this; } @@ -32,7 +32,7 @@ public String getCode() { return code; } - public GetUsage400ResponseError setMessage(String message) { + public InvalidRequestError setMessage(String message) { this.message = message; return this; } @@ -43,12 +43,12 @@ public String getMessage() { return message; } - public GetUsage400ResponseError setErrors(List errors) { + public InvalidRequestError setErrors(List errors) { this.errors = errors; return this; } - public GetUsage400ResponseError addErrors(GetUsage400ResponseErrorErrorsInner errorsItem) { + public InvalidRequestError addErrors(ErrorItem errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); } @@ -58,7 +58,7 @@ public GetUsage400ResponseError addErrors(GetUsage400ResponseErrorErrorsInner er /** Get errors */ @javax.annotation.Nullable - public List getErrors() { + public List getErrors() { return errors; } @@ -70,11 +70,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetUsage400ResponseError getUsage400ResponseError = (GetUsage400ResponseError) o; + InvalidRequestError invalidRequestError = (InvalidRequestError) o; return ( - Objects.equals(this.code, getUsage400ResponseError.code) && - Objects.equals(this.message, getUsage400ResponseError.message) && - Objects.equals(this.errors, getUsage400ResponseError.errors) + Objects.equals(this.code, invalidRequestError.code) && + Objects.equals(this.message, invalidRequestError.message) && + Objects.equals(this.errors, invalidRequestError.errors) ); } @@ -86,7 +86,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetUsage400ResponseError {\n"); + sb.append("class InvalidRequestError {\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200ResponseStatisticsInner.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/StatisticEntry.java similarity index 73% rename from clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200ResponseStatisticsInner.java rename to clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/StatisticEntry.java index 661eff12df..c25ec57b2b 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200ResponseStatisticsInner.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/usage/StatisticEntry.java @@ -7,8 +7,8 @@ import com.fasterxml.jackson.databind.annotation.*; import java.util.Objects; -/** GetUsage200ResponseStatisticsInner */ -public class GetUsage200ResponseStatisticsInner { +/** StatisticEntry */ +public class StatisticEntry { @JsonProperty("t") private Integer t; @@ -16,7 +16,7 @@ public class GetUsage200ResponseStatisticsInner { @JsonProperty("v") private StatisticValue v; - public GetUsage200ResponseStatisticsInner setT(Integer t) { + public StatisticEntry setT(Integer t) { this.t = t; return this; } @@ -27,7 +27,7 @@ public Integer getT() { return t; } - public GetUsage200ResponseStatisticsInner setV(StatisticValue v) { + public StatisticEntry setV(StatisticValue v) { this.v = v; return this; } @@ -46,8 +46,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetUsage200ResponseStatisticsInner getUsage200ResponseStatisticsInner = (GetUsage200ResponseStatisticsInner) o; - return Objects.equals(this.t, getUsage200ResponseStatisticsInner.t) && Objects.equals(this.v, getUsage200ResponseStatisticsInner.v); + StatisticEntry statisticEntry = (StatisticEntry) o; + return Objects.equals(this.t, statisticEntry.t) && Objects.equals(this.v, statisticEntry.v); } @Override @@ -58,7 +58,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetUsage200ResponseStatisticsInner {\n"); + sb.append("class StatisticEntry {\n"); sb.append(" t: ").append(toIndentedString(t)).append("\n"); sb.append(" v: ").append(toIndentedString(v)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/builds/models.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/builds/models.ts index cbc1bda4a8..2c63773359 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/builds/models.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/builds/models.ts @@ -6,7 +6,6 @@ import { AlternativesAsExact, Anchoring, AroundPrecision, - AroundPrecisionFromValueInner, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, @@ -50,11 +49,12 @@ import { PromoteObjectID, PromoteObjectIDs, QueryType, + Range, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexMetadata, - RedirectRuleIndexMetadataData, + RedirectRuleIndexData, RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, @@ -92,7 +92,6 @@ export { AlternativesAsExact, Anchoring, AroundPrecision, - AroundPrecisionFromValueInner, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, @@ -136,11 +135,12 @@ export { PromoteObjectID, PromoteObjectIDs, QueryType, + Range, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexMetadata, - RedirectRuleIndexMetadataData, + RedirectRuleIndexData, RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecision.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecision.ts index 937a1e87e3..8cacabcc75 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecision.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecision.ts @@ -1,8 +1,8 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { AroundPrecisionFromValueInner } from './aroundPrecisionFromValueInner'; +import type { Range } from './range'; /** * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. */ -export type AroundPrecision = AroundPrecisionFromValueInner[] | number; +export type AroundPrecision = Range[] | number; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/index.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/index.ts index e5dbdfbf93..b10724100a 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/index.ts @@ -5,7 +5,6 @@ export * from './advancedSyntaxFeatures'; export * from './alternativesAsExact'; export * from './apiKey'; export * from './aroundPrecision'; -export * from './aroundPrecisionFromValueInner'; export * from './aroundRadius'; export * from './aroundRadiusAll'; export * from './automaticFacetFilter'; @@ -58,6 +57,7 @@ export * from './optionalFilters'; export * from './params'; export * from './personalization'; export * from './queryType'; +export * from './range'; export * from './rankingInfo'; export * from './reRankingApplyFilter'; export * from './recommendHit'; @@ -69,8 +69,8 @@ export * from './recommendedForYou'; export * from './recommendedForYouModel'; export * from './recommendedForYouQuery'; export * from './redirect'; +export * from './redirectRuleIndexData'; export * from './redirectRuleIndexMetadata'; -export * from './redirectRuleIndexMetadataData'; export * from './redirectURL'; export * from './relatedModel'; export * from './relatedProducts'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecisionFromValueInner.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/range.ts similarity index 92% rename from clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecisionFromValueInner.ts rename to clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/range.ts index c3850a800a..780b75be76 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecisionFromValueInner.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/range.ts @@ -3,7 +3,7 @@ /** * Range object with lower and upper values in meters to define custom ranges. */ -export type AroundPrecisionFromValueInner = { +export type Range = { /** * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexMetadataData.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexData.ts similarity index 83% rename from clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexMetadataData.ts rename to clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexData.ts index a7f9739ad3..fbb7ea140e 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexMetadataData.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexData.ts @@ -3,6 +3,6 @@ /** * Redirect rule data. */ -export type RedirectRuleIndexMetadataData = { +export type RedirectRuleIndexData = { ruleObjectID: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexMetadata.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexMetadata.ts index 3d69bb1b53..33802fc694 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexMetadata.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/redirectRuleIndexMetadata.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { RedirectRuleIndexMetadataData } from './redirectRuleIndexMetadataData'; +import type { RedirectRuleIndexData } from './redirectRuleIndexData'; export type RedirectRuleIndexMetadata = { /** @@ -23,5 +23,5 @@ export type RedirectRuleIndexMetadata = { */ succeed: boolean; - data: RedirectRuleIndexMetadataData; + data: RedirectRuleIndexData; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffectsEmptySearch.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/emptySearchFilter.ts similarity index 91% rename from clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffectsEmptySearch.ts rename to clients/algoliasearch-client-javascript/packages/client-abtesting/model/emptySearchFilter.ts index 1631733b59..5fb112cdcd 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffectsEmptySearch.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/emptySearchFilter.ts @@ -3,7 +3,7 @@ /** * Empty searches removed from the A/B test as a result of configuration settings. */ -export type FilterEffectsEmptySearch = { +export type EmptySearchFilter = { /** * Number of users removed from the A/B test. */ diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffects.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffects.ts index b5e5c86a98..bf40d0a8d0 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffects.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffects.ts @@ -1,13 +1,13 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { FilterEffectsEmptySearch } from './filterEffectsEmptySearch'; -import type { FilterEffectsOutliers } from './filterEffectsOutliers'; +import type { EmptySearchFilter } from './emptySearchFilter'; +import type { OutliersFilter } from './outliersFilter'; /** * A/B test filter effects resulting from configuration settings. */ export type FilterEffects = { - outliers?: FilterEffectsOutliers; + outliers?: OutliersFilter; - emptySearch?: FilterEffectsEmptySearch; + emptySearch?: EmptySearchFilter; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/index.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/index.ts index 04aabe88a9..dd5df5ad0e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/index.ts @@ -11,13 +11,13 @@ export * from './currency'; export * from './customSearchParams'; export * from './effect'; export * from './emptySearch'; +export * from './emptySearchFilter'; export * from './errorBase'; export * from './filterEffects'; -export * from './filterEffectsEmptySearch'; -export * from './filterEffectsOutliers'; export * from './listABTestsResponse'; export * from './minimumDetectableEffect'; export * from './outliers'; +export * from './outliersFilter'; export * from './status'; export * from './variant'; export * from './clientMethodProps'; diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffectsOutliers.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/outliersFilter.ts similarity index 92% rename from clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffectsOutliers.ts rename to clients/algoliasearch-client-javascript/packages/client-abtesting/model/outliersFilter.ts index 5f9a5f18c2..4b82cfe5e9 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/model/filterEffectsOutliers.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/model/outliersFilter.ts @@ -3,7 +3,7 @@ /** * Outliers removed from the A/B test as a result of configuration settings. */ -export type FilterEffectsOutliers = { +export type OutliersFilter = { /** * Number of users removed from the A/B test. */ diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/model/clickPositionsInner.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/model/clickPosition.ts similarity index 93% rename from clients/algoliasearch-client-javascript/packages/client-analytics/model/clickPositionsInner.ts rename to clients/algoliasearch-client-javascript/packages/client-analytics/model/clickPosition.ts index d359451110..1f85dbf900 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/model/clickPositionsInner.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/model/clickPosition.ts @@ -3,7 +3,7 @@ /** * Click position. */ -export type ClickPositionsInner = { +export type ClickPosition = { /** * Range of positions in the search results, using the pattern `[start,end]`. For positions 11 and up, click events are summed over the specified range. `-1` indicates the end of the list of search results. */ diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/model/getClickPositionsResponse.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/model/getClickPositionsResponse.ts index 576868d518..98edf8c567 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/model/getClickPositionsResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/model/getClickPositionsResponse.ts @@ -1,10 +1,10 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { ClickPositionsInner } from './clickPositionsInner'; +import type { ClickPosition } from './clickPosition'; export type GetClickPositionsResponse = { /** * List of positions in the search results and clicks associated with this search. */ - positions: ClickPositionsInner[]; + positions: ClickPosition[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/model/index.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/model/index.ts index 0b9b9646b2..8ffc058135 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/model/index.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -export * from './clickPositionsInner'; +export * from './clickPosition'; export * from './currenciesValue'; export * from './dailyAddToCartRates'; export * from './dailyAverageClicks'; diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithAnalytics.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithAnalytics.ts index 95b977c287..ae1f592d76 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithAnalytics.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithAnalytics.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { ClickPositionsInner } from './clickPositionsInner'; +import type { ClickPosition } from './clickPosition'; export type TopSearchWithAnalytics = { /** @@ -26,7 +26,7 @@ export type TopSearchWithAnalytics = { /** * List of positions in the search results and clicks associated with this search. */ - clickPositions: ClickPositionsInner[]; + clickPositions: ClickPosition[]; /** * Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true. diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithRevenueAnalytics.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithRevenueAnalytics.ts index d196626ff5..98e02056d3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithRevenueAnalytics.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/model/topSearchWithRevenueAnalytics.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { ClickPositionsInner } from './clickPositionsInner'; +import type { ClickPosition } from './clickPosition'; import type { CurrenciesValue } from './currenciesValue'; export type TopSearchWithRevenueAnalytics = { @@ -27,7 +27,7 @@ export type TopSearchWithRevenueAnalytics = { /** * List of positions in the search results and clicks associated with this search. */ - clickPositions: ClickPositionsInner[]; + clickPositions: ClickPosition[]; /** * Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true. diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/getConfigStatus200Response.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/configStatus.ts similarity index 94% rename from clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/getConfigStatus200Response.ts rename to clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/configStatus.ts index 8c85ac3697..f3a3adfc5a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/getConfigStatus200Response.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/configStatus.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -export type GetConfigStatus200Response = { +export type ConfigStatus = { /** * Name of the Query Suggestions index (case-sensitive). */ diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/index.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/index.ts index 43b8de93a0..d54b9e5d75 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/index.ts @@ -2,14 +2,14 @@ export * from './appID'; export * from './baseResponse'; +export * from './configStatus'; export * from './configuration'; export * from './configurationResponse'; export * from './configurationWithIndex'; export * from './errorBase'; export * from './facet'; -export * from './getConfigStatus200Response'; -export * from './getLogFile200Response'; export * from './languages'; +export * from './logFile'; export * from './logLevel'; export * from './sourceIndex'; export * from './clientMethodProps'; diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/getLogFile200Response.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/logFile.ts similarity index 94% rename from clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/getLogFile200Response.ts rename to clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/logFile.ts index 61845760fb..3527352284 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/getLogFile200Response.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/model/logFile.ts @@ -2,7 +2,7 @@ import type { LogLevel } from './logLevel'; -export type GetLogFile200Response = { +export type LogFile = { /** * Date and time of the log entry, in RFC 3339 format. */ diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts index 994221a0e4..b2be7f4df5 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts @@ -26,10 +26,10 @@ import type { GetLogFileProps, UpdateConfigProps, } from '../model/clientMethodProps'; +import type { ConfigStatus } from '../model/configStatus'; import type { ConfigurationResponse } from '../model/configurationResponse'; import type { ConfigurationWithIndex } from '../model/configurationWithIndex'; -import type { GetConfigStatus200Response } from '../model/getConfigStatus200Response'; -import type { GetLogFile200Response } from '../model/getLogFile200Response'; +import type { LogFile } from '../model/logFile'; export const apiClientVersion = '5.0.0-beta.12'; @@ -387,7 +387,7 @@ export function createQuerySuggestionsClient({ getConfigStatus( { indexName }: GetConfigStatusProps, requestOptions?: RequestOptions - ): Promise { + ): Promise { if (!indexName) { throw new Error( 'Parameter `indexName` is required when calling `getConfigStatus`.' @@ -424,7 +424,7 @@ export function createQuerySuggestionsClient({ getLogFile( { indexName }: GetLogFileProps, requestOptions?: RequestOptions - ): Promise { + ): Promise { if (!indexName) { throw new Error( 'Parameter `indexName` is required when calling `getLogFile`.' diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecision.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecision.ts index 937a1e87e3..8cacabcc75 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecision.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/aroundPrecision.ts @@ -1,8 +1,8 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { AroundPrecisionFromValueInner } from './aroundPrecisionFromValueInner'; +import type { Range } from './range'; /** * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. */ -export type AroundPrecision = AroundPrecisionFromValueInner[] | number; +export type AroundPrecision = Range[] | number; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/index.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/index.ts index 05846195fc..fd7c2f1a56 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/index.ts @@ -9,7 +9,6 @@ export * from './anchoring'; export * from './apiKey'; export * from './apiKeyOperation'; export * from './aroundPrecision'; -export * from './aroundPrecisionFromValueInner'; export * from './aroundRadius'; export * from './aroundRadiusAll'; export * from './assignUserIdParams'; @@ -102,11 +101,12 @@ export * from './promote'; export * from './promoteObjectID'; export * from './promoteObjectIDs'; export * from './queryType'; +export * from './range'; export * from './rankingInfo'; export * from './reRankingApplyFilter'; export * from './redirect'; +export * from './redirectRuleIndexData'; export * from './redirectRuleIndexMetadata'; -export * from './redirectRuleIndexMetadataData'; export * from './redirectURL'; export * from './removeStopWords'; export * from './removeUserIdResponse'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecisionFromValueInner.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/range.ts similarity index 92% rename from clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecisionFromValueInner.ts rename to clients/algoliasearch-client-javascript/packages/client-search/model/range.ts index c3850a800a..780b75be76 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/aroundPrecisionFromValueInner.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/range.ts @@ -3,7 +3,7 @@ /** * Range object with lower and upper values in meters to define custom ranges. */ -export type AroundPrecisionFromValueInner = { +export type Range = { /** * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexMetadataData.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexData.ts similarity index 83% rename from clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexMetadataData.ts rename to clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexData.ts index a7f9739ad3..fbb7ea140e 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexMetadataData.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexData.ts @@ -3,6 +3,6 @@ /** * Redirect rule data. */ -export type RedirectRuleIndexMetadataData = { +export type RedirectRuleIndexData = { ruleObjectID: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexMetadata.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexMetadata.ts index 3d69bb1b53..33802fc694 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexMetadata.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexMetadata.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { RedirectRuleIndexMetadataData } from './redirectRuleIndexMetadataData'; +import type { RedirectRuleIndexData } from './redirectRuleIndexData'; export type RedirectRuleIndexMetadata = { /** @@ -23,5 +23,5 @@ export type RedirectRuleIndexMetadata = { */ succeed: boolean; - data: RedirectRuleIndexMetadataData; + data: RedirectRuleIndexData; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/searchParamsString.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/searchParamsString.ts index c8d5444775..78e0b5950a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/searchParamsString.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/searchParamsString.ts @@ -1,5 +1,8 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * Search parameters as query string. + */ export type SearchParamsString = { /** * Search parameters as a URL-encoded query string. diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400ResponseErrorErrorsInner.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/errorItem.ts similarity index 83% rename from clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400ResponseErrorErrorsInner.ts rename to clients/algoliasearch-client-javascript/packages/client-usage/model/errorItem.ts index ebd9690714..b53f82dec3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400ResponseErrorErrorsInner.ts +++ b/clients/algoliasearch-client-javascript/packages/client-usage/model/errorItem.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -export type GetUsage400ResponseErrorErrorsInner = { +export type ErrorItem = { code?: string; message: string; diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/model/forbidden.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/forbidden.ts new file mode 100644 index 0000000000..5ff3b64e65 --- /dev/null +++ b/clients/algoliasearch-client-javascript/packages/client-usage/model/forbidden.ts @@ -0,0 +1,7 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import type { ForbiddenError } from './forbiddenError'; + +export type Forbidden = { + error: ForbiddenError; +}; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/indexingTimeResponseMetrics.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/forbiddenError.ts similarity index 56% rename from clients/algoliasearch-client-javascript/packages/monitoring/model/indexingTimeResponseMetrics.ts rename to clients/algoliasearch-client-javascript/packages/client-usage/model/forbiddenError.ts index fe2a79e53d..0100f73759 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/indexingTimeResponseMetrics.ts +++ b/clients/algoliasearch-client-javascript/packages/client-usage/model/forbiddenError.ts @@ -1,7 +1,11 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { TimeInner } from './timeInner'; +import type { ErrorItem } from './errorItem'; -export type IndexingTimeResponseMetrics = { - indexing?: Record; +export type ForbiddenError = { + code?: string; + + message?: string; + + errors?: ErrorItem[]; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage200Response.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage200Response.ts deleted file mode 100644 index d83d94664b..0000000000 --- a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage200Response.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -import type { GetUsage200ResponseStatisticsInner } from './getUsage200ResponseStatisticsInner'; - -export type GetUsage200Response = { - statistics?: GetUsage200ResponseStatisticsInner[]; -}; diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400Response.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400Response.ts deleted file mode 100644 index 78fbed0ee7..0000000000 --- a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400Response.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -import type { GetUsage400ResponseError } from './getUsage400ResponseError'; - -export type GetUsage400Response = { - error: GetUsage400ResponseError; -}; diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400ResponseError.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400ResponseError.ts deleted file mode 100644 index 8577ad0599..0000000000 --- a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage400ResponseError.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -import type { GetUsage400ResponseErrorErrorsInner } from './getUsage400ResponseErrorErrorsInner'; - -export type GetUsage400ResponseError = { - code?: string; - - message?: string; - - errors?: GetUsage400ResponseErrorErrorsInner[]; -}; diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/model/index.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/index.ts index 69e17f497e..3bae42d10c 100644 --- a/clients/algoliasearch-client-javascript/packages/client-usage/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/client-usage/model/index.ts @@ -1,12 +1,14 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. export * from './errorBase'; -export * from './getUsage200Response'; -export * from './getUsage200ResponseStatisticsInner'; -export * from './getUsage400Response'; -export * from './getUsage400ResponseError'; -export * from './getUsage400ResponseErrorErrorsInner'; +export * from './errorItem'; +export * from './forbidden'; +export * from './forbiddenError'; export * from './granularity'; +export * from './indexUsage'; +export * from './invalidRequest'; +export * from './invalidRequestError'; export * from './statistic'; +export * from './statisticEntry'; export * from './statisticValue'; export * from './clientMethodProps'; diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/model/indexUsage.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/indexUsage.ts new file mode 100644 index 0000000000..d1bb3c81f0 --- /dev/null +++ b/clients/algoliasearch-client-javascript/packages/client-usage/model/indexUsage.ts @@ -0,0 +1,7 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import type { StatisticEntry } from './statisticEntry'; + +export type IndexUsage = { + statistics?: StatisticEntry[]; +}; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/latencyResponseMetrics.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/invalidRequest.ts similarity index 59% rename from clients/algoliasearch-client-javascript/packages/monitoring/model/latencyResponseMetrics.ts rename to clients/algoliasearch-client-javascript/packages/client-usage/model/invalidRequest.ts index 19e892a9d4..4f39387b32 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/latencyResponseMetrics.ts +++ b/clients/algoliasearch-client-javascript/packages/client-usage/model/invalidRequest.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { TimeInner } from './timeInner'; +import type { InvalidRequestError } from './invalidRequestError'; -export type LatencyResponseMetrics = { - latency?: Record; +export type InvalidRequest = { + error: InvalidRequestError; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/model/invalidRequestError.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/invalidRequestError.ts new file mode 100644 index 0000000000..6f96df12eb --- /dev/null +++ b/clients/algoliasearch-client-javascript/packages/client-usage/model/invalidRequestError.ts @@ -0,0 +1,11 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import type { ErrorItem } from './errorItem'; + +export type InvalidRequestError = { + code?: string; + + message?: string; + + errors?: ErrorItem[]; +}; diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage200ResponseStatisticsInner.ts b/clients/algoliasearch-client-javascript/packages/client-usage/model/statisticEntry.ts similarity index 87% rename from clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage200ResponseStatisticsInner.ts rename to clients/algoliasearch-client-javascript/packages/client-usage/model/statisticEntry.ts index 4c4a3aea63..5ed9a04769 100644 --- a/clients/algoliasearch-client-javascript/packages/client-usage/model/getUsage200ResponseStatisticsInner.ts +++ b/clients/algoliasearch-client-javascript/packages/client-usage/model/statisticEntry.ts @@ -2,7 +2,7 @@ import type { StatisticValue } from './statisticValue'; -export type GetUsage200ResponseStatisticsInner = { +export type StatisticEntry = { /** * Timestamp, measured in milliseconds since the Unix epoch. */ diff --git a/clients/algoliasearch-client-javascript/packages/client-usage/src/usageClient.ts b/clients/algoliasearch-client-javascript/packages/client-usage/src/usageClient.ts index 57021b6101..387a1a1f43 100644 --- a/clients/algoliasearch-client-javascript/packages/client-usage/src/usageClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-usage/src/usageClient.ts @@ -23,7 +23,7 @@ import type { GetIndexUsageProps, GetUsageProps, } from '../model/clientMethodProps'; -import type { GetUsage200Response } from '../model/getUsage200Response'; +import type { IndexUsage } from '../model/indexUsage'; export const apiClientVersion = '0.0.2-beta.12'; @@ -277,7 +277,7 @@ export function createUsageClient({ granularity, }: GetIndexUsageProps, requestOptions?: RequestOptions - ): Promise { + ): Promise { if (!statistic) { throw new Error( 'Parameter `statistic` is required when calling `getIndexUsage`.' @@ -343,7 +343,7 @@ export function createUsageClient({ getUsage( { statistic, startDate, endDate, granularity }: GetUsageProps, requestOptions?: RequestOptions - ): Promise { + ): Promise { if (!statistic) { throw new Error( 'Parameter `statistic` is required when calling `getUsage`.' diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/model/dockerStreamsInput.ts b/clients/algoliasearch-client-javascript/packages/ingestion/model/dockerStreamsInput.ts index 66334f6779..e64d6deb5b 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/model/dockerStreamsInput.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/model/dockerStreamsInput.ts @@ -1,5 +1,8 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +/** + * The selected streams of a singer or airbyte connector. + */ export type DockerStreamsInput = { streams: Record; }; diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts b/clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts index 009e98ab76..7b6e457560 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts @@ -131,10 +131,10 @@ export * from './taskV1'; export * from './transformation'; export * from './transformationCreate'; export * from './transformationCreateResponse'; +export * from './transformationError'; export * from './transformationSearch'; export * from './transformationTry'; export * from './transformationTryResponse'; -export * from './transformationTryResponseError'; export * from './transformationUpdateResponse'; export * from './trigger'; export * from './triggerType'; diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/model/transformationTryResponseError.ts b/clients/algoliasearch-client-javascript/packages/ingestion/model/transformationError.ts similarity index 88% rename from clients/algoliasearch-client-javascript/packages/ingestion/model/transformationTryResponseError.ts rename to clients/algoliasearch-client-javascript/packages/ingestion/model/transformationError.ts index 1ae81cfc3b..1974cf2a59 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/model/transformationTryResponseError.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/model/transformationError.ts @@ -3,7 +3,7 @@ /** * The error if the transformation failed. */ -export type TransformationTryResponseError = { +export type TransformationError = { /** * The error status code. */ diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/model/transformationTryResponse.ts b/clients/algoliasearch-client-javascript/packages/ingestion/model/transformationTryResponse.ts index 2e4c09d0f3..7f91565bc3 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/model/transformationTryResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/model/transformationTryResponse.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { TransformationTryResponseError } from './transformationTryResponseError'; +import type { TransformationError } from './transformationError'; export type TransformationTryResponse = { /** @@ -8,5 +8,5 @@ export type TransformationTryResponse = { */ payloads: Array>; - error?: TransformationTryResponseError; + error?: TransformationError; }; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/getServers403Response.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/badRequest.ts similarity index 84% rename from clients/algoliasearch-client-javascript/packages/monitoring/model/getServers403Response.ts rename to clients/algoliasearch-client-javascript/packages/monitoring/model/badRequest.ts index 3d12aa53a0..630ad5fd45 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/getServers403Response.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/badRequest.ts @@ -1,5 +1,5 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -export type GetServers403Response = { +export type BadRequest = { reason?: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/forbidden.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/forbidden.ts new file mode 100644 index 0000000000..692fcc1a4c --- /dev/null +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/forbidden.ts @@ -0,0 +1,5 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +export type Forbidden = { + reason?: string; +}; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/incidentsInner.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/incidentEntry.ts similarity index 91% rename from clients/algoliasearch-client-javascript/packages/monitoring/model/incidentsInner.ts rename to clients/algoliasearch-client-javascript/packages/monitoring/model/incidentEntry.ts index 06c412a315..42c5f410d1 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/incidentsInner.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/incidentEntry.ts @@ -2,7 +2,7 @@ import type { Incident } from './incident'; -export type IncidentsInner = { +export type IncidentEntry = { /** * Timestamp, measured in milliseconds since the Unix epoch. */ diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/incidentsResponse.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/incidentsResponse.ts index 92dce78e60..7b55fb6022 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/incidentsResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/incidentsResponse.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { IncidentsInner } from './incidentsInner'; +import type { IncidentEntry } from './incidentEntry'; export type IncidentsResponse = { - incidents?: Record; + incidents?: Record; }; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/index.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/index.ts index d52af8ed64..b80f8de708 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/index.ts @@ -1,18 +1,19 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +export * from './badRequest'; export * from './errorBase'; -export * from './getServers403Response'; +export * from './forbidden'; export * from './incident'; -export * from './incidentsInner'; +export * from './incidentEntry'; export * from './incidentsResponse'; +export * from './indexingMetric'; export * from './indexingTimeResponse'; -export * from './indexingTimeResponseMetrics'; export * from './infrastructureResponse'; -export * from './infrastructureResponseMetrics'; export * from './inventoryResponse'; +export * from './latencyMetric'; export * from './latencyResponse'; -export * from './latencyResponseMetrics'; export * from './metric'; +export * from './metrics'; export * from './period'; export * from './probesMetric'; export * from './region'; @@ -20,6 +21,7 @@ export * from './server'; export * from './serverStatus'; export * from './status'; export * from './statusResponse'; -export * from './timeInner'; +export * from './timeEntry'; export * from './type'; +export * from './unauthorized'; export * from './clientMethodProps'; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/indexingMetric.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/indexingMetric.ts new file mode 100644 index 0000000000..a77e5decb9 --- /dev/null +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/indexingMetric.ts @@ -0,0 +1,7 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import type { TimeEntry } from './timeEntry'; + +export type IndexingMetric = { + indexing?: Record; +}; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/indexingTimeResponse.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/indexingTimeResponse.ts index 3363e2c76b..2d2101adaa 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/indexingTimeResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/indexingTimeResponse.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { IndexingTimeResponseMetrics } from './indexingTimeResponseMetrics'; +import type { IndexingMetric } from './indexingMetric'; export type IndexingTimeResponse = { - metrics?: IndexingTimeResponseMetrics; + metrics?: IndexingMetric; }; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/infrastructureResponse.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/infrastructureResponse.ts index 7889ffd9fd..6edf9b7117 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/infrastructureResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/infrastructureResponse.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { InfrastructureResponseMetrics } from './infrastructureResponseMetrics'; +import type { Metrics } from './metrics'; export type InfrastructureResponse = { - metrics?: InfrastructureResponseMetrics; + metrics?: Metrics; }; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/latencyMetric.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/latencyMetric.ts new file mode 100644 index 0000000000..cdea05efc2 --- /dev/null +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/latencyMetric.ts @@ -0,0 +1,7 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import type { TimeEntry } from './timeEntry'; + +export type LatencyMetric = { + latency?: Record; +}; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/latencyResponse.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/latencyResponse.ts index f0ec95efb5..336951ae73 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/latencyResponse.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/latencyResponse.ts @@ -1,7 +1,7 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { LatencyResponseMetrics } from './latencyResponseMetrics'; +import type { LatencyMetric } from './latencyMetric'; export type LatencyResponse = { - metrics?: LatencyResponseMetrics; + metrics?: LatencyMetric; }; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/infrastructureResponseMetrics.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/metrics.ts similarity index 94% rename from clients/algoliasearch-client-javascript/packages/monitoring/model/infrastructureResponseMetrics.ts rename to clients/algoliasearch-client-javascript/packages/monitoring/model/metrics.ts index 5b73ef3719..41e82876db 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/infrastructureResponseMetrics.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/metrics.ts @@ -2,7 +2,7 @@ import type { ProbesMetric } from './probesMetric'; -export type InfrastructureResponseMetrics = { +export type Metrics = { /** * CPU idleness in %. */ diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/timeInner.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/timeEntry.ts similarity index 92% rename from clients/algoliasearch-client-javascript/packages/monitoring/model/timeInner.ts rename to clients/algoliasearch-client-javascript/packages/monitoring/model/timeEntry.ts index 8707262bea..21fb9b6a49 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/model/timeInner.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/timeEntry.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -export type TimeInner = { +export type TimeEntry = { /** * Timestamp, measured in milliseconds since the Unix epoch. */ diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/model/unauthorized.ts b/clients/algoliasearch-client-javascript/packages/monitoring/model/unauthorized.ts new file mode 100644 index 0000000000..bd09c5dbfb --- /dev/null +++ b/clients/algoliasearch-client-javascript/packages/monitoring/model/unauthorized.ts @@ -0,0 +1,5 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +export type Unauthorized = { + reason?: string; +}; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecision.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecision.ts index 937a1e87e3..8cacabcc75 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecision.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecision.ts @@ -1,8 +1,8 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { AroundPrecisionFromValueInner } from './aroundPrecisionFromValueInner'; +import type { Range } from './range'; /** * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal. */ -export type AroundPrecision = AroundPrecisionFromValueInner[] | number; +export type AroundPrecision = Range[] | number; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/index.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/index.ts index 1cfa4fa0b4..dd4e31419f 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/index.ts @@ -3,7 +3,6 @@ export * from './advancedSyntaxFeatures'; export * from './alternativesAsExact'; export * from './aroundPrecision'; -export * from './aroundPrecisionFromValueInner'; export * from './aroundRadius'; export * from './aroundRadiusAll'; export * from './autoFacetFilter'; @@ -46,12 +45,12 @@ export * from './paramsConsequence'; export * from './personalization'; export * from './promoteConsequenceObject'; export * from './queryType'; +export * from './range'; export * from './rankingInfo'; export * from './reRankingApplyFilter'; export * from './recommendHit'; export * from './recommendModels'; export * from './recommendRule'; -export * from './recommendRuleMetadata'; export * from './recommendationsHit'; export * from './recommendationsHits'; export * from './recommendationsRequest'; @@ -60,8 +59,8 @@ export * from './recommendedForYou'; export * from './recommendedForYouModel'; export * from './recommendedForYouQuery'; export * from './redirect'; +export * from './redirectRuleIndexData'; export * from './redirectRuleIndexMetadata'; -export * from './redirectRuleIndexMetadataData'; export * from './redirectURL'; export * from './relatedModel'; export * from './relatedProducts'; @@ -69,6 +68,7 @@ export * from './relatedQuery'; export * from './removeStopWords'; export * from './removeWordsIfNoResults'; export * from './renderingContent'; +export * from './ruleMetadata'; export * from './searchPagination'; export * from './searchParams'; export * from './searchParamsObject'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecisionFromValueInner.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/range.ts similarity index 92% rename from clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecisionFromValueInner.ts rename to clients/algoliasearch-client-javascript/packages/recommend/model/range.ts index c3850a800a..780b75be76 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/aroundPrecisionFromValueInner.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/range.ts @@ -3,7 +3,7 @@ /** * Range object with lower and upper values in meters to define custom ranges. */ -export type AroundPrecisionFromValueInner = { +export type Range = { /** * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/recommendRule.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/recommendRule.ts index 077a5fd0be..48e93d3e15 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/recommendRule.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/recommendRule.ts @@ -2,13 +2,13 @@ import type { Condition } from './condition'; import type { Consequence } from './consequence'; -import type { RecommendRuleMetadata } from './recommendRuleMetadata'; +import type { RuleMetadata } from './ruleMetadata'; /** * Recommend rule. */ export type RecommendRule = { - _metadata?: RecommendRuleMetadata; + _metadata?: RuleMetadata; /** * Unique identifier of a rule object. diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexMetadataData.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexData.ts similarity index 83% rename from clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexMetadataData.ts rename to clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexData.ts index a7f9739ad3..fbb7ea140e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/redirectRuleIndexMetadataData.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexData.ts @@ -3,6 +3,6 @@ /** * Redirect rule data. */ -export type RedirectRuleIndexMetadataData = { +export type RedirectRuleIndexData = { ruleObjectID: string; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexMetadata.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexMetadata.ts index 3d69bb1b53..33802fc694 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexMetadata.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/redirectRuleIndexMetadata.ts @@ -1,6 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { RedirectRuleIndexMetadataData } from './redirectRuleIndexMetadataData'; +import type { RedirectRuleIndexData } from './redirectRuleIndexData'; export type RedirectRuleIndexMetadata = { /** @@ -23,5 +23,5 @@ export type RedirectRuleIndexMetadata = { */ succeed: boolean; - data: RedirectRuleIndexMetadataData; + data: RedirectRuleIndexData; }; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/recommendRuleMetadata.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/ruleMetadata.ts similarity index 89% rename from clients/algoliasearch-client-javascript/packages/recommend/model/recommendRuleMetadata.ts rename to clients/algoliasearch-client-javascript/packages/recommend/model/ruleMetadata.ts index 58939f06a1..89f28a7ebb 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/recommendRuleMetadata.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/ruleMetadata.ts @@ -3,7 +3,7 @@ /** * Rule metadata. */ -export type RecommendRuleMetadata = { +export type RuleMetadata = { /** * Date and time when the object was updated, in RFC 3339 format. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/QuerySuggestionsClient.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/QuerySuggestionsClient.kt index 17dd51eb47..cffcd17ede 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/QuerySuggestionsClient.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/QuerySuggestionsClient.kt @@ -202,7 +202,7 @@ public class QuerySuggestionsClient( * @param indexName Query Suggestions index name. * @param requestOptions additional request configuration. */ - public suspend fun getConfigStatus(indexName: String, requestOptions: RequestOptions? = null): GetConfigStatus200Response { + public suspend fun getConfigStatus(indexName: String, requestOptions: RequestOptions? = null): ConfigStatus { require(indexName.isNotBlank()) { "Parameter `indexName` is required when calling `getConfigStatus`." } val requestConfig = RequestConfig( method = RequestMethod.GET, @@ -222,7 +222,7 @@ public class QuerySuggestionsClient( * @param indexName Query Suggestions index name. * @param requestOptions additional request configuration. */ - public suspend fun getLogFile(indexName: String, requestOptions: RequestOptions? = null): GetLogFile200Response { + public suspend fun getLogFile(indexName: String, requestOptions: RequestOptions? = null): LogFile { require(indexName.isNotBlank()) { "Parameter `indexName` is required when calling `getLogFile`." } val requestConfig = RequestConfig( method = RequestMethod.GET, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/UsageClient.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/UsageClient.kt index 624b3603a0..a817216f70 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/UsageClient.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/UsageClient.kt @@ -128,7 +128,7 @@ public class UsageClient( * @param granularity Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (default to daily) * @param requestOptions additional request configuration. */ - public suspend fun getIndexUsage(statistic: Statistic, indexName: String, startDate: String, endDate: String, granularity: Granularity? = null, requestOptions: RequestOptions? = null): GetUsage200Response { + public suspend fun getIndexUsage(statistic: Statistic, indexName: String, startDate: String, endDate: String, granularity: Granularity? = null, requestOptions: RequestOptions? = null): IndexUsage { require(indexName.isNotBlank()) { "Parameter `indexName` is required when calling `getIndexUsage`." } require(startDate.isNotBlank()) { "Parameter `startDate` is required when calling `getIndexUsage`." } require(endDate.isNotBlank()) { "Parameter `endDate` is required when calling `getIndexUsage`." } @@ -155,7 +155,7 @@ public class UsageClient( * @param granularity Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (default to daily) * @param requestOptions additional request configuration. */ - public suspend fun getUsage(statistic: Statistic, startDate: String, endDate: String, granularity: Granularity? = null, requestOptions: RequestOptions? = null): GetUsage200Response { + public suspend fun getUsage(statistic: Statistic, startDate: String, endDate: String, granularity: Granularity? = null, requestOptions: RequestOptions? = null): IndexUsage { require(startDate.isNotBlank()) { "Parameter `startDate` is required when calling `getUsage`." } require(endDate.isNotBlank()) { "Parameter `endDate` is required when calling `getUsage`." } val requestConfig = RequestConfig( diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffectsEmptySearch.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/EmptySearchFilter.kt similarity index 94% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffectsEmptySearch.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/EmptySearchFilter.kt index 3e168c72d2..843a1b4485 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffectsEmptySearch.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/EmptySearchFilter.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* * @param trackedSearchesCount Number of tracked searches removed from the A/B test. */ @Serializable -public data class FilterEffectsEmptySearch( +public data class EmptySearchFilter( /** Number of users removed from the A/B test. */ @SerialName(value = "usersCount") val usersCount: Int? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffects.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffects.kt index 58024fef53..30fb59c5f0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffects.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffects.kt @@ -13,7 +13,7 @@ import kotlinx.serialization.json.* @Serializable public data class FilterEffects( - @SerialName(value = "outliers") val outliers: FilterEffectsOutliers? = null, + @SerialName(value = "outliers") val outliers: OutliersFilter? = null, - @SerialName(value = "emptySearch") val emptySearch: FilterEffectsEmptySearch? = null, + @SerialName(value = "emptySearch") val emptySearch: EmptySearchFilter? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffectsOutliers.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/OutliersFilter.kt similarity index 95% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffectsOutliers.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/OutliersFilter.kt index 743130e9ad..756e325e71 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/FilterEffectsOutliers.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/OutliersFilter.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* * @param trackedSearchesCount Number of tracked searches removed from the A/B test. */ @Serializable -public data class FilterEffectsOutliers( +public data class OutliersFilter( /** Number of users removed from the A/B test. */ @SerialName(value = "usersCount") val usersCount: Int? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/ClickPositionsInner.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/ClickPosition.kt similarity index 96% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/ClickPositionsInner.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/ClickPosition.kt index 23d34cd9fb..64bd9dbf9d 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/ClickPositionsInner.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/ClickPosition.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* * @param clickCount Number of times this search has been clicked at that position. */ @Serializable -public data class ClickPositionsInner( +public data class ClickPosition( /** Range of positions in the search results, using the pattern `[start,end]`. For positions 11 and up, click events are summed over the specified range. `-1` indicates the end of the list of search results. */ @SerialName(value = "position") val position: List? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/GetClickPositionsResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/GetClickPositionsResponse.kt index cd96269904..c3186fb101 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/GetClickPositionsResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/GetClickPositionsResponse.kt @@ -13,5 +13,5 @@ import kotlinx.serialization.json.* public data class GetClickPositionsResponse( /** List of positions in the search results and clicks associated with this search. */ - @SerialName(value = "positions") val positions: List, + @SerialName(value = "positions") val positions: List, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithAnalytics.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithAnalytics.kt index a2cc6cb566..4a830f3620 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithAnalytics.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithAnalytics.kt @@ -34,7 +34,7 @@ public data class TopSearchWithAnalytics( @SerialName(value = "averageClickPosition") val averageClickPosition: Double, /** List of positions in the search results and clicks associated with this search. */ - @SerialName(value = "clickPositions") val clickPositions: List, + @SerialName(value = "clickPositions") val clickPositions: List, /** Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. */ @SerialName(value = "conversionRate") val conversionRate: Double, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithRevenueAnalytics.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithRevenueAnalytics.kt index c729edcb5d..1f05eaaef0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithRevenueAnalytics.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/analytics/TopSearchWithRevenueAnalytics.kt @@ -39,7 +39,7 @@ public data class TopSearchWithRevenueAnalytics( @SerialName(value = "averageClickPosition") val averageClickPosition: Double, /** List of positions in the search results and clicks associated with this search. */ - @SerialName(value = "clickPositions") val clickPositions: List, + @SerialName(value = "clickPositions") val clickPositions: List, /** Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. */ @SerialName(value = "conversionRate") val conversionRate: Double, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DockerStreamsInput.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DockerStreamsInput.kt index deed691384..b7b0775955 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DockerStreamsInput.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DockerStreamsInput.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * DockerStreamsInput + * The selected streams of a singer or airbyte connector. * * @param streams */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationTryResponseError.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationError.kt similarity index 93% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationTryResponseError.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationError.kt index 9c626c0025..eaa6811d69 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationTryResponseError.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationError.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* * @param message A descriptive message explaining the failure. */ @Serializable -public data class TransformationTryResponseError( +public data class TransformationError( /** The error status code. */ @SerialName(value = "code") val code: Int? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationTryResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationTryResponse.kt index 398d738fc8..ff6511bdc4 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationTryResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationTryResponse.kt @@ -16,5 +16,5 @@ public data class TransformationTryResponse( /** The array of records returned by the transformation service. */ @SerialName(value = "payloads") val payloads: List, - @SerialName(value = "error") val error: TransformationTryResponseError? = null, + @SerialName(value = "error") val error: TransformationError? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/GetServers403Response.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/BadRequest.kt similarity index 85% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/GetServers403Response.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/BadRequest.kt index 142aff3c60..30316dfd0c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/GetServers403Response.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/BadRequest.kt @@ -5,12 +5,12 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * GetServers403Response + * BadRequest * * @param reason */ @Serializable -public data class GetServers403Response( +public data class BadRequest( @SerialName(value = "reason") val reason: String? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Forbidden.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Forbidden.kt new file mode 100644 index 0000000000..e7888c45bc --- /dev/null +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Forbidden.kt @@ -0,0 +1,16 @@ +/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */ +package com.algolia.client.model.monitoring + +import kotlinx.serialization.* +import kotlinx.serialization.json.* + +/** + * Forbidden + * + * @param reason + */ +@Serializable +public data class Forbidden( + + @SerialName(value = "reason") val reason: String? = null, +) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentsInner.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentEntry.kt similarity index 91% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentsInner.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentEntry.kt index 0d43ae7b9d..2a1f54373e 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentsInner.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentEntry.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * IncidentsInner + * IncidentEntry * * @param t Timestamp, measured in milliseconds since the Unix epoch. * @param v */ @Serializable -public data class IncidentsInner( +public data class IncidentEntry( /** Timestamp, measured in milliseconds since the Unix epoch. */ @SerialName(value = "t") val t: Long? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentsResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentsResponse.kt index 24098b0036..a507d29880 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentsResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IncidentsResponse.kt @@ -12,5 +12,5 @@ import kotlinx.serialization.json.* @Serializable public data class IncidentsResponse( - @SerialName(value = "incidents") val incidents: Map>? = null, + @SerialName(value = "incidents") val incidents: Map>? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingTimeResponseMetrics.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingMetric.kt similarity index 79% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingTimeResponseMetrics.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingMetric.kt index 5a3052fc19..b7274f1fc7 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingTimeResponseMetrics.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingMetric.kt @@ -5,12 +5,12 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * IndexingTimeResponseMetrics + * IndexingMetric * * @param indexing */ @Serializable -public data class IndexingTimeResponseMetrics( +public data class IndexingMetric( - @SerialName(value = "indexing") val indexing: Map>? = null, + @SerialName(value = "indexing") val indexing: Map>? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingTimeResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingTimeResponse.kt index 6cce700211..db302b6623 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingTimeResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/IndexingTimeResponse.kt @@ -12,5 +12,5 @@ import kotlinx.serialization.json.* @Serializable public data class IndexingTimeResponse( - @SerialName(value = "metrics") val metrics: IndexingTimeResponseMetrics? = null, + @SerialName(value = "metrics") val metrics: IndexingMetric? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/InfrastructureResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/InfrastructureResponse.kt index 2b71c9770e..ceb1fb5a4c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/InfrastructureResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/InfrastructureResponse.kt @@ -12,5 +12,5 @@ import kotlinx.serialization.json.* @Serializable public data class InfrastructureResponse( - @SerialName(value = "metrics") val metrics: InfrastructureResponseMetrics? = null, + @SerialName(value = "metrics") val metrics: Metrics? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyResponseMetrics.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyMetric.kt similarity index 81% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyResponseMetrics.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyMetric.kt index 167b1e1896..97160f27b0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyResponseMetrics.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyMetric.kt @@ -5,12 +5,12 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * LatencyResponseMetrics + * LatencyMetric * * @param latency */ @Serializable -public data class LatencyResponseMetrics( +public data class LatencyMetric( - @SerialName(value = "latency") val latency: Map>? = null, + @SerialName(value = "latency") val latency: Map>? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyResponse.kt index 68cf686ab5..b8e2189695 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/LatencyResponse.kt @@ -12,5 +12,5 @@ import kotlinx.serialization.json.* @Serializable public data class LatencyResponse( - @SerialName(value = "metrics") val metrics: LatencyResponseMetrics? = null, + @SerialName(value = "metrics") val metrics: LatencyMetric? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/InfrastructureResponseMetrics.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Metrics.kt similarity index 95% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/InfrastructureResponseMetrics.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Metrics.kt index b04ce96571..c7f23864a0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/InfrastructureResponseMetrics.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Metrics.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * InfrastructureResponseMetrics + * Metrics * * @param cpuUsage CPU idleness in %. * @param ramIndexingUsage RAM used for indexing in MB. @@ -14,7 +14,7 @@ import kotlinx.serialization.json.* * @param avgBuildTime Average build time of the indices in seconds. */ @Serializable -public data class InfrastructureResponseMetrics( +public data class Metrics( /** CPU idleness in %. */ @SerialName(value = "cpu_usage") val cpuUsage: Map>? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/TimeInner.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/TimeEntry.kt similarity index 93% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/TimeInner.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/TimeEntry.kt index 4654c44ca9..032b5787b2 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/TimeInner.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/TimeEntry.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * TimeInner + * TimeEntry * * @param t Timestamp, measured in milliseconds since the Unix epoch. * @param v Time in ms. */ @Serializable -public data class TimeInner( +public data class TimeEntry( /** Timestamp, measured in milliseconds since the Unix epoch. */ @SerialName(value = "t") val t: Long? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Unauthorized.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Unauthorized.kt new file mode 100644 index 0000000000..8f3c76ece6 --- /dev/null +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/monitoring/Unauthorized.kt @@ -0,0 +1,16 @@ +/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */ +package com.algolia.client.model.monitoring + +import kotlinx.serialization.* +import kotlinx.serialization.json.* + +/** + * Unauthorized + * + * @param reason + */ +@Serializable +public data class Unauthorized( + + @SerialName(value = "reason") val reason: String? = null, +) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/GetConfigStatus200Response.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/ConfigStatus.kt similarity index 95% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/GetConfigStatus200Response.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/ConfigStatus.kt index c169669026..1cfc191b5c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/GetConfigStatus200Response.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/ConfigStatus.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * GetConfigStatus200Response + * ConfigStatus * * @param indexName Name of the Query Suggestions index (case-sensitive). * @param isRunning Whether the creation or update of the Query Suggestions index is in progress. @@ -14,7 +14,7 @@ import kotlinx.serialization.json.* * @param lastSuccessfulBuildDuration Duration of the last successful build in seconds. */ @Serializable -public data class GetConfigStatus200Response( +public data class ConfigStatus( /** Name of the Query Suggestions index (case-sensitive). */ @SerialName(value = "indexName") val indexName: String? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/GetLogFile200Response.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/LogFile.kt similarity index 94% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/GetLogFile200Response.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/LogFile.kt index deb7e4247b..3cf00b54d8 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/GetLogFile200Response.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/querysuggestions/LogFile.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * GetLogFile200Response + * LogFile * * @param timestamp Date and time of the log entry, in RFC 3339 format. * @param level @@ -13,7 +13,7 @@ import kotlinx.serialization.json.* * @param contextLevel 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. */ @Serializable -public data class GetLogFile200Response( +public data class LogFile( /** Date and time of the log entry, in RFC 3339 format. */ @SerialName(value = "timestamp") val timestamp: String? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecision.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecision.kt index 40fe088146..d15d1895f7 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecision.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecision.kt @@ -15,7 +15,7 @@ import kotlin.jvm.JvmInline * * Implementations: * - [Int] - *[AroundPrecision.of]* - * - [List] - *[AroundPrecision.of]* + * - [List] - *[AroundPrecision.of]* */ @Serializable(AroundPrecisionSerializer::class) public sealed interface AroundPrecision { @@ -25,15 +25,15 @@ public sealed interface AroundPrecision { @Serializable @JvmInline - public value class ListOfAroundPrecisionFromValueInnerValue(public val value: List) : AroundPrecision + public value class ListOfRangeValue(public val value: List) : AroundPrecision public companion object { public fun of(value: Int): AroundPrecision { return IntValue(value) } - public fun of(value: List): AroundPrecision { - return ListOfAroundPrecisionFromValueInnerValue(value) + public fun of(value: List): AroundPrecision { + return ListOfRangeValue(value) } } } @@ -42,7 +42,7 @@ internal class AroundPrecisionSerializer : JsonContentPolymorphicSerializer { return when { element.isInt -> AroundPrecision.IntValue.serializer() - element.isJsonArrayOfObjects -> AroundPrecision.ListOfAroundPrecisionFromValueInnerValue.serializer() + element.isJsonArrayOfObjects -> AroundPrecision.ListOfRangeValue.serializer() else -> throw AlgoliaClientException("Failed to deserialize json element: $element") } } diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecisionFromValueInner.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Range.kt similarity index 95% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecisionFromValueInner.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Range.kt index 91f12c5edc..a0a828d086 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/AroundPrecisionFromValueInner.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/Range.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* * @param `value` Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @Serializable -public data class AroundPrecisionFromValueInner( +public data class Range( /** Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @SerialName(value = "from") val from: Int? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendRule.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendRule.kt index 83281b457f..71065d5a0e 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendRule.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendRule.kt @@ -17,7 +17,7 @@ import kotlinx.serialization.json.* @Serializable public data class RecommendRule( - @SerialName(value = "_metadata") val metadata: RecommendRuleMetadata? = null, + @SerialName(value = "_metadata") val metadata: RuleMetadata? = null, /** Unique identifier of a rule object. */ @SerialName(value = "objectID") val objectID: String? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexMetadataData.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexData.kt similarity index 89% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexMetadataData.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexData.kt index 9924f90643..4b5446a8f0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexMetadataData.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexData.kt @@ -10,7 +10,7 @@ import kotlinx.serialization.json.* * @param ruleObjectID */ @Serializable -public data class RedirectRuleIndexMetadataData( +public data class RedirectRuleIndexData( @SerialName(value = "ruleObjectID") val ruleObjectID: String, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexMetadata.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexMetadata.kt index bc448d29f1..61d139c6c7 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexMetadata.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RedirectRuleIndexMetadata.kt @@ -28,5 +28,5 @@ public data class RedirectRuleIndexMetadata( /** Redirect rule status. */ @SerialName(value = "succeed") val succeed: Boolean, - @SerialName(value = "data") val `data`: RedirectRuleIndexMetadataData, + @SerialName(value = "data") val `data`: RedirectRuleIndexData, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendRuleMetadata.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RuleMetadata.kt similarity index 93% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendRuleMetadata.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RuleMetadata.kt index 3099c31d96..a0b6d86140 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendRuleMetadata.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RuleMetadata.kt @@ -10,7 +10,7 @@ import kotlinx.serialization.json.* * @param lastUpdate Date and time when the object was updated, in RFC 3339 format. */ @Serializable -public data class RecommendRuleMetadata( +public data class RuleMetadata( /** Date and time when the object was updated, in RFC 3339 format. */ @SerialName(value = "lastUpdate") val lastUpdate: String? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecision.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecision.kt index 4ae16ee3c3..8dc7f837c3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecision.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecision.kt @@ -15,7 +15,7 @@ import kotlin.jvm.JvmInline * * Implementations: * - [Int] - *[AroundPrecision.of]* - * - [List] - *[AroundPrecision.of]* + * - [List] - *[AroundPrecision.of]* */ @Serializable(AroundPrecisionSerializer::class) public sealed interface AroundPrecision { @@ -25,15 +25,15 @@ public sealed interface AroundPrecision { @Serializable @JvmInline - public value class ListOfAroundPrecisionFromValueInnerValue(public val value: List) : AroundPrecision + public value class ListOfRangeValue(public val value: List) : AroundPrecision public companion object { public fun of(value: Int): AroundPrecision { return IntValue(value) } - public fun of(value: List): AroundPrecision { - return ListOfAroundPrecisionFromValueInnerValue(value) + public fun of(value: List): AroundPrecision { + return ListOfRangeValue(value) } } } @@ -42,7 +42,7 @@ internal class AroundPrecisionSerializer : JsonContentPolymorphicSerializer { return when { element.isInt -> AroundPrecision.IntValue.serializer() - element.isJsonArrayOfObjects -> AroundPrecision.ListOfAroundPrecisionFromValueInnerValue.serializer() + element.isJsonArrayOfObjects -> AroundPrecision.ListOfRangeValue.serializer() else -> throw AlgoliaClientException("Failed to deserialize json element: $element") } } diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecisionFromValueInner.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Range.kt similarity index 95% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecisionFromValueInner.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Range.kt index 3998d4a386..03de79fe67 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/AroundPrecisionFromValueInner.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Range.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.json.* * @param `value` Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @Serializable -public data class AroundPrecisionFromValueInner( +public data class Range( /** Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ @SerialName(value = "from") val from: Int? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexMetadataData.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexData.kt similarity index 89% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexMetadataData.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexData.kt index 4c1b005063..8505fa90cb 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexMetadataData.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexData.kt @@ -10,7 +10,7 @@ import kotlinx.serialization.json.* * @param ruleObjectID */ @Serializable -public data class RedirectRuleIndexMetadataData( +public data class RedirectRuleIndexData( @SerialName(value = "ruleObjectID") val ruleObjectID: String, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexMetadata.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexMetadata.kt index 62737032f0..fb1fe53680 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexMetadata.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/RedirectRuleIndexMetadata.kt @@ -28,5 +28,5 @@ public data class RedirectRuleIndexMetadata( /** Redirect rule status. */ @SerialName(value = "succeed") val succeed: Boolean, - @SerialName(value = "data") val `data`: RedirectRuleIndexMetadataData, + @SerialName(value = "data") val `data`: RedirectRuleIndexData, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsString.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsString.kt index 4a0ace4794..f9e49f65d3 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsString.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsString.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * SearchParamsString + * Search parameters as query string. * * @param params Search parameters as a URL-encoded query string. */ diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage400ResponseErrorErrorsInner.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/ErrorItem.kt similarity index 86% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage400ResponseErrorErrorsInner.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/ErrorItem.kt index 22e1f70e75..b8195fc936 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage400ResponseErrorErrorsInner.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/ErrorItem.kt @@ -5,7 +5,7 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * GetUsage400ResponseErrorErrorsInner + * ErrorItem * * @param message * @param code @@ -13,7 +13,7 @@ import kotlinx.serialization.json.* * @param position */ @Serializable -public data class GetUsage400ResponseErrorErrorsInner( +public data class ErrorItem( @SerialName(value = "message") val message: String, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage400Response.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/Forbidden.kt similarity index 72% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage400Response.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/Forbidden.kt index c38f23860c..bc08634d01 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage400Response.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/Forbidden.kt @@ -5,12 +5,12 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * GetUsage400Response + * Forbidden * * @param error */ @Serializable -public data class GetUsage400Response( +public data class Forbidden( - @SerialName(value = "error") val error: GetUsage400ResponseError, + @SerialName(value = "error") val error: ForbiddenError, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage400ResponseError.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/ForbiddenError.kt similarity index 74% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage400ResponseError.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/ForbiddenError.kt index 080dc068f0..26977b4225 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage400ResponseError.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/ForbiddenError.kt @@ -5,18 +5,18 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * GetUsage400ResponseError + * ForbiddenError * * @param code * @param message * @param errors */ @Serializable -public data class GetUsage400ResponseError( +public data class ForbiddenError( @SerialName(value = "code") val code: String? = null, @SerialName(value = "message") val message: String? = null, - @SerialName(value = "errors") val errors: List? = null, + @SerialName(value = "errors") val errors: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage200Response.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/IndexUsage.kt similarity index 67% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage200Response.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/IndexUsage.kt index 9366186706..688f5f13bb 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage200Response.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/IndexUsage.kt @@ -5,12 +5,12 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * GetUsage200Response + * IndexUsage * * @param statistics */ @Serializable -public data class GetUsage200Response( +public data class IndexUsage( - @SerialName(value = "statistics") val statistics: List? = null, + @SerialName(value = "statistics") val statistics: List? = null, ) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/InvalidRequest.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/InvalidRequest.kt new file mode 100644 index 0000000000..3024cafba9 --- /dev/null +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/InvalidRequest.kt @@ -0,0 +1,16 @@ +/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */ +package com.algolia.client.model.usage + +import kotlinx.serialization.* +import kotlinx.serialization.json.* + +/** + * InvalidRequest + * + * @param error + */ +@Serializable +public data class InvalidRequest( + + @SerialName(value = "error") val error: InvalidRequestError, +) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/InvalidRequestError.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/InvalidRequestError.kt new file mode 100644 index 0000000000..e24128bf58 --- /dev/null +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/InvalidRequestError.kt @@ -0,0 +1,22 @@ +/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */ +package com.algolia.client.model.usage + +import kotlinx.serialization.* +import kotlinx.serialization.json.* + +/** + * InvalidRequestError + * + * @param code + * @param message + * @param errors + */ +@Serializable +public data class InvalidRequestError( + + @SerialName(value = "code") val code: String? = null, + + @SerialName(value = "message") val message: String? = null, + + @SerialName(value = "errors") val errors: List? = null, +) diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage200ResponseStatisticsInner.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/StatisticEntry.kt similarity index 86% rename from clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage200ResponseStatisticsInner.kt rename to clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/StatisticEntry.kt index af75e118f8..55e11d1e66 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/GetUsage200ResponseStatisticsInner.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/usage/StatisticEntry.kt @@ -5,13 +5,13 @@ import kotlinx.serialization.* import kotlinx.serialization.json.* /** - * GetUsage200ResponseStatisticsInner + * StatisticEntry * * @param t Timestamp, measured in milliseconds since the Unix epoch. * @param v */ @Serializable -public data class GetUsage200ResponseStatisticsInner( +public data class StatisticEntry( /** Timestamp, measured in milliseconds since the Unix epoch. */ @SerialName(value = "t") val t: Int? = null, diff --git a/clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php b/clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php index 26b20f088b..045409b1de 100644 --- a/clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php +++ b/clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php @@ -391,7 +391,7 @@ public function getConfig($indexName, $requestOptions = []) * @param string $indexName Query Suggestions index name. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\GetConfigStatus200Response|array + * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\ConfigStatus|array */ public function getConfigStatus($indexName, $requestOptions = []) { @@ -428,7 +428,7 @@ public function getConfigStatus($indexName, $requestOptions = []) * @param string $indexName Query Suggestions index name. (required) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\GetLogFile200Response|array + * @return \Algolia\AlgoliaSearch\Model\QuerySuggestions\LogFile|array */ public function getLogFile($indexName, $requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Api/UsageClient.php b/clients/algoliasearch-client-php/lib/Api/UsageClient.php index 13e7471e19..80fa675d34 100644 --- a/clients/algoliasearch-client-php/lib/Api/UsageClient.php +++ b/clients/algoliasearch-client-php/lib/Api/UsageClient.php @@ -265,7 +265,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio * @param array $granularity Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Usage\GetUsage200Response|array + * @return \Algolia\AlgoliaSearch\Model\Usage\IndexUsage|array */ public function getIndexUsage($statistic, $indexName, $startDate, $endDate, $granularity = null, $requestOptions = []) { @@ -341,7 +341,7 @@ public function getIndexUsage($statistic, $indexName, $startDate, $endDate, $gra * @param array $granularity Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (optional) * @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions * - * @return \Algolia\AlgoliaSearch\Model\Usage\GetUsage200Response|array + * @return \Algolia\AlgoliaSearch\Model\Usage\IndexUsage|array */ public function getUsage($statistic, $startDate, $endDate, $granularity = null, $requestOptions = []) { diff --git a/clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffectsEmptySearch.php b/clients/algoliasearch-client-php/lib/Model/Abtesting/EmptySearchFilter.php similarity index 97% rename from clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffectsEmptySearch.php rename to clients/algoliasearch-client-php/lib/Model/Abtesting/EmptySearchFilter.php index d86403d489..ab8d2c07ec 100644 --- a/clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffectsEmptySearch.php +++ b/clients/algoliasearch-client-php/lib/Model/Abtesting/EmptySearchFilter.php @@ -7,13 +7,13 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * FilterEffectsEmptySearch Class Doc Comment. + * EmptySearchFilter Class Doc Comment. * * @category Class * * @description Empty searches removed from the A/B test as a result of configuration settings. */ -class FilterEffectsEmptySearch extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class EmptySearchFilter extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffects.php b/clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffects.php index a3f431c259..8182f7a2a5 100644 --- a/clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffects.php +++ b/clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffects.php @@ -21,8 +21,8 @@ class FilterEffects extends AbstractModel implements ModelInterface, \ArrayAcces * @var string[] */ protected static $modelTypes = [ - 'outliers' => '\Algolia\AlgoliaSearch\Model\Abtesting\FilterEffectsOutliers', - 'emptySearch' => '\Algolia\AlgoliaSearch\Model\Abtesting\FilterEffectsEmptySearch', + 'outliers' => '\Algolia\AlgoliaSearch\Model\Abtesting\OutliersFilter', + 'emptySearch' => '\Algolia\AlgoliaSearch\Model\Abtesting\EmptySearchFilter', ]; /** @@ -163,7 +163,7 @@ public function valid() /** * Gets outliers. * - * @return null|FilterEffectsOutliers + * @return null|OutliersFilter */ public function getOutliers() { @@ -173,7 +173,7 @@ public function getOutliers() /** * Sets outliers. * - * @param null|FilterEffectsOutliers $outliers outliers + * @param null|OutliersFilter $outliers outliers * * @return self */ @@ -187,7 +187,7 @@ public function setOutliers($outliers) /** * Gets emptySearch. * - * @return null|FilterEffectsEmptySearch + * @return null|EmptySearchFilter */ public function getEmptySearch() { @@ -197,7 +197,7 @@ public function getEmptySearch() /** * Sets emptySearch. * - * @param null|FilterEffectsEmptySearch $emptySearch emptySearch + * @param null|EmptySearchFilter $emptySearch emptySearch * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffectsOutliers.php b/clients/algoliasearch-client-php/lib/Model/Abtesting/OutliersFilter.php similarity index 97% rename from clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffectsOutliers.php rename to clients/algoliasearch-client-php/lib/Model/Abtesting/OutliersFilter.php index b0e44dbfaf..83039bef67 100644 --- a/clients/algoliasearch-client-php/lib/Model/Abtesting/FilterEffectsOutliers.php +++ b/clients/algoliasearch-client-php/lib/Model/Abtesting/OutliersFilter.php @@ -7,13 +7,13 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * FilterEffectsOutliers Class Doc Comment. + * OutliersFilter Class Doc Comment. * * @category Class * * @description Outliers removed from the A/B test as a result of configuration settings. */ -class FilterEffectsOutliers extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class OutliersFilter extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Analytics/ClickPositionsInner.php b/clients/algoliasearch-client-php/lib/Model/Analytics/ClickPosition.php similarity index 93% rename from clients/algoliasearch-client-php/lib/Model/Analytics/ClickPositionsInner.php rename to clients/algoliasearch-client-php/lib/Model/Analytics/ClickPosition.php index 64d391cc6b..c3d635266e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Analytics/ClickPositionsInner.php +++ b/clients/algoliasearch-client-php/lib/Model/Analytics/ClickPosition.php @@ -7,13 +7,13 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * ClickPositionsInner Class Doc Comment. + * ClickPosition Class Doc Comment. * * @category Class * * @description Click position. */ -class ClickPositionsInner extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class ClickPosition extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. @@ -194,10 +194,10 @@ public function getPosition() public function setPosition($position) { if (!is_null($position) && (count($position) > 2)) { - throw new \InvalidArgumentException('invalid value for $position when calling ClickPositionsInner., number of items must be less than or equal to 2.'); + throw new \InvalidArgumentException('invalid value for $position when calling ClickPosition., number of items must be less than or equal to 2.'); } if (!is_null($position) && (count($position) < 2)) { - throw new \InvalidArgumentException('invalid length for $position when calling ClickPositionsInner., number of items must be greater than or equal to 2.'); + throw new \InvalidArgumentException('invalid length for $position when calling ClickPosition., number of items must be greater than or equal to 2.'); } $this->container['position'] = $position; @@ -224,7 +224,7 @@ public function getClickCount() public function setClickCount($clickCount) { if (!is_null($clickCount) && ($clickCount < 0)) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling ClickPositionsInner., must be bigger than or equal to 0.'); + throw new \InvalidArgumentException('invalid value for $clickCount when calling ClickPosition., must be bigger than or equal to 0.'); } $this->container['clickCount'] = $clickCount; diff --git a/clients/algoliasearch-client-php/lib/Model/Analytics/GetClickPositionsResponse.php b/clients/algoliasearch-client-php/lib/Model/Analytics/GetClickPositionsResponse.php index 81e9481ef0..fce0795a9b 100644 --- a/clients/algoliasearch-client-php/lib/Model/Analytics/GetClickPositionsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Analytics/GetClickPositionsResponse.php @@ -19,7 +19,7 @@ class GetClickPositionsResponse extends AbstractModel implements ModelInterface, * @var string[] */ protected static $modelTypes = [ - 'positions' => '\Algolia\AlgoliaSearch\Model\Analytics\ClickPositionsInner[]', + 'positions' => '\Algolia\AlgoliaSearch\Model\Analytics\ClickPosition[]', ]; /** @@ -166,7 +166,7 @@ public function valid() /** * Gets positions. * - * @return \Algolia\AlgoliaSearch\Model\Analytics\ClickPositionsInner[] + * @return \Algolia\AlgoliaSearch\Model\Analytics\ClickPosition[] */ public function getPositions() { @@ -176,7 +176,7 @@ public function getPositions() /** * Sets positions. * - * @param \Algolia\AlgoliaSearch\Model\Analytics\ClickPositionsInner[] $positions list of positions in the search results and clicks associated with this search + * @param \Algolia\AlgoliaSearch\Model\Analytics\ClickPosition[] $positions list of positions in the search results and clicks associated with this search * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithAnalytics.php b/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithAnalytics.php index b5776f58e9..0100d84bf6 100644 --- a/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithAnalytics.php +++ b/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithAnalytics.php @@ -23,7 +23,7 @@ class TopSearchWithAnalytics extends AbstractModel implements ModelInterface, \A 'count' => 'int', 'clickThroughRate' => 'float', 'averageClickPosition' => 'float', - 'clickPositions' => '\Algolia\AlgoliaSearch\Model\Analytics\ClickPositionsInner[]', + 'clickPositions' => '\Algolia\AlgoliaSearch\Model\Analytics\ClickPosition[]', 'conversionRate' => 'float', 'trackedSearchCount' => 'int', 'clickCount' => 'int', @@ -401,7 +401,7 @@ public function setAverageClickPosition($averageClickPosition) /** * Gets clickPositions. * - * @return \Algolia\AlgoliaSearch\Model\Analytics\ClickPositionsInner[] + * @return \Algolia\AlgoliaSearch\Model\Analytics\ClickPosition[] */ public function getClickPositions() { @@ -411,7 +411,7 @@ public function getClickPositions() /** * Sets clickPositions. * - * @param \Algolia\AlgoliaSearch\Model\Analytics\ClickPositionsInner[] $clickPositions list of positions in the search results and clicks associated with this search + * @param \Algolia\AlgoliaSearch\Model\Analytics\ClickPosition[] $clickPositions list of positions in the search results and clicks associated with this search * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithRevenueAnalytics.php b/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithRevenueAnalytics.php index 183000e666..af376c63e2 100644 --- a/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithRevenueAnalytics.php +++ b/clients/algoliasearch-client-php/lib/Model/Analytics/TopSearchWithRevenueAnalytics.php @@ -23,7 +23,7 @@ class TopSearchWithRevenueAnalytics extends AbstractModel implements ModelInterf 'count' => 'int', 'clickThroughRate' => 'float', 'averageClickPosition' => 'float', - 'clickPositions' => '\Algolia\AlgoliaSearch\Model\Analytics\ClickPositionsInner[]', + 'clickPositions' => '\Algolia\AlgoliaSearch\Model\Analytics\ClickPosition[]', 'conversionRate' => 'float', 'trackedSearchCount' => 'int', 'clickCount' => 'int', @@ -476,7 +476,7 @@ public function setAverageClickPosition($averageClickPosition) /** * Gets clickPositions. * - * @return \Algolia\AlgoliaSearch\Model\Analytics\ClickPositionsInner[] + * @return \Algolia\AlgoliaSearch\Model\Analytics\ClickPosition[] */ public function getClickPositions() { @@ -486,7 +486,7 @@ public function getClickPositions() /** * Sets clickPositions. * - * @param \Algolia\AlgoliaSearch\Model\Analytics\ClickPositionsInner[] $clickPositions list of positions in the search results and clicks associated with this search + * @param \Algolia\AlgoliaSearch\Model\Analytics\ClickPosition[] $clickPositions list of positions in the search results and clicks associated with this search * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Ingestion/DockerStreamsInput.php b/clients/algoliasearch-client-php/lib/Model/Ingestion/DockerStreamsInput.php index 92f94a7a6a..ef518d25eb 100644 --- a/clients/algoliasearch-client-php/lib/Model/Ingestion/DockerStreamsInput.php +++ b/clients/algoliasearch-client-php/lib/Model/Ingestion/DockerStreamsInput.php @@ -10,6 +10,8 @@ * DockerStreamsInput Class Doc Comment. * * @category Class + * + * @description The selected streams of a singer or airbyte connector. */ class DockerStreamsInput extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationTryResponseError.php b/clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationError.php similarity index 96% rename from clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationTryResponseError.php rename to clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationError.php index 012ee0c750..2673eba8f9 100644 --- a/clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationTryResponseError.php +++ b/clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationError.php @@ -7,13 +7,13 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * TransformationTryResponseError Class Doc Comment. + * TransformationError Class Doc Comment. * * @category Class * * @description The error if the transformation failed. */ -class TransformationTryResponseError extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class TransformationError extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationTryResponse.php b/clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationTryResponse.php index ca66022ac3..b02c57bb90 100644 --- a/clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationTryResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Ingestion/TransformationTryResponse.php @@ -20,7 +20,7 @@ class TransformationTryResponse extends AbstractModel implements ModelInterface, */ protected static $modelTypes = [ 'payloads' => 'object[]', - 'error' => '\Algolia\AlgoliaSearch\Model\Ingestion\TransformationTryResponseError', + 'error' => '\Algolia\AlgoliaSearch\Model\Ingestion\TransformationError', ]; /** @@ -191,7 +191,7 @@ public function setPayloads($payloads) /** * Gets error. * - * @return null|TransformationTryResponseError + * @return null|TransformationError */ public function getError() { @@ -201,7 +201,7 @@ public function getError() /** * Sets error. * - * @param null|TransformationTryResponseError $error error + * @param null|TransformationError $error error * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/GetServers403Response.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/BadRequest.php similarity index 96% rename from clients/algoliasearch-client-php/lib/Model/Monitoring/GetServers403Response.php rename to clients/algoliasearch-client-php/lib/Model/Monitoring/BadRequest.php index 2cb96356c8..5d5167383d 100644 --- a/clients/algoliasearch-client-php/lib/Model/Monitoring/GetServers403Response.php +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/BadRequest.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * GetServers403Response Class Doc Comment. + * BadRequest Class Doc Comment. * * @category Class */ -class GetServers403Response extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class BadRequest extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/Forbidden.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/Forbidden.php new file mode 100644 index 0000000000..7a6390e665 --- /dev/null +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/Forbidden.php @@ -0,0 +1,225 @@ + 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'reason' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'reason' => 'reason', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'reason' => 'setReason', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'reason' => 'getReason', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['reason'])) { + $this->container['reason'] = $data['reason']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets reason. + * + * @return null|string + */ + public function getReason() + { + return $this->container['reason'] ?? null; + } + + /** + * Sets reason. + * + * @param null|string $reason reason + * + * @return self + */ + public function setReason($reason) + { + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } +} diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/IncidentsInner.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/IncidentEntry.php similarity index 97% rename from clients/algoliasearch-client-php/lib/Model/Monitoring/IncidentsInner.php rename to clients/algoliasearch-client-php/lib/Model/Monitoring/IncidentEntry.php index 47f084ab97..787fbcda3d 100644 --- a/clients/algoliasearch-client-php/lib/Model/Monitoring/IncidentsInner.php +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/IncidentEntry.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * IncidentsInner Class Doc Comment. + * IncidentEntry Class Doc Comment. * * @category Class */ -class IncidentsInner extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class IncidentEntry extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingTimeResponseMetrics.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingMetric.php similarity index 96% rename from clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingTimeResponseMetrics.php rename to clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingMetric.php index c0087c2389..b7aa5596f9 100644 --- a/clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingTimeResponseMetrics.php +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingMetric.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * IndexingTimeResponseMetrics Class Doc Comment. + * IndexingMetric Class Doc Comment. * * @category Class */ -class IndexingTimeResponseMetrics extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class IndexingMetric extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingTimeResponse.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingTimeResponse.php index 6451ab9ea4..48b196367b 100644 --- a/clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingTimeResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/IndexingTimeResponse.php @@ -19,7 +19,7 @@ class IndexingTimeResponse extends AbstractModel implements ModelInterface, \Arr * @var string[] */ protected static $modelTypes = [ - 'metrics' => '\Algolia\AlgoliaSearch\Model\Monitoring\IndexingTimeResponseMetrics', + 'metrics' => '\Algolia\AlgoliaSearch\Model\Monitoring\IndexingMetric', ]; /** @@ -153,7 +153,7 @@ public function valid() /** * Gets metrics. * - * @return null|IndexingTimeResponseMetrics + * @return null|IndexingMetric */ public function getMetrics() { @@ -163,7 +163,7 @@ public function getMetrics() /** * Sets metrics. * - * @param null|IndexingTimeResponseMetrics $metrics metrics + * @param null|IndexingMetric $metrics metrics * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/InfrastructureResponse.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/InfrastructureResponse.php index a727daa733..7389c9fc2b 100644 --- a/clients/algoliasearch-client-php/lib/Model/Monitoring/InfrastructureResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/InfrastructureResponse.php @@ -19,7 +19,7 @@ class InfrastructureResponse extends AbstractModel implements ModelInterface, \A * @var string[] */ protected static $modelTypes = [ - 'metrics' => '\Algolia\AlgoliaSearch\Model\Monitoring\InfrastructureResponseMetrics', + 'metrics' => '\Algolia\AlgoliaSearch\Model\Monitoring\Metrics', ]; /** @@ -153,7 +153,7 @@ public function valid() /** * Gets metrics. * - * @return null|InfrastructureResponseMetrics + * @return null|Metrics */ public function getMetrics() { @@ -163,7 +163,7 @@ public function getMetrics() /** * Sets metrics. * - * @param null|InfrastructureResponseMetrics $metrics metrics + * @param null|Metrics $metrics metrics * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyResponseMetrics.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyMetric.php similarity index 96% rename from clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyResponseMetrics.php rename to clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyMetric.php index ab618ce656..7e916d4601 100644 --- a/clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyResponseMetrics.php +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyMetric.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * LatencyResponseMetrics Class Doc Comment. + * LatencyMetric Class Doc Comment. * * @category Class */ -class LatencyResponseMetrics extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class LatencyMetric extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyResponse.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyResponse.php index 24d35b0fa4..539bd5fe1c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/LatencyResponse.php @@ -19,7 +19,7 @@ class LatencyResponse extends AbstractModel implements ModelInterface, \ArrayAcc * @var string[] */ protected static $modelTypes = [ - 'metrics' => '\Algolia\AlgoliaSearch\Model\Monitoring\LatencyResponseMetrics', + 'metrics' => '\Algolia\AlgoliaSearch\Model\Monitoring\LatencyMetric', ]; /** @@ -153,7 +153,7 @@ public function valid() /** * Gets metrics. * - * @return null|LatencyResponseMetrics + * @return null|LatencyMetric */ public function getMetrics() { @@ -163,7 +163,7 @@ public function getMetrics() /** * Sets metrics. * - * @param null|LatencyResponseMetrics $metrics metrics + * @param null|LatencyMetric $metrics metrics * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/InfrastructureResponseMetrics.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/Metrics.php similarity index 97% rename from clients/algoliasearch-client-php/lib/Model/Monitoring/InfrastructureResponseMetrics.php rename to clients/algoliasearch-client-php/lib/Model/Monitoring/Metrics.php index 35b5a869b7..8f29e1047e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Monitoring/InfrastructureResponseMetrics.php +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/Metrics.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * InfrastructureResponseMetrics Class Doc Comment. + * Metrics Class Doc Comment. * * @category Class */ -class InfrastructureResponseMetrics extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class Metrics extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/TimeInner.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/TimeEntry.php similarity index 98% rename from clients/algoliasearch-client-php/lib/Model/Monitoring/TimeInner.php rename to clients/algoliasearch-client-php/lib/Model/Monitoring/TimeEntry.php index 909252f8b1..92a96bb004 100644 --- a/clients/algoliasearch-client-php/lib/Model/Monitoring/TimeInner.php +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/TimeEntry.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * TimeInner Class Doc Comment. + * TimeEntry Class Doc Comment. * * @category Class */ -class TimeInner extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class TimeEntry extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Monitoring/Unauthorized.php b/clients/algoliasearch-client-php/lib/Model/Monitoring/Unauthorized.php new file mode 100644 index 0000000000..b230701c37 --- /dev/null +++ b/clients/algoliasearch-client-php/lib/Model/Monitoring/Unauthorized.php @@ -0,0 +1,225 @@ + 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'reason' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'reason' => 'reason', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'reason' => 'setReason', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'reason' => 'getReason', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['reason'])) { + $this->container['reason'] = $data['reason']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets reason. + * + * @return null|string + */ + public function getReason() + { + return $this->container['reason'] ?? null; + } + + /** + * Sets reason. + * + * @param null|string $reason reason + * + * @return self + */ + public function setReason($reason) + { + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } +} diff --git a/clients/algoliasearch-client-php/lib/Model/QuerySuggestions/GetConfigStatus200Response.php b/clients/algoliasearch-client-php/lib/Model/QuerySuggestions/ConfigStatus.php similarity index 98% rename from clients/algoliasearch-client-php/lib/Model/QuerySuggestions/GetConfigStatus200Response.php rename to clients/algoliasearch-client-php/lib/Model/QuerySuggestions/ConfigStatus.php index 7134e10b70..a2e2356f12 100644 --- a/clients/algoliasearch-client-php/lib/Model/QuerySuggestions/GetConfigStatus200Response.php +++ b/clients/algoliasearch-client-php/lib/Model/QuerySuggestions/ConfigStatus.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * GetConfigStatus200Response Class Doc Comment. + * ConfigStatus Class Doc Comment. * * @category Class */ -class GetConfigStatus200Response extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class ConfigStatus extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/QuerySuggestions/GetLogFile200Response.php b/clients/algoliasearch-client-php/lib/Model/QuerySuggestions/LogFile.php similarity index 97% rename from clients/algoliasearch-client-php/lib/Model/QuerySuggestions/GetLogFile200Response.php rename to clients/algoliasearch-client-php/lib/Model/QuerySuggestions/LogFile.php index 14939ead10..74e7d6ee02 100644 --- a/clients/algoliasearch-client-php/lib/Model/QuerySuggestions/GetLogFile200Response.php +++ b/clients/algoliasearch-client-php/lib/Model/QuerySuggestions/LogFile.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * GetLogFile200Response Class Doc Comment. + * LogFile Class Doc Comment. * * @category Class */ -class GetLogFile200Response extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class LogFile extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecisionFromValueInner.php b/clients/algoliasearch-client-php/lib/Model/Recommend/Range.php similarity index 97% rename from clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecisionFromValueInner.php rename to clients/algoliasearch-client-php/lib/Model/Recommend/Range.php index 55f847a5aa..7b92e3a202 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/AroundPrecisionFromValueInner.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/Range.php @@ -7,13 +7,13 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * AroundPrecisionFromValueInner Class Doc Comment. + * Range Class Doc Comment. * * @category Class * * @description Range object with lower and upper values in meters to define custom ranges. */ -class AroundPrecisionFromValueInner extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class Range extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendRule.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendRule.php index 4a82e58c1c..9729861926 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendRule.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendRule.php @@ -21,7 +21,7 @@ class RecommendRule extends AbstractModel implements ModelInterface, \ArrayAcces * @var string[] */ protected static $modelTypes = [ - 'metadata' => '\Algolia\AlgoliaSearch\Model\Recommend\RecommendRuleMetadata', + 'metadata' => '\Algolia\AlgoliaSearch\Model\Recommend\RuleMetadata', 'objectID' => 'string', 'condition' => '\Algolia\AlgoliaSearch\Model\Recommend\Condition', 'consequence' => '\Algolia\AlgoliaSearch\Model\Recommend\Consequence', @@ -195,7 +195,7 @@ public function valid() /** * Gets metadata. * - * @return null|RecommendRuleMetadata + * @return null|RuleMetadata */ public function getMetadata() { @@ -205,7 +205,7 @@ public function getMetadata() /** * Sets metadata. * - * @param null|RecommendRuleMetadata $metadata metadata + * @param null|RuleMetadata $metadata metadata * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexMetadataData.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexData.php similarity index 96% rename from clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexMetadataData.php rename to clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexData.php index d675d6cfaf..038381ef03 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexMetadataData.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexData.php @@ -7,13 +7,13 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * RedirectRuleIndexMetadataData Class Doc Comment. + * RedirectRuleIndexData Class Doc Comment. * * @category Class * * @description Redirect rule data. */ -class RedirectRuleIndexMetadataData extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class RedirectRuleIndexData extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexMetadata.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexMetadata.php index 5f77844bfa..4aff906ab0 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexMetadata.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RedirectRuleIndexMetadata.php @@ -23,7 +23,7 @@ class RedirectRuleIndexMetadata extends AbstractModel implements ModelInterface, 'dest' => 'string', 'reason' => 'string', 'succeed' => 'bool', - 'data' => '\Algolia\AlgoliaSearch\Model\Recommend\RedirectRuleIndexMetadataData', + 'data' => '\Algolia\AlgoliaSearch\Model\Recommend\RedirectRuleIndexData', ]; /** @@ -299,7 +299,7 @@ public function setSucceed($succeed) /** * Gets data. * - * @return RedirectRuleIndexMetadataData + * @return RedirectRuleIndexData */ public function getData() { @@ -309,7 +309,7 @@ public function getData() /** * Sets data. * - * @param RedirectRuleIndexMetadataData $data data + * @param RedirectRuleIndexData $data data * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendRuleMetadata.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RuleMetadata.php similarity index 96% rename from clients/algoliasearch-client-php/lib/Model/Recommend/RecommendRuleMetadata.php rename to clients/algoliasearch-client-php/lib/Model/Recommend/RuleMetadata.php index 5485344607..e25d026a23 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendRuleMetadata.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RuleMetadata.php @@ -7,13 +7,13 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * RecommendRuleMetadata Class Doc Comment. + * RuleMetadata Class Doc Comment. * * @category Class * * @description Rule metadata. */ -class RecommendRuleMetadata extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class RuleMetadata extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecisionFromValueInner.php b/clients/algoliasearch-client-php/lib/Model/Search/Range.php similarity index 97% rename from clients/algoliasearch-client-php/lib/Model/Search/AroundPrecisionFromValueInner.php rename to clients/algoliasearch-client-php/lib/Model/Search/Range.php index e825455055..a9e9dcc320 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/AroundPrecisionFromValueInner.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/Range.php @@ -7,13 +7,13 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * AroundPrecisionFromValueInner Class Doc Comment. + * Range Class Doc Comment. * * @category Class * * @description Range object with lower and upper values in meters to define custom ranges. */ -class AroundPrecisionFromValueInner extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class Range extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexMetadataData.php b/clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexData.php similarity index 96% rename from clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexMetadataData.php rename to clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexData.php index 1eb4e2be46..dc5ea52698 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexMetadataData.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexData.php @@ -7,13 +7,13 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * RedirectRuleIndexMetadataData Class Doc Comment. + * RedirectRuleIndexData Class Doc Comment. * * @category Class * * @description Redirect rule data. */ -class RedirectRuleIndexMetadataData extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class RedirectRuleIndexData extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexMetadata.php b/clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexMetadata.php index 1063ad7fe2..b604b838b6 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexMetadata.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/RedirectRuleIndexMetadata.php @@ -23,7 +23,7 @@ class RedirectRuleIndexMetadata extends AbstractModel implements ModelInterface, 'dest' => 'string', 'reason' => 'string', 'succeed' => 'bool', - 'data' => '\Algolia\AlgoliaSearch\Model\Search\RedirectRuleIndexMetadataData', + 'data' => '\Algolia\AlgoliaSearch\Model\Search\RedirectRuleIndexData', ]; /** @@ -299,7 +299,7 @@ public function setSucceed($succeed) /** * Gets data. * - * @return RedirectRuleIndexMetadataData + * @return RedirectRuleIndexData */ public function getData() { @@ -309,7 +309,7 @@ public function getData() /** * Sets data. * - * @param RedirectRuleIndexMetadataData $data data + * @param RedirectRuleIndexData $data data * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsString.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsString.php index 27a4440484..56026955b9 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsString.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsString.php @@ -10,6 +10,8 @@ * SearchParamsString Class Doc Comment. * * @category Class + * + * @description Search parameters as query string. */ class SearchParamsString extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { diff --git a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage400ResponseErrorErrorsInner.php b/clients/algoliasearch-client-php/lib/Model/Usage/ErrorItem.php similarity index 97% rename from clients/algoliasearch-client-php/lib/Model/Usage/GetUsage400ResponseErrorErrorsInner.php rename to clients/algoliasearch-client-php/lib/Model/Usage/ErrorItem.php index 1698c6b95e..79d573d556 100644 --- a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage400ResponseErrorErrorsInner.php +++ b/clients/algoliasearch-client-php/lib/Model/Usage/ErrorItem.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * GetUsage400ResponseErrorErrorsInner Class Doc Comment. + * ErrorItem Class Doc Comment. * * @category Class */ -class GetUsage400ResponseErrorErrorsInner extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class ErrorItem extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage400Response.php b/clients/algoliasearch-client-php/lib/Model/Usage/Forbidden.php similarity index 93% rename from clients/algoliasearch-client-php/lib/Model/Usage/GetUsage400Response.php rename to clients/algoliasearch-client-php/lib/Model/Usage/Forbidden.php index 8501302d3d..73bd812fdf 100644 --- a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage400Response.php +++ b/clients/algoliasearch-client-php/lib/Model/Usage/Forbidden.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * GetUsage400Response Class Doc Comment. + * Forbidden Class Doc Comment. * * @category Class */ -class GetUsage400Response extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class Forbidden extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. @@ -19,7 +19,7 @@ class GetUsage400Response extends AbstractModel implements ModelInterface, \Arra * @var string[] */ protected static $modelTypes = [ - 'error' => '\Algolia\AlgoliaSearch\Model\Usage\GetUsage400ResponseError', + 'error' => '\Algolia\AlgoliaSearch\Model\Usage\ForbiddenError', ]; /** @@ -159,7 +159,7 @@ public function valid() /** * Gets error. * - * @return GetUsage400ResponseError + * @return ForbiddenError */ public function getError() { @@ -169,7 +169,7 @@ public function getError() /** * Sets error. * - * @param GetUsage400ResponseError $error error + * @param ForbiddenError $error error * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage400ResponseError.php b/clients/algoliasearch-client-php/lib/Model/Usage/ForbiddenError.php similarity index 92% rename from clients/algoliasearch-client-php/lib/Model/Usage/GetUsage400ResponseError.php rename to clients/algoliasearch-client-php/lib/Model/Usage/ForbiddenError.php index f1b1974820..cb5a60efbf 100644 --- a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage400ResponseError.php +++ b/clients/algoliasearch-client-php/lib/Model/Usage/ForbiddenError.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * GetUsage400ResponseError Class Doc Comment. + * ForbiddenError Class Doc Comment. * * @category Class */ -class GetUsage400ResponseError extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class ForbiddenError extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. @@ -21,7 +21,7 @@ class GetUsage400ResponseError extends AbstractModel implements ModelInterface, protected static $modelTypes = [ 'code' => 'string', 'message' => 'string', - 'errors' => '\Algolia\AlgoliaSearch\Model\Usage\GetUsage400ResponseErrorErrorsInner[]', + 'errors' => '\Algolia\AlgoliaSearch\Model\Usage\ErrorItem[]', ]; /** @@ -217,7 +217,7 @@ public function setMessage($message) /** * Gets errors. * - * @return null|\Algolia\AlgoliaSearch\Model\Usage\GetUsage400ResponseErrorErrorsInner[] + * @return null|\Algolia\AlgoliaSearch\Model\Usage\ErrorItem[] */ public function getErrors() { @@ -227,7 +227,7 @@ public function getErrors() /** * Sets errors. * - * @param null|\Algolia\AlgoliaSearch\Model\Usage\GetUsage400ResponseErrorErrorsInner[] $errors errors + * @param null|\Algolia\AlgoliaSearch\Model\Usage\ErrorItem[] $errors errors * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage200Response.php b/clients/algoliasearch-client-php/lib/Model/Usage/IndexUsage.php similarity index 91% rename from clients/algoliasearch-client-php/lib/Model/Usage/GetUsage200Response.php rename to clients/algoliasearch-client-php/lib/Model/Usage/IndexUsage.php index 06d5cef9cf..a322b46cfc 100644 --- a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage200Response.php +++ b/clients/algoliasearch-client-php/lib/Model/Usage/IndexUsage.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * GetUsage200Response Class Doc Comment. + * IndexUsage Class Doc Comment. * * @category Class */ -class GetUsage200Response extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class IndexUsage extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. @@ -19,7 +19,7 @@ class GetUsage200Response extends AbstractModel implements ModelInterface, \Arra * @var string[] */ protected static $modelTypes = [ - 'statistics' => '\Algolia\AlgoliaSearch\Model\Usage\GetUsage200ResponseStatisticsInner[]', + 'statistics' => '\Algolia\AlgoliaSearch\Model\Usage\StatisticEntry[]', ]; /** @@ -153,7 +153,7 @@ public function valid() /** * Gets statistics. * - * @return null|\Algolia\AlgoliaSearch\Model\Usage\GetUsage200ResponseStatisticsInner[] + * @return null|\Algolia\AlgoliaSearch\Model\Usage\StatisticEntry[] */ public function getStatistics() { @@ -163,7 +163,7 @@ public function getStatistics() /** * Sets statistics. * - * @param null|\Algolia\AlgoliaSearch\Model\Usage\GetUsage200ResponseStatisticsInner[] $statistics statistics + * @param null|\Algolia\AlgoliaSearch\Model\Usage\StatisticEntry[] $statistics statistics * * @return self */ diff --git a/clients/algoliasearch-client-php/lib/Model/Usage/InvalidRequest.php b/clients/algoliasearch-client-php/lib/Model/Usage/InvalidRequest.php new file mode 100644 index 0000000000..84fa6ab243 --- /dev/null +++ b/clients/algoliasearch-client-php/lib/Model/Usage/InvalidRequest.php @@ -0,0 +1,231 @@ + '\Algolia\AlgoliaSearch\Model\Usage\InvalidRequestError', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'error' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['error'])) { + $this->container['error'] = $data['error']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!isset($this->container['error']) || null === $this->container['error']) { + $invalidProperties[] = "'error' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets error. + * + * @return InvalidRequestError + */ + public function getError() + { + return $this->container['error'] ?? null; + } + + /** + * Sets error. + * + * @param InvalidRequestError $error error + * + * @return self + */ + public function setError($error) + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } +} diff --git a/clients/algoliasearch-client-php/lib/Model/Usage/InvalidRequestError.php b/clients/algoliasearch-client-php/lib/Model/Usage/InvalidRequestError.php new file mode 100644 index 0000000000..288275c3de --- /dev/null +++ b/clients/algoliasearch-client-php/lib/Model/Usage/InvalidRequestError.php @@ -0,0 +1,289 @@ + 'string', + 'message' => 'string', + 'errors' => '\Algolia\AlgoliaSearch\Model\Usage\ErrorItem[]', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $modelFormats = [ + 'code' => null, + 'message' => null, + 'errors' => null, + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'code' => 'code', + 'message' => 'message', + 'errors' => 'errors', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'errors' => 'setErrors', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'errors' => 'getErrors', + ]; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + */ + public function __construct(?array $data = null) + { + if (isset($data['code'])) { + $this->container['code'] = $data['code']; + } + if (isset($data['message'])) { + $this->container['message'] = $data['message']; + } + if (isset($data['errors'])) { + $this->container['errors'] = $data['errors']; + } + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelTypes() + { + return self::$modelTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function modelFormats() + { + return self::$modelFormats; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets code. + * + * @return null|string + */ + public function getCode() + { + return $this->container['code'] ?? null; + } + + /** + * Sets code. + * + * @param null|string $code code + * + * @return self + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message. + * + * @return null|string + */ + public function getMessage() + { + return $this->container['message'] ?? null; + } + + /** + * Sets message. + * + * @param null|string $message message + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets errors. + * + * @return null|\Algolia\AlgoliaSearch\Model\Usage\ErrorItem[] + */ + public function getErrors() + { + return $this->container['errors'] ?? null; + } + + /** + * Sets errors. + * + * @param null|\Algolia\AlgoliaSearch\Model\Usage\ErrorItem[] $errors errors + * + * @return self + */ + public function setErrors($errors) + { + $this->container['errors'] = $errors; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return null|mixed + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param null|int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } +} diff --git a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage200ResponseStatisticsInner.php b/clients/algoliasearch-client-php/lib/Model/Usage/StatisticEntry.php similarity index 96% rename from clients/algoliasearch-client-php/lib/Model/Usage/GetUsage200ResponseStatisticsInner.php rename to clients/algoliasearch-client-php/lib/Model/Usage/StatisticEntry.php index 583cca655d..683847154b 100644 --- a/clients/algoliasearch-client-php/lib/Model/Usage/GetUsage200ResponseStatisticsInner.php +++ b/clients/algoliasearch-client-php/lib/Model/Usage/StatisticEntry.php @@ -7,11 +7,11 @@ use Algolia\AlgoliaSearch\Model\AbstractModel; /** - * GetUsage200ResponseStatisticsInner Class Doc Comment. + * StatisticEntry Class Doc Comment. * * @category Class */ -class GetUsage200ResponseStatisticsInner extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable +class StatisticEntry extends AbstractModel implements ModelInterface, \ArrayAccess, \JsonSerializable { /** * Array of property to type mappings. Used for (de)serialization. diff --git a/clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects_empty_search.py b/clients/algoliasearch-client-python/algoliasearch/abtesting/models/empty_search_filter.py similarity index 91% rename from clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects_empty_search.py rename to clients/algoliasearch-client-python/algoliasearch/abtesting/models/empty_search_filter.py index 1707ca0f57..c8293b865c 100644 --- a/clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects_empty_search.py +++ b/clients/algoliasearch-client-python/algoliasearch/abtesting/models/empty_search_filter.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt -class FilterEffectsEmptySearch(BaseModel): +class EmptySearchFilter(BaseModel): """ Empty searches removed from the A/B test as a result of configuration settings. """ @@ -37,7 +37,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of FilterEffectsEmptySearch from a JSON string""" + """Create an instance of EmptySearchFilter from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -59,7 +59,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of FilterEffectsEmptySearch from a dict""" + """Create an instance of EmptySearchFilter from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects.py b/clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects.py index 77240ce4b4..1465b61c69 100644 --- a/clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects.py +++ b/clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects.py @@ -11,10 +11,8 @@ from pydantic import BaseModel, ConfigDict, Field -from algoliasearch.abtesting.models.filter_effects_empty_search import ( - FilterEffectsEmptySearch, -) -from algoliasearch.abtesting.models.filter_effects_outliers import FilterEffectsOutliers +from algoliasearch.abtesting.models.empty_search_filter import EmptySearchFilter +from algoliasearch.abtesting.models.outliers_filter import OutliersFilter class FilterEffects(BaseModel): @@ -22,10 +20,8 @@ class FilterEffects(BaseModel): A/B test filter effects resulting from configuration settings. """ - outliers: Optional[FilterEffectsOutliers] = None - empty_search: Optional[FilterEffectsEmptySearch] = Field( - default=None, alias="emptySearch" - ) + outliers: Optional[OutliersFilter] = None + empty_search: Optional[EmptySearchFilter] = Field(default=None, alias="emptySearch") model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -72,12 +68,12 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "outliers": ( - FilterEffectsOutliers.from_dict(obj.get("outliers")) + OutliersFilter.from_dict(obj.get("outliers")) if obj.get("outliers") is not None else None ), "emptySearch": ( - FilterEffectsEmptySearch.from_dict(obj.get("emptySearch")) + EmptySearchFilter.from_dict(obj.get("emptySearch")) if obj.get("emptySearch") is not None else None ), diff --git a/clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects_outliers.py b/clients/algoliasearch-client-python/algoliasearch/abtesting/models/outliers_filter.py similarity index 91% rename from clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects_outliers.py rename to clients/algoliasearch-client-python/algoliasearch/abtesting/models/outliers_filter.py index 88c22324f7..ebc094f312 100644 --- a/clients/algoliasearch-client-python/algoliasearch/abtesting/models/filter_effects_outliers.py +++ b/clients/algoliasearch-client-python/algoliasearch/abtesting/models/outliers_filter.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt -class FilterEffectsOutliers(BaseModel): +class OutliersFilter(BaseModel): """ Outliers removed from the A/B test as a result of configuration settings. """ @@ -37,7 +37,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of FilterEffectsOutliers from a JSON string""" + """Create an instance of OutliersFilter from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -59,7 +59,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of FilterEffectsOutliers from a dict""" + """Create an instance of OutliersFilter from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/analytics/models/click_positions_inner.py b/clients/algoliasearch-client-python/algoliasearch/analytics/models/click_position.py similarity index 92% rename from clients/algoliasearch-client-python/algoliasearch/analytics/models/click_positions_inner.py rename to clients/algoliasearch-client-python/algoliasearch/analytics/models/click_position.py index 896695d153..e1a2e7d9e0 100644 --- a/clients/algoliasearch-client-python/algoliasearch/analytics/models/click_positions_inner.py +++ b/clients/algoliasearch-client-python/algoliasearch/analytics/models/click_position.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt -class ClickPositionsInner(BaseModel): +class ClickPosition(BaseModel): """ Click position. """ @@ -38,7 +38,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of ClickPositionsInner from a JSON string""" + """Create an instance of ClickPosition from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -60,7 +60,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ClickPositionsInner from a dict""" + """Create an instance of ClickPosition from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/analytics/models/get_click_positions_response.py b/clients/algoliasearch-client-python/algoliasearch/analytics/models/get_click_positions_response.py index 3ae097e301..10cba6b838 100644 --- a/clients/algoliasearch-client-python/algoliasearch/analytics/models/get_click_positions_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/analytics/models/get_click_positions_response.py @@ -11,7 +11,7 @@ from pydantic import BaseModel, ConfigDict, Field -from algoliasearch.analytics.models.click_positions_inner import ClickPositionsInner +from algoliasearch.analytics.models.click_position import ClickPosition class GetClickPositionsResponse(BaseModel): @@ -19,10 +19,10 @@ class GetClickPositionsResponse(BaseModel): GetClickPositionsResponse """ - positions: Annotated[ - List[ClickPositionsInner], Field(min_length=12, max_length=12) - ] = Field( - description="List of positions in the search results and clicks associated with this search." + positions: Annotated[List[ClickPosition], Field(min_length=12, max_length=12)] = ( + Field( + description="List of positions in the search results and clicks associated with this search." + ) ) model_config = ConfigDict( @@ -72,10 +72,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "positions": ( - [ - ClickPositionsInner.from_dict(_item) - for _item in obj.get("positions") - ] + [ClickPosition.from_dict(_item) for _item in obj.get("positions")] if obj.get("positions") is not None else None ) diff --git a/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_analytics.py b/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_analytics.py index a943bc61b1..c0c9c01c7e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_analytics.py +++ b/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_analytics.py @@ -11,7 +11,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from algoliasearch.analytics.models.click_positions_inner import ClickPositionsInner +from algoliasearch.analytics.models.click_position import ClickPosition class TopSearchWithAnalytics(BaseModel): @@ -40,7 +40,7 @@ class TopSearchWithAnalytics(BaseModel): alias="averageClickPosition", ) click_positions: Annotated[ - List[ClickPositionsInner], Field(min_length=12, max_length=12) + List[ClickPosition], Field(min_length=12, max_length=12) ] = Field( description="List of positions in the search results and clicks associated with this search.", alias="clickPositions", @@ -118,7 +118,7 @@ def from_dict(cls, obj: Dict) -> Self: "averageClickPosition": obj.get("averageClickPosition"), "clickPositions": ( [ - ClickPositionsInner.from_dict(_item) + ClickPosition.from_dict(_item) for _item in obj.get("clickPositions") ] if obj.get("clickPositions") is not None diff --git a/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_revenue_analytics.py b/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_revenue_analytics.py index 3d1c395471..e3b7fd15ad 100644 --- a/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_revenue_analytics.py +++ b/clients/algoliasearch-client-python/algoliasearch/analytics/models/top_search_with_revenue_analytics.py @@ -11,7 +11,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from algoliasearch.analytics.models.click_positions_inner import ClickPositionsInner +from algoliasearch.analytics.models.click_position import ClickPosition from algoliasearch.analytics.models.currencies_value import CurrenciesValue @@ -41,7 +41,7 @@ class TopSearchWithRevenueAnalytics(BaseModel): alias="averageClickPosition", ) click_positions: Annotated[ - List[ClickPositionsInner], Field(min_length=12, max_length=12) + List[ClickPosition], Field(min_length=12, max_length=12) ] = Field( description="List of positions in the search results and clicks associated with this search.", alias="clickPositions", @@ -153,7 +153,7 @@ def from_dict(cls, obj: Dict) -> Self: "averageClickPosition": obj.get("averageClickPosition"), "clickPositions": ( [ - ClickPositionsInner.from_dict(_item) + ClickPosition.from_dict(_item) for _item in obj.get("clickPositions") ] if obj.get("clickPositions") is not None diff --git a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/docker_streams_input.py b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/docker_streams_input.py index 99b5f14d51..872367bb3d 100644 --- a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/docker_streams_input.py +++ b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/docker_streams_input.py @@ -14,7 +14,7 @@ class DockerStreamsInput(BaseModel): """ - DockerStreamsInput + The selected streams of a singer or airbyte connector. """ streams: Dict[str, Any] diff --git a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_try_response_error.py b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_error.py similarity index 89% rename from clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_try_response_error.py rename to clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_error.py index 20dbb42321..f888ea3968 100644 --- a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_try_response_error.py +++ b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_error.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -class TransformationTryResponseError(BaseModel): +class TransformationError(BaseModel): """ The error if the transformation failed. """ @@ -33,7 +33,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of TransformationTryResponseError from a JSON string""" + """Create an instance of TransformationError from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -55,7 +55,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TransformationTryResponseError from a dict""" + """Create an instance of TransformationError from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_try_response.py b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_try_response.py index 19cfbe55c9..3d02ffb6b2 100644 --- a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_try_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/transformation_try_response.py @@ -11,9 +11,7 @@ from pydantic import BaseModel, ConfigDict, Field -from algoliasearch.ingestion.models.transformation_try_response_error import ( - TransformationTryResponseError, -) +from algoliasearch.ingestion.models.transformation_error import TransformationError class TransformationTryResponse(BaseModel): @@ -24,7 +22,7 @@ class TransformationTryResponse(BaseModel): payloads: List[Dict[str, Any]] = Field( description="The array of records returned by the transformation service." ) - error: Optional[TransformationTryResponseError] = None + error: Optional[TransformationError] = None model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -70,7 +68,7 @@ def from_dict(cls, obj: Dict) -> Self: { "payloads": obj.get("payloads"), "error": ( - TransformationTryResponseError.from_dict(obj.get("error")) + TransformationError.from_dict(obj.get("error")) if obj.get("error") is not None else None ), diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/get_servers403_response.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/bad_request.py similarity index 88% rename from clients/algoliasearch-client-python/algoliasearch/monitoring/models/get_servers403_response.py rename to clients/algoliasearch-client-python/algoliasearch/monitoring/models/bad_request.py index 0c47b480ff..ec92a5064b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/get_servers403_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/bad_request.py @@ -12,9 +12,9 @@ from pydantic import BaseModel, ConfigDict, StrictStr -class GetServers403Response(BaseModel): +class BadRequest(BaseModel): """ - GetServers403Response + BadRequest """ reason: Optional[StrictStr] = None @@ -28,7 +28,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of GetServers403Response from a JSON string""" + """Create an instance of BadRequest from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -50,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetServers403Response from a dict""" + """Create an instance of BadRequest from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/forbidden.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/forbidden.py new file mode 100644 index 0000000000..3a6c8c94e5 --- /dev/null +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/forbidden.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" +Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +""" + +from __future__ import annotations + +from json import loads +from typing import Any, Dict, Optional, Self + +from pydantic import BaseModel, ConfigDict, StrictStr + + +class Forbidden(BaseModel): + """ + Forbidden + """ + + reason: Optional[StrictStr] = None + + model_config = ConfigDict( + use_enum_values=True, populate_by_name=True, validate_assignment=True + ) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Forbidden from a JSON string""" + return cls.from_dict(loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + _dict = self.model_dump( + by_alias=True, + exclude={}, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Dict) -> Self: + """Create an instance of Forbidden from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"reason": obj.get("reason")}) + return _obj diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/incidents_inner.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/incident_entry.py similarity index 91% rename from clients/algoliasearch-client-python/algoliasearch/monitoring/models/incidents_inner.py rename to clients/algoliasearch-client-python/algoliasearch/monitoring/models/incident_entry.py index aca55e5977..1afd5e10b4 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/incidents_inner.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/incident_entry.py @@ -14,9 +14,9 @@ from algoliasearch.monitoring.models.incident import Incident -class IncidentsInner(BaseModel): +class IncidentEntry(BaseModel): """ - IncidentsInner + IncidentEntry """ t: Optional[StrictInt] = Field( @@ -34,7 +34,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of IncidentsInner from a JSON string""" + """Create an instance of IncidentEntry from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -58,7 +58,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of IncidentsInner from a dict""" + """Create an instance of IncidentEntry from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/incidents_response.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/incidents_response.py index 5a5ba655ab..2359facefb 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/incidents_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/incidents_response.py @@ -11,7 +11,7 @@ from pydantic import BaseModel, ConfigDict -from algoliasearch.monitoring.models.incidents_inner import IncidentsInner +from algoliasearch.monitoring.models.incident_entry import IncidentEntry class IncidentsResponse(BaseModel): @@ -19,7 +19,7 @@ class IncidentsResponse(BaseModel): IncidentsResponse """ - incidents: Optional[Dict[str, List[IncidentsInner]]] = None + incidents: Optional[Dict[str, List[IncidentEntry]]] = None model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -72,7 +72,7 @@ def from_dict(cls, obj: Dict) -> Self: "incidents": dict( ( _k, - [IncidentsInner.from_dict(_item) for _item in _v] + [IncidentEntry.from_dict(_item) for _item in _v] if _v is not None else None, ) diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_time_response_metrics.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_metric.py similarity index 83% rename from clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_time_response_metrics.py rename to clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_metric.py index 8c58e8b7ee..2dd7f123c5 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_time_response_metrics.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_metric.py @@ -11,15 +11,15 @@ from pydantic import BaseModel, ConfigDict -from algoliasearch.monitoring.models.time_inner import TimeInner +from algoliasearch.monitoring.models.time_entry import TimeEntry -class IndexingTimeResponseMetrics(BaseModel): +class IndexingMetric(BaseModel): """ - IndexingTimeResponseMetrics + IndexingMetric """ - indexing: Optional[Dict[str, List[TimeInner]]] = None + indexing: Optional[Dict[str, List[TimeEntry]]] = None model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -30,7 +30,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of IndexingTimeResponseMetrics from a JSON string""" + """Create an instance of IndexingMetric from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -60,7 +60,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of IndexingTimeResponseMetrics from a dict""" + """Create an instance of IndexingMetric from a dict""" if obj is None: return None @@ -72,7 +72,7 @@ def from_dict(cls, obj: Dict) -> Self: "indexing": dict( ( _k, - [TimeInner.from_dict(_item) for _item in _v] + [TimeEntry.from_dict(_item) for _item in _v] if _v is not None else None, ) diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_time_response.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_time_response.py index 7c22cbe206..2978f1d0d4 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_time_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/indexing_time_response.py @@ -11,9 +11,7 @@ from pydantic import BaseModel, ConfigDict -from algoliasearch.monitoring.models.indexing_time_response_metrics import ( - IndexingTimeResponseMetrics, -) +from algoliasearch.monitoring.models.indexing_metric import IndexingMetric class IndexingTimeResponse(BaseModel): @@ -21,7 +19,7 @@ class IndexingTimeResponse(BaseModel): IndexingTimeResponse """ - metrics: Optional[IndexingTimeResponseMetrics] = None + metrics: Optional[IndexingMetric] = None model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -66,7 +64,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "metrics": ( - IndexingTimeResponseMetrics.from_dict(obj.get("metrics")) + IndexingMetric.from_dict(obj.get("metrics")) if obj.get("metrics") is not None else None ) diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/infrastructure_response.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/infrastructure_response.py index 80dd7843ee..16458fd4e1 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/infrastructure_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/infrastructure_response.py @@ -11,9 +11,7 @@ from pydantic import BaseModel, ConfigDict -from algoliasearch.monitoring.models.infrastructure_response_metrics import ( - InfrastructureResponseMetrics, -) +from algoliasearch.monitoring.models.metrics import Metrics class InfrastructureResponse(BaseModel): @@ -21,7 +19,7 @@ class InfrastructureResponse(BaseModel): InfrastructureResponse """ - metrics: Optional[InfrastructureResponseMetrics] = None + metrics: Optional[Metrics] = None model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -66,7 +64,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "metrics": ( - InfrastructureResponseMetrics.from_dict(obj.get("metrics")) + Metrics.from_dict(obj.get("metrics")) if obj.get("metrics") is not None else None ) diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_response_metrics.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_metric.py similarity index 84% rename from clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_response_metrics.py rename to clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_metric.py index f925a25704..ccccdb5014 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_response_metrics.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_metric.py @@ -11,15 +11,15 @@ from pydantic import BaseModel, ConfigDict -from algoliasearch.monitoring.models.time_inner import TimeInner +from algoliasearch.monitoring.models.time_entry import TimeEntry -class LatencyResponseMetrics(BaseModel): +class LatencyMetric(BaseModel): """ - LatencyResponseMetrics + LatencyMetric """ - latency: Optional[Dict[str, List[TimeInner]]] = None + latency: Optional[Dict[str, List[TimeEntry]]] = None model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -30,7 +30,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of LatencyResponseMetrics from a JSON string""" + """Create an instance of LatencyMetric from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -60,7 +60,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of LatencyResponseMetrics from a dict""" + """Create an instance of LatencyMetric from a dict""" if obj is None: return None @@ -72,7 +72,7 @@ def from_dict(cls, obj: Dict) -> Self: "latency": dict( ( _k, - [TimeInner.from_dict(_item) for _item in _v] + [TimeEntry.from_dict(_item) for _item in _v] if _v is not None else None, ) diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_response.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_response.py index e718a3dcee..858eac0690 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/latency_response.py @@ -11,9 +11,7 @@ from pydantic import BaseModel, ConfigDict -from algoliasearch.monitoring.models.latency_response_metrics import ( - LatencyResponseMetrics, -) +from algoliasearch.monitoring.models.latency_metric import LatencyMetric class LatencyResponse(BaseModel): @@ -21,7 +19,7 @@ class LatencyResponse(BaseModel): LatencyResponse """ - metrics: Optional[LatencyResponseMetrics] = None + metrics: Optional[LatencyMetric] = None model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -66,7 +64,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "metrics": ( - LatencyResponseMetrics.from_dict(obj.get("metrics")) + LatencyMetric.from_dict(obj.get("metrics")) if obj.get("metrics") is not None else None ) diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/infrastructure_response_metrics.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/metrics.py similarity index 96% rename from clients/algoliasearch-client-python/algoliasearch/monitoring/models/infrastructure_response_metrics.py rename to clients/algoliasearch-client-python/algoliasearch/monitoring/models/metrics.py index 05ea4ce5f6..dd80c779c4 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/infrastructure_response_metrics.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/metrics.py @@ -14,9 +14,9 @@ from algoliasearch.monitoring.models.probes_metric import ProbesMetric -class InfrastructureResponseMetrics(BaseModel): +class Metrics(BaseModel): """ - InfrastructureResponseMetrics + Metrics """ cpu_usage: Optional[Dict[str, List[ProbesMetric]]] = Field( @@ -45,7 +45,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of InfrastructureResponseMetrics from a JSON string""" + """Create an instance of Metrics from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -107,7 +107,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of InfrastructureResponseMetrics from a dict""" + """Create an instance of Metrics from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/time_inner.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/time_entry.py similarity index 91% rename from clients/algoliasearch-client-python/algoliasearch/monitoring/models/time_inner.py rename to clients/algoliasearch-client-python/algoliasearch/monitoring/models/time_entry.py index e7d58d5cab..eb50894293 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/time_inner.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/time_entry.py @@ -12,9 +12,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt -class TimeInner(BaseModel): +class TimeEntry(BaseModel): """ - TimeInner + TimeEntry """ t: Optional[StrictInt] = Field( @@ -32,7 +32,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of TimeInner from a JSON string""" + """Create an instance of TimeEntry from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -54,7 +54,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TimeInner from a dict""" + """Create an instance of TimeEntry from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/models/unauthorized.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/unauthorized.py new file mode 100644 index 0000000000..fadef00eb9 --- /dev/null +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/models/unauthorized.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" +Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +""" + +from __future__ import annotations + +from json import loads +from typing import Any, Dict, Optional, Self + +from pydantic import BaseModel, ConfigDict, StrictStr + + +class Unauthorized(BaseModel): + """ + Unauthorized + """ + + reason: Optional[StrictStr] = None + + model_config = ConfigDict( + use_enum_values=True, populate_by_name=True, validate_assignment=True + ) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Unauthorized from a JSON string""" + return cls.from_dict(loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + _dict = self.model_dump( + by_alias=True, + exclude={}, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Dict) -> Self: + """Create an instance of Unauthorized from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"reason": obj.get("reason")}) + return _obj diff --git a/clients/algoliasearch-client-python/algoliasearch/query_suggestions/client.py b/clients/algoliasearch-client-python/algoliasearch/query_suggestions/client.py index c3db54e618..a154184520 100644 --- a/clients/algoliasearch-client-python/algoliasearch/query_suggestions/client.py +++ b/clients/algoliasearch-client-python/algoliasearch/query_suggestions/client.py @@ -19,6 +19,7 @@ from algoliasearch.http.verb import Verb from algoliasearch.query_suggestions.config import QuerySuggestionsConfig from algoliasearch.query_suggestions.models.base_response import BaseResponse +from algoliasearch.query_suggestions.models.config_status import ConfigStatus from algoliasearch.query_suggestions.models.configuration import Configuration from algoliasearch.query_suggestions.models.configuration_response import ( ConfigurationResponse, @@ -26,12 +27,7 @@ from algoliasearch.query_suggestions.models.configuration_with_index import ( ConfigurationWithIndex, ) -from algoliasearch.query_suggestions.models.get_config_status200_response import ( - GetConfigStatus200Response, -) -from algoliasearch.query_suggestions.models.get_log_file200_response import ( - GetLogFile200Response, -) +from algoliasearch.query_suggestions.models.log_file import LogFile class QuerySuggestionsClient: @@ -701,7 +697,7 @@ async def get_config_status( StrictStr, Field(description="Query Suggestions index name.") ], request_options: Optional[Union[dict, RequestOptions]] = None, - ) -> GetConfigStatus200Response: + ) -> ConfigStatus: """ Reports the status of a Query Suggestions index. @@ -711,11 +707,11 @@ async def get_config_status( :param index_name: Query Suggestions index name. (required) :type index_name: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - :return: Returns the deserialized response in a 'GetConfigStatus200Response' result object. + :return: Returns the deserialized response in a 'ConfigStatus' result object. """ return ( await self.get_config_status_with_http_info(index_name, request_options) - ).deserialize(GetConfigStatus200Response) + ).deserialize(ConfigStatus) async def get_log_file_with_http_info( self, @@ -758,7 +754,7 @@ async def get_log_file( StrictStr, Field(description="Query Suggestions index name.") ], request_options: Optional[Union[dict, RequestOptions]] = None, - ) -> GetLogFile200Response: + ) -> LogFile: """ Retrieves the logs for a single Query Suggestions index. @@ -768,11 +764,11 @@ async def get_log_file( :param index_name: Query Suggestions index name. (required) :type index_name: str :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - :return: Returns the deserialized response in a 'GetLogFile200Response' result object. + :return: Returns the deserialized response in a 'LogFile' result object. """ return ( await self.get_log_file_with_http_info(index_name, request_options) - ).deserialize(GetLogFile200Response) + ).deserialize(LogFile) async def update_config_with_http_info( self, diff --git a/clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/get_config_status200_response.py b/clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/config_status.py similarity index 92% rename from clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/get_config_status200_response.py rename to clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/config_status.py index cb61ce7d56..f6d3aee62b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/get_config_status200_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/config_status.py @@ -12,9 +12,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -class GetConfigStatus200Response(BaseModel): +class ConfigStatus(BaseModel): """ - GetConfigStatus200Response + ConfigStatus """ index_name: Optional[StrictStr] = Field( @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of GetConfigStatus200Response from a JSON string""" + """Create an instance of ConfigStatus from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetConfigStatus200Response from a dict""" + """Create an instance of ConfigStatus from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/get_log_file200_response.py b/clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/log_file.py similarity index 92% rename from clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/get_log_file200_response.py rename to clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/log_file.py index 6a72146c1a..acff455db1 100644 --- a/clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/get_log_file200_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/query_suggestions/models/log_file.py @@ -14,9 +14,9 @@ from algoliasearch.query_suggestions.models.log_level import LogLevel -class GetLogFile200Response(BaseModel): +class LogFile(BaseModel): """ - GetLogFile200Response + LogFile """ timestamp: Optional[StrictStr] = Field( @@ -41,7 +41,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of GetLogFile200Response from a JSON string""" + """Create an instance of LogFile from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -63,7 +63,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetLogFile200Response from a dict""" + """Create an instance of LogFile from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision.py index 5d43c4b371..5ff34b3be3 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision.py @@ -11,9 +11,7 @@ from pydantic import BaseModel, Field, StrictInt, ValidationError, model_serializer -from algoliasearch.recommend.models.around_precision_from_value_inner import ( - AroundPrecisionFromValueInner, -) +from algoliasearch.recommend.models.range import Range class AroundPrecision(BaseModel): @@ -25,8 +23,8 @@ class AroundPrecision(BaseModel): default=10, description="Distance in meters to group results by similar distances. For example, if you set `aroundPrecision` to 100, records wihin 100 meters to the central coordinate are considered to have the same distance, as are records between 100 and 199 meters. ", ) - oneof_schema_2_validator: Optional[List[AroundPrecisionFromValueInner]] = None - actual_instance: Optional[Union[List[AroundPrecisionFromValueInner], int]] = None + oneof_schema_2_validator: Optional[List[Range]] = None + actual_instance: Optional[Union[List[Range], int]] = None def __init__(self, *args, **kwargs) -> None: if args: @@ -43,9 +41,7 @@ def __init__(self, *args, **kwargs) -> None: super().__init__(**kwargs) @model_serializer - def unwrap_actual_instance( - self, - ) -> Optional[Union[List[AroundPrecisionFromValueInner], int]]: + def unwrap_actual_instance(self) -> Optional[Union[List[Range], int]]: """ Unwraps the `actual_instance` when calling the `to_json` method. """ @@ -77,7 +73,7 @@ def from_json(cls, json_str: str) -> Self: error_messages.append(str(e)) raise ValueError( - "No match found when deserializing the JSON string into AroundPrecision with oneOf schemas: List[AroundPrecisionFromValueInner], int. Details: " + "No match found when deserializing the JSON string into AroundPrecision with oneOf schemas: List[Range], int. Details: " + ", ".join(error_messages) ) diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision_from_value_inner.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/range.py similarity index 90% rename from clients/algoliasearch-client-python/algoliasearch/search/models/around_precision_from_value_inner.py rename to clients/algoliasearch-client-python/algoliasearch/recommend/models/range.py index 97fe6d28d3..9c8bc91a5c 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision_from_value_inner.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/range.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt -class AroundPrecisionFromValueInner(BaseModel): +class Range(BaseModel): """ Range object with lower and upper values in meters to define custom ranges. """ @@ -36,7 +36,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of AroundPrecisionFromValueInner from a JSON string""" + """Create an instance of Range from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -58,7 +58,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AroundPrecisionFromValueInner from a dict""" + """Create an instance of Range from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_rule.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_rule.py index d96bde9e11..334e51be36 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_rule.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_rule.py @@ -13,7 +13,7 @@ from algoliasearch.recommend.models.condition import Condition from algoliasearch.recommend.models.consequence import Consequence -from algoliasearch.recommend.models.recommend_rule_metadata import RecommendRuleMetadata +from algoliasearch.recommend.models.rule_metadata import RuleMetadata class RecommendRule(BaseModel): @@ -21,7 +21,7 @@ class RecommendRule(BaseModel): Recommend rule. """ - metadata: Optional[RecommendRuleMetadata] = Field(default=None, alias="_metadata") + metadata: Optional[RuleMetadata] = Field(default=None, alias="_metadata") object_id: Optional[StrictStr] = Field( default=None, description="Unique identifier of a rule object.", @@ -85,7 +85,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "_metadata": ( - RecommendRuleMetadata.from_dict(obj.get("_metadata")) + RuleMetadata.from_dict(obj.get("_metadata")) if obj.get("_metadata") is not None else None ), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_metadata_data.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_data.py similarity index 88% rename from clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_metadata_data.py rename to clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_data.py index 28b3d5b651..48a692e88a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_metadata_data.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_data.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr -class RedirectRuleIndexMetadataData(BaseModel): +class RedirectRuleIndexData(BaseModel): """ Redirect rule data. """ @@ -28,7 +28,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of RedirectRuleIndexMetadataData from a JSON string""" + """Create an instance of RedirectRuleIndexData from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -50,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of RedirectRuleIndexMetadataData from a dict""" + """Create an instance of RedirectRuleIndexData from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_metadata.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_metadata.py index c8cb3ed4c7..8cc873e2e9 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_metadata.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_metadata.py @@ -11,8 +11,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from algoliasearch.recommend.models.redirect_rule_index_metadata_data import ( - RedirectRuleIndexMetadataData, +from algoliasearch.recommend.models.redirect_rule_index_data import ( + RedirectRuleIndexData, ) @@ -25,7 +25,7 @@ class RedirectRuleIndexMetadata(BaseModel): dest: StrictStr = Field(description="Destination index for the redirect rule.") reason: StrictStr = Field(description="Reason for the redirect rule.") succeed: StrictBool = Field(description="Redirect rule status.") - data: RedirectRuleIndexMetadataData + data: RedirectRuleIndexData model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -74,7 +74,7 @@ def from_dict(cls, obj: Dict) -> Self: "reason": obj.get("reason"), "succeed": obj.get("succeed"), "data": ( - RedirectRuleIndexMetadataData.from_dict(obj.get("data")) + RedirectRuleIndexData.from_dict(obj.get("data")) if obj.get("data") is not None else None ), diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_rule_metadata.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/rule_metadata.py similarity index 90% rename from clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_rule_metadata.py rename to clients/algoliasearch-client-python/algoliasearch/recommend/models/rule_metadata.py index 8704e76684..2b07f1148f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_rule_metadata.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/rule_metadata.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr -class RecommendRuleMetadata(BaseModel): +class RuleMetadata(BaseModel): """ Rule metadata. """ @@ -32,7 +32,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of RecommendRuleMetadata from a JSON string""" + """Create an instance of RuleMetadata from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -54,7 +54,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of RecommendRuleMetadata from a dict""" + """Create an instance of RuleMetadata from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision.py b/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision.py index 896986f419..6560b1dcd7 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/around_precision.py @@ -11,9 +11,7 @@ from pydantic import BaseModel, Field, StrictInt, ValidationError, model_serializer -from algoliasearch.search.models.around_precision_from_value_inner import ( - AroundPrecisionFromValueInner, -) +from algoliasearch.search.models.range import Range class AroundPrecision(BaseModel): @@ -25,8 +23,8 @@ class AroundPrecision(BaseModel): default=10, description="Distance in meters to group results by similar distances. For example, if you set `aroundPrecision` to 100, records wihin 100 meters to the central coordinate are considered to have the same distance, as are records between 100 and 199 meters. ", ) - oneof_schema_2_validator: Optional[List[AroundPrecisionFromValueInner]] = None - actual_instance: Optional[Union[List[AroundPrecisionFromValueInner], int]] = None + oneof_schema_2_validator: Optional[List[Range]] = None + actual_instance: Optional[Union[List[Range], int]] = None def __init__(self, *args, **kwargs) -> None: if args: @@ -43,9 +41,7 @@ def __init__(self, *args, **kwargs) -> None: super().__init__(**kwargs) @model_serializer - def unwrap_actual_instance( - self, - ) -> Optional[Union[List[AroundPrecisionFromValueInner], int]]: + def unwrap_actual_instance(self) -> Optional[Union[List[Range], int]]: """ Unwraps the `actual_instance` when calling the `to_json` method. """ @@ -77,7 +73,7 @@ def from_json(cls, json_str: str) -> Self: error_messages.append(str(e)) raise ValueError( - "No match found when deserializing the JSON string into AroundPrecision with oneOf schemas: List[AroundPrecisionFromValueInner], int. Details: " + "No match found when deserializing the JSON string into AroundPrecision with oneOf schemas: List[Range], int. Details: " + ", ".join(error_messages) ) diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision_from_value_inner.py b/clients/algoliasearch-client-python/algoliasearch/search/models/range.py similarity index 90% rename from clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision_from_value_inner.py rename to clients/algoliasearch-client-python/algoliasearch/search/models/range.py index 97fe6d28d3..9c8bc91a5c 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/around_precision_from_value_inner.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/range.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt -class AroundPrecisionFromValueInner(BaseModel): +class Range(BaseModel): """ Range object with lower and upper values in meters to define custom ranges. """ @@ -36,7 +36,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of AroundPrecisionFromValueInner from a JSON string""" + """Create an instance of Range from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -58,7 +58,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AroundPrecisionFromValueInner from a dict""" + """Create an instance of Range from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_metadata_data.py b/clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_data.py similarity index 88% rename from clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_metadata_data.py rename to clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_data.py index 28b3d5b651..48a692e88a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/redirect_rule_index_metadata_data.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_data.py @@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr -class RedirectRuleIndexMetadataData(BaseModel): +class RedirectRuleIndexData(BaseModel): """ Redirect rule data. """ @@ -28,7 +28,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of RedirectRuleIndexMetadataData from a JSON string""" + """Create an instance of RedirectRuleIndexData from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -50,7 +50,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of RedirectRuleIndexMetadataData from a dict""" + """Create an instance of RedirectRuleIndexData from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_metadata.py b/clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_metadata.py index 2cda53f3e8..363cea82fc 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_metadata.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/redirect_rule_index_metadata.py @@ -11,9 +11,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from algoliasearch.search.models.redirect_rule_index_metadata_data import ( - RedirectRuleIndexMetadataData, -) +from algoliasearch.search.models.redirect_rule_index_data import RedirectRuleIndexData class RedirectRuleIndexMetadata(BaseModel): @@ -25,7 +23,7 @@ class RedirectRuleIndexMetadata(BaseModel): dest: StrictStr = Field(description="Destination index for the redirect rule.") reason: StrictStr = Field(description="Reason for the redirect rule.") succeed: StrictBool = Field(description="Redirect rule status.") - data: RedirectRuleIndexMetadataData + data: RedirectRuleIndexData model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -74,7 +72,7 @@ def from_dict(cls, obj: Dict) -> Self: "reason": obj.get("reason"), "succeed": obj.get("succeed"), "data": ( - RedirectRuleIndexMetadataData.from_dict(obj.get("data")) + RedirectRuleIndexData.from_dict(obj.get("data")) if obj.get("data") is not None else None ), diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_string.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_string.py index af1eb74737..3320cb12de 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_string.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_string.py @@ -14,7 +14,7 @@ class SearchParamsString(BaseModel): """ - SearchParamsString + Search parameters as query string. """ params: Optional[StrictStr] = Field( diff --git a/clients/algoliasearch-client-python/algoliasearch/usage/client.py b/clients/algoliasearch-client-python/algoliasearch/usage/client.py index a9b89524f4..ec3adf5f0a 100644 --- a/clients/algoliasearch-client-python/algoliasearch/usage/client.py +++ b/clients/algoliasearch-client-python/algoliasearch/usage/client.py @@ -18,8 +18,8 @@ from algoliasearch.http.transporter import Transporter from algoliasearch.http.verb import Verb from algoliasearch.usage.config import UsageConfig -from algoliasearch.usage.models.get_usage200_response import GetUsage200Response from algoliasearch.usage.models.granularity import Granularity +from algoliasearch.usage.models.index_usage import IndexUsage from algoliasearch.usage.models.statistic import Statistic @@ -559,7 +559,7 @@ async def get_index_usage( ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, - ) -> GetUsage200Response: + ) -> IndexUsage: """ Retrieves the selected usage statistics for one index. @@ -575,7 +575,7 @@ async def get_index_usage( :param granularity: Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. :type granularity: Granularity :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - :return: Returns the deserialized response in a 'GetUsage200Response' result object. + :return: Returns the deserialized response in a 'IndexUsage' result object. """ return ( await self.get_index_usage_with_http_info( @@ -586,7 +586,7 @@ async def get_index_usage( granularity, request_options, ) - ).deserialize(GetUsage200Response) + ).deserialize(IndexUsage) async def get_usage_with_http_info( self, @@ -695,7 +695,7 @@ async def get_usage( ), ] = None, request_options: Optional[Union[dict, RequestOptions]] = None, - ) -> GetUsage200Response: + ) -> IndexUsage: """ Retrieves usage statistics evaluated over a specified period. @@ -709,10 +709,10 @@ async def get_usage( :param granularity: Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. :type granularity: Granularity :param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - :return: Returns the deserialized response in a 'GetUsage200Response' result object. + :return: Returns the deserialized response in a 'IndexUsage' result object. """ return ( await self.get_usage_with_http_info( statistic, start_date, end_date, granularity, request_options ) - ).deserialize(GetUsage200Response) + ).deserialize(IndexUsage) diff --git a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage400_response_error_errors_inner.py b/clients/algoliasearch-client-python/algoliasearch/usage/models/error_item.py similarity index 87% rename from clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage400_response_error_errors_inner.py rename to clients/algoliasearch-client-python/algoliasearch/usage/models/error_item.py index c4e7ca5552..de45822e74 100644 --- a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage400_response_error_errors_inner.py +++ b/clients/algoliasearch-client-python/algoliasearch/usage/models/error_item.py @@ -12,9 +12,9 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -class GetUsage400ResponseErrorErrorsInner(BaseModel): +class ErrorItem(BaseModel): """ - GetUsage400ResponseErrorErrorsInner + ErrorItem """ code: Optional[StrictStr] = None @@ -31,7 +31,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of GetUsage400ResponseErrorErrorsInner from a JSON string""" + """Create an instance of ErrorItem from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -53,7 +53,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetUsage400ResponseErrorErrorsInner from a dict""" + """Create an instance of ErrorItem from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage400_response.py b/clients/algoliasearch-client-python/algoliasearch/usage/models/forbidden.py similarity index 80% rename from clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage400_response.py rename to clients/algoliasearch-client-python/algoliasearch/usage/models/forbidden.py index 9b3ce5b48d..e88ae5058e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage400_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/usage/models/forbidden.py @@ -11,17 +11,15 @@ from pydantic import BaseModel, ConfigDict -from algoliasearch.usage.models.get_usage400_response_error import ( - GetUsage400ResponseError, -) +from algoliasearch.usage.models.forbidden_error import ForbiddenError -class GetUsage400Response(BaseModel): +class Forbidden(BaseModel): """ - GetUsage400Response + Forbidden """ - error: GetUsage400ResponseError + error: ForbiddenError model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -32,7 +30,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of GetUsage400Response from a JSON string""" + """Create an instance of Forbidden from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -56,7 +54,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetUsage400Response from a dict""" + """Create an instance of Forbidden from a dict""" if obj is None: return None @@ -66,7 +64,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "error": ( - GetUsage400ResponseError.from_dict(obj.get("error")) + ForbiddenError.from_dict(obj.get("error")) if obj.get("error") is not None else None ) diff --git a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage400_response_error.py b/clients/algoliasearch-client-python/algoliasearch/usage/models/forbidden_error.py similarity index 77% rename from clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage400_response_error.py rename to clients/algoliasearch-client-python/algoliasearch/usage/models/forbidden_error.py index 5af5271d05..045962aa92 100644 --- a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage400_response_error.py +++ b/clients/algoliasearch-client-python/algoliasearch/usage/models/forbidden_error.py @@ -11,19 +11,17 @@ from pydantic import BaseModel, ConfigDict, StrictStr -from algoliasearch.usage.models.get_usage400_response_error_errors_inner import ( - GetUsage400ResponseErrorErrorsInner, -) +from algoliasearch.usage.models.error_item import ErrorItem -class GetUsage400ResponseError(BaseModel): +class ForbiddenError(BaseModel): """ - GetUsage400ResponseError + ForbiddenError """ code: Optional[StrictStr] = None message: Optional[StrictStr] = None - errors: Optional[List[GetUsage400ResponseErrorErrorsInner]] = None + errors: Optional[List[ErrorItem]] = None model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -34,7 +32,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of GetUsage400ResponseError from a JSON string""" + """Create an instance of ForbiddenError from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -62,7 +60,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetUsage400ResponseError from a dict""" + """Create an instance of ForbiddenError from a dict""" if obj is None: return None @@ -74,10 +72,7 @@ def from_dict(cls, obj: Dict) -> Self: "code": obj.get("code"), "message": obj.get("message"), "errors": ( - [ - GetUsage400ResponseErrorErrorsInner.from_dict(_item) - for _item in obj.get("errors") - ] + [ErrorItem.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None ), diff --git a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage200_response.py b/clients/algoliasearch-client-python/algoliasearch/usage/models/index_usage.py similarity index 76% rename from clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage200_response.py rename to clients/algoliasearch-client-python/algoliasearch/usage/models/index_usage.py index 878751f08a..c322e19615 100644 --- a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage200_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/usage/models/index_usage.py @@ -11,17 +11,15 @@ from pydantic import BaseModel, ConfigDict -from algoliasearch.usage.models.get_usage200_response_statistics_inner import ( - GetUsage200ResponseStatisticsInner, -) +from algoliasearch.usage.models.statistic_entry import StatisticEntry -class GetUsage200Response(BaseModel): +class IndexUsage(BaseModel): """ - GetUsage200Response + IndexUsage """ - statistics: Optional[List[GetUsage200ResponseStatisticsInner]] = None + statistics: Optional[List[StatisticEntry]] = None model_config = ConfigDict( use_enum_values=True, populate_by_name=True, validate_assignment=True @@ -32,7 +30,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of GetUsage200Response from a JSON string""" + """Create an instance of IndexUsage from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -60,7 +58,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetUsage200Response from a dict""" + """Create an instance of IndexUsage from a dict""" if obj is None: return None @@ -70,10 +68,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate( { "statistics": ( - [ - GetUsage200ResponseStatisticsInner.from_dict(_item) - for _item in obj.get("statistics") - ] + [StatisticEntry.from_dict(_item) for _item in obj.get("statistics")] if obj.get("statistics") is not None else None ) diff --git a/clients/algoliasearch-client-python/algoliasearch/usage/models/invalid_request.py b/clients/algoliasearch-client-python/algoliasearch/usage/models/invalid_request.py new file mode 100644 index 0000000000..1737c61874 --- /dev/null +++ b/clients/algoliasearch-client-python/algoliasearch/usage/models/invalid_request.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" +Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +""" + +from __future__ import annotations + +from json import loads +from typing import Any, Dict, Self + +from pydantic import BaseModel, ConfigDict + +from algoliasearch.usage.models.invalid_request_error import InvalidRequestError + + +class InvalidRequest(BaseModel): + """ + InvalidRequest + """ + + error: InvalidRequestError + + model_config = ConfigDict( + use_enum_values=True, populate_by_name=True, validate_assignment=True + ) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InvalidRequest from a JSON string""" + return cls.from_dict(loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + _dict = self.model_dump( + by_alias=True, + exclude={}, + exclude_none=True, + ) + if self.error: + _dict["error"] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Dict) -> Self: + """Create an instance of InvalidRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "error": ( + InvalidRequestError.from_dict(obj.get("error")) + if obj.get("error") is not None + else None + ) + } + ) + return _obj diff --git a/clients/algoliasearch-client-python/algoliasearch/usage/models/invalid_request_error.py b/clients/algoliasearch-client-python/algoliasearch/usage/models/invalid_request_error.py new file mode 100644 index 0000000000..309fef7c99 --- /dev/null +++ b/clients/algoliasearch-client-python/algoliasearch/usage/models/invalid_request_error.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" +Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +""" + +from __future__ import annotations + +from json import loads +from typing import Any, Dict, List, Optional, Self + +from pydantic import BaseModel, ConfigDict, StrictStr + +from algoliasearch.usage.models.error_item import ErrorItem + + +class InvalidRequestError(BaseModel): + """ + InvalidRequestError + """ + + code: Optional[StrictStr] = None + message: Optional[StrictStr] = None + errors: Optional[List[ErrorItem]] = None + + model_config = ConfigDict( + use_enum_values=True, populate_by_name=True, validate_assignment=True + ) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InvalidRequestError from a JSON string""" + return cls.from_dict(loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + _dict = self.model_dump( + by_alias=True, + exclude={}, + exclude_none=True, + ) + _items = [] + if self.errors: + for _item in self.errors: + if _item: + _items.append(_item.to_dict()) + _dict["errors"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Dict) -> Self: + """Create an instance of InvalidRequestError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "code": obj.get("code"), + "message": obj.get("message"), + "errors": ( + [ErrorItem.from_dict(_item) for _item in obj.get("errors")] + if obj.get("errors") is not None + else None + ), + } + ) + return _obj diff --git a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage200_response_statistics_inner.py b/clients/algoliasearch-client-python/algoliasearch/usage/models/statistic_entry.py similarity index 88% rename from clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage200_response_statistics_inner.py rename to clients/algoliasearch-client-python/algoliasearch/usage/models/statistic_entry.py index 3210d1439d..b1b0ee0883 100644 --- a/clients/algoliasearch-client-python/algoliasearch/usage/models/get_usage200_response_statistics_inner.py +++ b/clients/algoliasearch-client-python/algoliasearch/usage/models/statistic_entry.py @@ -14,9 +14,9 @@ from algoliasearch.usage.models.statistic_value import StatisticValue -class GetUsage200ResponseStatisticsInner(BaseModel): +class StatisticEntry(BaseModel): """ - GetUsage200ResponseStatisticsInner + StatisticEntry """ t: Optional[StrictInt] = Field( @@ -34,7 +34,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of GetUsage200ResponseStatisticsInner from a JSON string""" + """Create an instance of StatisticEntry from a JSON string""" return cls.from_dict(loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -58,7 +58,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetUsage200ResponseStatisticsInner from a dict""" + """Create an instance of StatisticEntry from a dict""" if obj is None: return None diff --git a/clients/algoliasearch-client-ruby/lib/algolia/api/query_suggestions_client.rb b/clients/algoliasearch-client-ruby/lib/algolia/api/query_suggestions_client.rb index ef0e9ea998..e4b6aaa9c5 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/api/query_suggestions_client.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/api/query_suggestions_client.rb @@ -428,13 +428,10 @@ def get_config_status_with_http_info(index_name, request_options = {}) # - settings # @param index_name [String] Query Suggestions index name. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - # @return [GetConfigStatus200Response] + # @return [ConfigStatus] def get_config_status(index_name, request_options = {}) response = get_config_status_with_http_info(index_name, request_options) - @api_client.deserialize( - response.body, - request_options[:debug_return_type] || "QuerySuggestions::GetConfigStatus200Response" - ) + @api_client.deserialize(response.body, request_options[:debug_return_type] || "QuerySuggestions::ConfigStatus") end # Retrieves the logs for a single Query Suggestions index. @@ -475,13 +472,10 @@ def get_log_file_with_http_info(index_name, request_options = {}) # - settings # @param index_name [String] Query Suggestions index name. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - # @return [GetLogFile200Response] + # @return [LogFile] def get_log_file(index_name, request_options = {}) response = get_log_file_with_http_info(index_name, request_options) - @api_client.deserialize( - response.body, - request_options[:debug_return_type] || "QuerySuggestions::GetLogFile200Response" - ) + @api_client.deserialize(response.body, request_options[:debug_return_type] || "QuerySuggestions::LogFile") end # Updates a QuerySuggestions configuration. diff --git a/clients/algoliasearch-client-ruby/lib/algolia/api/usage_client.rb b/clients/algoliasearch-client-ruby/lib/algolia/api/usage_client.rb index 368c959a0f..e4611b5062 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/api/usage_client.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/api/usage_client.rb @@ -275,7 +275,7 @@ def get_index_usage_with_http_info( # @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format. (required) # @param granularity [Granularity] Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (default to 'daily') # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - # @return [GetUsage200Response] + # @return [IndexUsage] def get_index_usage(statistic, index_name, start_date, end_date, granularity = nil, request_options = {}) response = get_index_usage_with_http_info( statistic, @@ -285,7 +285,7 @@ def get_index_usage(statistic, index_name, start_date, end_date, granularity = n granularity, request_options ) - @api_client.deserialize(response.body, request_options[:debug_return_type] || "Usage::GetUsage200Response") + @api_client.deserialize(response.body, request_options[:debug_return_type] || "Usage::IndexUsage") end # Retrieves usage statistics evaluated over a specified period. @@ -339,10 +339,10 @@ def get_usage_with_http_info(statistic, start_date, end_date, granularity = nil, # @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format. (required) # @param granularity [Granularity] Granularity of the aggregated metrics. - `hourly`: the maximum time range for hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (default to 'daily') # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) - # @return [GetUsage200Response] + # @return [IndexUsage] def get_usage(statistic, start_date, end_date, granularity = nil, request_options = {}) response = get_usage_with_http_info(statistic, start_date, end_date, granularity, request_options) - @api_client.deserialize(response.body, request_options[:debug_return_type] || "Usage::GetUsage200Response") + @api_client.deserialize(response.body, request_options[:debug_return_type] || "Usage::IndexUsage") end end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects_empty_search.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/empty_search_filter.rb similarity index 96% rename from clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects_empty_search.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/empty_search_filter.rb index 24e0c7ef7e..c3bfd4464b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects_empty_search.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/empty_search_filter.rb @@ -6,7 +6,7 @@ module Algolia module Abtesting # Empty searches removed from the A/B test as a result of configuration settings. - class FilterEffectsEmptySearch + class EmptySearchFilter # Number of users removed from the A/B test. attr_accessor :users_count @@ -47,7 +47,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::FilterEffectsEmptySearch` initialize method" + "The input argument (attributes) must be a hash in `Algolia::EmptySearchFilter` initialize method" ) end @@ -56,7 +56,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::FilterEffectsEmptySearch`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::EmptySearchFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects.rb index 3bc86c6cf1..c6bba046ce 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects.rb @@ -27,8 +27,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :outliers => :"FilterEffectsOutliers", - :empty_search => :"FilterEffectsEmptySearch" + :outliers => :"OutliersFilter", + :empty_search => :"EmptySearchFilter" } end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects_outliers.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/outliers_filter.rb similarity index 96% rename from clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects_outliers.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/outliers_filter.rb index 596614dad9..52602b41cc 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/filter_effects_outliers.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/abtesting/outliers_filter.rb @@ -6,7 +6,7 @@ module Algolia module Abtesting # Outliers removed from the A/B test as a result of configuration settings. - class FilterEffectsOutliers + class OutliersFilter # Number of users removed from the A/B test. attr_accessor :users_count @@ -47,7 +47,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::FilterEffectsOutliers` initialize method" + "The input argument (attributes) must be a hash in `Algolia::OutliersFilter` initialize method" ) end @@ -56,7 +56,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::FilterEffectsOutliers`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::OutliersFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/click_positions_inner.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/click_position.rb similarity index 97% rename from clients/algoliasearch-client-ruby/lib/algolia/models/analytics/click_positions_inner.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/analytics/click_position.rb index a1ef63046f..ade3a8f0b5 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/click_positions_inner.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/click_position.rb @@ -6,7 +6,7 @@ module Algolia module Analytics # Click position. - class ClickPositionsInner + class ClickPosition # Range of positions in the search results, using the pattern `[start,end]`. For positions 11 and up, click events are summed over the specified range. `-1` indicates the end of the list of search results. attr_accessor :position @@ -47,7 +47,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::ClickPositionsInner` initialize method" + "The input argument (attributes) must be a hash in `Algolia::ClickPosition` initialize method" ) end @@ -56,7 +56,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::ClickPositionsInner`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::ClickPosition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/get_click_positions_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/get_click_positions_response.rb index 1614d55b04..2df563c540 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/get_click_positions_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/get_click_positions_response.rb @@ -24,7 +24,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :positions => :"Array" + :positions => :"Array" } end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_analytics.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_analytics.rb index 862e625dff..11573be0e5 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_analytics.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_analytics.rb @@ -64,7 +64,7 @@ def self.types_mapping :count => :"Integer", :click_through_rate => :"Float", :average_click_position => :"Float", - :click_positions => :"Array", + :click_positions => :"Array", :conversion_rate => :"Float", :tracked_search_count => :"Integer", :click_count => :"Integer", diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb index b0e2a17e27..09a78f0bbf 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb @@ -84,7 +84,7 @@ def self.types_mapping :count => :"Integer", :click_through_rate => :"Float", :average_click_position => :"Float", - :click_positions => :"Array", + :click_positions => :"Array", :conversion_rate => :"Float", :tracked_search_count => :"Integer", :click_count => :"Integer", diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/docker_streams_input.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/docker_streams_input.rb index 4523fdc8c9..648dacce58 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/docker_streams_input.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/docker_streams_input.rb @@ -5,6 +5,7 @@ module Algolia module Ingestion + # The selected streams of a singer or airbyte connector. class DockerStreamsInput attr_accessor :streams diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_try_response_error.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_error.rb similarity index 97% rename from clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_try_response_error.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_error.rb index 5bc70c561a..77aeec7aa1 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_try_response_error.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_error.rb @@ -6,7 +6,7 @@ module Algolia module Ingestion # The error if the transformation failed. - class TransformationTryResponseError + class TransformationError # The error status code. attr_accessor :code @@ -47,7 +47,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::TransformationTryResponseError` initialize method" + "The input argument (attributes) must be a hash in `Algolia::TransformationError` initialize method" ) end @@ -56,7 +56,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::TransformationTryResponseError`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::TransformationError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_try_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_try_response.rb index 8e31fbeb23..6ee25cb3a7 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_try_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/transformation_try_response.rb @@ -28,7 +28,7 @@ def self.acceptable_attributes def self.types_mapping { :payloads => :"Array", - :error => :"TransformationTryResponseError" + :error => :"TransformationError" } end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/get_servers403_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/bad_request.rb similarity index 96% rename from clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/get_servers403_response.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/bad_request.rb index ff6b236357..50ac2c1142 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/get_servers403_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/bad_request.rb @@ -5,7 +5,7 @@ module Algolia module Monitoring - class GetServers403Response + class BadRequest attr_accessor :reason # Attribute mapping from ruby-style variable name to JSON key. @@ -40,7 +40,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::GetServers403Response` initialize method" + "The input argument (attributes) must be a hash in `Algolia::BadRequest` initialize method" ) end @@ -49,7 +49,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::GetServers403Response`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::BadRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/forbidden.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/forbidden.rb new file mode 100644 index 0000000000..9697a9f6d3 --- /dev/null +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/forbidden.rb @@ -0,0 +1,211 @@ +# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +require "date" +require "time" + +module Algolia + module Monitoring + class Forbidden + attr_accessor :reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :reason => :reason + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.types_mapping + { + :reason => :"String" + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new( + [] + ) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise( + ArgumentError, + "The input argument (attributes) must be a hash in `Algolia::Forbidden` initialize method" + ) + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + raise( + ArgumentError, + "`#{k}` is not a valid attribute in `Algolia::Forbidden`. Please check the name to make sure it's valid. List of attributes: " + + self.class.attribute_map.keys.inspect + ) + end + + h[k.to_sym] = v + } + + if attributes.key?(:reason) + self.reason = attributes[:reason] + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if self.equal?(other) + self.class == other.class && + reason == other.reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + types_mapping.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| + _deserialize(::Regexp.last_match(1), v) + } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) + end + end + + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + # model + else + # models (e.g. Pet) or oneOf + klass = Algolia::Monitoring.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass + .build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + def to_json(*_args) + to_hash.to_json + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to?(:to_hash) + value.to_hash + else + value + end + end + + end + + end +end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/incidents_inner.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/incident_entry.rb similarity index 97% rename from clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/incidents_inner.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/incident_entry.rb index fa1980836f..e23cc4ff3b 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/incidents_inner.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/incident_entry.rb @@ -5,7 +5,7 @@ module Algolia module Monitoring - class IncidentsInner + class IncidentEntry # Timestamp, measured in milliseconds since the Unix epoch. attr_accessor :t @@ -45,7 +45,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::IncidentsInner` initialize method" + "The input argument (attributes) must be a hash in `Algolia::IncidentEntry` initialize method" ) end @@ -54,7 +54,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::IncidentsInner`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::IncidentEntry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_time_response_metrics.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_metric.rb similarity index 97% rename from clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_time_response_metrics.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_metric.rb index 196b504f75..45362f6afc 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_time_response_metrics.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_metric.rb @@ -5,7 +5,7 @@ module Algolia module Monitoring - class IndexingTimeResponseMetrics + class IndexingMetric attr_accessor :indexing # Attribute mapping from ruby-style variable name to JSON key. @@ -40,7 +40,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::IndexingTimeResponseMetrics` initialize method" + "The input argument (attributes) must be a hash in `Algolia::IndexingMetric` initialize method" ) end @@ -49,7 +49,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::IndexingTimeResponseMetrics`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::IndexingMetric`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_time_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_time_response.rb index 082e5daced..053f753104 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_time_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/indexing_time_response.rb @@ -23,7 +23,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :metrics => :"IndexingTimeResponseMetrics" + :metrics => :"IndexingMetric" } end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/infrastructure_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/infrastructure_response.rb index c567f57b6e..89b2f97243 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/infrastructure_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/infrastructure_response.rb @@ -23,7 +23,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :metrics => :"InfrastructureResponseMetrics" + :metrics => :"Metrics" } end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_response_metrics.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_metric.rb similarity index 97% rename from clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_response_metrics.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_metric.rb index 54e08624c0..c9d6d52a87 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_response_metrics.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_metric.rb @@ -5,7 +5,7 @@ module Algolia module Monitoring - class LatencyResponseMetrics + class LatencyMetric attr_accessor :latency # Attribute mapping from ruby-style variable name to JSON key. @@ -40,7 +40,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::LatencyResponseMetrics` initialize method" + "The input argument (attributes) must be a hash in `Algolia::LatencyMetric` initialize method" ) end @@ -49,7 +49,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::LatencyResponseMetrics`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::LatencyMetric`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_response.rb index cda6bc6f7f..0c404c7f96 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/latency_response.rb @@ -23,7 +23,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :metrics => :"LatencyResponseMetrics" + :metrics => :"LatencyMetric" } end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/infrastructure_response_metrics.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/metrics.rb similarity index 95% rename from clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/infrastructure_response_metrics.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/metrics.rb index 23a81533cd..ca29313c4c 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/infrastructure_response_metrics.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/metrics.rb @@ -5,7 +5,7 @@ module Algolia module Monitoring - class InfrastructureResponseMetrics + class Metrics # CPU idleness in %. attr_accessor :cpu_usage @@ -59,10 +59,7 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - raise( - ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::InfrastructureResponseMetrics` initialize method" - ) + raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::Metrics` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key @@ -70,7 +67,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::InfrastructureResponseMetrics`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::Metrics`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/time_inner.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/time_entry.rb similarity index 98% rename from clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/time_inner.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/time_entry.rb index f096682ea7..ef2cb1d200 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/time_inner.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/time_entry.rb @@ -5,7 +5,7 @@ module Algolia module Monitoring - class TimeInner + class TimeEntry # Timestamp, measured in milliseconds since the Unix epoch. attr_accessor :t @@ -46,7 +46,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::TimeInner` initialize method" + "The input argument (attributes) must be a hash in `Algolia::TimeEntry` initialize method" ) end @@ -55,7 +55,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::TimeInner`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::TimeEntry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/unauthorized.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/unauthorized.rb new file mode 100644 index 0000000000..aa2d67a6cd --- /dev/null +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/monitoring/unauthorized.rb @@ -0,0 +1,211 @@ +# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +require "date" +require "time" + +module Algolia + module Monitoring + class Unauthorized + attr_accessor :reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :reason => :reason + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.types_mapping + { + :reason => :"String" + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new( + [] + ) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise( + ArgumentError, + "The input argument (attributes) must be a hash in `Algolia::Unauthorized` initialize method" + ) + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + raise( + ArgumentError, + "`#{k}` is not a valid attribute in `Algolia::Unauthorized`. Please check the name to make sure it's valid. List of attributes: " + + self.class.attribute_map.keys.inspect + ) + end + + h[k.to_sym] = v + } + + if attributes.key?(:reason) + self.reason = attributes[:reason] + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if self.equal?(other) + self.class == other.class && + reason == other.reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + types_mapping.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| + _deserialize(::Regexp.last_match(1), v) + } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) + end + end + + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + # model + else + # models (e.g. Pet) or oneOf + klass = Algolia::Monitoring.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass + .build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + def to_json(*_args) + to_hash.to_json + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to?(:to_hash) + value.to_hash + else + value + end + end + + end + + end +end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/query-suggestions/config_status.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/query-suggestions/config_status.rb new file mode 100644 index 0000000000..0911d42dda --- /dev/null +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/query-suggestions/config_status.rb @@ -0,0 +1,252 @@ +# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +require "date" +require "time" + +module Algolia + module QuerySuggestions + class ConfigStatus + # Name of the Query Suggestions index (case-sensitive). + attr_accessor :index_name + + # Whether the creation or update of the Query Suggestions index is in progress. + attr_accessor :is_running + + # Date and time when the Query Suggestions index was last built, in RFC 3339 format. + attr_accessor :last_built_at + + # Date and time when the Query Suggestions index was last updated successfully. + attr_accessor :last_successful_built_at + + # Duration of the last successful build in seconds. + attr_accessor :last_successful_build_duration + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :index_name => :indexName, + :is_running => :isRunning, + :last_built_at => :lastBuiltAt, + :last_successful_built_at => :lastSuccessfulBuiltAt, + :last_successful_build_duration => :lastSuccessfulBuildDuration + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.types_mapping + { + :index_name => :"String", + :is_running => :"Boolean", + :last_built_at => :"String", + :last_successful_built_at => :"String", + :last_successful_build_duration => :"String" + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new( + [] + ) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise( + ArgumentError, + "The input argument (attributes) must be a hash in `Algolia::ConfigStatus` initialize method" + ) + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + raise( + ArgumentError, + "`#{k}` is not a valid attribute in `Algolia::ConfigStatus`. Please check the name to make sure it's valid. List of attributes: " + + self.class.attribute_map.keys.inspect + ) + end + + h[k.to_sym] = v + } + + if attributes.key?(:index_name) + self.index_name = attributes[:index_name] + end + + if attributes.key?(:is_running) + self.is_running = attributes[:is_running] + end + + if attributes.key?(:last_built_at) + self.last_built_at = attributes[:last_built_at] + end + + if attributes.key?(:last_successful_built_at) + self.last_successful_built_at = attributes[:last_successful_built_at] + end + + if attributes.key?(:last_successful_build_duration) + self.last_successful_build_duration = attributes[:last_successful_build_duration] + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if self.equal?(other) + self.class == other.class && + index_name == other.index_name && + is_running == other.is_running && + last_built_at == other.last_built_at && + last_successful_built_at == other.last_successful_built_at && + last_successful_build_duration == other.last_successful_build_duration + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [index_name, is_running, last_built_at, last_successful_built_at, last_successful_build_duration].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + types_mapping.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| + _deserialize(::Regexp.last_match(1), v) + } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) + end + end + + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + # model + else + # models (e.g. Pet) or oneOf + klass = Algolia::QuerySuggestions.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass + .build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + def to_json(*_args) + to_hash.to_json + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to?(:to_hash) + value.to_hash + else + value + end + end + + end + + end +end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/query-suggestions/log_file.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/query-suggestions/log_file.rb new file mode 100644 index 0000000000..dcf1f80b50 --- /dev/null +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/query-suggestions/log_file.rb @@ -0,0 +1,260 @@ +# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +require "date" +require "time" + +module Algolia + module QuerySuggestions + class LogFile + # Date and time of the log entry, in RFC 3339 format. + attr_accessor :timestamp + + attr_accessor :level + + # Details about this log entry. + attr_accessor :message + + # 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. + attr_accessor :context_level + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :timestamp => :timestamp, + :level => :level, + :message => :message, + :context_level => :contextLevel + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.types_mapping + { + :timestamp => :"String", + :level => :"LogLevel", + :message => :"String", + :context_level => :"Integer" + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new( + [] + ) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::LogFile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + raise( + ArgumentError, + "`#{k}` is not a valid attribute in `Algolia::LogFile`. Please check the name to make sure it's valid. List of attributes: " + + self.class.attribute_map.keys.inspect + ) + end + + h[k.to_sym] = v + } + + if attributes.key?(:timestamp) + self.timestamp = attributes[:timestamp] + end + + if attributes.key?(:level) + self.level = attributes[:level] + end + + if attributes.key?(:message) + self.message = attributes[:message] + end + + if attributes.key?(:context_level) + self.context_level = attributes[:context_level] + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if self.equal?(other) + self.class == other.class && + timestamp == other.timestamp && + level == other.level && + message == other.message && + context_level == other.context_level + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [timestamp, level, message, context_level].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + types_mapping.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| + _deserialize(::Regexp.last_match(1), v) + } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) + end + end + + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + # model + else + # models (e.g. Pet) or oneOf + klass = Algolia::QuerySuggestions.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass + .build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + def to_json(*_args) + to_hash.to_json + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to?(:to_hash) + value.to_hash + else + value + end + end + + end + + end +end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision.rb index e96358cf21..b45009f512 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision.rb @@ -11,7 +11,7 @@ class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ - :"Array", + :"Array", :"Integer" ] end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision_from_value_inner.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/range.rb similarity index 94% rename from clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision_from_value_inner.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/recommend/range.rb index b75fcb6b91..f4571fefaf 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/around_precision_from_value_inner.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/range.rb @@ -6,7 +6,7 @@ module Algolia module Recommend # Range object with lower and upper values in meters to define custom ranges. - class AroundPrecisionFromValueInner + class Range # Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. attr_accessor :from @@ -45,10 +45,7 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - raise( - ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::AroundPrecisionFromValueInner` initialize method" - ) + raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::Range` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key @@ -56,7 +53,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::AroundPrecisionFromValueInner`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::Range`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_rule.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_rule.rb index 90e8f2e56c..6532d86fd8 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_rule.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_rule.rb @@ -42,7 +42,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :_metadata => :"RecommendRuleMetadata", + :_metadata => :"RuleMetadata", :object_id => :"String", :condition => :"Condition", :consequence => :"Consequence", diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_metadata_data.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_data.rb similarity index 97% rename from clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_metadata_data.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_data.rb index 08534f15cc..39b991a788 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_metadata_data.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_data.rb @@ -6,7 +6,7 @@ module Algolia module Recommend # Redirect rule data. - class RedirectRuleIndexMetadataData + class RedirectRuleIndexData attr_accessor :rule_object_id # Attribute mapping from ruby-style variable name to JSON key. @@ -41,7 +41,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::RedirectRuleIndexMetadataData` initialize method" + "The input argument (attributes) must be a hash in `Algolia::RedirectRuleIndexData` initialize method" ) end @@ -50,7 +50,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::RedirectRuleIndexMetadataData`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::RedirectRuleIndexData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_metadata.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_metadata.rb index 1867e81d44..8cb54144bf 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/redirect_rule_index_metadata.rb @@ -43,7 +43,7 @@ def self.types_mapping :dest => :"String", :reason => :"String", :succeed => :"Boolean", - :data => :"RedirectRuleIndexMetadataData" + :data => :"RedirectRuleIndexData" } end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_rule_metadata.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/rule_metadata.rb similarity index 96% rename from clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_rule_metadata.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/recommend/rule_metadata.rb index 1fcae0e766..6b4da8ce10 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_rule_metadata.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/rule_metadata.rb @@ -6,7 +6,7 @@ module Algolia module Recommend # Rule metadata. - class RecommendRuleMetadata + class RuleMetadata # Date and time when the object was updated, in RFC 3339 format. attr_accessor :last_update @@ -42,7 +42,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::RecommendRuleMetadata` initialize method" + "The input argument (attributes) must be a hash in `Algolia::RuleMetadata` initialize method" ) end @@ -51,7 +51,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::RecommendRuleMetadata`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::RuleMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision.rb index e278ed260e..915eff2753 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision.rb @@ -11,7 +11,7 @@ class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ - :"Array", + :"Array", :"Integer" ] end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision_from_value_inner.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/range.rb similarity index 94% rename from clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision_from_value_inner.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/search/range.rb index a7d8f1d559..69f1e12605 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/around_precision_from_value_inner.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/range.rb @@ -6,7 +6,7 @@ module Algolia module Search # Range object with lower and upper values in meters to define custom ranges. - class AroundPrecisionFromValueInner + class Range # Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. attr_accessor :from @@ -45,10 +45,7 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - raise( - ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::AroundPrecisionFromValueInner` initialize method" - ) + raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::Range` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key @@ -56,7 +53,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::AroundPrecisionFromValueInner`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::Range`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_metadata_data.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_data.rb similarity index 97% rename from clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_metadata_data.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_data.rb index 49406ff2af..c71dfe14de 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_metadata_data.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_data.rb @@ -6,7 +6,7 @@ module Algolia module Search # Redirect rule data. - class RedirectRuleIndexMetadataData + class RedirectRuleIndexData attr_accessor :rule_object_id # Attribute mapping from ruby-style variable name to JSON key. @@ -41,7 +41,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::RedirectRuleIndexMetadataData` initialize method" + "The input argument (attributes) must be a hash in `Algolia::RedirectRuleIndexData` initialize method" ) end @@ -50,7 +50,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::RedirectRuleIndexMetadataData`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::RedirectRuleIndexData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_metadata.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_metadata.rb index 3c3e0b780f..4131504fa2 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_metadata.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/redirect_rule_index_metadata.rb @@ -43,7 +43,7 @@ def self.types_mapping :dest => :"String", :reason => :"String", :succeed => :"Boolean", - :data => :"RedirectRuleIndexMetadataData" + :data => :"RedirectRuleIndexData" } end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_string.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_string.rb index 18795ca212..8405433189 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_string.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_string.rb @@ -5,6 +5,7 @@ module Algolia module Search + # Search parameters as query string. class SearchParamsString # Search parameters as a URL-encoded query string. attr_accessor :params diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/error_item.rb similarity index 96% rename from clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/usage/error_item.rb index f237fd0d52..9fa51e12fe 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/error_item.rb @@ -5,7 +5,7 @@ module Algolia module Usage - class GetUsage400ResponseErrorErrorsInner + class ErrorItem attr_accessor :code attr_accessor :message @@ -52,7 +52,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::GetUsage400ResponseErrorErrorsInner` initialize method" + "The input argument (attributes) must be a hash in `Algolia::ErrorItem` initialize method" ) end @@ -61,7 +61,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::GetUsage400ResponseErrorErrorsInner`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::ErrorItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage400_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/forbidden.rb similarity index 95% rename from clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage400_response.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/usage/forbidden.rb index 90548796f0..7e060e26d4 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage400_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/forbidden.rb @@ -5,7 +5,7 @@ module Algolia module Usage - class GetUsage400Response + class Forbidden attr_accessor :error # Attribute mapping from ruby-style variable name to JSON key. @@ -23,7 +23,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :error => :"GetUsage400ResponseError" + :error => :"ForbiddenError" } end @@ -40,7 +40,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::GetUsage400Response` initialize method" + "The input argument (attributes) must be a hash in `Algolia::Forbidden` initialize method" ) end @@ -49,7 +49,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::GetUsage400Response`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::Forbidden`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage400_response_error.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/forbidden_error.rb similarity index 95% rename from clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage400_response_error.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/usage/forbidden_error.rb index 05239422a9..a8c49343c3 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage400_response_error.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/forbidden_error.rb @@ -5,7 +5,7 @@ module Algolia module Usage - class GetUsage400ResponseError + class ForbiddenError attr_accessor :code attr_accessor :message @@ -31,7 +31,7 @@ def self.types_mapping { :code => :"String", :message => :"String", - :errors => :"Array" + :errors => :"Array" } end @@ -48,7 +48,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::GetUsage400ResponseError` initialize method" + "The input argument (attributes) must be a hash in `Algolia::ForbiddenError` initialize method" ) end @@ -57,7 +57,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::GetUsage400ResponseError`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::ForbiddenError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage200_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/index_usage.rb similarity index 95% rename from clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage200_response.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/usage/index_usage.rb index d9ac6367f0..42a994e55c 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage200_response.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/index_usage.rb @@ -5,7 +5,7 @@ module Algolia module Usage - class GetUsage200Response + class IndexUsage attr_accessor :statistics # Attribute mapping from ruby-style variable name to JSON key. @@ -23,7 +23,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.types_mapping { - :statistics => :"Array" + :statistics => :"Array" } end @@ -40,7 +40,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::GetUsage200Response` initialize method" + "The input argument (attributes) must be a hash in `Algolia::IndexUsage` initialize method" ) end @@ -49,7 +49,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::GetUsage200Response`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::IndexUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/invalid_request.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/invalid_request.rb new file mode 100644 index 0000000000..a66924bc32 --- /dev/null +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/invalid_request.rb @@ -0,0 +1,213 @@ +# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +require "date" +require "time" + +module Algolia + module Usage + class InvalidRequest + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :error => :error + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.types_mapping + { + :error => :"InvalidRequestError" + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new( + [] + ) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise( + ArgumentError, + "The input argument (attributes) must be a hash in `Algolia::InvalidRequest` initialize method" + ) + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + raise( + ArgumentError, + "`#{k}` is not a valid attribute in `Algolia::InvalidRequest`. Please check the name to make sure it's valid. List of attributes: " + + self.class.attribute_map.keys.inspect + ) + end + + h[k.to_sym] = v + } + + if attributes.key?(:error) + self.error = attributes[:error] + else + self.error = nil + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if self.equal?(other) + self.class == other.class && + error == other.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + types_mapping.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| + _deserialize(::Regexp.last_match(1), v) + } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) + end + end + + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + # model + else + # models (e.g. Pet) or oneOf + klass = Algolia::Usage.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass + .build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + def to_json(*_args) + to_hash.to_json + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to?(:to_hash) + value.to_hash + else + value + end + end + + end + + end +end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/invalid_request_error.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/invalid_request_error.rb new file mode 100644 index 0000000000..67cfddf305 --- /dev/null +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/invalid_request_error.rb @@ -0,0 +1,231 @@ +# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +require "date" +require "time" + +module Algolia + module Usage + class InvalidRequestError + attr_accessor :code + + attr_accessor :message + + attr_accessor :errors + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :code => :code, + :message => :message, + :errors => :errors + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.types_mapping + { + :code => :"String", + :message => :"String", + :errors => :"Array" + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new( + [] + ) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise( + ArgumentError, + "The input argument (attributes) must be a hash in `Algolia::InvalidRequestError` initialize method" + ) + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + raise( + ArgumentError, + "`#{k}` is not a valid attribute in `Algolia::InvalidRequestError`. Please check the name to make sure it's valid. List of attributes: " + + self.class.attribute_map.keys.inspect + ) + end + + h[k.to_sym] = v + } + + if attributes.key?(:code) + self.code = attributes[:code] + end + + if attributes.key?(:message) + self.message = attributes[:message] + end + + if attributes.key?(:errors) + if (value = attributes[:errors]).is_a?(Array) + self.errors = value + end + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(other) + return true if self.equal?(other) + self.class == other.class && + code == other.code && + message == other.message && + errors == other.errors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(other) + self == other + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message, errors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + types_mapping.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| + _deserialize(::Regexp.last_match(1), v) + } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) + end + end + + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + # model + else + # models (e.g. Pet) or oneOf + klass = Algolia::Usage.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass + .build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + def to_json(*_args) + to_hash.to_json + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to?(:to_hash) + value.to_hash + else + value + end + end + + end + + end +end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/statistic_entry.rb similarity index 95% rename from clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb rename to clients/algoliasearch-client-ruby/lib/algolia/models/usage/statistic_entry.rb index d8bd209893..7934028d96 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/usage/statistic_entry.rb @@ -5,7 +5,7 @@ module Algolia module Usage - class GetUsage200ResponseStatisticsInner + class StatisticEntry # Timestamp, measured in milliseconds since the Unix epoch. attr_accessor :t @@ -45,7 +45,7 @@ def initialize(attributes = {}) if (!attributes.is_a?(Hash)) raise( ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::GetUsage200ResponseStatisticsInner` initialize method" + "The input argument (attributes) must be a hash in `Algolia::StatisticEntry` initialize method" ) end @@ -54,7 +54,7 @@ def initialize(attributes = {}) if (!self.class.attribute_map.key?(k.to_sym)) raise( ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::GetUsage200ResponseStatisticsInner`. Please check the name to make sure it's valid. List of attributes: " + + "`#{k}` is not a valid attribute in `Algolia::StatisticEntry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect ) end diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffectsEmptySearch.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/EmptySearchFilter.scala similarity index 98% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffectsEmptySearch.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/EmptySearchFilter.scala index 44f9e50b1a..692b0cf481 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffectsEmptySearch.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/EmptySearchFilter.scala @@ -30,7 +30,7 @@ package algoliasearch.abtesting * @param trackedSearchesCount * Number of tracked searches removed from the A/B test. */ -case class FilterEffectsEmptySearch( +case class EmptySearchFilter( usersCount: Option[Int] = scala.None, trackedSearchesCount: Option[Int] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffects.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffects.scala index 4d7768fe57..00465177b8 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffects.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffects.scala @@ -26,6 +26,6 @@ package algoliasearch.abtesting /** A/B test filter effects resulting from configuration settings. */ case class FilterEffects( - outliers: Option[FilterEffectsOutliers] = scala.None, - emptySearch: Option[FilterEffectsEmptySearch] = scala.None + outliers: Option[OutliersFilter] = scala.None, + emptySearch: Option[EmptySearchFilter] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffectsOutliers.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/OutliersFilter.scala similarity index 98% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffectsOutliers.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/OutliersFilter.scala index 2b1edc84e4..36caad95d2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/FilterEffectsOutliers.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/abtesting/OutliersFilter.scala @@ -30,7 +30,7 @@ package algoliasearch.abtesting * @param trackedSearchesCount * Number of tracked searches removed from the A/B test. */ -case class FilterEffectsOutliers( +case class OutliersFilter( usersCount: Option[Int] = scala.None, trackedSearchesCount: Option[Int] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/ClickPositionsInner.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/ClickPosition.scala similarity index 98% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/ClickPositionsInner.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/ClickPosition.scala index 98881c7e48..cbc289acc6 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/ClickPositionsInner.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/ClickPosition.scala @@ -31,7 +31,7 @@ package algoliasearch.analytics * @param clickCount * Number of times this search has been clicked at that position. */ -case class ClickPositionsInner( +case class ClickPosition( position: Option[Seq[Int]] = scala.None, clickCount: Option[Int] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/GetClickPositionsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/GetClickPositionsResponse.scala index e76d0e67f2..2dc23a9e40 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/GetClickPositionsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/GetClickPositionsResponse.scala @@ -29,5 +29,5 @@ package algoliasearch.analytics * List of positions in the search results and clicks associated with this search. */ case class GetClickPositionsResponse( - positions: Seq[ClickPositionsInner] + positions: Seq[ClickPosition] ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithAnalytics.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithAnalytics.scala index d6512928de..f2088d59de 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithAnalytics.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithAnalytics.scala @@ -54,7 +54,7 @@ case class TopSearchWithAnalytics( count: Int, clickThroughRate: Option[Double] = scala.None, averageClickPosition: Option[Double] = scala.None, - clickPositions: Seq[ClickPositionsInner], + clickPositions: Seq[ClickPosition], conversionRate: Option[Double] = scala.None, trackedSearchCount: Int, clickCount: Int, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithRevenueAnalytics.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithRevenueAnalytics.scala index 9ad7ff8dfb..4c9ac3c203 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithRevenueAnalytics.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/analytics/TopSearchWithRevenueAnalytics.scala @@ -66,7 +66,7 @@ case class TopSearchWithRevenueAnalytics( count: Int, clickThroughRate: Option[Double] = scala.None, averageClickPosition: Option[Double] = scala.None, - clickPositions: Seq[ClickPositionsInner], + clickPositions: Seq[ClickPosition], conversionRate: Option[Double] = scala.None, trackedSearchCount: Int, clickCount: Int, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/MonitoringClient.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/MonitoringClient.scala index c62d40e168..e63c0e44da 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/MonitoringClient.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/MonitoringClient.scala @@ -3,8 +3,9 @@ */ package algoliasearch.api +import algoliasearch.monitoring.BadRequest import algoliasearch.monitoring.ErrorBase -import algoliasearch.monitoring.GetServers403Response +import algoliasearch.monitoring.Forbidden import algoliasearch.monitoring.IncidentsResponse import algoliasearch.monitoring.IndexingTimeResponse import algoliasearch.monitoring.InfrastructureResponse @@ -13,6 +14,7 @@ import algoliasearch.monitoring.LatencyResponse import algoliasearch.monitoring.Metric._ import algoliasearch.monitoring.Period._ import algoliasearch.monitoring.StatusResponse +import algoliasearch.monitoring.Unauthorized import algoliasearch.monitoring._ import algoliasearch.ApiClient import algoliasearch.api.MonitoringClient.hosts diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/QuerySuggestionsClient.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/QuerySuggestionsClient.scala index 5193e47f6a..9c8618516f 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/QuerySuggestionsClient.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/QuerySuggestionsClient.scala @@ -4,12 +4,12 @@ package algoliasearch.api import algoliasearch.querysuggestions.BaseResponse +import algoliasearch.querysuggestions.ConfigStatus import algoliasearch.querysuggestions.Configuration import algoliasearch.querysuggestions.ConfigurationResponse import algoliasearch.querysuggestions.ConfigurationWithIndex import algoliasearch.querysuggestions.ErrorBase -import algoliasearch.querysuggestions.GetConfigStatus200Response -import algoliasearch.querysuggestions.GetLogFile200Response +import algoliasearch.querysuggestions.LogFile import algoliasearch.querysuggestions._ import algoliasearch.ApiClient import algoliasearch.api.QuerySuggestionsClient.hosts @@ -263,7 +263,7 @@ class QuerySuggestionsClient( */ def getConfigStatus(indexName: String, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext - ): Future[GetConfigStatus200Response] = Future { + ): Future[ConfigStatus] = Future { requireNotNull(indexName, "Parameter `indexName` is required when calling `getConfigStatus`.") val request = HttpRequest @@ -271,7 +271,7 @@ class QuerySuggestionsClient( .withMethod("GET") .withPath(s"/1/configs/${escape(indexName)}/status") .build() - execute[GetConfigStatus200Response](request, requestOptions) + execute[ConfigStatus](request, requestOptions) } /** Retrieves the logs for a single Query Suggestions index. @@ -284,7 +284,7 @@ class QuerySuggestionsClient( */ def getLogFile(indexName: String, requestOptions: Option[RequestOptions] = None)(implicit ec: ExecutionContext - ): Future[GetLogFile200Response] = Future { + ): Future[LogFile] = Future { requireNotNull(indexName, "Parameter `indexName` is required when calling `getLogFile`.") val request = HttpRequest @@ -292,7 +292,7 @@ class QuerySuggestionsClient( .withMethod("GET") .withPath(s"/1/logs/${escape(indexName)}") .build() - execute[GetLogFile200Response](request, requestOptions) + execute[LogFile](request, requestOptions) } /** Updates a QuerySuggestions configuration. diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/UsageClient.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/UsageClient.scala index 7eefc96c05..4c79fc12b2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/UsageClient.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/api/UsageClient.scala @@ -4,9 +4,10 @@ package algoliasearch.api import algoliasearch.usage.ErrorBase -import algoliasearch.usage.GetUsage200Response -import algoliasearch.usage.GetUsage400Response +import algoliasearch.usage.Forbidden import algoliasearch.usage.Granularity._ +import algoliasearch.usage.IndexUsage +import algoliasearch.usage.InvalidRequest import algoliasearch.usage.Statistic._ import algoliasearch.usage._ import algoliasearch.ApiClient @@ -273,7 +274,7 @@ class UsageClient( endDate: String, granularity: Option[Granularity] = None, requestOptions: Option[RequestOptions] = None - )(implicit ec: ExecutionContext): Future[GetUsage200Response] = Future { + )(implicit ec: ExecutionContext): Future[IndexUsage] = Future { requireNotNull(statistic, "Parameter `statistic` is required when calling `getIndexUsage`.") requireNotNull(indexName, "Parameter `indexName` is required when calling `getIndexUsage`.") requireNotNull(startDate, "Parameter `startDate` is required when calling `getIndexUsage`.") @@ -287,7 +288,7 @@ class UsageClient( .withQueryParameter("endDate", endDate) .withQueryParameter("granularity", granularity) .build() - execute[GetUsage200Response](request, requestOptions) + execute[IndexUsage](request, requestOptions) } /** Retrieves usage statistics evaluated over a specified period. @@ -393,7 +394,7 @@ class UsageClient( endDate: String, granularity: Option[Granularity] = None, requestOptions: Option[RequestOptions] = None - )(implicit ec: ExecutionContext): Future[GetUsage200Response] = Future { + )(implicit ec: ExecutionContext): Future[IndexUsage] = Future { requireNotNull(statistic, "Parameter `statistic` is required when calling `getUsage`.") requireNotNull(startDate, "Parameter `startDate` is required when calling `getUsage`.") requireNotNull(endDate, "Parameter `endDate` is required when calling `getUsage`.") @@ -406,7 +407,7 @@ class UsageClient( .withQueryParameter("endDate", endDate) .withQueryParameter("granularity", granularity) .build() - execute[GetUsage200Response](request, requestOptions) + execute[IndexUsage](request, requestOptions) } } diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DockerStreamsInput.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DockerStreamsInput.scala index 73161b4993..c4d7227dc4 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DockerStreamsInput.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DockerStreamsInput.scala @@ -23,7 +23,7 @@ */ package algoliasearch.ingestion -/** DockerStreamsInput +/** The selected streams of a singer or airbyte connector. */ case class DockerStreamsInput( streams: Any diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationTryResponseError.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationError.scala similarity index 98% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationTryResponseError.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationError.scala index d6c5e1e5c4..65c03c1b1c 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationTryResponseError.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationError.scala @@ -30,7 +30,7 @@ package algoliasearch.ingestion * @param message * A descriptive message explaining the failure. */ -case class TransformationTryResponseError( +case class TransformationError( code: Option[Int] = scala.None, message: Option[String] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationTryResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationTryResponse.scala index fa824748b1..afdbdcc72d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationTryResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/TransformationTryResponse.scala @@ -30,5 +30,5 @@ package algoliasearch.ingestion */ case class TransformationTryResponse( payloads: Seq[Any], - error: Option[TransformationTryResponseError] = scala.None + error: Option[TransformationError] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/GetServers403Response.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/BadRequest.scala similarity index 96% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/GetServers403Response.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/BadRequest.scala index 4db38ee2f4..5e43e93a09 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/GetServers403Response.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/BadRequest.scala @@ -18,8 +18,8 @@ */ package algoliasearch.monitoring -/** GetServers403Response +/** BadRequest */ -case class GetServers403Response( +case class BadRequest( reason: Option[String] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyResponseMetrics.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Forbidden.scala similarity index 92% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyResponseMetrics.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Forbidden.scala index d2279ed86e..4941957f9a 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyResponseMetrics.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Forbidden.scala @@ -18,8 +18,8 @@ */ package algoliasearch.monitoring -/** LatencyResponseMetrics +/** Forbidden */ -case class LatencyResponseMetrics( - latency: Option[Map[String, Seq[TimeInner]]] = scala.None +case class Forbidden( + reason: Option[String] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentsInner.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentEntry.scala similarity index 97% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentsInner.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentEntry.scala index c909eb2d30..053710f9e2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentsInner.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentEntry.scala @@ -18,12 +18,12 @@ */ package algoliasearch.monitoring -/** IncidentsInner +/** IncidentEntry * * @param t * Timestamp, measured in milliseconds since the Unix epoch. */ -case class IncidentsInner( +case class IncidentEntry( t: Option[Long] = scala.None, v: Option[Incident] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentsResponse.scala index c10da39f43..80958f04b1 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IncidentsResponse.scala @@ -21,5 +21,5 @@ package algoliasearch.monitoring /** IncidentsResponse */ case class IncidentsResponse( - incidents: Option[Map[String, Seq[IncidentsInner]]] = scala.None + incidents: Option[Map[String, Seq[IncidentEntry]]] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingTimeResponseMetrics.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingMetric.scala similarity index 92% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingTimeResponseMetrics.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingMetric.scala index 85753dd874..71eaec8335 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingTimeResponseMetrics.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingMetric.scala @@ -18,8 +18,8 @@ */ package algoliasearch.monitoring -/** IndexingTimeResponseMetrics +/** IndexingMetric */ -case class IndexingTimeResponseMetrics( - indexing: Option[Map[String, Seq[TimeInner]]] = scala.None +case class IndexingMetric( + indexing: Option[Map[String, Seq[TimeEntry]]] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingTimeResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingTimeResponse.scala index 8495c2715b..e7cb3a2eda 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingTimeResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/IndexingTimeResponse.scala @@ -21,5 +21,5 @@ package algoliasearch.monitoring /** IndexingTimeResponse */ case class IndexingTimeResponse( - metrics: Option[IndexingTimeResponseMetrics] = scala.None + metrics: Option[IndexingMetric] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/InfrastructureResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/InfrastructureResponse.scala index 7093a748e2..131ff1b3bb 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/InfrastructureResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/InfrastructureResponse.scala @@ -21,5 +21,5 @@ package algoliasearch.monitoring /** InfrastructureResponse */ case class InfrastructureResponse( - metrics: Option[InfrastructureResponseMetrics] = scala.None + metrics: Option[Metrics] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyMetric.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyMetric.scala new file mode 100644 index 0000000000..588fa755f8 --- /dev/null +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyMetric.scala @@ -0,0 +1,25 @@ +/** Algolia Monitoring API The Monitoring API lets you check the status of your Algolia infrastructure. ## Base URLs The + * base URL for requests to the Monitoring API is: - `https://status.algolia.com` **All requests must use HTTPS.** ## + * Availability and authentication Access to the [Infrastructure](#tag/infrastructure) endpoints is available as part + * of the [Premium or Elevate plans](https://www.algolia.com/pricing). To authenticate requests to the Infrastructure + * endpoints, add these headers: - `x-algolia-application-id`. Your Algolia application ID. - `x-algolia-api-key`. Your + * Monitoring API key. You can find your application ID and API key in the [Algolia + * dashboard](https://dashboard.algolia.com/account). Other endpoints don't require authentication. ## Response status + * and errors The Monitoring API returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely + * on the order of attributes in the API response. Successful responses return a `2xx` status. Client errors return a + * `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message` property with more + * information. ## Version The current version of the Monitoring API is version 1, as indicated by the `/1/` in each + * endpoint's URL. + * + * The version of the OpenAPI document: 1.0.0 + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech Do not edit the class manually. + */ +package algoliasearch.monitoring + +/** LatencyMetric + */ +case class LatencyMetric( + latency: Option[Map[String, Seq[TimeEntry]]] = scala.None +) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyResponse.scala index dff311ee0c..489506aa39 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/LatencyResponse.scala @@ -21,5 +21,5 @@ package algoliasearch.monitoring /** LatencyResponse */ case class LatencyResponse( - metrics: Option[LatencyResponseMetrics] = scala.None + metrics: Option[LatencyMetric] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/InfrastructureResponseMetrics.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Metrics.scala similarity index 96% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/InfrastructureResponseMetrics.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Metrics.scala index e8c3d6b4c1..3b2f5fd0db 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/InfrastructureResponseMetrics.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Metrics.scala @@ -18,7 +18,7 @@ */ package algoliasearch.monitoring -/** InfrastructureResponseMetrics +/** Metrics * * @param cpuUsage * CPU idleness in %. @@ -32,7 +32,7 @@ package algoliasearch.monitoring * @param avgBuildTime * Average build time of the indices in seconds. */ -case class InfrastructureResponseMetrics( +case class Metrics( cpuUsage: Option[Map[String, Seq[ProbesMetric]]] = scala.None, ramIndexingUsage: Option[Map[String, Seq[ProbesMetric]]] = scala.None, ramSearchUsage: Option[Map[String, Seq[ProbesMetric]]] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/TimeInner.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/TimeEntry.scala similarity index 97% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/TimeInner.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/TimeEntry.scala index ae6483b85a..75cd9185c9 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/TimeInner.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/TimeEntry.scala @@ -18,14 +18,14 @@ */ package algoliasearch.monitoring -/** TimeInner +/** TimeEntry * * @param t * Timestamp, measured in milliseconds since the Unix epoch. * @param v * Time in ms. */ -case class TimeInner( +case class TimeEntry( t: Option[Long] = scala.None, v: Option[Int] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Unauthorized.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Unauthorized.scala new file mode 100644 index 0000000000..5bc8c6a865 --- /dev/null +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/monitoring/Unauthorized.scala @@ -0,0 +1,25 @@ +/** Algolia Monitoring API The Monitoring API lets you check the status of your Algolia infrastructure. ## Base URLs The + * base URL for requests to the Monitoring API is: - `https://status.algolia.com` **All requests must use HTTPS.** ## + * Availability and authentication Access to the [Infrastructure](#tag/infrastructure) endpoints is available as part + * of the [Premium or Elevate plans](https://www.algolia.com/pricing). To authenticate requests to the Infrastructure + * endpoints, add these headers: - `x-algolia-application-id`. Your Algolia application ID. - `x-algolia-api-key`. Your + * Monitoring API key. You can find your application ID and API key in the [Algolia + * dashboard](https://dashboard.algolia.com/account). Other endpoints don't require authentication. ## Response status + * and errors The Monitoring API returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely + * on the order of attributes in the API response. Successful responses return a `2xx` status. Client errors return a + * `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message` property with more + * information. ## Version The current version of the Monitoring API is version 1, as indicated by the `/1/` in each + * endpoint's URL. + * + * The version of the OpenAPI document: 1.0.0 + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech Do not edit the class manually. + */ +package algoliasearch.monitoring + +/** Unauthorized + */ +case class Unauthorized( + reason: Option[String] = scala.None +) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/GetConfigStatus200Response.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/ConfigStatus.scala similarity index 97% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/GetConfigStatus200Response.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/ConfigStatus.scala index e6b1674fcd..9d5ebba745 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/GetConfigStatus200Response.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/ConfigStatus.scala @@ -22,7 +22,7 @@ */ package algoliasearch.querysuggestions -/** GetConfigStatus200Response +/** ConfigStatus * * @param indexName * Name of the Query Suggestions index (case-sensitive). @@ -35,7 +35,7 @@ package algoliasearch.querysuggestions * @param lastSuccessfulBuildDuration * Duration of the last successful build in seconds. */ -case class GetConfigStatus200Response( +case class ConfigStatus( indexName: Option[String] = scala.None, isRunning: Option[Boolean] = scala.None, lastBuiltAt: Option[String] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/GetLogFile200Response.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/LogFile.scala similarity index 97% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/GetLogFile200Response.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/LogFile.scala index 46f2af9ab1..ceebc04dc1 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/GetLogFile200Response.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/querysuggestions/LogFile.scala @@ -24,7 +24,7 @@ package algoliasearch.querysuggestions import algoliasearch.querysuggestions.LogLevel._ -/** GetLogFile200Response +/** LogFile * * @param timestamp * Date and time of the log entry, in RFC 3339 format. @@ -34,7 +34,7 @@ import algoliasearch.querysuggestions.LogLevel._ * 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. */ -case class GetLogFile200Response( +case class LogFile( timestamp: Option[String] = scala.None, level: Option[LogLevel] = scala.None, message: Option[String] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecision.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecision.scala index 67207c93a2..2e2546d844 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecision.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecision.scala @@ -39,13 +39,13 @@ sealed trait AroundPrecision object AroundPrecision { case class IntValue(value: Int) extends AroundPrecision - case class SeqOfAroundPrecisionFromValueInner(value: Seq[AroundPrecisionFromValueInner]) extends AroundPrecision + case class SeqOfRange(value: Seq[Range]) extends AroundPrecision def apply(value: Int): AroundPrecision = { AroundPrecision.IntValue(value) } - def apply(value: Seq[AroundPrecisionFromValueInner]): AroundPrecision = { - AroundPrecision.SeqOfAroundPrecisionFromValueInner(value) + def apply(value: Seq[Range]): AroundPrecision = { + AroundPrecision.SeqOfRange(value) } } @@ -54,17 +54,16 @@ object AroundPrecisionSerializer extends Serializer[AroundPrecision] { case (TypeInfo(clazz, _), json) if clazz == classOf[AroundPrecision] => json match { - case JInt(value) => AroundPrecision.IntValue(value.toInt) - case JArray(value) if value.forall(_.isInstanceOf[JArray]) => - AroundPrecision.SeqOfAroundPrecisionFromValueInner(value.map(_.extract)) + case JInt(value) => AroundPrecision.IntValue(value.toInt) + case JArray(value) if value.forall(_.isInstanceOf[JArray]) => AroundPrecision.SeqOfRange(value.map(_.extract)) case _ => throw new MappingException("Can't convert " + json + " to AroundPrecision") } } override def serialize(implicit format: Formats): PartialFunction[Any, JValue] = { case value: AroundPrecision => value match { - case AroundPrecision.IntValue(value) => JInt(value) - case AroundPrecision.SeqOfAroundPrecisionFromValueInner(value) => JArray(value.map(Extraction.decompose).toList) + case AroundPrecision.IntValue(value) => JInt(value) + case AroundPrecision.SeqOfRange(value) => JArray(value.map(Extraction.decompose).toList) } } } diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecisionFromValueInner.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Range.scala similarity index 98% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecisionFromValueInner.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Range.scala index fa1bdaa78e..7458901e25 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/AroundPrecisionFromValueInner.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/Range.scala @@ -36,7 +36,7 @@ package algoliasearch.recommend * @param value * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ -case class AroundPrecisionFromValueInner( +case class Range( from: Option[Int] = scala.None, value: Option[Int] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendRule.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendRule.scala index 4e645d7b42..a0db1eec38 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendRule.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendRule.scala @@ -39,7 +39,7 @@ package algoliasearch.recommend * Indicates whether to enable the rule. If it isn't enabled, it isn't applied at query time. */ case class RecommendRule( - metadata: Option[RecommendRuleMetadata] = scala.None, + metadata: Option[RuleMetadata] = scala.None, objectID: Option[String] = scala.None, condition: Option[Condition] = scala.None, consequence: Option[Consequence] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexMetadataData.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexData.scala similarity index 98% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexMetadataData.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexData.scala index 2c39031ea2..d5e58e5c39 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexMetadataData.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexData.scala @@ -31,6 +31,6 @@ package algoliasearch.recommend /** Redirect rule data. */ -case class RedirectRuleIndexMetadataData( +case class RedirectRuleIndexData( ruleObjectID: String ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexMetadata.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexMetadata.scala index 648e3c1254..b5cda2be48 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexMetadata.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RedirectRuleIndexMetadata.scala @@ -45,5 +45,5 @@ case class RedirectRuleIndexMetadata( dest: String, reason: String, succeed: Boolean, - data: RedirectRuleIndexMetadataData + data: RedirectRuleIndexData ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendRuleMetadata.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RuleMetadata.scala similarity index 98% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendRuleMetadata.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RuleMetadata.scala index 0501e6906a..be37cc5043 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendRuleMetadata.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RuleMetadata.scala @@ -34,6 +34,6 @@ package algoliasearch.recommend * @param lastUpdate * Date and time when the object was updated, in RFC 3339 format. */ -case class RecommendRuleMetadata( +case class RuleMetadata( lastUpdate: Option[String] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecision.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecision.scala index abe94b38b9..8fbb832dfd 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecision.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecision.scala @@ -43,13 +43,13 @@ sealed trait AroundPrecision object AroundPrecision { case class IntValue(value: Int) extends AroundPrecision - case class SeqOfAroundPrecisionFromValueInner(value: Seq[AroundPrecisionFromValueInner]) extends AroundPrecision + case class SeqOfRange(value: Seq[Range]) extends AroundPrecision def apply(value: Int): AroundPrecision = { AroundPrecision.IntValue(value) } - def apply(value: Seq[AroundPrecisionFromValueInner]): AroundPrecision = { - AroundPrecision.SeqOfAroundPrecisionFromValueInner(value) + def apply(value: Seq[Range]): AroundPrecision = { + AroundPrecision.SeqOfRange(value) } } @@ -58,17 +58,16 @@ object AroundPrecisionSerializer extends Serializer[AroundPrecision] { case (TypeInfo(clazz, _), json) if clazz == classOf[AroundPrecision] => json match { - case JInt(value) => AroundPrecision.IntValue(value.toInt) - case JArray(value) if value.forall(_.isInstanceOf[JArray]) => - AroundPrecision.SeqOfAroundPrecisionFromValueInner(value.map(_.extract)) + case JInt(value) => AroundPrecision.IntValue(value.toInt) + case JArray(value) if value.forall(_.isInstanceOf[JArray]) => AroundPrecision.SeqOfRange(value.map(_.extract)) case _ => throw new MappingException("Can't convert " + json + " to AroundPrecision") } } override def serialize(implicit format: Formats): PartialFunction[Any, JValue] = { case value: AroundPrecision => value match { - case AroundPrecision.IntValue(value) => JInt(value) - case AroundPrecision.SeqOfAroundPrecisionFromValueInner(value) => JArray(value.map(Extraction.decompose).toList) + case AroundPrecision.IntValue(value) => JInt(value) + case AroundPrecision.SeqOfRange(value) => JArray(value.map(Extraction.decompose).toList) } } } diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecisionFromValueInner.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Range.scala similarity index 98% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecisionFromValueInner.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Range.scala index 2f49b9f803..71693054bf 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/AroundPrecisionFromValueInner.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/Range.scala @@ -40,7 +40,7 @@ package algoliasearch.search * @param value * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal. */ -case class AroundPrecisionFromValueInner( +case class Range( from: Option[Int] = scala.None, value: Option[Int] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadataData.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexData.scala similarity index 98% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadataData.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexData.scala index d0bea0b286..d3e8f6aa42 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadataData.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexData.scala @@ -35,6 +35,6 @@ package algoliasearch.search /** Redirect rule data. */ -case class RedirectRuleIndexMetadataData( +case class RedirectRuleIndexData( ruleObjectID: String ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadata.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadata.scala index c01ef4d8bb..0e8d48b231 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadata.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/RedirectRuleIndexMetadata.scala @@ -49,5 +49,5 @@ case class RedirectRuleIndexMetadata( dest: String, reason: String, succeed: Boolean, - data: RedirectRuleIndexMetadataData + data: RedirectRuleIndexData ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsString.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsString.scala index 5040ecb02d..5c749a5b91 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsString.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsString.scala @@ -33,7 +33,7 @@ */ package algoliasearch.search -/** SearchParamsString +/** Search parameters as query string. * * @param params * Search parameters as a URL-encoded query string. diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage400ResponseErrorErrorsInner.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/ErrorItem.scala similarity index 94% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage400ResponseErrorErrorsInner.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/ErrorItem.scala index fe708ad1cd..756d392e3f 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage400ResponseErrorErrorsInner.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/ErrorItem.scala @@ -15,9 +15,9 @@ */ package algoliasearch.usage -/** GetUsage400ResponseErrorErrorsInner +/** ErrorItem */ -case class GetUsage400ResponseErrorErrorsInner( +case class ErrorItem( code: Option[String] = scala.None, message: String, line: Option[Int] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage400Response.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/Forbidden.scala similarity index 93% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage400Response.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/Forbidden.scala index de464b278f..e5cb39dca2 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage400Response.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/Forbidden.scala @@ -15,8 +15,8 @@ */ package algoliasearch.usage -/** GetUsage400Response +/** Forbidden */ -case class GetUsage400Response( - error: GetUsage400ResponseError +case class Forbidden( + error: ForbiddenError ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage400ResponseError.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/ForbiddenError.scala similarity index 90% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage400ResponseError.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/ForbiddenError.scala index 8ebb278b03..a559c0a2b3 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage400ResponseError.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/ForbiddenError.scala @@ -15,10 +15,10 @@ */ package algoliasearch.usage -/** GetUsage400ResponseError +/** ForbiddenError */ -case class GetUsage400ResponseError( +case class ForbiddenError( code: Option[String] = scala.None, message: Option[String] = scala.None, - errors: Option[Seq[GetUsage400ResponseErrorErrorsInner]] = scala.None + errors: Option[Seq[ErrorItem]] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage200Response.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/IndexUsage.scala similarity index 90% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage200Response.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/IndexUsage.scala index b9fd9f60c3..ed6e86d162 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage200Response.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/IndexUsage.scala @@ -15,8 +15,8 @@ */ package algoliasearch.usage -/** GetUsage200Response +/** IndexUsage */ -case class GetUsage200Response( - statistics: Option[Seq[GetUsage200ResponseStatisticsInner]] = scala.None +case class IndexUsage( + statistics: Option[Seq[StatisticEntry]] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/InvalidRequest.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/InvalidRequest.scala new file mode 100644 index 0000000000..1a11390bcf --- /dev/null +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/InvalidRequest.scala @@ -0,0 +1,22 @@ +/** Usage API The Usage API gives you access to statistics about all requests made to your Algolia applications. ## Base + * URL The base URL for requests to the Usage API is: - `https://usage.algolia.com` **All requests must use HTTPS.** ## + * Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia + * application ID. - `x-algolia-api-key`. The Usage API key. You can find your application ID and Usage API key in the + * [Algolia dashboard](https://dashboard.algolia.com/account). ## Response status and errors The Usage API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current + * version of the Usage API is version 1, as indicated by the `/1/` in each endpoint's URL. + * + * The version of the OpenAPI document: 1.0.0 + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech Do not edit the class manually. + */ +package algoliasearch.usage + +/** InvalidRequest + */ +case class InvalidRequest( + error: InvalidRequestError +) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/InvalidRequestError.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/InvalidRequestError.scala new file mode 100644 index 0000000000..b908ceb883 --- /dev/null +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/InvalidRequestError.scala @@ -0,0 +1,24 @@ +/** Usage API The Usage API gives you access to statistics about all requests made to your Algolia applications. ## Base + * URL The base URL for requests to the Usage API is: - `https://usage.algolia.com` **All requests must use HTTPS.** ## + * Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia + * application ID. - `x-algolia-api-key`. The Usage API key. You can find your application ID and Usage API key in the + * [Algolia dashboard](https://dashboard.algolia.com/account). ## Response status and errors The Usage API returns JSON + * responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API + * response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are + * indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current + * version of the Usage API is version 1, as indicated by the `/1/` in each endpoint's URL. + * + * The version of the OpenAPI document: 1.0.0 + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech Do not edit the class manually. + */ +package algoliasearch.usage + +/** InvalidRequestError + */ +case class InvalidRequestError( + code: Option[String] = scala.None, + message: Option[String] = scala.None, + errors: Option[Seq[ErrorItem]] = scala.None +) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage200ResponseStatisticsInner.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/StatisticEntry.scala similarity index 94% rename from clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage200ResponseStatisticsInner.scala rename to clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/StatisticEntry.scala index 6eb40c9ecb..e2a4692ce1 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/GetUsage200ResponseStatisticsInner.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/usage/StatisticEntry.scala @@ -15,12 +15,12 @@ */ package algoliasearch.usage -/** GetUsage200ResponseStatisticsInner +/** StatisticEntry * * @param t * Timestamp, measured in milliseconds since the Unix epoch. */ -case class GetUsage200ResponseStatisticsInner( +case class StatisticEntry( t: Option[Int] = scala.None, v: Option[StatisticValue] = scala.None ) diff --git a/clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffectsEmptySearch.swift b/clients/algoliasearch-client-swift/Sources/Abtesting/Models/EmptySearchFilter.swift similarity index 84% rename from clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffectsEmptySearch.swift rename to clients/algoliasearch-client-swift/Sources/Abtesting/Models/EmptySearchFilter.swift index 3bd52f3ed1..d03d5f95fb 100644 --- a/clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffectsEmptySearch.swift +++ b/clients/algoliasearch-client-swift/Sources/Abtesting/Models/EmptySearchFilter.swift @@ -7,7 +7,7 @@ import Foundation #endif /// Empty searches removed from the A/B test as a result of configuration settings. -public struct FilterEffectsEmptySearch: Codable, JSONEncodable { +public struct EmptySearchFilter: Codable, JSONEncodable { /// Number of users removed from the A/B test. public var usersCount: Int? /// Number of tracked searches removed from the A/B test. @@ -32,14 +32,14 @@ public struct FilterEffectsEmptySearch: Codable, JSONEncodable { } } -extension FilterEffectsEmptySearch: Equatable { - public static func ==(lhs: FilterEffectsEmptySearch, rhs: FilterEffectsEmptySearch) -> Bool { +extension EmptySearchFilter: Equatable { + public static func ==(lhs: EmptySearchFilter, rhs: EmptySearchFilter) -> Bool { lhs.usersCount == rhs.usersCount && lhs.trackedSearchesCount == rhs.trackedSearchesCount } } -extension FilterEffectsEmptySearch: Hashable { +extension EmptySearchFilter: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.usersCount?.hashValue) hasher.combine(self.trackedSearchesCount?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffects.swift b/clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffects.swift index 5a77a55a78..a7c2141c0d 100644 --- a/clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffects.swift +++ b/clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffects.swift @@ -8,10 +8,10 @@ import Foundation /// A/B test filter effects resulting from configuration settings. public struct FilterEffects: Codable, JSONEncodable { - public var outliers: FilterEffectsOutliers? - public var emptySearch: FilterEffectsEmptySearch? + public var outliers: OutliersFilter? + public var emptySearch: EmptySearchFilter? - public init(outliers: FilterEffectsOutliers? = nil, emptySearch: FilterEffectsEmptySearch? = nil) { + public init(outliers: OutliersFilter? = nil, emptySearch: EmptySearchFilter? = nil) { self.outliers = outliers self.emptySearch = emptySearch } diff --git a/clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffectsOutliers.swift b/clients/algoliasearch-client-swift/Sources/Abtesting/Models/OutliersFilter.swift similarity index 85% rename from clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffectsOutliers.swift rename to clients/algoliasearch-client-swift/Sources/Abtesting/Models/OutliersFilter.swift index 03c90f98e3..e615400bc6 100644 --- a/clients/algoliasearch-client-swift/Sources/Abtesting/Models/FilterEffectsOutliers.swift +++ b/clients/algoliasearch-client-swift/Sources/Abtesting/Models/OutliersFilter.swift @@ -7,7 +7,7 @@ import Foundation #endif /// Outliers removed from the A/B test as a result of configuration settings. -public struct FilterEffectsOutliers: Codable, JSONEncodable { +public struct OutliersFilter: Codable, JSONEncodable { /// Number of users removed from the A/B test. public var usersCount: Int? /// Number of tracked searches removed from the A/B test. @@ -32,14 +32,14 @@ public struct FilterEffectsOutliers: Codable, JSONEncodable { } } -extension FilterEffectsOutliers: Equatable { - public static func ==(lhs: FilterEffectsOutliers, rhs: FilterEffectsOutliers) -> Bool { +extension OutliersFilter: Equatable { + public static func ==(lhs: OutliersFilter, rhs: OutliersFilter) -> Bool { lhs.usersCount == rhs.usersCount && lhs.trackedSearchesCount == rhs.trackedSearchesCount } } -extension FilterEffectsOutliers: Hashable { +extension OutliersFilter: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.usersCount?.hashValue) hasher.combine(self.trackedSearchesCount?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Analytics/Models/ClickPositionsInner.swift b/clients/algoliasearch-client-swift/Sources/Analytics/Models/ClickPosition.swift similarity index 86% rename from clients/algoliasearch-client-swift/Sources/Analytics/Models/ClickPositionsInner.swift rename to clients/algoliasearch-client-swift/Sources/Analytics/Models/ClickPosition.swift index e5790c95bd..79b6e52e9e 100644 --- a/clients/algoliasearch-client-swift/Sources/Analytics/Models/ClickPositionsInner.swift +++ b/clients/algoliasearch-client-swift/Sources/Analytics/Models/ClickPosition.swift @@ -7,7 +7,7 @@ import Foundation #endif /// Click position. -public struct ClickPositionsInner: Codable, JSONEncodable { +public struct ClickPosition: Codable, JSONEncodable { /// Range of positions in the search results, using the pattern `[start,end]`. For positions 11 and up, click /// events are summed over the specified range. `-1` indicates the end of the list of search results. public var position: [Int]? @@ -33,14 +33,14 @@ public struct ClickPositionsInner: Codable, JSONEncodable { } } -extension ClickPositionsInner: Equatable { - public static func ==(lhs: ClickPositionsInner, rhs: ClickPositionsInner) -> Bool { +extension ClickPosition: Equatable { + public static func ==(lhs: ClickPosition, rhs: ClickPosition) -> Bool { lhs.position == rhs.position && lhs.clickCount == rhs.clickCount } } -extension ClickPositionsInner: Hashable { +extension ClickPosition: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.position?.hashValue) hasher.combine(self.clickCount?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Analytics/Models/GetClickPositionsResponse.swift b/clients/algoliasearch-client-swift/Sources/Analytics/Models/GetClickPositionsResponse.swift index 44759a830d..b73e467087 100644 --- a/clients/algoliasearch-client-swift/Sources/Analytics/Models/GetClickPositionsResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Analytics/Models/GetClickPositionsResponse.swift @@ -8,9 +8,9 @@ import Foundation public struct GetClickPositionsResponse: Codable, JSONEncodable { /// List of positions in the search results and clicks associated with this search. - public var positions: [ClickPositionsInner] + public var positions: [ClickPosition] - public init(positions: [ClickPositionsInner]) { + public init(positions: [ClickPosition]) { self.positions = positions } diff --git a/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithAnalytics.swift b/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithAnalytics.swift index ceabc13420..dd1a781228 100644 --- a/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithAnalytics.swift +++ b/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithAnalytics.swift @@ -18,7 +18,7 @@ public struct TopSearchWithAnalytics: Codable, JSONEncodable { /// search requests with `clickAnalytics` set to true. public var averageClickPosition: Double? /// List of positions in the search results and clicks associated with this search. - public var clickPositions: [ClickPositionsInner] + public var clickPositions: [ClickPosition] /// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the /// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to /// true. @@ -37,7 +37,7 @@ public struct TopSearchWithAnalytics: Codable, JSONEncodable { count: Int, clickThroughRate: Double?, averageClickPosition: Double?, - clickPositions: [ClickPositionsInner], + clickPositions: [ClickPosition], conversionRate: Double?, trackedSearchCount: Int, clickCount: Int, diff --git a/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithRevenueAnalytics.swift b/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithRevenueAnalytics.swift index 7611df31a5..20147bc4c4 100644 --- a/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithRevenueAnalytics.swift +++ b/clients/algoliasearch-client-swift/Sources/Analytics/Models/TopSearchWithRevenueAnalytics.swift @@ -18,7 +18,7 @@ public struct TopSearchWithRevenueAnalytics: Codable, JSONEncodable { /// search requests with `clickAnalytics` set to true. public var averageClickPosition: Double? /// List of positions in the search results and clicks associated with this search. - public var clickPositions: [ClickPositionsInner] + public var clickPositions: [ClickPosition] /// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the /// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to /// true. @@ -50,7 +50,7 @@ public struct TopSearchWithRevenueAnalytics: Codable, JSONEncodable { count: Int, clickThroughRate: Double?, averageClickPosition: Double?, - clickPositions: [ClickPositionsInner], + clickPositions: [ClickPosition], conversionRate: Double?, trackedSearchCount: Int, clickCount: Int, diff --git a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DockerStreamsInput.swift b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DockerStreamsInput.swift index 86eb2da5e2..964cf29360 100644 --- a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DockerStreamsInput.swift +++ b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DockerStreamsInput.swift @@ -6,6 +6,7 @@ import Foundation import Core #endif +/// The selected streams of a singer or airbyte connector. public struct DockerStreamsInput: Codable, JSONEncodable { public var streams: AnyCodable diff --git a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationTryResponseError.swift b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationError.swift similarity index 80% rename from clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationTryResponseError.swift rename to clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationError.swift index 361ba6b808..0bb4edcad8 100644 --- a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationTryResponseError.swift +++ b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationError.swift @@ -7,7 +7,7 @@ import Foundation #endif /// The error if the transformation failed. -public struct TransformationTryResponseError: Codable, JSONEncodable { +public struct TransformationError: Codable, JSONEncodable { /// The error status code. public var code: Int? /// A descriptive message explaining the failure. @@ -32,14 +32,14 @@ public struct TransformationTryResponseError: Codable, JSONEncodable { } } -extension TransformationTryResponseError: Equatable { - public static func ==(lhs: TransformationTryResponseError, rhs: TransformationTryResponseError) -> Bool { +extension TransformationError: Equatable { + public static func ==(lhs: TransformationError, rhs: TransformationError) -> Bool { lhs.code == rhs.code && lhs.message == rhs.message } } -extension TransformationTryResponseError: Hashable { +extension TransformationError: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.code?.hashValue) hasher.combine(self.message?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationTryResponse.swift b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationTryResponse.swift index 27f6b39893..a650d1b15d 100644 --- a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationTryResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/TransformationTryResponse.swift @@ -9,9 +9,9 @@ import Foundation public struct TransformationTryResponse: Codable, JSONEncodable { /// The array of records returned by the transformation service. public var payloads: [AnyCodable] - public var error: TransformationTryResponseError? + public var error: TransformationError? - public init(payloads: [AnyCodable], error: TransformationTryResponseError? = nil) { + public init(payloads: [AnyCodable], error: TransformationError? = nil) { self.payloads = payloads self.error = error } diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/GetServers403Response.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/BadRequest.swift similarity index 77% rename from clients/algoliasearch-client-swift/Sources/Monitoring/Models/GetServers403Response.swift rename to clients/algoliasearch-client-swift/Sources/Monitoring/Models/BadRequest.swift index b41b5aa653..232ca1d03c 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/GetServers403Response.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/BadRequest.swift @@ -6,7 +6,7 @@ import Foundation import Core #endif -public struct GetServers403Response: Codable, JSONEncodable { +public struct BadRequest: Codable, JSONEncodable { public var reason: String? public init(reason: String? = nil) { @@ -25,13 +25,13 @@ public struct GetServers403Response: Codable, JSONEncodable { } } -extension GetServers403Response: Equatable { - public static func ==(lhs: GetServers403Response, rhs: GetServers403Response) -> Bool { +extension BadRequest: Equatable { + public static func ==(lhs: BadRequest, rhs: BadRequest) -> Bool { lhs.reason == rhs.reason } } -extension GetServers403Response: Hashable { +extension BadRequest: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.reason?.hashValue) } diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentsInner.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentEntry.swift similarity index 83% rename from clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentsInner.swift rename to clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentEntry.swift index 70d2789395..e7a4c22b5b 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentsInner.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentEntry.swift @@ -6,7 +6,7 @@ import Foundation import Core #endif -public struct IncidentsInner: Codable, JSONEncodable { +public struct IncidentEntry: Codable, JSONEncodable { /// Timestamp, measured in milliseconds since the Unix epoch. public var t: Int64? public var v: Incident? @@ -30,14 +30,14 @@ public struct IncidentsInner: Codable, JSONEncodable { } } -extension IncidentsInner: Equatable { - public static func ==(lhs: IncidentsInner, rhs: IncidentsInner) -> Bool { +extension IncidentEntry: Equatable { + public static func ==(lhs: IncidentEntry, rhs: IncidentEntry) -> Bool { lhs.t == rhs.t && lhs.v == rhs.v } } -extension IncidentsInner: Hashable { +extension IncidentEntry: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.t?.hashValue) hasher.combine(self.v?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentsResponse.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentsResponse.swift index 586e533f9c..5b6d96bb97 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentsResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IncidentsResponse.swift @@ -7,9 +7,9 @@ import Foundation #endif public struct IncidentsResponse: Codable, JSONEncodable { - public var incidents: [String: [IncidentsInner]]? + public var incidents: [String: [IncidentEntry]]? - public init(incidents: [String: [IncidentsInner]]? = nil) { + public init(incidents: [String: [IncidentEntry]]? = nil) { self.incidents = incidents } diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingTimeResponseMetrics.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingMetric.swift similarity index 66% rename from clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingTimeResponseMetrics.swift rename to clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingMetric.swift index bab07e0798..b692d9d495 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingTimeResponseMetrics.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingMetric.swift @@ -6,10 +6,10 @@ import Foundation import Core #endif -public struct IndexingTimeResponseMetrics: Codable, JSONEncodable { - public var indexing: [String: [TimeInner]]? +public struct IndexingMetric: Codable, JSONEncodable { + public var indexing: [String: [TimeEntry]]? - public init(indexing: [String: [TimeInner]]? = nil) { + public init(indexing: [String: [TimeEntry]]? = nil) { self.indexing = indexing } @@ -25,13 +25,13 @@ public struct IndexingTimeResponseMetrics: Codable, JSONEncodable { } } -extension IndexingTimeResponseMetrics: Equatable { - public static func ==(lhs: IndexingTimeResponseMetrics, rhs: IndexingTimeResponseMetrics) -> Bool { +extension IndexingMetric: Equatable { + public static func ==(lhs: IndexingMetric, rhs: IndexingMetric) -> Bool { lhs.indexing == rhs.indexing } } -extension IndexingTimeResponseMetrics: Hashable { +extension IndexingMetric: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.indexing?.hashValue) } diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingTimeResponse.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingTimeResponse.swift index 810c76b0aa..9ac31eda28 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingTimeResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/IndexingTimeResponse.swift @@ -7,9 +7,9 @@ import Foundation #endif public struct IndexingTimeResponse: Codable, JSONEncodable { - public var metrics: IndexingTimeResponseMetrics? + public var metrics: IndexingMetric? - public init(metrics: IndexingTimeResponseMetrics? = nil) { + public init(metrics: IndexingMetric? = nil) { self.metrics = metrics } diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/InfrastructureResponse.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/InfrastructureResponse.swift index 12597d8104..8010b49a62 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/InfrastructureResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/InfrastructureResponse.swift @@ -7,9 +7,9 @@ import Foundation #endif public struct InfrastructureResponse: Codable, JSONEncodable { - public var metrics: InfrastructureResponseMetrics? + public var metrics: Metrics? - public init(metrics: InfrastructureResponseMetrics? = nil) { + public init(metrics: Metrics? = nil) { self.metrics = metrics } diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyResponseMetrics.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyMetric.swift similarity index 68% rename from clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyResponseMetrics.swift rename to clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyMetric.swift index ec35ec354a..63baddee39 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyResponseMetrics.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyMetric.swift @@ -6,10 +6,10 @@ import Foundation import Core #endif -public struct LatencyResponseMetrics: Codable, JSONEncodable { - public var latency: [String: [TimeInner]]? +public struct LatencyMetric: Codable, JSONEncodable { + public var latency: [String: [TimeEntry]]? - public init(latency: [String: [TimeInner]]? = nil) { + public init(latency: [String: [TimeEntry]]? = nil) { self.latency = latency } @@ -25,13 +25,13 @@ public struct LatencyResponseMetrics: Codable, JSONEncodable { } } -extension LatencyResponseMetrics: Equatable { - public static func ==(lhs: LatencyResponseMetrics, rhs: LatencyResponseMetrics) -> Bool { +extension LatencyMetric: Equatable { + public static func ==(lhs: LatencyMetric, rhs: LatencyMetric) -> Bool { lhs.latency == rhs.latency } } -extension LatencyResponseMetrics: Hashable { +extension LatencyMetric: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.latency?.hashValue) } diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyResponse.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyResponse.swift index cf9d123413..0effc0421b 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/LatencyResponse.swift @@ -7,9 +7,9 @@ import Foundation #endif public struct LatencyResponse: Codable, JSONEncodable { - public var metrics: LatencyResponseMetrics? + public var metrics: LatencyMetric? - public init(metrics: LatencyResponseMetrics? = nil) { + public init(metrics: LatencyMetric? = nil) { self.metrics = metrics } diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/InfrastructureResponseMetrics.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/Metrics.swift similarity index 90% rename from clients/algoliasearch-client-swift/Sources/Monitoring/Models/InfrastructureResponseMetrics.swift rename to clients/algoliasearch-client-swift/Sources/Monitoring/Models/Metrics.swift index f0a0bcd368..a13bdd200b 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/InfrastructureResponseMetrics.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/Metrics.swift @@ -6,7 +6,7 @@ import Foundation import Core #endif -public struct InfrastructureResponseMetrics: Codable, JSONEncodable { +public struct Metrics: Codable, JSONEncodable { /// CPU idleness in %. public var cpuUsage: [String: [ProbesMetric]]? /// RAM used for indexing in MB. @@ -53,8 +53,8 @@ public struct InfrastructureResponseMetrics: Codable, JSONEncodable { } } -extension InfrastructureResponseMetrics: Equatable { - public static func ==(lhs: InfrastructureResponseMetrics, rhs: InfrastructureResponseMetrics) -> Bool { +extension Metrics: Equatable { + public static func ==(lhs: Metrics, rhs: Metrics) -> Bool { lhs.cpuUsage == rhs.cpuUsage && lhs.ramIndexingUsage == rhs.ramIndexingUsage && lhs.ramSearchUsage == rhs.ramSearchUsage && @@ -63,7 +63,7 @@ extension InfrastructureResponseMetrics: Equatable { } } -extension InfrastructureResponseMetrics: Hashable { +extension Metrics: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.cpuUsage?.hashValue) hasher.combine(self.ramIndexingUsage?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/MonitoringForbidden.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/MonitoringForbidden.swift new file mode 100644 index 0000000000..2cedfbfbca --- /dev/null +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/MonitoringForbidden.swift @@ -0,0 +1,38 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on +// https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import Foundation +#if canImport(Core) + import Core +#endif + +public struct MonitoringForbidden: Codable, JSONEncodable { + public var reason: String? + + public init(reason: String? = nil) { + self.reason = reason + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case reason + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(self.reason, forKey: .reason) + } +} + +extension MonitoringForbidden: Equatable { + public static func ==(lhs: MonitoringForbidden, rhs: MonitoringForbidden) -> Bool { + lhs.reason == rhs.reason + } +} + +extension MonitoringForbidden: Hashable { + public func hash(into hasher: inout Hasher) { + hasher.combine(self.reason?.hashValue) + } +} diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/TimeInner.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/TimeEntry.swift similarity index 85% rename from clients/algoliasearch-client-swift/Sources/Monitoring/Models/TimeInner.swift rename to clients/algoliasearch-client-swift/Sources/Monitoring/Models/TimeEntry.swift index aaa3f673dc..8b58368939 100644 --- a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/TimeInner.swift +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/TimeEntry.swift @@ -6,7 +6,7 @@ import Foundation import Core #endif -public struct TimeInner: Codable, JSONEncodable { +public struct TimeEntry: Codable, JSONEncodable { /// Timestamp, measured in milliseconds since the Unix epoch. public var t: Int64? /// Time in ms. @@ -31,14 +31,14 @@ public struct TimeInner: Codable, JSONEncodable { } } -extension TimeInner: Equatable { - public static func ==(lhs: TimeInner, rhs: TimeInner) -> Bool { +extension TimeEntry: Equatable { + public static func ==(lhs: TimeEntry, rhs: TimeEntry) -> Bool { lhs.t == rhs.t && lhs.v == rhs.v } } -extension TimeInner: Hashable { +extension TimeEntry: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.t?.hashValue) hasher.combine(self.v?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Monitoring/Models/Unauthorized.swift b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/Unauthorized.swift new file mode 100644 index 0000000000..e01e32d142 --- /dev/null +++ b/clients/algoliasearch-client-swift/Sources/Monitoring/Models/Unauthorized.swift @@ -0,0 +1,38 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on +// https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import Foundation +#if canImport(Core) + import Core +#endif + +public struct Unauthorized: Codable, JSONEncodable { + public var reason: String? + + public init(reason: String? = nil) { + self.reason = reason + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case reason + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(self.reason, forKey: .reason) + } +} + +extension Unauthorized: Equatable { + public static func ==(lhs: Unauthorized, rhs: Unauthorized) -> Bool { + lhs.reason == rhs.reason + } +} + +extension Unauthorized: Hashable { + public func hash(into hasher: inout Hasher) { + hasher.combine(self.reason?.hashValue) + } +} diff --git a/clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/GetConfigStatus200Response.swift b/clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/ConfigStatus.swift similarity index 91% rename from clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/GetConfigStatus200Response.swift rename to clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/ConfigStatus.swift index 5f9c702064..d7e5c8b723 100644 --- a/clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/GetConfigStatus200Response.swift +++ b/clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/ConfigStatus.swift @@ -6,7 +6,7 @@ import Foundation import Core #endif -public struct GetConfigStatus200Response: Codable, JSONEncodable { +public struct ConfigStatus: Codable, JSONEncodable { /// Name of the Query Suggestions index (case-sensitive). public var indexName: String? /// Whether the creation or update of the Query Suggestions index is in progress. @@ -52,8 +52,8 @@ public struct GetConfigStatus200Response: Codable, JSONEncodable { } } -extension GetConfigStatus200Response: Equatable { - public static func ==(lhs: GetConfigStatus200Response, rhs: GetConfigStatus200Response) -> Bool { +extension ConfigStatus: Equatable { + public static func ==(lhs: ConfigStatus, rhs: ConfigStatus) -> Bool { lhs.indexName == rhs.indexName && lhs.isRunning == rhs.isRunning && lhs.lastBuiltAt == rhs.lastBuiltAt && @@ -62,7 +62,7 @@ extension GetConfigStatus200Response: Equatable { } } -extension GetConfigStatus200Response: Hashable { +extension ConfigStatus: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.indexName?.hashValue) hasher.combine(self.isRunning?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/GetLogFile200Response.swift b/clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/LogFile.swift similarity index 89% rename from clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/GetLogFile200Response.swift rename to clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/LogFile.swift index fce478e33e..f2bf7b4b9e 100644 --- a/clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/GetLogFile200Response.swift +++ b/clients/algoliasearch-client-swift/Sources/QuerySuggestions/Models/LogFile.swift @@ -6,7 +6,7 @@ import Foundation import Core #endif -public struct GetLogFile200Response: Codable, JSONEncodable { +public struct LogFile: Codable, JSONEncodable { /// Date and time of the log entry, in RFC 3339 format. public var timestamp: String? public var level: ModelLogLevel? @@ -46,8 +46,8 @@ public struct GetLogFile200Response: Codable, JSONEncodable { } } -extension GetLogFile200Response: Equatable { - public static func ==(lhs: GetLogFile200Response, rhs: GetLogFile200Response) -> Bool { +extension LogFile: Equatable { + public static func ==(lhs: LogFile, rhs: LogFile) -> Bool { lhs.timestamp == rhs.timestamp && lhs.level == rhs.level && lhs.message == rhs.message && @@ -55,7 +55,7 @@ extension GetLogFile200Response: Equatable { } } -extension GetLogFile200Response: Hashable { +extension LogFile: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.timestamp?.hashValue) hasher.combine(self.level?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/QuerySuggestions/QuerySuggestionsClient.swift b/clients/algoliasearch-client-swift/Sources/QuerySuggestions/QuerySuggestionsClient.swift index 984548b1f2..30e3671a76 100644 --- a/clients/algoliasearch-client-swift/Sources/QuerySuggestions/QuerySuggestionsClient.swift +++ b/clients/algoliasearch-client-swift/Sources/QuerySuggestions/QuerySuggestionsClient.swift @@ -487,13 +487,10 @@ open class QuerySuggestionsClient { } /// - parameter indexName: (path) Query Suggestions index name. - /// - returns: GetConfigStatus200Response + /// - returns: ConfigStatus @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) - open func getConfigStatus( - indexName: String, - requestOptions: RequestOptions? = nil - ) async throws -> GetConfigStatus200Response { - let response: Response = try await getConfigStatusWithHTTPInfo( + open func getConfigStatus(indexName: String, requestOptions: RequestOptions? = nil) async throws -> ConfigStatus { + let response: Response = try await getConfigStatusWithHTTPInfo( indexName: indexName, requestOptions: requestOptions ) @@ -510,12 +507,12 @@ open class QuerySuggestionsClient { // - settings // // - parameter indexName: (path) Query Suggestions index name. - // - returns: RequestBuilder + // - returns: RequestBuilder open func getConfigStatusWithHTTPInfo( indexName: String, requestOptions userRequestOptions: RequestOptions? = nil - ) async throws -> Response { + ) async throws -> Response { guard !indexName.isEmpty else { throw AlgoliaError.invalidArgument("indexName", "getConfigStatus") } @@ -546,13 +543,10 @@ open class QuerySuggestionsClient { } /// - parameter indexName: (path) Query Suggestions index name. - /// - returns: GetLogFile200Response + /// - returns: LogFile @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) - open func getLogFile( - indexName: String, - requestOptions: RequestOptions? = nil - ) async throws -> GetLogFile200Response { - let response: Response = try await getLogFileWithHTTPInfo( + open func getLogFile(indexName: String, requestOptions: RequestOptions? = nil) async throws -> LogFile { + let response: Response = try await getLogFileWithHTTPInfo( indexName: indexName, requestOptions: requestOptions ) @@ -569,12 +563,12 @@ open class QuerySuggestionsClient { // - settings // // - parameter indexName: (path) Query Suggestions index name. - // - returns: RequestBuilder + // - returns: RequestBuilder open func getLogFileWithHTTPInfo( indexName: String, requestOptions userRequestOptions: RequestOptions? = nil - ) async throws -> Response { + ) async throws -> Response { guard !indexName.isEmpty else { throw AlgoliaError.invalidArgument("indexName", "getLogFile") } diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendAroundPrecision.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendAroundPrecision.swift index adfecce992..7b60e8335a 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendAroundPrecision.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendAroundPrecision.swift @@ -10,14 +10,14 @@ import Foundation /// considers all matches within the same range of distances to be equal. public enum RecommendAroundPrecision: Codable, JSONEncodable, AbstractEncodable { case int(Int) - case arrayOfRecommendAroundPrecisionFromValueInner([RecommendAroundPrecisionFromValueInner]) + case arrayOfRecommendRange([RecommendRange]) public func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() switch self { case let .int(value): try container.encode(value) - case let .arrayOfRecommendAroundPrecisionFromValueInner(value): + case let .arrayOfRecommendRange(value): try container.encode(value) } } @@ -26,8 +26,8 @@ public enum RecommendAroundPrecision: Codable, JSONEncodable, AbstractEncodable let container = try decoder.singleValueContainer() if let value = try? container.decode(Int.self) { self = .int(value) - } else if let value = try? container.decode([RecommendAroundPrecisionFromValueInner].self) { - self = .arrayOfRecommendAroundPrecisionFromValueInner(value) + } else if let value = try? container.decode([RecommendRange].self) { + self = .arrayOfRecommendRange(value) } else { throw DecodingError.typeMismatch( Self.Type.self, @@ -43,8 +43,8 @@ public enum RecommendAroundPrecision: Codable, JSONEncodable, AbstractEncodable switch self { case let .int(value): value as Int - case let .arrayOfRecommendAroundPrecisionFromValueInner(value): - value as [RecommendAroundPrecisionFromValueInner] + case let .arrayOfRecommendRange(value): + value as [RecommendRange] } } } diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchAroundPrecisionFromValueInner.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRange.swift similarity index 81% rename from clients/algoliasearch-client-swift/Sources/Search/Models/SearchAroundPrecisionFromValueInner.swift rename to clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRange.swift index 4fff6654bd..c16997bd5e 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchAroundPrecisionFromValueInner.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRange.swift @@ -7,7 +7,7 @@ import Foundation #endif /// Range object with lower and upper values in meters to define custom ranges. -public struct SearchAroundPrecisionFromValueInner: Codable, JSONEncodable { +public struct RecommendRange: Codable, JSONEncodable { /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be /// equal. public var from: Int? @@ -34,14 +34,14 @@ public struct SearchAroundPrecisionFromValueInner: Codable, JSONEncodable { } } -extension SearchAroundPrecisionFromValueInner: Equatable { - public static func ==(lhs: SearchAroundPrecisionFromValueInner, rhs: SearchAroundPrecisionFromValueInner) -> Bool { +extension RecommendRange: Equatable { + public static func ==(lhs: RecommendRange, rhs: RecommendRange) -> Bool { lhs.from == rhs.from && lhs.value == rhs.value } } -extension SearchAroundPrecisionFromValueInner: Hashable { +extension RecommendRange: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.from?.hashValue) hasher.combine(self.value?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexMetadataData.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexData.swift similarity index 73% rename from clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexMetadataData.swift rename to clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexData.swift index bfdaadc97f..798ca96dd6 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexMetadataData.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexData.swift @@ -7,7 +7,7 @@ import Foundation #endif /// Redirect rule data. -public struct SearchRedirectRuleIndexMetadataData: Codable, JSONEncodable { +public struct RecommendRedirectRuleIndexData: Codable, JSONEncodable { public var ruleObjectID: String public init(ruleObjectID: String) { @@ -26,13 +26,13 @@ public struct SearchRedirectRuleIndexMetadataData: Codable, JSONEncodable { } } -extension SearchRedirectRuleIndexMetadataData: Equatable { - public static func ==(lhs: SearchRedirectRuleIndexMetadataData, rhs: SearchRedirectRuleIndexMetadataData) -> Bool { +extension RecommendRedirectRuleIndexData: Equatable { + public static func ==(lhs: RecommendRedirectRuleIndexData, rhs: RecommendRedirectRuleIndexData) -> Bool { lhs.ruleObjectID == rhs.ruleObjectID } } -extension SearchRedirectRuleIndexMetadataData: Hashable { +extension RecommendRedirectRuleIndexData: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.ruleObjectID.hashValue) } diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexMetadata.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexMetadata.swift index ca107c3973..dba6ea895b 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexMetadata.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexMetadata.swift @@ -15,15 +15,9 @@ public struct RecommendRedirectRuleIndexMetadata: Codable, JSONEncodable { public var reason: String /// Redirect rule status. public var succeed: Bool - public var data: RecommendRedirectRuleIndexMetadataData + public var data: RecommendRedirectRuleIndexData - public init( - source: String, - dest: String, - reason: String, - succeed: Bool, - data: RecommendRedirectRuleIndexMetadataData - ) { + public init(source: String, dest: String, reason: String, succeed: Bool, data: RecommendRedirectRuleIndexData) { self.source = source self.dest = dest self.reason = reason diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRule.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRule.swift index 59d3e90b52..0131b4cc7c 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRule.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRule.swift @@ -8,7 +8,7 @@ import Foundation /// Recommend rule. public struct RecommendRule: Codable, JSONEncodable { - public var metadata: RecommendRuleMetadata? + public var metadata: RuleMetadata? /// Unique identifier of a rule object. public var objectID: String? public var condition: RecommendCondition? @@ -19,7 +19,7 @@ public struct RecommendRule: Codable, JSONEncodable { public var enabled: Bool? public init( - metadata: RecommendRuleMetadata? = nil, + metadata: RuleMetadata? = nil, objectID: String? = nil, condition: RecommendCondition? = nil, consequence: RecommendConsequence? = nil, diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRuleMetadata.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RuleMetadata.swift similarity index 79% rename from clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRuleMetadata.swift rename to clients/algoliasearch-client-swift/Sources/Recommend/Models/RuleMetadata.swift index dcb292a426..a0f59c3c17 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRuleMetadata.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RuleMetadata.swift @@ -7,7 +7,7 @@ import Foundation #endif /// Rule metadata. -public struct RecommendRuleMetadata: Codable, JSONEncodable { +public struct RuleMetadata: Codable, JSONEncodable { /// Date and time when the object was updated, in RFC 3339 format. public var lastUpdate: String? @@ -27,13 +27,13 @@ public struct RecommendRuleMetadata: Codable, JSONEncodable { } } -extension RecommendRuleMetadata: Equatable { - public static func ==(lhs: RecommendRuleMetadata, rhs: RecommendRuleMetadata) -> Bool { +extension RuleMetadata: Equatable { + public static func ==(lhs: RuleMetadata, rhs: RuleMetadata) -> Bool { lhs.lastUpdate == rhs.lastUpdate } } -extension RecommendRuleMetadata: Hashable { +extension RuleMetadata: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.lastUpdate?.hashValue) } diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchAroundPrecision.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchAroundPrecision.swift index 951930b896..f57f9d40f8 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchAroundPrecision.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchAroundPrecision.swift @@ -10,14 +10,14 @@ import Foundation /// considers all matches within the same range of distances to be equal. public enum SearchAroundPrecision: Codable, JSONEncodable, AbstractEncodable { case int(Int) - case arrayOfSearchAroundPrecisionFromValueInner([SearchAroundPrecisionFromValueInner]) + case arrayOfSearchRange([SearchRange]) public func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() switch self { case let .int(value): try container.encode(value) - case let .arrayOfSearchAroundPrecisionFromValueInner(value): + case let .arrayOfSearchRange(value): try container.encode(value) } } @@ -26,8 +26,8 @@ public enum SearchAroundPrecision: Codable, JSONEncodable, AbstractEncodable { let container = try decoder.singleValueContainer() if let value = try? container.decode(Int.self) { self = .int(value) - } else if let value = try? container.decode([SearchAroundPrecisionFromValueInner].self) { - self = .arrayOfSearchAroundPrecisionFromValueInner(value) + } else if let value = try? container.decode([SearchRange].self) { + self = .arrayOfSearchRange(value) } else { throw DecodingError.typeMismatch( Self.Type.self, @@ -43,8 +43,8 @@ public enum SearchAroundPrecision: Codable, JSONEncodable, AbstractEncodable { switch self { case let .int(value): value as Int - case let .arrayOfSearchAroundPrecisionFromValueInner(value): - value as [SearchAroundPrecisionFromValueInner] + case let .arrayOfSearchRange(value): + value as [SearchRange] } } } diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsString.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsString.swift index 139e36c9d4..d4ce6ce49b 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsString.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchParamsString.swift @@ -6,6 +6,7 @@ import Foundation import Core #endif +/// Search parameters as query string. public struct SearchParamsString: Codable, JSONEncodable { /// Search parameters as a URL-encoded query string. public var params: String? diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendAroundPrecisionFromValueInner.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRange.swift similarity index 79% rename from clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendAroundPrecisionFromValueInner.swift rename to clients/algoliasearch-client-swift/Sources/Search/Models/SearchRange.swift index d9482015ca..cfeb1db47b 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendAroundPrecisionFromValueInner.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRange.swift @@ -7,7 +7,7 @@ import Foundation #endif /// Range object with lower and upper values in meters to define custom ranges. -public struct RecommendAroundPrecisionFromValueInner: Codable, JSONEncodable { +public struct SearchRange: Codable, JSONEncodable { /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be /// equal. public var from: Int? @@ -34,17 +34,14 @@ public struct RecommendAroundPrecisionFromValueInner: Codable, JSONEncodable { } } -extension RecommendAroundPrecisionFromValueInner: Equatable { - public static func ==( - lhs: RecommendAroundPrecisionFromValueInner, - rhs: RecommendAroundPrecisionFromValueInner - ) -> Bool { +extension SearchRange: Equatable { + public static func ==(lhs: SearchRange, rhs: SearchRange) -> Bool { lhs.from == rhs.from && lhs.value == rhs.value } } -extension RecommendAroundPrecisionFromValueInner: Hashable { +extension SearchRange: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.from?.hashValue) hasher.combine(self.value?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexMetadataData.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexData.swift similarity index 71% rename from clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexMetadataData.swift rename to clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexData.swift index b0f2b8d3c6..5c785564e3 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendRedirectRuleIndexMetadataData.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexData.swift @@ -7,7 +7,7 @@ import Foundation #endif /// Redirect rule data. -public struct RecommendRedirectRuleIndexMetadataData: Codable, JSONEncodable { +public struct SearchRedirectRuleIndexData: Codable, JSONEncodable { public var ruleObjectID: String public init(ruleObjectID: String) { @@ -26,16 +26,13 @@ public struct RecommendRedirectRuleIndexMetadataData: Codable, JSONEncodable { } } -extension RecommendRedirectRuleIndexMetadataData: Equatable { - public static func ==( - lhs: RecommendRedirectRuleIndexMetadataData, - rhs: RecommendRedirectRuleIndexMetadataData - ) -> Bool { +extension SearchRedirectRuleIndexData: Equatable { + public static func ==(lhs: SearchRedirectRuleIndexData, rhs: SearchRedirectRuleIndexData) -> Bool { lhs.ruleObjectID == rhs.ruleObjectID } } -extension RecommendRedirectRuleIndexMetadataData: Hashable { +extension SearchRedirectRuleIndexData: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.ruleObjectID.hashValue) } diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexMetadata.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexMetadata.swift index 9f34beb4af..91b52be42a 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexMetadata.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchRedirectRuleIndexMetadata.swift @@ -15,15 +15,9 @@ public struct SearchRedirectRuleIndexMetadata: Codable, JSONEncodable { public var reason: String /// Redirect rule status. public var succeed: Bool - public var data: SearchRedirectRuleIndexMetadataData + public var data: SearchRedirectRuleIndexData - public init( - source: String, - dest: String, - reason: String, - succeed: Bool, - data: SearchRedirectRuleIndexMetadataData - ) { + public init(source: String, dest: String, reason: String, succeed: Bool, data: SearchRedirectRuleIndexData) { self.source = source self.dest = dest self.reason = reason diff --git a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage400ResponseErrorErrorsInner.swift b/clients/algoliasearch-client-swift/Sources/Usage/Models/ErrorItem.swift similarity index 83% rename from clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage400ResponseErrorErrorsInner.swift rename to clients/algoliasearch-client-swift/Sources/Usage/Models/ErrorItem.swift index 5e60249817..925f42e671 100644 --- a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage400ResponseErrorErrorsInner.swift +++ b/clients/algoliasearch-client-swift/Sources/Usage/Models/ErrorItem.swift @@ -6,7 +6,7 @@ import Foundation import Core #endif -public struct GetUsage400ResponseErrorErrorsInner: Codable, JSONEncodable { +public struct ErrorItem: Codable, JSONEncodable { public var code: String? public var message: String public var line: Int? @@ -37,8 +37,8 @@ public struct GetUsage400ResponseErrorErrorsInner: Codable, JSONEncodable { } } -extension GetUsage400ResponseErrorErrorsInner: Equatable { - public static func ==(lhs: GetUsage400ResponseErrorErrorsInner, rhs: GetUsage400ResponseErrorErrorsInner) -> Bool { +extension ErrorItem: Equatable { + public static func ==(lhs: ErrorItem, rhs: ErrorItem) -> Bool { lhs.code == rhs.code && lhs.message == rhs.message && lhs.line == rhs.line && @@ -46,7 +46,7 @@ extension GetUsage400ResponseErrorErrorsInner: Equatable { } } -extension GetUsage400ResponseErrorErrorsInner: Hashable { +extension ErrorItem: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.code?.hashValue) hasher.combine(self.message.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage400ResponseError.swift b/clients/algoliasearch-client-swift/Sources/Usage/Models/ForbiddenError.swift similarity index 77% rename from clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage400ResponseError.swift rename to clients/algoliasearch-client-swift/Sources/Usage/Models/ForbiddenError.swift index 8353601143..bb01acc18a 100644 --- a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage400ResponseError.swift +++ b/clients/algoliasearch-client-swift/Sources/Usage/Models/ForbiddenError.swift @@ -6,12 +6,12 @@ import Foundation import Core #endif -public struct GetUsage400ResponseError: Codable, JSONEncodable { +public struct ForbiddenError: Codable, JSONEncodable { public var code: String? public var message: String? - public var errors: [GetUsage400ResponseErrorErrorsInner]? + public var errors: [ErrorItem]? - public init(code: String? = nil, message: String? = nil, errors: [GetUsage400ResponseErrorErrorsInner]? = nil) { + public init(code: String? = nil, message: String? = nil, errors: [ErrorItem]? = nil) { self.code = code self.message = message self.errors = errors @@ -33,15 +33,15 @@ public struct GetUsage400ResponseError: Codable, JSONEncodable { } } -extension GetUsage400ResponseError: Equatable { - public static func ==(lhs: GetUsage400ResponseError, rhs: GetUsage400ResponseError) -> Bool { +extension ForbiddenError: Equatable { + public static func ==(lhs: ForbiddenError, rhs: ForbiddenError) -> Bool { lhs.code == rhs.code && lhs.message == rhs.message && lhs.errors == rhs.errors } } -extension GetUsage400ResponseError: Hashable { +extension ForbiddenError: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.code?.hashValue) hasher.combine(self.message?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage200Response.swift b/clients/algoliasearch-client-swift/Sources/Usage/Models/IndexUsage.swift similarity index 67% rename from clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage200Response.swift rename to clients/algoliasearch-client-swift/Sources/Usage/Models/IndexUsage.swift index 6512980524..f6ba27864d 100644 --- a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage200Response.swift +++ b/clients/algoliasearch-client-swift/Sources/Usage/Models/IndexUsage.swift @@ -6,10 +6,10 @@ import Foundation import Core #endif -public struct GetUsage200Response: Codable, JSONEncodable { - public var statistics: [GetUsage200ResponseStatisticsInner]? +public struct IndexUsage: Codable, JSONEncodable { + public var statistics: [StatisticEntry]? - public init(statistics: [GetUsage200ResponseStatisticsInner]? = nil) { + public init(statistics: [StatisticEntry]? = nil) { self.statistics = statistics } @@ -25,13 +25,13 @@ public struct GetUsage200Response: Codable, JSONEncodable { } } -extension GetUsage200Response: Equatable { - public static func ==(lhs: GetUsage200Response, rhs: GetUsage200Response) -> Bool { +extension IndexUsage: Equatable { + public static func ==(lhs: IndexUsage, rhs: IndexUsage) -> Bool { lhs.statistics == rhs.statistics } } -extension GetUsage200Response: Hashable { +extension IndexUsage: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.statistics?.hashValue) } diff --git a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage400Response.swift b/clients/algoliasearch-client-swift/Sources/Usage/Models/InvalidRequest.swift similarity index 68% rename from clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage400Response.swift rename to clients/algoliasearch-client-swift/Sources/Usage/Models/InvalidRequest.swift index 64bcfbde27..3ebb416627 100644 --- a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage400Response.swift +++ b/clients/algoliasearch-client-swift/Sources/Usage/Models/InvalidRequest.swift @@ -6,10 +6,10 @@ import Foundation import Core #endif -public struct GetUsage400Response: Codable, JSONEncodable { - public var error: GetUsage400ResponseError +public struct InvalidRequest: Codable, JSONEncodable { + public var error: InvalidRequestError - public init(error: GetUsage400ResponseError) { + public init(error: InvalidRequestError) { self.error = error } @@ -25,13 +25,13 @@ public struct GetUsage400Response: Codable, JSONEncodable { } } -extension GetUsage400Response: Equatable { - public static func ==(lhs: GetUsage400Response, rhs: GetUsage400Response) -> Bool { +extension InvalidRequest: Equatable { + public static func ==(lhs: InvalidRequest, rhs: InvalidRequest) -> Bool { lhs.error == rhs.error } } -extension GetUsage400Response: Hashable { +extension InvalidRequest: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.error.hashValue) } diff --git a/clients/algoliasearch-client-swift/Sources/Usage/Models/InvalidRequestError.swift b/clients/algoliasearch-client-swift/Sources/Usage/Models/InvalidRequestError.swift new file mode 100644 index 0000000000..2614ba5d4b --- /dev/null +++ b/clients/algoliasearch-client-swift/Sources/Usage/Models/InvalidRequestError.swift @@ -0,0 +1,50 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on +// https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import Foundation +#if canImport(Core) + import Core +#endif + +public struct InvalidRequestError: Codable, JSONEncodable { + public var code: String? + public var message: String? + public var errors: [ErrorItem]? + + public init(code: String? = nil, message: String? = nil, errors: [ErrorItem]? = nil) { + self.code = code + self.message = message + self.errors = errors + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case code + case message + case errors + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(self.code, forKey: .code) + try container.encodeIfPresent(self.message, forKey: .message) + try container.encodeIfPresent(self.errors, forKey: .errors) + } +} + +extension InvalidRequestError: Equatable { + public static func ==(lhs: InvalidRequestError, rhs: InvalidRequestError) -> Bool { + lhs.code == rhs.code && + lhs.message == rhs.message && + lhs.errors == rhs.errors + } +} + +extension InvalidRequestError: Hashable { + public func hash(into hasher: inout Hasher) { + hasher.combine(self.code?.hashValue) + hasher.combine(self.message?.hashValue) + hasher.combine(self.errors?.hashValue) + } +} diff --git a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage200ResponseStatisticsInner.swift b/clients/algoliasearch-client-swift/Sources/Usage/Models/StatisticEntry.swift similarity index 77% rename from clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage200ResponseStatisticsInner.swift rename to clients/algoliasearch-client-swift/Sources/Usage/Models/StatisticEntry.swift index f809efd597..314659965c 100644 --- a/clients/algoliasearch-client-swift/Sources/Usage/Models/GetUsage200ResponseStatisticsInner.swift +++ b/clients/algoliasearch-client-swift/Sources/Usage/Models/StatisticEntry.swift @@ -6,7 +6,7 @@ import Foundation import Core #endif -public struct GetUsage200ResponseStatisticsInner: Codable, JSONEncodable { +public struct StatisticEntry: Codable, JSONEncodable { /// Timestamp, measured in milliseconds since the Unix epoch. public var t: Int? public var v: StatisticValue? @@ -30,14 +30,14 @@ public struct GetUsage200ResponseStatisticsInner: Codable, JSONEncodable { } } -extension GetUsage200ResponseStatisticsInner: Equatable { - public static func ==(lhs: GetUsage200ResponseStatisticsInner, rhs: GetUsage200ResponseStatisticsInner) -> Bool { +extension StatisticEntry: Equatable { + public static func ==(lhs: StatisticEntry, rhs: StatisticEntry) -> Bool { lhs.t == rhs.t && lhs.v == rhs.v } } -extension GetUsage200ResponseStatisticsInner: Hashable { +extension StatisticEntry: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.t?.hashValue) hasher.combine(self.v?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Usage/Models/UsageForbidden.swift b/clients/algoliasearch-client-swift/Sources/Usage/Models/UsageForbidden.swift new file mode 100644 index 0000000000..6deb4963b3 --- /dev/null +++ b/clients/algoliasearch-client-swift/Sources/Usage/Models/UsageForbidden.swift @@ -0,0 +1,38 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on +// https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +import Foundation +#if canImport(Core) + import Core +#endif + +public struct UsageForbidden: Codable, JSONEncodable { + public var error: ForbiddenError + + public init(error: ForbiddenError) { + self.error = error + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case error + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(self.error, forKey: .error) + } +} + +extension UsageForbidden: Equatable { + public static func ==(lhs: UsageForbidden, rhs: UsageForbidden) -> Bool { + lhs.error == rhs.error + } +} + +extension UsageForbidden: Hashable { + public func hash(into hasher: inout Hasher) { + hasher.combine(self.error.hashValue) + } +} diff --git a/clients/algoliasearch-client-swift/Sources/Usage/UsageClient.swift b/clients/algoliasearch-client-swift/Sources/Usage/UsageClient.swift index 1b15ab7006..50614e9e8d 100644 --- a/clients/algoliasearch-client-swift/Sources/Usage/UsageClient.swift +++ b/clients/algoliasearch-client-swift/Sources/Usage/UsageClient.swift @@ -397,7 +397,7 @@ open class UsageClient { /// - parameter endDate: (query) End date of the period to analyze, in `YYYY-MM-DD` format. /// - parameter granularity: (query) Granularity of the aggregated metrics. - `hourly`: the maximum time range for /// hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (optional) - /// - returns: GetUsage200Response + /// - returns: IndexUsage @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func getIndexUsage( statistic: Statistic, @@ -406,8 +406,8 @@ open class UsageClient { endDate: String, granularity: Granularity? = nil, requestOptions: RequestOptions? = nil - ) async throws -> GetUsage200Response { - let response: Response = try await getIndexUsageWithHTTPInfo( + ) async throws -> IndexUsage { + let response: Response = try await getIndexUsageWithHTTPInfo( statistic: statistic, indexName: indexName, startDate: startDate, @@ -530,7 +530,7 @@ open class UsageClient { // // - parameter granularity: (query) Granularity of the aggregated metrics. - `hourly`: the maximum time range for // hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (optional) - // - returns: RequestBuilder + // - returns: RequestBuilder open func getIndexUsageWithHTTPInfo( statistic: Statistic, @@ -539,7 +539,7 @@ open class UsageClient { endDate: String, granularity: Granularity? = nil, requestOptions userRequestOptions: RequestOptions? = nil - ) async throws -> Response { + ) async throws -> Response { guard !indexName.isEmpty else { throw AlgoliaError.invalidArgument("indexName", "getIndexUsage") } @@ -699,7 +699,7 @@ open class UsageClient { /// - parameter endDate: (query) End date of the period to analyze, in `YYYY-MM-DD` format. /// - parameter granularity: (query) Granularity of the aggregated metrics. - `hourly`: the maximum time range for /// hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (optional) - /// - returns: GetUsage200Response + /// - returns: IndexUsage @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) open func getUsage( statistic: Statistic, @@ -707,8 +707,8 @@ open class UsageClient { endDate: String, granularity: Granularity? = nil, requestOptions: RequestOptions? = nil - ) async throws -> GetUsage200Response { - let response: Response = try await getUsageWithHTTPInfo( + ) async throws -> IndexUsage { + let response: Response = try await getUsageWithHTTPInfo( statistic: statistic, startDate: startDate, endDate: endDate, @@ -828,7 +828,7 @@ open class UsageClient { // // - parameter granularity: (query) Granularity of the aggregated metrics. - `hourly`: the maximum time range for // hourly metrics is 7 days. - `daily`: the maximum time range for daily metrics is 365 days. (optional) - // - returns: RequestBuilder + // - returns: RequestBuilder open func getUsageWithHTTPInfo( statistic: Statistic, @@ -836,7 +836,7 @@ open class UsageClient { endDate: String, granularity: Granularity? = nil, requestOptions userRequestOptions: RequestOptions? = nil - ) async throws -> Response { + ) async throws -> Response { guard !startDate.isEmpty else { throw AlgoliaError.invalidArgument("startDate", "getUsage") } diff --git a/specs/bundled/abtesting.doc.yml b/specs/bundled/abtesting.doc.yml index bf21c261fd..e5bf185192 100644 --- a/specs/bundled/abtesting.doc.yml +++ b/specs/bundled/abtesting.doc.yml @@ -2342,6 +2342,7 @@ components: description: A/B test filter effects resulting from configuration settings. properties: outliers: + title: outliersFilter type: object description: >- Outliers removed from the A/B test as a result of configuration @@ -2359,6 +2360,7 @@ components: description: Number of tracked searches removed from the A/B test. example: 237 emptySearch: + title: emptySearchFilter type: object description: >- Empty searches removed from the A/B test as a result of diff --git a/specs/bundled/abtesting.yml b/specs/bundled/abtesting.yml index 967ae8a9b6..221e5103fe 100644 --- a/specs/bundled/abtesting.yml +++ b/specs/bundled/abtesting.yml @@ -601,6 +601,7 @@ components: description: A/B test filter effects resulting from configuration settings. properties: outliers: + title: outliersFilter type: object description: >- Outliers removed from the A/B test as a result of configuration @@ -618,6 +619,7 @@ components: description: Number of tracked searches removed from the A/B test. example: 237 emptySearch: + title: emptySearchFilter type: object description: >- Empty searches removed from the A/B test as a result of diff --git a/specs/bundled/algoliasearch.yml b/specs/bundled/algoliasearch.yml index 8dc1bf8499..3b04a19536 100644 --- a/specs/bundled/algoliasearch.yml +++ b/specs/bundled/algoliasearch.yml @@ -709,6 +709,7 @@ components: title: range objects type: array items: + title: range type: object description: >- Range object with lower and upper values in meters to define custom @@ -2233,6 +2234,7 @@ components: type: boolean description: Redirect rule status. data: + title: redirectRuleIndexData type: object description: Redirect rule data. required: @@ -2284,8 +2286,8 @@ components: type: string description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: - type: object title: exhaustive + type: object description: >- Whether certain properties of the search response are calculated exhaustive (exact) or approximated. @@ -2365,8 +2367,8 @@ components: type: object description: Statistics for numerical facets. additionalProperties: - type: object title: facetStats + type: object properties: min: type: number @@ -2815,8 +2817,8 @@ components: type: array description: Matching facet values. items: - type: object title: facetHits + type: object additionalProperties: false required: - value @@ -2886,7 +2888,6 @@ components: - $ref: '#/components/schemas/cursor' baseIndexSettings: type: object - title: Index settings. additionalProperties: false properties: attributesForFaceting: diff --git a/specs/bundled/analytics.doc.yml b/specs/bundled/analytics.doc.yml index d4e89b6c45..1202639b40 100644 --- a/specs/bundled/analytics.doc.yml +++ b/specs/bundled/analytics.doc.yml @@ -1237,8 +1237,8 @@ paths: type: array description: Daily number of searches. items: - type: object title: dailySearches + type: object additionalProperties: false required: - date @@ -1479,8 +1479,8 @@ paths: type: array description: Searches without results. items: - type: object title: dailySearchesNoResults + type: object additionalProperties: false required: - search @@ -1732,8 +1732,8 @@ paths: type: array description: Searches without any clicks. items: - type: object title: dailySearchesNoClicks + type: object additionalProperties: false required: - search @@ -1999,8 +1999,8 @@ paths: type: array description: Daily no results rates. items: - type: object title: dailyNoResultsRates + type: object additionalProperties: false required: - date @@ -2260,8 +2260,8 @@ paths: type: array description: Daily no click rates. items: - type: object title: dailyNoClickRates + type: object additionalProperties: false required: - rate @@ -2753,8 +2753,8 @@ paths: type: array description: Daily number of unique users. items: - type: object title: dailyUsers + type: object additionalProperties: false required: - date @@ -3711,8 +3711,8 @@ paths: type: array description: Countries and number of searches. items: - type: object title: topCountry + type: object additionalProperties: false required: - country @@ -3971,8 +3971,8 @@ paths: type: array description: Daily average click positions. items: - type: object title: dailyAverageClicks + type: object additionalProperties: false required: - average @@ -4469,8 +4469,8 @@ paths: type: array description: Daily click-through rates. items: - type: object title: dailyClickThroughRates + type: object additionalProperties: false required: - rate @@ -4736,8 +4736,8 @@ paths: type: array description: Daily conversion rates. items: - type: object title: dailyConversionRates + type: object additionalProperties: false required: - rate @@ -4997,8 +4997,8 @@ paths: type: array description: Daily add-to-cart rates. items: - type: object title: dailyAddToCartRates + type: object additionalProperties: false required: - rate @@ -5258,8 +5258,8 @@ paths: type: array description: Daily purchase rates. items: - type: object title: dailyPurchaseRates + type: object additionalProperties: false required: - rate @@ -5508,8 +5508,8 @@ paths: type: array description: Daily revenue. items: - type: object title: dailyRevenue + type: object additionalProperties: false required: - currencies @@ -6127,8 +6127,8 @@ components: type: array description: Most popular searches and their number of search results (hits). items: - type: object title: topSearch + type: object additionalProperties: false required: - search @@ -6176,6 +6176,7 @@ components: minItems: 12 maxItems: 12 items: + title: clickPosition type: object description: Click position. properties: @@ -6249,8 +6250,8 @@ components: Most popular searches and their associated click and conversion metrics. items: - type: object title: topSearchWithAnalytics + type: object additionalProperties: false required: - search @@ -6285,10 +6286,12 @@ components: nbHits: $ref: '#/components/schemas/nbHits' currencies: + title: currenciesValue type: object description: Revenue associated with this search, broken-down by currencies. default: {} additionalProperties: + title: currencyCode x-additionalPropertiesName: currency type: object description: Currency code. @@ -6352,8 +6355,8 @@ components: type: array description: Most popular searches, including their click and revenue metrics. items: - type: object title: topSearchWithRevenueAnalytics + type: object additionalProperties: false required: - search @@ -6463,8 +6466,8 @@ components: type: array description: Most frequent search results. items: - type: object title: topHit + type: object additionalProperties: false required: - hit @@ -6485,8 +6488,8 @@ components: type: array description: Most frequent search results with click and conversion metrics. items: - type: object title: topHitWithAnalytics + type: object additionalProperties: false required: - hit @@ -6524,8 +6527,8 @@ components: Most frequent search results with click, conversion, and revenue metrics. items: - type: object title: topHitWithRevenueAnalytics + type: object additionalProperties: false required: - hit diff --git a/specs/bundled/analytics.yml b/specs/bundled/analytics.yml index e2311963dd..3cc6aa7437 100644 --- a/specs/bundled/analytics.yml +++ b/specs/bundled/analytics.yml @@ -322,8 +322,8 @@ paths: type: array description: Daily number of searches. items: - type: object title: dailySearches + type: object additionalProperties: false required: - date @@ -380,8 +380,8 @@ paths: type: array description: Searches without results. items: - type: object title: dailySearchesNoResults + type: object additionalProperties: false required: - search @@ -443,8 +443,8 @@ paths: type: array description: Searches without any clicks. items: - type: object title: dailySearchesNoClicks + type: object additionalProperties: false required: - search @@ -520,8 +520,8 @@ paths: type: array description: Daily no results rates. items: - type: object title: dailyNoResultsRates + type: object additionalProperties: false required: - date @@ -597,8 +597,8 @@ paths: type: array description: Daily no click rates. items: - type: object title: dailyNoClickRates + type: object additionalProperties: false required: - rate @@ -723,8 +723,8 @@ paths: type: array description: Daily number of unique users. items: - type: object title: dailyUsers + type: object additionalProperties: false required: - date @@ -918,8 +918,8 @@ paths: type: array description: Countries and number of searches. items: - type: object title: topCountry + type: object additionalProperties: false required: - country @@ -994,8 +994,8 @@ paths: type: array description: Daily average click positions. items: - type: object title: dailyAverageClicks + type: object additionalProperties: false required: - average @@ -1117,8 +1117,8 @@ paths: type: array description: Daily click-through rates. items: - type: object title: dailyClickThroughRates + type: object additionalProperties: false required: - rate @@ -1194,8 +1194,8 @@ paths: type: array description: Daily conversion rates. items: - type: object title: dailyConversionRates + type: object additionalProperties: false required: - rate @@ -1271,8 +1271,8 @@ paths: type: array description: Daily add-to-cart rates. items: - type: object title: dailyAddToCartRates + type: object additionalProperties: false required: - rate @@ -1348,8 +1348,8 @@ paths: type: array description: Daily purchase rates. items: - type: object title: dailyPurchaseRates + type: object additionalProperties: false required: - rate @@ -1414,8 +1414,8 @@ paths: type: array description: Daily revenue. items: - type: object title: dailyRevenue + type: object additionalProperties: false required: - currencies @@ -1667,8 +1667,8 @@ components: type: array description: Most popular searches and their number of search results (hits). items: - type: object title: topSearch + type: object additionalProperties: false required: - search @@ -1716,6 +1716,7 @@ components: minItems: 12 maxItems: 12 items: + title: clickPosition type: object description: Click position. properties: @@ -1789,8 +1790,8 @@ components: Most popular searches and their associated click and conversion metrics. items: - type: object title: topSearchWithAnalytics + type: object additionalProperties: false required: - search @@ -1825,10 +1826,12 @@ components: nbHits: $ref: '#/components/schemas/nbHits' currencies: + title: currenciesValue type: object description: Revenue associated with this search, broken-down by currencies. default: {} additionalProperties: + title: currencyCode x-additionalPropertiesName: currency type: object description: Currency code. @@ -1892,8 +1895,8 @@ components: type: array description: Most popular searches, including their click and revenue metrics. items: - type: object title: topSearchWithRevenueAnalytics + type: object additionalProperties: false required: - search @@ -2003,8 +2006,8 @@ components: type: array description: Most frequent search results. items: - type: object title: topHit + type: object additionalProperties: false required: - hit @@ -2025,8 +2028,8 @@ components: type: array description: Most frequent search results with click and conversion metrics. items: - type: object title: topHitWithAnalytics + type: object additionalProperties: false required: - hit @@ -2064,8 +2067,8 @@ components: Most frequent search results with click, conversion, and revenue metrics. items: - type: object title: topHitWithRevenueAnalytics + type: object additionalProperties: false required: - hit diff --git a/specs/bundled/crawler.doc.yml b/specs/bundled/crawler.doc.yml index 8f02b7ac1c..41bd0997c2 100644 --- a/specs/bundled/crawler.doc.yml +++ b/specs/bundled/crawler.doc.yml @@ -165,6 +165,7 @@ paths: content: application/json: schema: + title: crawlerCreate type: object properties: name: @@ -180,6 +181,7 @@ paths: content: application/json: schema: + title: crawlerCreateResponse type: object properties: id: @@ -252,6 +254,7 @@ paths: content: application/json: schema: + title: patchCrawler type: object properties: name: @@ -343,6 +346,7 @@ paths: content: application/json: schema: + title: testUrl type: object properties: url: @@ -359,6 +363,7 @@ paths: content: application/json: schema: + title: urlTest type: object properties: startDate: @@ -386,6 +391,7 @@ paths: type: array description: Extracted records from the URL. items: + title: extractedRecords type: object properties: indexName: @@ -405,6 +411,7 @@ paths: type: array description: Partial records generated by each record extractor. items: + title: recordPerExtractor type: object properties: index: @@ -450,6 +457,7 @@ paths: data1: val1 data2: val2 error: + title: urlTestError type: object description: An error. properties: @@ -492,6 +500,7 @@ paths: content: application/json: schema: + title: crawlUrls type: object properties: urls: @@ -537,6 +546,7 @@ paths: content: application/json: schema: + title: crawlerStats type: object properties: count: @@ -626,6 +636,7 @@ paths: content: application/json: schema: + title: configVersion type: object properties: version: @@ -661,6 +672,7 @@ paths: content: application/json: schema: + title: taskStatus type: object properties: pending: @@ -777,6 +789,7 @@ components: type: array description: Crawlers. items: + title: crawlerResponse type: object properties: id: @@ -982,6 +995,7 @@ components: items: $ref: '#/components/schemas/urlPattern' recordExtractor: + title: recordExtractor type: object description: >- Function for extracting information from a crawled page and @@ -1121,7 +1135,6 @@ components: - Advanced baseIndexSettings: type: object - title: Index settings. additionalProperties: false properties: attributesForFaceting: @@ -2740,7 +2753,8 @@ components: The pattern support globs and wildcard matching with [micromark](https://github.com/micromatch/micromatch). example: https://www.example.com - - type: object + - title: headlessBrowserConfig + type: object description: Configuration for rendering HTML with a headless browser. properties: enabled: @@ -2993,6 +3007,7 @@ components: $ref: '#/components/schemas/indexSettings' x-additionalPropertiesName: indexName linkExtractor: + title: linkExtractor type: object description: Function for extracting URLs for links found on crawled pages. properties: @@ -3249,6 +3264,7 @@ components: type: array description: Configuration changes. items: + title: crawlerConfigVersionsResponse type: object properties: version: @@ -3269,6 +3285,7 @@ components: items: type: array items: + title: domainResponse type: object properties: appId: @@ -3332,9 +3349,11 @@ components: content: application/json: schema: + title: invalidRequest type: object properties: error: + title: invalidRequestError type: object properties: code: @@ -3344,6 +3363,7 @@ components: errors: type: array items: + title: errorItem type: object properties: code: @@ -3374,6 +3394,7 @@ components: content: application/json: schema: + title: actionAcknowledged type: object properties: taskId: @@ -3385,9 +3406,11 @@ components: content: application/json: schema: + title: forbidden type: object properties: error: + title: forbiddenError type: object properties: code: @@ -3397,6 +3420,7 @@ components: errors: type: array items: + title: errorItem type: object properties: code: diff --git a/specs/bundled/crawler.yml b/specs/bundled/crawler.yml index 8371d14885..b2ccb579b0 100644 --- a/specs/bundled/crawler.yml +++ b/specs/bundled/crawler.yml @@ -165,6 +165,7 @@ paths: content: application/json: schema: + title: crawlerCreate type: object properties: name: @@ -180,6 +181,7 @@ paths: content: application/json: schema: + title: crawlerCreateResponse type: object properties: id: @@ -252,6 +254,7 @@ paths: content: application/json: schema: + title: patchCrawler type: object properties: name: @@ -343,6 +346,7 @@ paths: content: application/json: schema: + title: testUrl type: object properties: url: @@ -359,6 +363,7 @@ paths: content: application/json: schema: + title: urlTest type: object properties: startDate: @@ -386,6 +391,7 @@ paths: type: array description: Extracted records from the URL. items: + title: extractedRecords type: object properties: indexName: @@ -405,6 +411,7 @@ paths: type: array description: Partial records generated by each record extractor. items: + title: recordPerExtractor type: object properties: index: @@ -450,6 +457,7 @@ paths: data1: val1 data2: val2 error: + title: urlTestError type: object description: An error. properties: @@ -492,6 +500,7 @@ paths: content: application/json: schema: + title: crawlUrls type: object properties: urls: @@ -537,6 +546,7 @@ paths: content: application/json: schema: + title: crawlerStats type: object properties: count: @@ -626,6 +636,7 @@ paths: content: application/json: schema: + title: configVersion type: object properties: version: @@ -661,6 +672,7 @@ paths: content: application/json: schema: + title: taskStatus type: object properties: pending: @@ -777,6 +789,7 @@ components: type: array description: Crawlers. items: + title: crawlerResponse type: object properties: id: @@ -982,6 +995,7 @@ components: items: $ref: '#/components/schemas/urlPattern' recordExtractor: + title: recordExtractor type: object description: >- Function for extracting information from a crawled page and @@ -1121,7 +1135,6 @@ components: - Advanced baseIndexSettings: type: object - title: Index settings. additionalProperties: false properties: attributesForFaceting: @@ -2740,7 +2753,8 @@ components: The pattern support globs and wildcard matching with [micromark](https://github.com/micromatch/micromatch). example: https://www.example.com - - type: object + - title: headlessBrowserConfig + type: object description: Configuration for rendering HTML with a headless browser. properties: enabled: @@ -2993,6 +3007,7 @@ components: $ref: '#/components/schemas/indexSettings' x-additionalPropertiesName: indexName linkExtractor: + title: linkExtractor type: object description: Function for extracting URLs for links found on crawled pages. properties: @@ -3249,6 +3264,7 @@ components: type: array description: Configuration changes. items: + title: crawlerConfigVersionsResponse type: object properties: version: @@ -3269,6 +3285,7 @@ components: items: type: array items: + title: domainResponse type: object properties: appId: @@ -3332,9 +3349,11 @@ components: content: application/json: schema: + title: invalidRequest type: object properties: error: + title: invalidRequestError type: object properties: code: @@ -3344,6 +3363,7 @@ components: errors: type: array items: + title: errorItem type: object properties: code: @@ -3374,6 +3394,7 @@ components: content: application/json: schema: + title: actionAcknowledged type: object properties: taskId: @@ -3385,9 +3406,11 @@ components: content: application/json: schema: + title: forbidden type: object properties: error: + title: forbiddenError type: object properties: code: @@ -3397,6 +3420,7 @@ components: errors: type: array items: + title: errorItem type: object properties: code: diff --git a/specs/bundled/ingestion.doc.yml b/specs/bundled/ingestion.doc.yml index 175cb166e1..f2a2548063 100644 --- a/specs/bundled/ingestion.doc.yml +++ b/specs/bundled/ingestion.doc.yml @@ -13382,7 +13382,6 @@ components: type: string description: Descriptive name for the resource. AuthGoogleServiceAccountPartial: - title: Google service account type: object description: >- Credentials for authenticating with a Google service account, such as @@ -13399,7 +13398,6 @@ components: Private key of the Google service account. This field is `null` in the API response. AuthBasicPartial: - title: Basic type: object description: Credentials for authenticating with user name and password. additionalProperties: false @@ -13411,7 +13409,6 @@ components: type: string description: Password. This field is `null` in the API response. AuthAPIKeyPartial: - title: API key type: object description: Credentials for authenticating with an API key. additionalProperties: false @@ -13420,7 +13417,6 @@ components: type: string description: API key. This field is `null` in the API response. AuthOAuthPartial: - title: OAuth type: object description: Credentials for authenticating with OAuth 2.0. additionalProperties: false @@ -13439,7 +13435,6 @@ components: default: '' description: OAuth scope. AuthAlgoliaPartial: - title: Algolia type: object description: Credentials for authenticating with Algolia. additionalProperties: false @@ -13455,7 +13450,6 @@ components: This field is `null` in the API response. AuthAlgoliaInsightsPartial: - title: Algolia Insights type: object additionalProperties: false description: Credentials for authenticating with the Algolia Insights API. @@ -13532,7 +13526,6 @@ components: - nbItems - itemsPerPage AuthGoogleServiceAccount: - title: Google service account type: object description: >- Credentials for authenticating with a Google service account, such as @@ -13552,7 +13545,6 @@ components: - clientEmail - privateKey AuthBasic: - title: Basic type: object description: Credentials for authenticating with user name and password. additionalProperties: false @@ -13567,7 +13559,6 @@ components: - username - password AuthAPIKey: - title: API key type: object description: Credentials for authenticating with an API key. additionalProperties: false @@ -13578,7 +13569,6 @@ components: required: - key AuthOAuth: - title: OAuth type: object description: Credentials for authenticating with OAuth 2.0. additionalProperties: false @@ -13601,7 +13591,6 @@ components: - client_id - client_secret AuthAlgolia: - title: Algolia type: object additionalProperties: false description: Credentials for authenticating with Algolia. @@ -13620,7 +13609,6 @@ components: - appID - apiKey AuthAlgoliaInsights: - title: Algolia Insights type: object additionalProperties: false description: Credentials for authenticating with the Algolia Insights API. @@ -13958,7 +13946,6 @@ components: type: string - type: 'null' SourceCommercetools: - title: Commercetools type: object additionalProperties: false properties: @@ -14027,7 +14014,6 @@ components: - namespace - key SourceBigCommerce: - title: BigCommerce type: object additionalProperties: false properties: @@ -14064,7 +14050,6 @@ components: - GET - POST SourceJSON: - title: JSON type: object additionalProperties: false properties: @@ -14086,7 +14071,6 @@ components: - boolean - json SourceCSV: - title: CSV type: object additionalProperties: false properties: @@ -14120,7 +14104,6 @@ components: - ga4 - ga360 SourceBigQuery: - title: BigQuery type: object additionalProperties: false properties: @@ -14149,7 +14132,6 @@ components: x-discriminator-fields: - projectID SourceGA4BigQueryExport: - title: GA4 BigQuery export type: object additionalProperties: false properties: @@ -14185,7 +14167,6 @@ components: - dockerhub - ghcr SourceDocker: - title: Docker type: object additionalProperties: false properties: @@ -14211,7 +14192,6 @@ components: - imageType - configuration SourceUpdateShopify: - title: Shopify type: object additionalProperties: false properties: @@ -14577,7 +14557,6 @@ components: enum: - subscription SubscriptionTrigger: - title: Subscription type: object additionalProperties: false description: Trigger input for subscription tasks. @@ -14592,7 +14571,6 @@ components: enum: - streaming StreamingTrigger: - title: Streaming type: object additionalProperties: false description: Trigger input for continuously running tasks. @@ -14672,7 +14650,6 @@ components: - format - actions StreamingInput: - title: Streaming input type: object additionalProperties: false description: >- @@ -14684,7 +14661,7 @@ components: required: - mapping DockerStreamsInput: - title: The selected streams of a singer or airbyte connector. + description: The selected streams of a singer or airbyte connector. type: object properties: streams: @@ -14728,7 +14705,6 @@ components: - currencies - locales ShopifyInput: - title: Shopify input type: object additionalProperties: false description: >- @@ -14801,7 +14777,6 @@ components: - action - createdAt OnDemandTriggerInput: - title: On demand type: object additionalProperties: false description: Trigger information for manually-triggered tasks. @@ -14811,7 +14786,6 @@ components: required: - type ScheduleTriggerInput: - title: Schedule type: object additionalProperties: false description: Trigger input for scheduled tasks. @@ -15158,6 +15132,7 @@ components: items: type: object error: + title: transformationError type: object description: The error if the transformation failed. properties: @@ -15254,6 +15229,7 @@ components: status: $ref: '#/components/schemas/RunStatus' progress: + title: runProgress type: object additionalProperties: false properties: diff --git a/specs/bundled/ingestion.yml b/specs/bundled/ingestion.yml index bd2eb70733..29475d9764 100644 --- a/specs/bundled/ingestion.yml +++ b/specs/bundled/ingestion.yml @@ -2033,7 +2033,6 @@ components: type: string description: Descriptive name for the resource. AuthGoogleServiceAccountPartial: - title: Google service account type: object description: >- Credentials for authenticating with a Google service account, such as @@ -2050,7 +2049,6 @@ components: Private key of the Google service account. This field is `null` in the API response. AuthBasicPartial: - title: Basic type: object description: Credentials for authenticating with user name and password. additionalProperties: false @@ -2062,7 +2060,6 @@ components: type: string description: Password. This field is `null` in the API response. AuthAPIKeyPartial: - title: API key type: object description: Credentials for authenticating with an API key. additionalProperties: false @@ -2071,7 +2068,6 @@ components: type: string description: API key. This field is `null` in the API response. AuthOAuthPartial: - title: OAuth type: object description: Credentials for authenticating with OAuth 2.0. additionalProperties: false @@ -2090,7 +2086,6 @@ components: default: '' description: OAuth scope. AuthAlgoliaPartial: - title: Algolia type: object description: Credentials for authenticating with Algolia. additionalProperties: false @@ -2106,7 +2101,6 @@ components: This field is `null` in the API response. AuthAlgoliaInsightsPartial: - title: Algolia Insights type: object additionalProperties: false description: Credentials for authenticating with the Algolia Insights API. @@ -2183,7 +2177,6 @@ components: - nbItems - itemsPerPage AuthGoogleServiceAccount: - title: Google service account type: object description: >- Credentials for authenticating with a Google service account, such as @@ -2203,7 +2196,6 @@ components: - clientEmail - privateKey AuthBasic: - title: Basic type: object description: Credentials for authenticating with user name and password. additionalProperties: false @@ -2218,7 +2210,6 @@ components: - username - password AuthAPIKey: - title: API key type: object description: Credentials for authenticating with an API key. additionalProperties: false @@ -2229,7 +2220,6 @@ components: required: - key AuthOAuth: - title: OAuth type: object description: Credentials for authenticating with OAuth 2.0. additionalProperties: false @@ -2252,7 +2242,6 @@ components: - client_id - client_secret AuthAlgolia: - title: Algolia type: object additionalProperties: false description: Credentials for authenticating with Algolia. @@ -2271,7 +2260,6 @@ components: - appID - apiKey AuthAlgoliaInsights: - title: Algolia Insights type: object additionalProperties: false description: Credentials for authenticating with the Algolia Insights API. @@ -2609,7 +2597,6 @@ components: type: string - type: 'null' SourceCommercetools: - title: Commercetools type: object additionalProperties: false properties: @@ -2678,7 +2665,6 @@ components: - namespace - key SourceBigCommerce: - title: BigCommerce type: object additionalProperties: false properties: @@ -2715,7 +2701,6 @@ components: - GET - POST SourceJSON: - title: JSON type: object additionalProperties: false properties: @@ -2737,7 +2722,6 @@ components: - boolean - json SourceCSV: - title: CSV type: object additionalProperties: false properties: @@ -2771,7 +2755,6 @@ components: - ga4 - ga360 SourceBigQuery: - title: BigQuery type: object additionalProperties: false properties: @@ -2800,7 +2783,6 @@ components: x-discriminator-fields: - projectID SourceGA4BigQueryExport: - title: GA4 BigQuery export type: object additionalProperties: false properties: @@ -2836,7 +2818,6 @@ components: - dockerhub - ghcr SourceDocker: - title: Docker type: object additionalProperties: false properties: @@ -2862,7 +2843,6 @@ components: - imageType - configuration SourceUpdateShopify: - title: Shopify type: object additionalProperties: false properties: @@ -3228,7 +3208,6 @@ components: enum: - subscription SubscriptionTrigger: - title: Subscription type: object additionalProperties: false description: Trigger input for subscription tasks. @@ -3243,7 +3222,6 @@ components: enum: - streaming StreamingTrigger: - title: Streaming type: object additionalProperties: false description: Trigger input for continuously running tasks. @@ -3323,7 +3301,6 @@ components: - format - actions StreamingInput: - title: Streaming input type: object additionalProperties: false description: >- @@ -3335,7 +3312,7 @@ components: required: - mapping DockerStreamsInput: - title: The selected streams of a singer or airbyte connector. + description: The selected streams of a singer or airbyte connector. type: object properties: streams: @@ -3379,7 +3356,6 @@ components: - currencies - locales ShopifyInput: - title: Shopify input type: object additionalProperties: false description: >- @@ -3452,7 +3428,6 @@ components: - action - createdAt OnDemandTriggerInput: - title: On demand type: object additionalProperties: false description: Trigger information for manually-triggered tasks. @@ -3462,7 +3437,6 @@ components: required: - type ScheduleTriggerInput: - title: Schedule type: object additionalProperties: false description: Trigger input for scheduled tasks. @@ -3809,6 +3783,7 @@ components: items: type: object error: + title: transformationError type: object description: The error if the transformation failed. properties: @@ -3905,6 +3880,7 @@ components: status: $ref: '#/components/schemas/RunStatus' progress: + title: runProgress type: object additionalProperties: false properties: diff --git a/specs/bundled/insights.doc.yml b/specs/bundled/insights.doc.yml index d676a92ffb..f2e87d6691 100644 --- a/specs/bundled/insights.doc.yml +++ b/specs/bundled/insights.doc.yml @@ -1028,7 +1028,7 @@ paths: content: application/json: schema: - title: InsightsEvents + title: insightsEvents type: object additionalProperties: false required: diff --git a/specs/bundled/insights.yml b/specs/bundled/insights.yml index 71087d6817..a6d0e4ef09 100644 --- a/specs/bundled/insights.yml +++ b/specs/bundled/insights.yml @@ -245,7 +245,7 @@ paths: content: application/json: schema: - title: InsightsEvents + title: insightsEvents type: object additionalProperties: false required: diff --git a/specs/bundled/monitoring.doc.yml b/specs/bundled/monitoring.doc.yml index 66950191f8..7c455cb97b 100644 --- a/specs/bundled/monitoring.doc.yml +++ b/specs/bundled/monitoring.doc.yml @@ -2629,6 +2629,7 @@ components: reported for this cluster as values. type: array items: + title: incidentEntry type: object properties: t: @@ -2698,10 +2699,11 @@ components: type: $ref: '#/components/schemas/Type' Time: - title: time + title: times description: Time measured by a probe. type: array items: + title: timeEntry type: object additionalProperties: false properties: @@ -2784,7 +2786,7 @@ components: content: application/json: schema: - title: StatusResponse + title: statusResponse type: object properties: status: @@ -2822,7 +2824,7 @@ components: content: application/json: schema: - title: IncidentsResponse + title: incidentsResponse type: object properties: incidents: @@ -2854,7 +2856,7 @@ components: content: application/json: schema: - title: InventoryResponse + title: inventoryResponse type: object properties: inventory: @@ -2891,6 +2893,7 @@ components: content: application/json: schema: + title: forbidden type: object additionalProperties: false properties: @@ -2905,10 +2908,11 @@ components: content: application/json: schema: - title: LatencyResponse + title: latencyResponse type: object properties: metrics: + title: latencyMetric type: object additionalProperties: false properties: @@ -2933,6 +2937,7 @@ components: content: application/json: schema: + title: badRequest type: object additionalProperties: false properties: @@ -2947,10 +2952,11 @@ components: content: application/json: schema: - title: IndexingTimeResponse + title: indexingTimeResponse type: object properties: metrics: + title: indexingMetric type: object additionalProperties: false properties: @@ -2975,7 +2981,7 @@ components: content: application/json: schema: - title: ReachabilityResponse + title: reachabilityResponse type: object additionalProperties: x-additionalPropertiesName: cluster @@ -2992,11 +2998,12 @@ components: content: application/json: schema: - title: InfrastructureResponse + title: infrastructureResponse type: object additionalProperties: false properties: metrics: + title: metrics type: object additionalProperties: false properties: @@ -3071,6 +3078,7 @@ components: content: application/json: schema: + title: unauthorized type: object additionalProperties: false properties: diff --git a/specs/bundled/monitoring.yml b/specs/bundled/monitoring.yml index fe9f10205b..f4af31b9c3 100644 --- a/specs/bundled/monitoring.yml +++ b/specs/bundled/monitoring.yml @@ -447,6 +447,7 @@ components: reported for this cluster as values. type: array items: + title: incidentEntry type: object properties: t: @@ -516,10 +517,11 @@ components: type: $ref: '#/components/schemas/Type' Time: - title: time + title: times description: Time measured by a probe. type: array items: + title: timeEntry type: object additionalProperties: false properties: @@ -602,7 +604,7 @@ components: content: application/json: schema: - title: StatusResponse + title: statusResponse type: object properties: status: @@ -640,7 +642,7 @@ components: content: application/json: schema: - title: IncidentsResponse + title: incidentsResponse type: object properties: incidents: @@ -672,7 +674,7 @@ components: content: application/json: schema: - title: InventoryResponse + title: inventoryResponse type: object properties: inventory: @@ -709,6 +711,7 @@ components: content: application/json: schema: + title: forbidden type: object additionalProperties: false properties: @@ -723,10 +726,11 @@ components: content: application/json: schema: - title: LatencyResponse + title: latencyResponse type: object properties: metrics: + title: latencyMetric type: object additionalProperties: false properties: @@ -751,6 +755,7 @@ components: content: application/json: schema: + title: badRequest type: object additionalProperties: false properties: @@ -765,10 +770,11 @@ components: content: application/json: schema: - title: IndexingTimeResponse + title: indexingTimeResponse type: object properties: metrics: + title: indexingMetric type: object additionalProperties: false properties: @@ -793,7 +799,7 @@ components: content: application/json: schema: - title: ReachabilityResponse + title: reachabilityResponse type: object additionalProperties: x-additionalPropertiesName: cluster @@ -810,11 +816,12 @@ components: content: application/json: schema: - title: InfrastructureResponse + title: infrastructureResponse type: object additionalProperties: false properties: metrics: + title: metrics type: object additionalProperties: false properties: @@ -889,6 +896,7 @@ components: content: application/json: schema: + title: unauthorized type: object additionalProperties: false properties: diff --git a/specs/bundled/query-suggestions.doc.yml b/specs/bundled/query-suggestions.doc.yml index 59cb6ae4c2..f0d52e1820 100644 --- a/specs/bundled/query-suggestions.doc.yml +++ b/specs/bundled/query-suggestions.doc.yml @@ -2316,6 +2316,7 @@ paths: content: application/json: schema: + title: configStatus type: object additionalProperties: false properties: @@ -2550,6 +2551,7 @@ paths: content: application/json: schema: + title: logFile type: object additionalProperties: false properties: @@ -3028,6 +3030,7 @@ components: - sourceIndices allOf: - type: object + additionalProperties: false properties: indexName: $ref: '#/components/schemas/IndexName' diff --git a/specs/bundled/query-suggestions.yml b/specs/bundled/query-suggestions.yml index fb9d001764..c66c795497 100644 --- a/specs/bundled/query-suggestions.yml +++ b/specs/bundled/query-suggestions.yml @@ -383,6 +383,7 @@ paths: content: application/json: schema: + title: configStatus type: object additionalProperties: false properties: @@ -431,6 +432,7 @@ paths: content: application/json: schema: + title: logFile type: object additionalProperties: false properties: @@ -724,6 +726,7 @@ components: - sourceIndices allOf: - type: object + additionalProperties: false properties: indexName: $ref: '#/components/schemas/IndexName' diff --git a/specs/bundled/recommend.doc.yml b/specs/bundled/recommend.doc.yml index b7f98556af..91d5b92ead 100644 --- a/specs/bundled/recommend.doc.yml +++ b/specs/bundled/recommend.doc.yml @@ -2063,8 +2063,8 @@ paths: content: application/json: schema: - type: object title: searchRecommendRulesParams + type: object description: Recommend rules parameters. additionalProperties: false properties: @@ -2658,6 +2658,7 @@ components: title: range objects type: array items: + title: range type: object description: >- Range object with lower and upper values in meters to define custom @@ -4406,6 +4407,7 @@ components: type: boolean description: Redirect rule status. data: + title: redirectRuleIndexData type: object description: Redirect rule data. required: @@ -4457,8 +4459,8 @@ components: type: string description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: - type: object title: exhaustive + type: object description: >- Whether certain properties of the search response are calculated exhaustive (exact) or approximated. @@ -4538,8 +4540,8 @@ components: type: object description: Statistics for numerical facets. additionalProperties: - type: object title: facetStats + type: object properties: min: type: number @@ -5028,6 +5030,7 @@ components: additionalProperties: false properties: _metadata: + title: ruleMetadata type: object description: Rule metadata. properties: diff --git a/specs/bundled/recommend.yml b/specs/bundled/recommend.yml index 07cfa90983..46890db10e 100644 --- a/specs/bundled/recommend.yml +++ b/specs/bundled/recommend.yml @@ -436,8 +436,8 @@ paths: content: application/json: schema: - type: object title: searchRecommendRulesParams + type: object description: Recommend rules parameters. additionalProperties: false properties: @@ -829,6 +829,7 @@ components: title: range objects type: array items: + title: range type: object description: >- Range object with lower and upper values in meters to define custom @@ -2577,6 +2578,7 @@ components: type: boolean description: Redirect rule status. data: + title: redirectRuleIndexData type: object description: Redirect rule data. required: @@ -2628,8 +2630,8 @@ components: type: string description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: - type: object title: exhaustive + type: object description: >- Whether certain properties of the search response are calculated exhaustive (exact) or approximated. @@ -2709,8 +2711,8 @@ components: type: object description: Statistics for numerical facets. additionalProperties: - type: object title: facetStats + type: object properties: min: type: number @@ -3199,6 +3201,7 @@ components: additionalProperties: false properties: _metadata: + title: ruleMetadata type: object description: Rule metadata. properties: diff --git a/specs/bundled/search.doc.yml b/specs/bundled/search.doc.yml index 9c7408f7a0..fa78f02837 100644 --- a/specs/bundled/search.doc.yml +++ b/specs/bundled/search.doc.yml @@ -4744,8 +4744,8 @@ paths: requests: type: array items: - description: Request body for retrieving records. title: getObjectsRequest + description: Request body for retrieving records. type: object additionalProperties: false required: @@ -9688,8 +9688,8 @@ paths: content: application/json: schema: - type: object title: searchRulesParams + type: object description: Rules search parameters. additionalProperties: false properties: @@ -14386,8 +14386,8 @@ paths: type: array description: Queries performed for the given request. items: - type: object title: logQuery + type: object properties: index_name: type: string @@ -15689,7 +15689,7 @@ components: default: '' searchParamsString: type: object - title: Search parameters as query string + description: Search parameters as query string. additionalProperties: false x-discriminator-fields: - params @@ -15938,6 +15938,7 @@ components: title: range objects type: array items: + title: range type: object description: >- Range object with lower and upper values in meters to define custom @@ -17460,6 +17461,7 @@ components: type: boolean description: Redirect rule status. data: + title: redirectRuleIndexData type: object description: Redirect rule data. required: @@ -17511,8 +17513,8 @@ components: type: string description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: - type: object title: exhaustive + type: object description: >- Whether certain properties of the search response are calculated exhaustive (exact) or approximated. @@ -17592,8 +17594,8 @@ components: type: object description: Statistics for numerical facets. additionalProperties: - type: object title: facetStats + type: object properties: min: type: number @@ -18042,8 +18044,8 @@ components: type: array description: Matching facet values. items: - type: object title: facetHits + type: object additionalProperties: false required: - value @@ -18277,7 +18279,6 @@ components: - objectIDs baseIndexSettings: type: object - title: Index settings. additionalProperties: false properties: attributesForFaceting: diff --git a/specs/bundled/search.yml b/specs/bundled/search.yml index 4c94f67ad5..3728dd45e5 100644 --- a/specs/bundled/search.yml +++ b/specs/bundled/search.yml @@ -1126,8 +1126,8 @@ paths: requests: type: array items: - description: Request body for retrieving records. title: getObjectsRequest + description: Request body for retrieving records. type: object additionalProperties: false required: @@ -1845,8 +1845,8 @@ paths: content: application/json: schema: - type: object title: searchRulesParams + type: object description: Rules search parameters. additionalProperties: false properties: @@ -2869,8 +2869,8 @@ paths: type: array description: Queries performed for the given request. items: - type: object title: logQuery + type: object properties: index_name: type: string @@ -3645,7 +3645,7 @@ components: default: '' searchParamsString: type: object - title: Search parameters as query string + description: Search parameters as query string. additionalProperties: false x-discriminator-fields: - params @@ -3894,6 +3894,7 @@ components: title: range objects type: array items: + title: range type: object description: >- Range object with lower and upper values in meters to define custom @@ -5416,6 +5417,7 @@ components: type: boolean description: Redirect rule status. data: + title: redirectRuleIndexData type: object description: Redirect rule data. required: @@ -5467,8 +5469,8 @@ components: type: string description: Distance from a central coordinate provided by `aroundLatLng`. exhaustive: - type: object title: exhaustive + type: object description: >- Whether certain properties of the search response are calculated exhaustive (exact) or approximated. @@ -5548,8 +5550,8 @@ components: type: object description: Statistics for numerical facets. additionalProperties: - type: object title: facetStats + type: object properties: min: type: number @@ -5998,8 +6000,8 @@ components: type: array description: Matching facet values. items: - type: object title: facetHits + type: object additionalProperties: false required: - value @@ -6233,7 +6235,6 @@ components: - objectIDs baseIndexSettings: type: object - title: Index settings. additionalProperties: false properties: attributesForFaceting: diff --git a/specs/bundled/usage.doc.yml b/specs/bundled/usage.doc.yml index 53ac1d33d4..ee438b06ec 100644 --- a/specs/bundled/usage.doc.yml +++ b/specs/bundled/usage.doc.yml @@ -1705,11 +1705,13 @@ components: content: application/json: schema: + title: indexUsage type: object properties: statistics: type: array items: + title: statisticEntry type: object properties: t: @@ -1726,9 +1728,11 @@ components: content: application/json: schema: + title: invalidRequest type: object properties: error: + title: invalidRequestError type: object properties: code: @@ -1738,6 +1742,7 @@ components: errors: type: array items: + title: errorItem type: object properties: code: @@ -1768,9 +1773,11 @@ components: content: application/json: schema: + title: forbidden type: object properties: error: + title: forbiddenError type: object properties: code: @@ -1780,6 +1787,7 @@ components: errors: type: array items: + title: errorItem type: object properties: code: diff --git a/specs/bundled/usage.yml b/specs/bundled/usage.yml index 98013ed808..5b267f12c9 100644 --- a/specs/bundled/usage.yml +++ b/specs/bundled/usage.yml @@ -748,11 +748,13 @@ components: content: application/json: schema: + title: indexUsage type: object properties: statistics: type: array items: + title: statisticEntry type: object properties: t: @@ -769,9 +771,11 @@ components: content: application/json: schema: + title: invalidRequest type: object properties: error: + title: invalidRequestError type: object properties: code: @@ -781,6 +785,7 @@ components: errors: type: array items: + title: errorItem type: object properties: code: @@ -811,9 +816,11 @@ components: content: application/json: schema: + title: forbidden type: object properties: error: + title: forbiddenError type: object properties: code: @@ -823,6 +830,7 @@ components: errors: type: array items: + title: errorItem type: object properties: code: