From 47a89b21fdab490c53311743b94c0dd952e0fc89 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Tue, 30 Jul 2024 08:41:06 +0000 Subject: [PATCH] fix(specs): proper title with linter (generated) https://github.com/algolia/api-clients-automation/pull/3444 Co-authored-by: algolia-bot Co-authored-by: Pierre Millot --- .../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 +-- 44 files changed, 583 insertions(+), 311 deletions(-) rename algoliasearch/src/main/java/com/algolia/model/abtesting/{FilterEffectsEmptySearch.java => EmptySearchFilter.java} (78%) rename algoliasearch/src/main/java/com/algolia/model/abtesting/{FilterEffectsOutliers.java => OutliersFilter.java} (79%) rename algoliasearch/src/main/java/com/algolia/model/analytics/{ClickPositionsInner.java => ClickPosition.java} (81%) rename algoliasearch/src/main/java/com/algolia/model/ingestion/{TransformationTryResponseError.java => TransformationError.java} (76%) rename algoliasearch/src/main/java/com/algolia/model/monitoring/{GetServers403Response.java => BadRequest.java} (79%) create mode 100644 algoliasearch/src/main/java/com/algolia/model/monitoring/Forbidden.java rename algoliasearch/src/main/java/com/algolia/model/monitoring/{IncidentsInner.java => IncidentEntry.java} (82%) rename algoliasearch/src/main/java/com/algolia/model/monitoring/{IndexingTimeResponseMetrics.java => IndexingMetric.java} (70%) rename algoliasearch/src/main/java/com/algolia/model/monitoring/{LatencyResponseMetrics.java => LatencyMetric.java} (72%) rename algoliasearch/src/main/java/com/algolia/model/monitoring/{InfrastructureResponseMetrics.java => Metrics.java} (70%) rename algoliasearch/src/main/java/com/algolia/model/monitoring/{TimeInner.java => TimeEntry.java} (84%) create mode 100644 algoliasearch/src/main/java/com/algolia/model/monitoring/Unauthorized.java rename algoliasearch/src/main/java/com/algolia/model/querysuggestions/{GetConfigStatus200Response.java => ConfigStatus.java} (74%) rename algoliasearch/src/main/java/com/algolia/model/querysuggestions/{GetLogFile200Response.java => LogFile.java} (77%) rename algoliasearch/src/main/java/com/algolia/model/recommend/{AroundPrecisionFromValueInner.java => Range.java} (79%) rename algoliasearch/src/main/java/com/algolia/model/recommend/{RedirectRuleIndexMetadataData.java => RedirectRuleIndexData.java} (78%) rename algoliasearch/src/main/java/com/algolia/model/recommend/{RecommendRuleMetadata.java => RuleMetadata.java} (81%) rename algoliasearch/src/main/java/com/algolia/model/search/{AroundPrecisionFromValueInner.java => Range.java} (79%) rename algoliasearch/src/main/java/com/algolia/model/search/{RedirectRuleIndexMetadataData.java => RedirectRuleIndexData.java} (78%) rename algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage400ResponseErrorErrorsInner.java => ErrorItem.java} (70%) rename algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage400Response.java => Forbidden.java} (74%) create mode 100644 algoliasearch/src/main/java/com/algolia/model/usage/ForbiddenError.java rename algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage200Response.java => IndexUsage.java} (71%) create mode 100644 algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequest.java rename algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage400ResponseError.java => InvalidRequestError.java} (70%) rename algoliasearch/src/main/java/com/algolia/model/usage/{GetUsage200ResponseStatisticsInner.java => StatisticEntry.java} (73%) diff --git a/algoliasearch/src/main/java/com/algolia/api/QuerySuggestionsClient.java b/algoliasearch/src/main/java/com/algolia/api/QuerySuggestionsClient.java index b4b35c725..1ce4101fc 100644 --- a/algoliasearch/src/main/java/com/algolia/api/QuerySuggestionsClient.java +++ b/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/algoliasearch/src/main/java/com/algolia/api/UsageClient.java b/algoliasearch/src/main/java/com/algolia/api/UsageClient.java index 54cc63527..3ef2b67cd 100644 --- a/algoliasearch/src/main/java/com/algolia/api/UsageClient.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsEmptySearch.java b/algoliasearch/src/main/java/com/algolia/model/abtesting/EmptySearchFilter.java similarity index 78% rename from algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsEmptySearch.java rename to algoliasearch/src/main/java/com/algolia/model/abtesting/EmptySearchFilter.java index a5d686c0a..17d033eb3 100644 --- a/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsEmptySearch.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffects.java b/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffects.java index 26188c95f..84d78b06f 100644 --- a/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffects.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsOutliers.java b/algoliasearch/src/main/java/com/algolia/model/abtesting/OutliersFilter.java similarity index 79% rename from algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsOutliers.java rename to algoliasearch/src/main/java/com/algolia/model/abtesting/OutliersFilter.java index dbf2ed48d..c57446cf4 100644 --- a/algoliasearch/src/main/java/com/algolia/model/abtesting/FilterEffectsOutliers.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/analytics/ClickPositionsInner.java b/algoliasearch/src/main/java/com/algolia/model/analytics/ClickPosition.java similarity index 81% rename from algoliasearch/src/main/java/com/algolia/model/analytics/ClickPositionsInner.java rename to algoliasearch/src/main/java/com/algolia/model/analytics/ClickPosition.java index 13177c55e..74024a2e1 100644 --- a/algoliasearch/src/main/java/com/algolia/model/analytics/ClickPositionsInner.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java b/algoliasearch/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java index 866e72bef..4213974b6 100644 --- a/algoliasearch/src/main/java/com/algolia/model/analytics/GetClickPositionsResponse.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java b/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java index eb2602b4f..f17b8a809 100644 --- a/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithAnalytics.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithRevenueAnalytics.java b/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithRevenueAnalytics.java index f91ef9e4a..b9f00ff1d 100644 --- a/algoliasearch/src/main/java/com/algolia/model/analytics/TopSearchWithRevenueAnalytics.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/ingestion/DockerStreamsInput.java b/algoliasearch/src/main/java/com/algolia/model/ingestion/DockerStreamsInput.java index 274ac84f8..4331bed03 100644 --- a/algoliasearch/src/main/java/com/algolia/model/ingestion/DockerStreamsInput.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponseError.java b/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationError.java similarity index 76% rename from algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponseError.java rename to algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationError.java index f921af52c..97e19b125 100644 --- a/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponseError.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponse.java b/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponse.java index 001a464b2..719c0f1c0 100644 --- a/algoliasearch/src/main/java/com/algolia/model/ingestion/TransformationTryResponse.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/GetServers403Response.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/BadRequest.java similarity index 79% rename from algoliasearch/src/main/java/com/algolia/model/monitoring/GetServers403Response.java rename to algoliasearch/src/main/java/com/algolia/model/monitoring/BadRequest.java index 128b637cd..16e1c190b 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/GetServers403Response.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/Forbidden.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/Forbidden.java new file mode 100644 index 000000000..b0c701487 --- /dev/null +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsInner.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentEntry.java similarity index 82% rename from algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsInner.java rename to algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentEntry.java index 473f28479..4da2412f9 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsInner.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java index 28cef1cf2..5b6d495cb 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/IncidentsResponse.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingMetric.java similarity index 70% rename from algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java rename to algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingMetric.java index c3bf5a198..951ff9c8a 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponseMetrics.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java index aa6c90687..84f58a215 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/IndexingTimeResponse.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java index c2443051a..6cd6724a4 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponse.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyMetric.java similarity index 72% rename from algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java rename to algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyMetric.java index e602ed5cc..4f8ab682c 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponseMetrics.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponse.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponse.java index f47050281..9522d5f75 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/LatencyResponse.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/Metrics.java similarity index 70% rename from algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java rename to algoliasearch/src/main/java/com/algolia/model/monitoring/Metrics.java index 60eaabd04..9695d9637 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/InfrastructureResponseMetrics.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/TimeInner.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/TimeEntry.java similarity index 84% rename from algoliasearch/src/main/java/com/algolia/model/monitoring/TimeInner.java rename to algoliasearch/src/main/java/com/algolia/model/monitoring/TimeEntry.java index 4d838f1e1..de463f614 100644 --- a/algoliasearch/src/main/java/com/algolia/model/monitoring/TimeInner.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/monitoring/Unauthorized.java b/algoliasearch/src/main/java/com/algolia/model/monitoring/Unauthorized.java new file mode 100644 index 000000000..d0e161531 --- /dev/null +++ b/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/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java b/algoliasearch/src/main/java/com/algolia/model/querysuggestions/ConfigStatus.java similarity index 74% rename from algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java rename to algoliasearch/src/main/java/com/algolia/model/querysuggestions/ConfigStatus.java index d6b396e91..b472634c5 100644 --- a/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetConfigStatus200Response.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java b/algoliasearch/src/main/java/com/algolia/model/querysuggestions/LogFile.java similarity index 77% rename from algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java rename to algoliasearch/src/main/java/com/algolia/model/querysuggestions/LogFile.java index 0f4b93f43..98ab0eb5a 100644 --- a/algoliasearch/src/main/java/com/algolia/model/querysuggestions/GetLogFile200Response.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java b/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java index 16a56f3e2..41cb1838e 100644 --- a/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecision.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java b/algoliasearch/src/main/java/com/algolia/model/recommend/Range.java similarity index 79% rename from algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java rename to algoliasearch/src/main/java/com/algolia/model/recommend/Range.java index 280aca7e2..6111e0ffe 100644 --- a/algoliasearch/src/main/java/com/algolia/model/recommend/AroundPrecisionFromValueInner.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRule.java b/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRule.java index e817e0d88..d1afdce68 100644 --- a/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRule.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java b/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexData.java similarity index 78% rename from algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java rename to algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexData.java index 0dcc4276a..4a98cb100 100644 --- a/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadataData.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java b/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java index 34541bf59..b97322a39 100644 --- a/algoliasearch/src/main/java/com/algolia/model/recommend/RedirectRuleIndexMetadata.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRuleMetadata.java b/algoliasearch/src/main/java/com/algolia/model/recommend/RuleMetadata.java similarity index 81% rename from algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRuleMetadata.java rename to algoliasearch/src/main/java/com/algolia/model/recommend/RuleMetadata.java index d086c7b68..45dd5d9c2 100644 --- a/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendRuleMetadata.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java b/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java index a426bb487..5f5d692b5 100644 --- a/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecision.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java b/algoliasearch/src/main/java/com/algolia/model/search/Range.java similarity index 79% rename from algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java rename to algoliasearch/src/main/java/com/algolia/model/search/Range.java index d08ee2efb..1edbbf02e 100644 --- a/algoliasearch/src/main/java/com/algolia/model/search/AroundPrecisionFromValueInner.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java b/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexData.java similarity index 78% rename from algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java rename to algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexData.java index 86297100d..2ce3c80f7 100644 --- a/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadataData.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java b/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java index 3820ccd18..c3e708d63 100644 --- a/algoliasearch/src/main/java/com/algolia/model/search/RedirectRuleIndexMetadata.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsString.java b/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsString.java index 2ecffd51c..43088251f 100644 --- a/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsString.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseErrorErrorsInner.java b/algoliasearch/src/main/java/com/algolia/model/usage/ErrorItem.java similarity index 70% rename from algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseErrorErrorsInner.java rename to algoliasearch/src/main/java/com/algolia/model/usage/ErrorItem.java index 08f07b8ac..c406b5dc2 100644 --- a/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseErrorErrorsInner.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400Response.java b/algoliasearch/src/main/java/com/algolia/model/usage/Forbidden.java similarity index 74% rename from algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400Response.java rename to algoliasearch/src/main/java/com/algolia/model/usage/Forbidden.java index 42e6f8b64..7be9dee8e 100644 --- a/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400Response.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/usage/ForbiddenError.java b/algoliasearch/src/main/java/com/algolia/model/usage/ForbiddenError.java new file mode 100644 index 000000000..a5b4fa034 --- /dev/null +++ b/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/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200Response.java b/algoliasearch/src/main/java/com/algolia/model/usage/IndexUsage.java similarity index 71% rename from algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200Response.java rename to algoliasearch/src/main/java/com/algolia/model/usage/IndexUsage.java index a0ee80425..62facd520 100644 --- a/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200Response.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequest.java b/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequest.java new file mode 100644 index 000000000..cf003ccf5 --- /dev/null +++ b/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/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseError.java b/algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequestError.java similarity index 70% rename from algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseError.java rename to algoliasearch/src/main/java/com/algolia/model/usage/InvalidRequestError.java index 111fbf37c..22d7bb791 100644 --- a/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage400ResponseError.java +++ b/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/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200ResponseStatisticsInner.java b/algoliasearch/src/main/java/com/algolia/model/usage/StatisticEntry.java similarity index 73% rename from algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200ResponseStatisticsInner.java rename to algoliasearch/src/main/java/com/algolia/model/usage/StatisticEntry.java index 661eff12d..c25ec57b2 100644 --- a/algoliasearch/src/main/java/com/algolia/model/usage/GetUsage200ResponseStatisticsInner.java +++ b/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("}");