From 8bc6526df364586c6ad8ff513736b9d91aeebf68 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Wed, 9 Oct 2024 23:23:55 +0000 Subject: [PATCH] fix(clients): remove all client side validation expect null check (generated) https://github.com/algolia/api-clients-automation/pull/3936 Co-authored-by: algolia-bot --- lib/Api/AbtestingClient.php | 4 - lib/Api/AnalyticsClient.php | 80 ---------- lib/Api/IngestionClient.php | 87 ----------- lib/Api/InsightsClient.php | 9 -- lib/Api/SearchClient.php | 26 ---- lib/Model/Abtesting/AbTestsVariant.php | 14 -- .../Abtesting/AbTestsVariantSearchParams.php | 15 -- lib/Model/Abtesting/AddABTestsRequest.php | 14 -- lib/Model/Abtesting/AddABTestsVariant.php | 15 -- .../Abtesting/MinimumDetectableEffect.php | 19 +-- .../Abtesting/ScheduleABTestsRequest.php | 14 -- lib/Model/Abtesting/Variant.php | 15 -- lib/Model/Analytics/ClickPosition.php | 26 +--- lib/Model/Analytics/DailyAddToCartRates.php | 23 --- lib/Model/Analytics/DailyAverageClicks.php | 16 -- .../Analytics/DailyClickThroughRates.php | 23 --- lib/Model/Analytics/DailyConversionRates.php | 23 --- lib/Model/Analytics/DailyNoClickRates.php | 23 --- lib/Model/Analytics/DailyNoResultsRates.php | 14 -- lib/Model/Analytics/DailyPurchaseRates.php | 15 -- lib/Model/Analytics/DailySearchesNoClicks.php | 8 - .../Analytics/DailySearchesNoResults.php | 7 - .../Analytics/GetAddToCartRateResponse.php | 23 --- .../GetAverageClickPositionResponse.php | 16 -- .../Analytics/GetClickPositionsResponse.php | 13 -- .../Analytics/GetClickThroughRateResponse.php | 23 --- .../Analytics/GetConversionRateResponse.php | 23 --- .../Analytics/GetNoClickRateResponse.php | 23 --- .../Analytics/GetNoResultsRateResponse.php | 15 -- .../Analytics/GetPurchaseRateResponse.php | 15 -- lib/Model/Analytics/TopHitWithAnalytics.php | 45 ------ .../Analytics/TopHitWithRevenueAnalytics.php | 84 ---------- .../Analytics/TopSearchWithAnalytics.php | 68 --------- .../TopSearchWithRevenueAnalytics.php | 106 ------------- lib/Model/Ingestion/Event.php | 8 - lib/Model/Ingestion/Pagination.php | 38 ----- lib/Model/Ingestion/Run.php | 15 -- lib/Model/Ingestion/SourceCSV.php | 14 -- lib/Model/Ingestion/SourceInput.php | 15 -- lib/Model/Ingestion/SourceUpdateInput.php | 15 -- lib/Model/Ingestion/Task.php | 15 -- lib/Model/Ingestion/TaskCreate.php | 14 -- lib/Model/Ingestion/TaskCreateV1.php | 14 -- lib/Model/Ingestion/TaskUpdate.php | 19 +-- lib/Model/Ingestion/TaskUpdateV1.php | 19 +-- lib/Model/Ingestion/TaskV1.php | 15 -- lib/Model/Insights/AddedToCartObjectIDs.php | 93 ------------ .../AddedToCartObjectIDsAfterSearch.php | 115 -------------- lib/Model/Insights/ClickedFilters.php | 79 ---------- lib/Model/Insights/ClickedObjectIDs.php | 79 ---------- .../Insights/ClickedObjectIDsAfterSearch.php | 115 -------------- lib/Model/Insights/ConvertedFilters.php | 79 ---------- lib/Model/Insights/ConvertedObjectIDs.php | 79 ---------- .../ConvertedObjectIDsAfterSearch.php | 101 ------------- lib/Model/Insights/EventsItems.php | 143 ------------------ lib/Model/Insights/InsightsEvents.php | 13 -- lib/Model/Insights/ObjectDataAfterSearch.php | 26 +--- lib/Model/Insights/PurchasedObjectIDs.php | 93 ------------ .../PurchasedObjectIDsAfterSearch.php | 93 ------------ lib/Model/Insights/ViewedFilters.php | 79 ---------- lib/Model/Insights/ViewedObjectIDs.php | 79 ---------- .../PersonalizationStrategyParams.php | 14 -- lib/Model/QuerySuggestions/Configuration.php | 6 - .../ConfigurationResponse.php | 7 - .../ConfigurationWithIndex.php | 7 - lib/Model/QuerySuggestions/SourceIndex.php | 15 -- lib/Model/Recommend/BoughtTogetherQuery.php | 30 ---- lib/Model/Recommend/Condition.php | 12 +- lib/Model/Recommend/Consequence.php | 18 +-- lib/Model/Recommend/FallbackParams.php | 66 +------- lib/Model/Recommend/LookingSimilarQuery.php | 30 ---- .../Recommend/PromoteConsequenceObject.php | 12 +- lib/Model/Recommend/RankingInfo.php | 63 -------- lib/Model/Recommend/RecommendHit.php | 14 -- lib/Model/Recommend/RecommendSearchParams.php | 66 +------- lib/Model/Recommend/RecommendationsHit.php | 15 -- .../Recommend/RecommendationsRequest.php | 30 ---- .../Recommend/RecommendationsResults.php | 39 ----- .../Recommend/RecommendedForYouQuery.php | 30 ---- lib/Model/Recommend/RelatedQuery.php | 30 ---- .../Recommend/SearchRecommendRulesParams.php | 42 +---- .../SearchRecommendRulesResponse.php | 8 - lib/Model/Recommend/TrendingFacetHit.php | 15 -- lib/Model/Recommend/TrendingFacetsQuery.php | 30 ---- lib/Model/Recommend/TrendingItemsQuery.php | 30 ---- lib/Model/Search/BrowseParams.php | 96 +----------- lib/Model/Search/BrowseParamsObject.php | 96 +----------- lib/Model/Search/BrowseResponse.php | 39 ----- lib/Model/Search/Condition.php | 12 +- lib/Model/Search/Consequence.php | 18 +-- lib/Model/Search/ConsequenceParams.php | 96 +----------- lib/Model/Search/IndexSettings.php | 58 +------ lib/Model/Search/Log.php | 16 -- lib/Model/Search/Promote.php | 7 - lib/Model/Search/PromoteObjectIDs.php | 7 - lib/Model/Search/RankingInfo.php | 63 -------- lib/Model/Search/Rule.php | 13 -- .../Search/SearchDictionaryEntriesParams.php | 22 --- .../SearchDictionaryEntriesResponse.php | 8 - .../Search/SearchForFacetValuesRequest.php | 12 +- lib/Model/Search/SearchForFacets.php | 92 ----------- lib/Model/Search/SearchForHits.php | 92 ----------- lib/Model/Search/SearchParams.php | 96 +----------- lib/Model/Search/SearchParamsObject.php | 96 +----------- lib/Model/Search/SearchQuery.php | 92 ----------- lib/Model/Search/SearchResponse.php | 39 ----- lib/Model/Search/SearchResult.php | 39 ----- lib/Model/Search/SearchRulesParams.php | 27 +--- lib/Model/Search/SearchSynonymsParams.php | 27 +--- lib/Model/Search/SearchUserIdsParams.php | 22 --- lib/Model/Search/SearchUserIdsResponse.php | 23 --- lib/Model/Search/SettingsResponse.php | 58 +------ lib/Model/Search/UserHit.php | 8 - lib/Model/Search/UserId.php | 8 - 114 files changed, 23 insertions(+), 4299 deletions(-) diff --git a/lib/Api/AbtestingClient.php b/lib/Api/AbtestingClient.php index 5b8715dc..b1f2ea6e 100644 --- a/lib/Api/AbtestingClient.php +++ b/lib/Api/AbtestingClient.php @@ -391,10 +391,6 @@ public function getABTest($id, $requestOptions = []) */ public function listABTests($offset = null, $limit = null, $indexPrefix = null, $indexSuffix = null, $requestOptions = []) { - if (null !== $offset && $offset < 0) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AbtestingClient.listABTests, must be bigger than or equal to 0.'); - } - $resourcePath = '/2/abtests'; $queryParameters = []; $headers = []; diff --git a/lib/Api/AnalyticsClient.php b/lib/Api/AnalyticsClient.php index 52b915be..0ba89ed7 100644 --- a/lib/Api/AnalyticsClient.php +++ b/lib/Api/AnalyticsClient.php @@ -759,16 +759,6 @@ public function getSearchesNoClicks($index, $startDate = null, $endDate = null, 'Parameter `index` is required when calling `getSearchesNoClicks`.' ); } - if (null !== $limit && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getSearchesNoClicks, must be smaller than or equal to 1000.'); - } - - if (null !== $offset && $offset > 1000) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoClicks, must be smaller than or equal to 1000.'); - } - if (null !== $offset && $offset < 0) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoClicks, must be bigger than or equal to 0.'); - } $resourcePath = '/2/searches/noClicks'; $queryParameters = []; @@ -826,16 +816,6 @@ public function getSearchesNoResults($index, $startDate = null, $endDate = null, 'Parameter `index` is required when calling `getSearchesNoResults`.' ); } - if (null !== $limit && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getSearchesNoResults, must be smaller than or equal to 1000.'); - } - - if (null !== $offset && $offset > 1000) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoResults, must be smaller than or equal to 1000.'); - } - if (null !== $offset && $offset < 0) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getSearchesNoResults, must be bigger than or equal to 0.'); - } $resourcePath = '/2/searches/noResults'; $queryParameters = []; @@ -925,16 +905,6 @@ public function getTopCountries($index, $startDate = null, $endDate = null, $lim 'Parameter `index` is required when calling `getTopCountries`.' ); } - if (null !== $limit && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopCountries, must be smaller than or equal to 1000.'); - } - - if (null !== $offset && $offset > 1000) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopCountries, must be smaller than or equal to 1000.'); - } - if (null !== $offset && $offset < 0) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopCountries, must be bigger than or equal to 0.'); - } $resourcePath = '/2/countries'; $queryParameters = []; @@ -993,16 +963,6 @@ public function getTopFilterAttributes($index, $search = null, $startDate = null 'Parameter `index` is required when calling `getTopFilterAttributes`.' ); } - if (null !== $limit && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopFilterAttributes, must be smaller than or equal to 1000.'); - } - - if (null !== $offset && $offset > 1000) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterAttributes, must be smaller than or equal to 1000.'); - } - if (null !== $offset && $offset < 0) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterAttributes, must be bigger than or equal to 0.'); - } $resourcePath = '/2/filters'; $queryParameters = []; @@ -1072,16 +1032,6 @@ public function getTopFilterForAttribute($attribute, $index, $search = null, $st 'Parameter `index` is required when calling `getTopFilterForAttribute`.' ); } - if (null !== $limit && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopFilterForAttribute, must be smaller than or equal to 1000.'); - } - - if (null !== $offset && $offset > 1000) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterForAttribute, must be smaller than or equal to 1000.'); - } - if (null !== $offset && $offset < 0) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFilterForAttribute, must be bigger than or equal to 0.'); - } $resourcePath = '/2/filters/{attribute}'; $queryParameters = []; @@ -1153,16 +1103,6 @@ public function getTopFiltersNoResults($index, $search = null, $startDate = null 'Parameter `index` is required when calling `getTopFiltersNoResults`.' ); } - if (null !== $limit && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopFiltersNoResults, must be smaller than or equal to 1000.'); - } - - if (null !== $offset && $offset > 1000) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFiltersNoResults, must be smaller than or equal to 1000.'); - } - if (null !== $offset && $offset < 0) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopFiltersNoResults, must be bigger than or equal to 0.'); - } $resourcePath = '/2/filters/noResults'; $queryParameters = []; @@ -1227,16 +1167,6 @@ public function getTopHits($index, $search = null, $clickAnalytics = null, $reve 'Parameter `index` is required when calling `getTopHits`.' ); } - if (null !== $limit && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopHits, must be smaller than or equal to 1000.'); - } - - if (null !== $offset && $offset > 1000) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopHits, must be smaller than or equal to 1000.'); - } - if (null !== $offset && $offset < 0) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopHits, must be bigger than or equal to 0.'); - } $resourcePath = '/2/hits'; $queryParameters = []; @@ -1310,16 +1240,6 @@ public function getTopSearches($index, $clickAnalytics = null, $revenueAnalytics 'Parameter `index` is required when calling `getTopSearches`.' ); } - if (null !== $limit && $limit > 1000) { - throw new \InvalidArgumentException('invalid value for "$limit" when calling AnalyticsClient.getTopSearches, must be smaller than or equal to 1000.'); - } - - if (null !== $offset && $offset > 1000) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopSearches, must be smaller than or equal to 1000.'); - } - if (null !== $offset && $offset < 0) { - throw new \InvalidArgumentException('invalid value for "$offset" when calling AnalyticsClient.getTopSearches, must be bigger than or equal to 0.'); - } $resourcePath = '/2/searches'; $queryParameters = []; diff --git a/lib/Api/IngestionClient.php b/lib/Api/IngestionClient.php index 44078d51..77b81df0 100644 --- a/lib/Api/IngestionClient.php +++ b/lib/Api/IngestionClient.php @@ -1225,17 +1225,6 @@ public function getTransformation($transformationID, $requestOptions = []) */ public function listAuthentications($itemsPerPage = null, $page = null, $type = null, $platform = null, $sort = null, $order = null, $requestOptions = []) { - if (null !== $itemsPerPage && $itemsPerPage > 100) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listAuthentications, must be smaller than or equal to 100.'); - } - if (null !== $itemsPerPage && $itemsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listAuthentications, must be bigger than or equal to 1.'); - } - - if (null !== $page && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling IngestionClient.listAuthentications, must be bigger than or equal to 1.'); - } - $resourcePath = '/1/authentications'; $queryParameters = []; $headers = []; @@ -1295,17 +1284,6 @@ public function listAuthentications($itemsPerPage = null, $page = null, $type = */ public function listDestinations($itemsPerPage = null, $page = null, $type = null, $authenticationID = null, $transformationID = null, $sort = null, $order = null, $requestOptions = []) { - if (null !== $itemsPerPage && $itemsPerPage > 100) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listDestinations, must be smaller than or equal to 100.'); - } - if (null !== $itemsPerPage && $itemsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listDestinations, must be bigger than or equal to 1.'); - } - - if (null !== $page && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling IngestionClient.listDestinations, must be bigger than or equal to 1.'); - } - $resourcePath = '/1/destinations'; $queryParameters = []; $headers = []; @@ -1380,16 +1358,6 @@ public function listEvents($runID, $itemsPerPage = null, $page = null, $status = 'Parameter `runID` is required when calling `listEvents`.' ); } - if (null !== $itemsPerPage && $itemsPerPage > 100) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listEvents, must be smaller than or equal to 100.'); - } - if (null !== $itemsPerPage && $itemsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listEvents, must be bigger than or equal to 1.'); - } - - if (null !== $page && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling IngestionClient.listEvents, must be bigger than or equal to 1.'); - } $resourcePath = '/1/runs/{runID}/events'; $queryParameters = []; @@ -1463,17 +1431,6 @@ public function listEvents($runID, $itemsPerPage = null, $page = null, $status = */ public function listRuns($itemsPerPage = null, $page = null, $status = null, $type = null, $taskID = null, $sort = null, $order = null, $startDate = null, $endDate = null, $requestOptions = []) { - if (null !== $itemsPerPage && $itemsPerPage > 100) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listRuns, must be smaller than or equal to 100.'); - } - if (null !== $itemsPerPage && $itemsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listRuns, must be bigger than or equal to 1.'); - } - - if (null !== $page && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling IngestionClient.listRuns, must be bigger than or equal to 1.'); - } - $resourcePath = '/1/runs'; $queryParameters = []; $headers = []; @@ -1538,17 +1495,6 @@ public function listRuns($itemsPerPage = null, $page = null, $status = null, $ty */ public function listSources($itemsPerPage = null, $page = null, $type = null, $authenticationID = null, $sort = null, $order = null, $requestOptions = []) { - if (null !== $itemsPerPage && $itemsPerPage > 100) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listSources, must be smaller than or equal to 100.'); - } - if (null !== $itemsPerPage && $itemsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listSources, must be bigger than or equal to 1.'); - } - - if (null !== $page && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling IngestionClient.listSources, must be bigger than or equal to 1.'); - } - $resourcePath = '/1/sources'; $queryParameters = []; $headers = []; @@ -1610,17 +1556,6 @@ public function listSources($itemsPerPage = null, $page = null, $type = null, $a */ public function listTasks($itemsPerPage = null, $page = null, $action = null, $enabled = null, $sourceID = null, $destinationID = null, $triggerType = null, $sort = null, $order = null, $requestOptions = []) { - if (null !== $itemsPerPage && $itemsPerPage > 100) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listTasks, must be smaller than or equal to 100.'); - } - if (null !== $itemsPerPage && $itemsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listTasks, must be bigger than or equal to 1.'); - } - - if (null !== $page && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling IngestionClient.listTasks, must be bigger than or equal to 1.'); - } - $resourcePath = '/2/tasks'; $queryParameters = []; $headers = []; @@ -1700,17 +1635,6 @@ public function listTasks($itemsPerPage = null, $page = null, $action = null, $e */ public function listTasksV1($itemsPerPage = null, $page = null, $action = null, $enabled = null, $sourceID = null, $destinationID = null, $triggerType = null, $sort = null, $order = null, $requestOptions = []) { - if (null !== $itemsPerPage && $itemsPerPage > 100) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listTasksV1, must be smaller than or equal to 100.'); - } - if (null !== $itemsPerPage && $itemsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listTasksV1, must be bigger than or equal to 1.'); - } - - if (null !== $page && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling IngestionClient.listTasksV1, must be bigger than or equal to 1.'); - } - $resourcePath = '/1/tasks'; $queryParameters = []; $headers = []; @@ -1785,17 +1709,6 @@ public function listTasksV1($itemsPerPage = null, $page = null, $action = null, */ public function listTransformations($itemsPerPage = null, $page = null, $sort = null, $order = null, $requestOptions = []) { - if (null !== $itemsPerPage && $itemsPerPage > 100) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listTransformations, must be smaller than or equal to 100.'); - } - if (null !== $itemsPerPage && $itemsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for "$itemsPerPage" when calling IngestionClient.listTransformations, must be bigger than or equal to 1.'); - } - - if (null !== $page && $page < 1) { - throw new \InvalidArgumentException('invalid value for "$page" when calling IngestionClient.listTransformations, must be bigger than or equal to 1.'); - } - $resourcePath = '/1/transformations'; $queryParameters = []; $headers = []; diff --git a/lib/Api/InsightsClient.php b/lib/Api/InsightsClient.php index 60820c0e..9bd82d51 100644 --- a/lib/Api/InsightsClient.php +++ b/lib/Api/InsightsClient.php @@ -280,15 +280,6 @@ public function deleteUserToken($userToken, $requestOptions = []) 'Parameter `userToken` is required when calling `deleteUserToken`.' ); } - if (strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for "$userToken" when calling InsightsClient.deleteUserToken, must be smaller than or equal to 129.'); - } - if (strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for "$userToken" when calling InsightsClient.deleteUserToken, must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException('invalid value for "userToken" when calling InsightsClient.deleteUserToken, must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/.'); - } $resourcePath = '/1/usertokens/{userToken}'; $queryParameters = []; diff --git a/lib/Api/SearchClient.php b/lib/Api/SearchClient.php index bd585442..889c382f 100644 --- a/lib/Api/SearchClient.php +++ b/lib/Api/SearchClient.php @@ -293,10 +293,6 @@ public function assignUserId($xAlgoliaUserID, $assignUserIdParams, $requestOptio 'Parameter `xAlgoliaUserID` is required when calling `assignUserId`.' ); } - if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $xAlgoliaUserID)) { - throw new \InvalidArgumentException('invalid value for "xAlgoliaUserID" when calling SearchClient.assignUserId, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/.'); - } - // verify the required parameter 'assignUserIdParams' is set if (!isset($assignUserIdParams)) { throw new \InvalidArgumentException( @@ -384,10 +380,6 @@ public function batchAssignUserIds($xAlgoliaUserID, $batchAssignUserIdsParams, $ 'Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.' ); } - if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $xAlgoliaUserID)) { - throw new \InvalidArgumentException('invalid value for "xAlgoliaUserID" when calling SearchClient.batchAssignUserIds, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/.'); - } - // verify the required parameter 'batchAssignUserIdsParams' is set if (!isset($batchAssignUserIdsParams)) { throw new \InvalidArgumentException( @@ -1236,10 +1228,6 @@ public function getDictionarySettings($requestOptions = []) */ public function getLogs($offset = null, $length = null, $indexName = null, $type = null, $requestOptions = []) { - if (null !== $length && $length > 1000) { - throw new \InvalidArgumentException('invalid value for "$length" when calling SearchClient.getLogs, must be smaller than or equal to 1000.'); - } - $resourcePath = '/1/logs'; $queryParameters = []; $headers = []; @@ -1609,9 +1597,6 @@ public function getUserId($userID, $requestOptions = []) 'Parameter `userID` is required when calling `getUserId`.' ); } - if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $userID)) { - throw new \InvalidArgumentException('invalid value for "userID" when calling SearchClient.getUserId, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/.'); - } $resourcePath = '/1/clusters/mapping/{userID}'; $queryParameters = []; @@ -1709,10 +1694,6 @@ public function listClusters($requestOptions = []) */ public function listIndices($page = null, $hitsPerPage = null, $requestOptions = []) { - if (null !== $page && $page < 0) { - throw new \InvalidArgumentException('invalid value for "$page" when calling SearchClient.listIndices, must be bigger than or equal to 0.'); - } - $resourcePath = '/1/indexes'; $queryParameters = []; $headers = []; @@ -1743,10 +1724,6 @@ public function listIndices($page = null, $hitsPerPage = null, $requestOptions = */ public function listUserIds($page = null, $hitsPerPage = null, $requestOptions = []) { - if (null !== $page && $page < 0) { - throw new \InvalidArgumentException('invalid value for "$page" when calling SearchClient.listUserIds, must be bigger than or equal to 0.'); - } - $resourcePath = '/1/clusters/mapping'; $queryParameters = []; $headers = []; @@ -1926,9 +1903,6 @@ public function removeUserId($userID, $requestOptions = []) 'Parameter `userID` is required when calling `removeUserId`.' ); } - if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $userID)) { - throw new \InvalidArgumentException('invalid value for "userID" when calling SearchClient.removeUserId, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/.'); - } $resourcePath = '/1/clusters/mapping/{userID}'; $queryParameters = []; diff --git a/lib/Model/Abtesting/AbTestsVariant.php b/lib/Model/Abtesting/AbTestsVariant.php index dc89d7a2..da8ce78a 100644 --- a/lib/Model/Abtesting/AbTestsVariant.php +++ b/lib/Model/Abtesting/AbTestsVariant.php @@ -161,13 +161,6 @@ public function listInvalidProperties() if (!isset($this->container['trafficPercentage']) || null === $this->container['trafficPercentage']) { $invalidProperties[] = "'trafficPercentage' can't be null"; } - if ($this->container['trafficPercentage'] > 100) { - $invalidProperties[] = "invalid value for 'trafficPercentage', must be smaller than or equal to 100."; - } - - if ($this->container['trafficPercentage'] < 0) { - $invalidProperties[] = "invalid value for 'trafficPercentage', must be bigger than or equal to 0."; - } return $invalidProperties; } @@ -226,13 +219,6 @@ public function getTrafficPercentage() */ public function setTrafficPercentage($trafficPercentage) { - if ($trafficPercentage > 100) { - throw new \InvalidArgumentException('invalid value for $trafficPercentage when calling AbTestsVariant., must be smaller than or equal to 100.'); - } - if ($trafficPercentage < 0) { - throw new \InvalidArgumentException('invalid value for $trafficPercentage when calling AbTestsVariant., must be bigger than or equal to 0.'); - } - $this->container['trafficPercentage'] = $trafficPercentage; return $this; diff --git a/lib/Model/Abtesting/AbTestsVariantSearchParams.php b/lib/Model/Abtesting/AbTestsVariantSearchParams.php index 0cdef3dc..b5f1e8e5 100644 --- a/lib/Model/Abtesting/AbTestsVariantSearchParams.php +++ b/lib/Model/Abtesting/AbTestsVariantSearchParams.php @@ -169,14 +169,6 @@ public function listInvalidProperties() if (!isset($this->container['trafficPercentage']) || null === $this->container['trafficPercentage']) { $invalidProperties[] = "'trafficPercentage' can't be null"; } - if ($this->container['trafficPercentage'] > 100) { - $invalidProperties[] = "invalid value for 'trafficPercentage', must be smaller than or equal to 100."; - } - - if ($this->container['trafficPercentage'] < 0) { - $invalidProperties[] = "invalid value for 'trafficPercentage', must be bigger than or equal to 0."; - } - if (!isset($this->container['customSearchParameters']) || null === $this->container['customSearchParameters']) { $invalidProperties[] = "'customSearchParameters' can't be null"; } @@ -238,13 +230,6 @@ public function getTrafficPercentage() */ public function setTrafficPercentage($trafficPercentage) { - if ($trafficPercentage > 100) { - throw new \InvalidArgumentException('invalid value for $trafficPercentage when calling AbTestsVariantSearchParams., must be smaller than or equal to 100.'); - } - if ($trafficPercentage < 0) { - throw new \InvalidArgumentException('invalid value for $trafficPercentage when calling AbTestsVariantSearchParams., must be bigger than or equal to 0.'); - } - $this->container['trafficPercentage'] = $trafficPercentage; return $this; diff --git a/lib/Model/Abtesting/AddABTestsRequest.php b/lib/Model/Abtesting/AddABTestsRequest.php index b0238b00..febf4a57 100644 --- a/lib/Model/Abtesting/AddABTestsRequest.php +++ b/lib/Model/Abtesting/AddABTestsRequest.php @@ -161,14 +161,6 @@ public function listInvalidProperties() if (!isset($this->container['variants']) || null === $this->container['variants']) { $invalidProperties[] = "'variants' can't be null"; } - if (count($this->container['variants']) > 2) { - $invalidProperties[] = "invalid value for 'variants', number of items must be less than or equal to 2."; - } - - if (count($this->container['variants']) < 2) { - $invalidProperties[] = "invalid value for 'variants', number of items must be greater than or equal to 2."; - } - if (!isset($this->container['endAt']) || null === $this->container['endAt']) { $invalidProperties[] = "'endAt' can't be null"; } @@ -230,12 +222,6 @@ public function getVariants() */ public function setVariants($variants) { - if (count($variants) > 2) { - throw new \InvalidArgumentException('invalid value for $variants when calling AddABTestsRequest., number of items must be less than or equal to 2.'); - } - if (count($variants) < 2) { - throw new \InvalidArgumentException('invalid length for $variants when calling AddABTestsRequest., number of items must be greater than or equal to 2.'); - } $this->container['variants'] = $variants; return $this; diff --git a/lib/Model/Abtesting/AddABTestsVariant.php b/lib/Model/Abtesting/AddABTestsVariant.php index b39cbb93..1d2f757c 100644 --- a/lib/Model/Abtesting/AddABTestsVariant.php +++ b/lib/Model/Abtesting/AddABTestsVariant.php @@ -169,14 +169,6 @@ public function listInvalidProperties() if (!isset($this->container['trafficPercentage']) || null === $this->container['trafficPercentage']) { $invalidProperties[] = "'trafficPercentage' can't be null"; } - if ($this->container['trafficPercentage'] > 100) { - $invalidProperties[] = "invalid value for 'trafficPercentage', must be smaller than or equal to 100."; - } - - if ($this->container['trafficPercentage'] < 0) { - $invalidProperties[] = "invalid value for 'trafficPercentage', must be bigger than or equal to 0."; - } - if (!isset($this->container['customSearchParameters']) || null === $this->container['customSearchParameters']) { $invalidProperties[] = "'customSearchParameters' can't be null"; } @@ -238,13 +230,6 @@ public function getTrafficPercentage() */ public function setTrafficPercentage($trafficPercentage) { - if ($trafficPercentage > 100) { - throw new \InvalidArgumentException('invalid value for $trafficPercentage when calling AddABTestsVariant., must be smaller than or equal to 100.'); - } - if ($trafficPercentage < 0) { - throw new \InvalidArgumentException('invalid value for $trafficPercentage when calling AddABTestsVariant., must be bigger than or equal to 0.'); - } - $this->container['trafficPercentage'] = $trafficPercentage; return $this; diff --git a/lib/Model/Abtesting/MinimumDetectableEffect.php b/lib/Model/Abtesting/MinimumDetectableEffect.php index ed2f99fd..936652d4 100644 --- a/lib/Model/Abtesting/MinimumDetectableEffect.php +++ b/lib/Model/Abtesting/MinimumDetectableEffect.php @@ -147,17 +147,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['size']) && ($this->container['size'] > 1)) { - $invalidProperties[] = "invalid value for 'size', must be smaller than or equal to 1."; - } - - if (isset($this->container['size']) && ($this->container['size'] < 0)) { - $invalidProperties[] = "invalid value for 'size', must be bigger than or equal to 0."; - } - - return $invalidProperties; + return []; } /** @@ -190,13 +180,6 @@ public function getSize() */ public function setSize($size) { - if (!is_null($size) && ($size > 1)) { - throw new \InvalidArgumentException('invalid value for $size when calling MinimumDetectableEffect., must be smaller than or equal to 1.'); - } - if (!is_null($size) && ($size < 0)) { - throw new \InvalidArgumentException('invalid value for $size when calling MinimumDetectableEffect., must be bigger than or equal to 0.'); - } - $this->container['size'] = $size; return $this; diff --git a/lib/Model/Abtesting/ScheduleABTestsRequest.php b/lib/Model/Abtesting/ScheduleABTestsRequest.php index c6aae391..2309ccb7 100644 --- a/lib/Model/Abtesting/ScheduleABTestsRequest.php +++ b/lib/Model/Abtesting/ScheduleABTestsRequest.php @@ -169,14 +169,6 @@ public function listInvalidProperties() if (!isset($this->container['variants']) || null === $this->container['variants']) { $invalidProperties[] = "'variants' can't be null"; } - if (count($this->container['variants']) > 2) { - $invalidProperties[] = "invalid value for 'variants', number of items must be less than or equal to 2."; - } - - if (count($this->container['variants']) < 2) { - $invalidProperties[] = "invalid value for 'variants', number of items must be greater than or equal to 2."; - } - if (!isset($this->container['scheduledAt']) || null === $this->container['scheduledAt']) { $invalidProperties[] = "'scheduledAt' can't be null"; } @@ -241,12 +233,6 @@ public function getVariants() */ public function setVariants($variants) { - if (count($variants) > 2) { - throw new \InvalidArgumentException('invalid value for $variants when calling ScheduleABTestsRequest., number of items must be less than or equal to 2.'); - } - if (count($variants) < 2) { - throw new \InvalidArgumentException('invalid length for $variants when calling ScheduleABTestsRequest., number of items must be greater than or equal to 2.'); - } $this->container['variants'] = $variants; return $this; diff --git a/lib/Model/Abtesting/Variant.php b/lib/Model/Abtesting/Variant.php index e515be8e..a8a57e72 100644 --- a/lib/Model/Abtesting/Variant.php +++ b/lib/Model/Abtesting/Variant.php @@ -318,14 +318,6 @@ public function listInvalidProperties() if (!isset($this->container['trafficPercentage']) || null === $this->container['trafficPercentage']) { $invalidProperties[] = "'trafficPercentage' can't be null"; } - if ($this->container['trafficPercentage'] > 100) { - $invalidProperties[] = "invalid value for 'trafficPercentage', must be smaller than or equal to 100."; - } - - if ($this->container['trafficPercentage'] < 0) { - $invalidProperties[] = "invalid value for 'trafficPercentage', must be bigger than or equal to 0."; - } - if (!isset($this->container['userCount']) || null === $this->container['userCount']) { $invalidProperties[] = "'userCount' can't be null"; } @@ -774,13 +766,6 @@ public function getTrafficPercentage() */ public function setTrafficPercentage($trafficPercentage) { - if ($trafficPercentage > 100) { - throw new \InvalidArgumentException('invalid value for $trafficPercentage when calling Variant., must be smaller than or equal to 100.'); - } - if ($trafficPercentage < 0) { - throw new \InvalidArgumentException('invalid value for $trafficPercentage when calling Variant., must be bigger than or equal to 0.'); - } - $this->container['trafficPercentage'] = $trafficPercentage; return $this; diff --git a/lib/Model/Analytics/ClickPosition.php b/lib/Model/Analytics/ClickPosition.php index b6b43c08..e7fd4401 100644 --- a/lib/Model/Analytics/ClickPosition.php +++ b/lib/Model/Analytics/ClickPosition.php @@ -147,21 +147,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['position']) && (count($this->container['position']) > 2)) { - $invalidProperties[] = "invalid value for 'position', number of items must be less than or equal to 2."; - } - - if (isset($this->container['position']) && (count($this->container['position']) < 2)) { - $invalidProperties[] = "invalid value for 'position', number of items must be greater than or equal to 2."; - } - - if (isset($this->container['clickCount']) && ($this->container['clickCount'] < 0)) { - $invalidProperties[] = "invalid value for 'clickCount', must be bigger than or equal to 0."; - } - - return $invalidProperties; + return []; } /** @@ -194,12 +180,6 @@ public function getPosition() */ public function setPosition($position) { - if (!is_null($position) && (count($position) > 2)) { - throw new \InvalidArgumentException('invalid value for $position when calling ClickPosition., number of items must be less than or equal to 2.'); - } - if (!is_null($position) && (count($position) < 2)) { - throw new \InvalidArgumentException('invalid length for $position when calling ClickPosition., number of items must be greater than or equal to 2.'); - } $this->container['position'] = $position; return $this; @@ -224,10 +204,6 @@ public function getClickCount() */ public function setClickCount($clickCount) { - if (!is_null($clickCount) && ($clickCount < 0)) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling ClickPosition., must be bigger than or equal to 0.'); - } - $this->container['clickCount'] = $clickCount; return $this; diff --git a/lib/Model/Analytics/DailyAddToCartRates.php b/lib/Model/Analytics/DailyAddToCartRates.php index 7edae2e3..d1f55ec0 100644 --- a/lib/Model/Analytics/DailyAddToCartRates.php +++ b/lib/Model/Analytics/DailyAddToCartRates.php @@ -166,24 +166,12 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } if (!isset($this->container['addToCartCount']) || null === $this->container['addToCartCount']) { $invalidProperties[] = "'addToCartCount' can't be null"; } - if ($this->container['addToCartCount'] < 0) { - $invalidProperties[] = "invalid value for 'addToCartCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['date']) || null === $this->container['date']) { $invalidProperties[] = "'date' can't be null"; } @@ -221,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyAddToCartRates., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyAddToCartRates., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; @@ -276,10 +257,6 @@ public function getAddToCartCount() */ public function setAddToCartCount($addToCartCount) { - if ($addToCartCount < 0) { - throw new \InvalidArgumentException('invalid value for $addToCartCount when calling DailyAddToCartRates., must be bigger than or equal to 0.'); - } - $this->container['addToCartCount'] = $addToCartCount; return $this; diff --git a/lib/Model/Analytics/DailyAverageClicks.php b/lib/Model/Analytics/DailyAverageClicks.php index 8c465e91..f46185ed 100644 --- a/lib/Model/Analytics/DailyAverageClicks.php +++ b/lib/Model/Analytics/DailyAverageClicks.php @@ -158,17 +158,9 @@ public function listInvalidProperties() if (!isset($this->container['average']) || null === $this->container['average']) { $invalidProperties[] = "'average' can't be null"; } - if ($this->container['average'] < 1) { - $invalidProperties[] = "invalid value for 'average', must be bigger than or equal to 1."; - } - if (!isset($this->container['clickCount']) || null === $this->container['clickCount']) { $invalidProperties[] = "'clickCount' can't be null"; } - if ($this->container['clickCount'] < 0) { - $invalidProperties[] = "invalid value for 'clickCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['date']) || null === $this->container['date']) { $invalidProperties[] = "'date' can't be null"; } @@ -206,10 +198,6 @@ public function getAverage() */ public function setAverage($average) { - if ($average < 1) { - throw new \InvalidArgumentException('invalid value for $average when calling DailyAverageClicks., must be bigger than or equal to 1.'); - } - $this->container['average'] = $average; return $this; @@ -234,10 +222,6 @@ public function getClickCount() */ public function setClickCount($clickCount) { - if ($clickCount < 0) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling DailyAverageClicks., must be bigger than or equal to 0.'); - } - $this->container['clickCount'] = $clickCount; return $this; diff --git a/lib/Model/Analytics/DailyClickThroughRates.php b/lib/Model/Analytics/DailyClickThroughRates.php index 72932575..a9b58c67 100644 --- a/lib/Model/Analytics/DailyClickThroughRates.php +++ b/lib/Model/Analytics/DailyClickThroughRates.php @@ -166,21 +166,9 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['clickCount']) || null === $this->container['clickCount']) { $invalidProperties[] = "'clickCount' can't be null"; } - if ($this->container['clickCount'] < 0) { - $invalidProperties[] = "invalid value for 'clickCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } @@ -221,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyClickThroughRates., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyClickThroughRates., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; @@ -252,10 +233,6 @@ public function getClickCount() */ public function setClickCount($clickCount) { - if ($clickCount < 0) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling DailyClickThroughRates., must be bigger than or equal to 0.'); - } - $this->container['clickCount'] = $clickCount; return $this; diff --git a/lib/Model/Analytics/DailyConversionRates.php b/lib/Model/Analytics/DailyConversionRates.php index a0271e5c..5d3a2bf4 100644 --- a/lib/Model/Analytics/DailyConversionRates.php +++ b/lib/Model/Analytics/DailyConversionRates.php @@ -166,24 +166,12 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } if (!isset($this->container['conversionCount']) || null === $this->container['conversionCount']) { $invalidProperties[] = "'conversionCount' can't be null"; } - if ($this->container['conversionCount'] < 0) { - $invalidProperties[] = "invalid value for 'conversionCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['date']) || null === $this->container['date']) { $invalidProperties[] = "'date' can't be null"; } @@ -221,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyConversionRates., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyConversionRates., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; @@ -276,10 +257,6 @@ public function getConversionCount() */ public function setConversionCount($conversionCount) { - if ($conversionCount < 0) { - throw new \InvalidArgumentException('invalid value for $conversionCount when calling DailyConversionRates., must be bigger than or equal to 0.'); - } - $this->container['conversionCount'] = $conversionCount; return $this; diff --git a/lib/Model/Analytics/DailyNoClickRates.php b/lib/Model/Analytics/DailyNoClickRates.php index c7976606..cffc1876 100644 --- a/lib/Model/Analytics/DailyNoClickRates.php +++ b/lib/Model/Analytics/DailyNoClickRates.php @@ -166,24 +166,12 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['count']) || null === $this->container['count']) { $invalidProperties[] = "'count' can't be null"; } if (!isset($this->container['noClickCount']) || null === $this->container['noClickCount']) { $invalidProperties[] = "'noClickCount' can't be null"; } - if ($this->container['noClickCount'] < 1) { - $invalidProperties[] = "invalid value for 'noClickCount', must be bigger than or equal to 1."; - } - if (!isset($this->container['date']) || null === $this->container['date']) { $invalidProperties[] = "'date' can't be null"; } @@ -221,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyNoClickRates., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyNoClickRates., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; @@ -276,10 +257,6 @@ public function getNoClickCount() */ public function setNoClickCount($noClickCount) { - if ($noClickCount < 1) { - throw new \InvalidArgumentException('invalid value for $noClickCount when calling DailyNoClickRates., must be bigger than or equal to 1.'); - } - $this->container['noClickCount'] = $noClickCount; return $this; diff --git a/lib/Model/Analytics/DailyNoResultsRates.php b/lib/Model/Analytics/DailyNoResultsRates.php index 95d4d618..60f40105 100644 --- a/lib/Model/Analytics/DailyNoResultsRates.php +++ b/lib/Model/Analytics/DailyNoResultsRates.php @@ -175,13 +175,6 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } return $invalidProperties; } @@ -288,13 +281,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyNoResultsRates., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyNoResultsRates., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; diff --git a/lib/Model/Analytics/DailyPurchaseRates.php b/lib/Model/Analytics/DailyPurchaseRates.php index afd82b06..5b7e6849 100644 --- a/lib/Model/Analytics/DailyPurchaseRates.php +++ b/lib/Model/Analytics/DailyPurchaseRates.php @@ -166,14 +166,6 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } @@ -217,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyPurchaseRates., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling DailyPurchaseRates., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; diff --git a/lib/Model/Analytics/DailySearchesNoClicks.php b/lib/Model/Analytics/DailySearchesNoClicks.php index f595885c..84a991c5 100644 --- a/lib/Model/Analytics/DailySearchesNoClicks.php +++ b/lib/Model/Analytics/DailySearchesNoClicks.php @@ -161,10 +161,6 @@ public function listInvalidProperties() if (!isset($this->container['count']) || null === $this->container['count']) { $invalidProperties[] = "'count' can't be null"; } - if ($this->container['count'] < 1) { - $invalidProperties[] = "invalid value for 'count', must be bigger than or equal to 1."; - } - if (!isset($this->container['nbHits']) || null === $this->container['nbHits']) { $invalidProperties[] = "'nbHits' can't be null"; } @@ -226,10 +222,6 @@ public function getCount() */ public function setCount($count) { - if ($count < 1) { - throw new \InvalidArgumentException('invalid value for $count when calling DailySearchesNoClicks., must be bigger than or equal to 1.'); - } - $this->container['count'] = $count; return $this; diff --git a/lib/Model/Analytics/DailySearchesNoResults.php b/lib/Model/Analytics/DailySearchesNoResults.php index 72f5d7f9..b4f91989 100644 --- a/lib/Model/Analytics/DailySearchesNoResults.php +++ b/lib/Model/Analytics/DailySearchesNoResults.php @@ -164,9 +164,6 @@ public function listInvalidProperties() if (!isset($this->container['withFilterCount']) || null === $this->container['withFilterCount']) { $invalidProperties[] = "'withFilterCount' can't be null"; } - if ($this->container['withFilterCount'] < 0) { - $invalidProperties[] = "invalid value for 'withFilterCount', must be bigger than or equal to 0."; - } return $invalidProperties; } @@ -249,10 +246,6 @@ public function getWithFilterCount() */ public function setWithFilterCount($withFilterCount) { - if ($withFilterCount < 0) { - throw new \InvalidArgumentException('invalid value for $withFilterCount when calling DailySearchesNoResults., must be bigger than or equal to 0.'); - } - $this->container['withFilterCount'] = $withFilterCount; return $this; diff --git a/lib/Model/Analytics/GetAddToCartRateResponse.php b/lib/Model/Analytics/GetAddToCartRateResponse.php index 5eafa8d8..fdda576a 100644 --- a/lib/Model/Analytics/GetAddToCartRateResponse.php +++ b/lib/Model/Analytics/GetAddToCartRateResponse.php @@ -166,24 +166,12 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } if (!isset($this->container['addToCartCount']) || null === $this->container['addToCartCount']) { $invalidProperties[] = "'addToCartCount' can't be null"; } - if ($this->container['addToCartCount'] < 0) { - $invalidProperties[] = "invalid value for 'addToCartCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['dates']) || null === $this->container['dates']) { $invalidProperties[] = "'dates' can't be null"; } @@ -221,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetAddToCartRateResponse., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetAddToCartRateResponse., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; @@ -276,10 +257,6 @@ public function getAddToCartCount() */ public function setAddToCartCount($addToCartCount) { - if ($addToCartCount < 0) { - throw new \InvalidArgumentException('invalid value for $addToCartCount when calling GetAddToCartRateResponse., must be bigger than or equal to 0.'); - } - $this->container['addToCartCount'] = $addToCartCount; return $this; diff --git a/lib/Model/Analytics/GetAverageClickPositionResponse.php b/lib/Model/Analytics/GetAverageClickPositionResponse.php index cdc34c65..52a5d393 100644 --- a/lib/Model/Analytics/GetAverageClickPositionResponse.php +++ b/lib/Model/Analytics/GetAverageClickPositionResponse.php @@ -158,17 +158,9 @@ public function listInvalidProperties() if (!isset($this->container['average']) || null === $this->container['average']) { $invalidProperties[] = "'average' can't be null"; } - if ($this->container['average'] < 1) { - $invalidProperties[] = "invalid value for 'average', must be bigger than or equal to 1."; - } - if (!isset($this->container['clickCount']) || null === $this->container['clickCount']) { $invalidProperties[] = "'clickCount' can't be null"; } - if ($this->container['clickCount'] < 0) { - $invalidProperties[] = "invalid value for 'clickCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['dates']) || null === $this->container['dates']) { $invalidProperties[] = "'dates' can't be null"; } @@ -206,10 +198,6 @@ public function getAverage() */ public function setAverage($average) { - if ($average < 1) { - throw new \InvalidArgumentException('invalid value for $average when calling GetAverageClickPositionResponse., must be bigger than or equal to 1.'); - } - $this->container['average'] = $average; return $this; @@ -234,10 +222,6 @@ public function getClickCount() */ public function setClickCount($clickCount) { - if ($clickCount < 0) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling GetAverageClickPositionResponse., must be bigger than or equal to 0.'); - } - $this->container['clickCount'] = $clickCount; return $this; diff --git a/lib/Model/Analytics/GetClickPositionsResponse.php b/lib/Model/Analytics/GetClickPositionsResponse.php index aa1d5a0e..91158eae 100644 --- a/lib/Model/Analytics/GetClickPositionsResponse.php +++ b/lib/Model/Analytics/GetClickPositionsResponse.php @@ -142,13 +142,6 @@ public function listInvalidProperties() if (!isset($this->container['positions']) || null === $this->container['positions']) { $invalidProperties[] = "'positions' can't be null"; } - if (count($this->container['positions']) > 12) { - $invalidProperties[] = "invalid value for 'positions', number of items must be less than or equal to 12."; - } - - if (count($this->container['positions']) < 12) { - $invalidProperties[] = "invalid value for 'positions', number of items must be greater than or equal to 12."; - } return $invalidProperties; } @@ -183,12 +176,6 @@ public function getPositions() */ public function setPositions($positions) { - if (count($positions) > 12) { - throw new \InvalidArgumentException('invalid value for $positions when calling GetClickPositionsResponse., number of items must be less than or equal to 12.'); - } - if (count($positions) < 12) { - throw new \InvalidArgumentException('invalid length for $positions when calling GetClickPositionsResponse., number of items must be greater than or equal to 12.'); - } $this->container['positions'] = $positions; return $this; diff --git a/lib/Model/Analytics/GetClickThroughRateResponse.php b/lib/Model/Analytics/GetClickThroughRateResponse.php index 8196ce54..a61e6af7 100644 --- a/lib/Model/Analytics/GetClickThroughRateResponse.php +++ b/lib/Model/Analytics/GetClickThroughRateResponse.php @@ -166,21 +166,9 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['clickCount']) || null === $this->container['clickCount']) { $invalidProperties[] = "'clickCount' can't be null"; } - if ($this->container['clickCount'] < 0) { - $invalidProperties[] = "invalid value for 'clickCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } @@ -221,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetClickThroughRateResponse., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetClickThroughRateResponse., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; @@ -252,10 +233,6 @@ public function getClickCount() */ public function setClickCount($clickCount) { - if ($clickCount < 0) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling GetClickThroughRateResponse., must be bigger than or equal to 0.'); - } - $this->container['clickCount'] = $clickCount; return $this; diff --git a/lib/Model/Analytics/GetConversionRateResponse.php b/lib/Model/Analytics/GetConversionRateResponse.php index de4395f4..a4ac7b0c 100644 --- a/lib/Model/Analytics/GetConversionRateResponse.php +++ b/lib/Model/Analytics/GetConversionRateResponse.php @@ -166,24 +166,12 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } if (!isset($this->container['conversionCount']) || null === $this->container['conversionCount']) { $invalidProperties[] = "'conversionCount' can't be null"; } - if ($this->container['conversionCount'] < 0) { - $invalidProperties[] = "invalid value for 'conversionCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['dates']) || null === $this->container['dates']) { $invalidProperties[] = "'dates' can't be null"; } @@ -221,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetConversionRateResponse., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetConversionRateResponse., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; @@ -276,10 +257,6 @@ public function getConversionCount() */ public function setConversionCount($conversionCount) { - if ($conversionCount < 0) { - throw new \InvalidArgumentException('invalid value for $conversionCount when calling GetConversionRateResponse., must be bigger than or equal to 0.'); - } - $this->container['conversionCount'] = $conversionCount; return $this; diff --git a/lib/Model/Analytics/GetNoClickRateResponse.php b/lib/Model/Analytics/GetNoClickRateResponse.php index 69361277..8db86c7a 100644 --- a/lib/Model/Analytics/GetNoClickRateResponse.php +++ b/lib/Model/Analytics/GetNoClickRateResponse.php @@ -166,24 +166,12 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['count']) || null === $this->container['count']) { $invalidProperties[] = "'count' can't be null"; } if (!isset($this->container['noClickCount']) || null === $this->container['noClickCount']) { $invalidProperties[] = "'noClickCount' can't be null"; } - if ($this->container['noClickCount'] < 1) { - $invalidProperties[] = "invalid value for 'noClickCount', must be bigger than or equal to 1."; - } - if (!isset($this->container['dates']) || null === $this->container['dates']) { $invalidProperties[] = "'dates' can't be null"; } @@ -221,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetNoClickRateResponse., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetNoClickRateResponse., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; @@ -276,10 +257,6 @@ public function getNoClickCount() */ public function setNoClickCount($noClickCount) { - if ($noClickCount < 1) { - throw new \InvalidArgumentException('invalid value for $noClickCount when calling GetNoClickRateResponse., must be bigger than or equal to 1.'); - } - $this->container['noClickCount'] = $noClickCount; return $this; diff --git a/lib/Model/Analytics/GetNoResultsRateResponse.php b/lib/Model/Analytics/GetNoResultsRateResponse.php index 165603b9..5d22205b 100644 --- a/lib/Model/Analytics/GetNoResultsRateResponse.php +++ b/lib/Model/Analytics/GetNoResultsRateResponse.php @@ -166,14 +166,6 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['count']) || null === $this->container['count']) { $invalidProperties[] = "'count' can't be null"; } @@ -217,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetNoResultsRateResponse., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetNoResultsRateResponse., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; diff --git a/lib/Model/Analytics/GetPurchaseRateResponse.php b/lib/Model/Analytics/GetPurchaseRateResponse.php index ff1c2d2d..05f8573c 100644 --- a/lib/Model/Analytics/GetPurchaseRateResponse.php +++ b/lib/Model/Analytics/GetPurchaseRateResponse.php @@ -166,14 +166,6 @@ public function listInvalidProperties() if (!isset($this->container['rate']) || null === $this->container['rate']) { $invalidProperties[] = "'rate' can't be null"; } - if ($this->container['rate'] > 1) { - $invalidProperties[] = "invalid value for 'rate', must be smaller than or equal to 1."; - } - - if ($this->container['rate'] < 0) { - $invalidProperties[] = "invalid value for 'rate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } @@ -217,13 +209,6 @@ public function getRate() */ public function setRate($rate) { - if ($rate > 1) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetPurchaseRateResponse., must be smaller than or equal to 1.'); - } - if ($rate < 0) { - throw new \InvalidArgumentException('invalid value for $rate when calling GetPurchaseRateResponse., must be bigger than or equal to 0.'); - } - $this->container['rate'] = $rate; return $this; diff --git a/lib/Model/Analytics/TopHitWithAnalytics.php b/lib/Model/Analytics/TopHitWithAnalytics.php index 1401454f..1a138e10 100644 --- a/lib/Model/Analytics/TopHitWithAnalytics.php +++ b/lib/Model/Analytics/TopHitWithAnalytics.php @@ -196,41 +196,18 @@ public function listInvalidProperties() if (!isset($this->container['clickThroughRate']) || null === $this->container['clickThroughRate']) { $invalidProperties[] = "'clickThroughRate' can't be null"; } - if ($this->container['clickThroughRate'] > 1) { - $invalidProperties[] = "invalid value for 'clickThroughRate', must be smaller than or equal to 1."; - } - - if ($this->container['clickThroughRate'] < 0) { - $invalidProperties[] = "invalid value for 'clickThroughRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['conversionRate']) || null === $this->container['conversionRate']) { $invalidProperties[] = "'conversionRate' can't be null"; } - if ($this->container['conversionRate'] > 1) { - $invalidProperties[] = "invalid value for 'conversionRate', must be smaller than or equal to 1."; - } - - if ($this->container['conversionRate'] < 0) { - $invalidProperties[] = "invalid value for 'conversionRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedHitCount']) || null === $this->container['trackedHitCount']) { $invalidProperties[] = "'trackedHitCount' can't be null"; } if (!isset($this->container['clickCount']) || null === $this->container['clickCount']) { $invalidProperties[] = "'clickCount' can't be null"; } - if ($this->container['clickCount'] < 0) { - $invalidProperties[] = "invalid value for 'clickCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['conversionCount']) || null === $this->container['conversionCount']) { $invalidProperties[] = "'conversionCount' can't be null"; } - if ($this->container['conversionCount'] < 0) { - $invalidProperties[] = "invalid value for 'conversionCount', must be bigger than or equal to 0."; - } return $invalidProperties; } @@ -313,13 +290,6 @@ public function getClickThroughRate() */ public function setClickThroughRate($clickThroughRate) { - if ($clickThroughRate > 1) { - throw new \InvalidArgumentException('invalid value for $clickThroughRate when calling TopHitWithAnalytics., must be smaller than or equal to 1.'); - } - if ($clickThroughRate < 0) { - throw new \InvalidArgumentException('invalid value for $clickThroughRate when calling TopHitWithAnalytics., must be bigger than or equal to 0.'); - } - $this->container['clickThroughRate'] = $clickThroughRate; return $this; @@ -344,13 +314,6 @@ public function getConversionRate() */ public function setConversionRate($conversionRate) { - if ($conversionRate > 1) { - throw new \InvalidArgumentException('invalid value for $conversionRate when calling TopHitWithAnalytics., must be smaller than or equal to 1.'); - } - if ($conversionRate < 0) { - throw new \InvalidArgumentException('invalid value for $conversionRate when calling TopHitWithAnalytics., must be bigger than or equal to 0.'); - } - $this->container['conversionRate'] = $conversionRate; return $this; @@ -399,10 +362,6 @@ public function getClickCount() */ public function setClickCount($clickCount) { - if ($clickCount < 0) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling TopHitWithAnalytics., must be bigger than or equal to 0.'); - } - $this->container['clickCount'] = $clickCount; return $this; @@ -427,10 +386,6 @@ public function getConversionCount() */ public function setConversionCount($conversionCount) { - if ($conversionCount < 0) { - throw new \InvalidArgumentException('invalid value for $conversionCount when calling TopHitWithAnalytics., must be bigger than or equal to 0.'); - } - $this->container['conversionCount'] = $conversionCount; return $this; diff --git a/lib/Model/Analytics/TopHitWithRevenueAnalytics.php b/lib/Model/Analytics/TopHitWithRevenueAnalytics.php index 89499ab2..a8e86f6a 100644 --- a/lib/Model/Analytics/TopHitWithRevenueAnalytics.php +++ b/lib/Model/Analytics/TopHitWithRevenueAnalytics.php @@ -236,71 +236,27 @@ public function listInvalidProperties() if (!isset($this->container['clickThroughRate']) || null === $this->container['clickThroughRate']) { $invalidProperties[] = "'clickThroughRate' can't be null"; } - if ($this->container['clickThroughRate'] > 1) { - $invalidProperties[] = "invalid value for 'clickThroughRate', must be smaller than or equal to 1."; - } - - if ($this->container['clickThroughRate'] < 0) { - $invalidProperties[] = "invalid value for 'clickThroughRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['conversionRate']) || null === $this->container['conversionRate']) { $invalidProperties[] = "'conversionRate' can't be null"; } - if ($this->container['conversionRate'] > 1) { - $invalidProperties[] = "invalid value for 'conversionRate', must be smaller than or equal to 1."; - } - - if ($this->container['conversionRate'] < 0) { - $invalidProperties[] = "invalid value for 'conversionRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedHitCount']) || null === $this->container['trackedHitCount']) { $invalidProperties[] = "'trackedHitCount' can't be null"; } if (!isset($this->container['clickCount']) || null === $this->container['clickCount']) { $invalidProperties[] = "'clickCount' can't be null"; } - if ($this->container['clickCount'] < 0) { - $invalidProperties[] = "invalid value for 'clickCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['conversionCount']) || null === $this->container['conversionCount']) { $invalidProperties[] = "'conversionCount' can't be null"; } - if ($this->container['conversionCount'] < 0) { - $invalidProperties[] = "invalid value for 'conversionCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['addToCartRate']) || null === $this->container['addToCartRate']) { $invalidProperties[] = "'addToCartRate' can't be null"; } - if ($this->container['addToCartRate'] > 1) { - $invalidProperties[] = "invalid value for 'addToCartRate', must be smaller than or equal to 1."; - } - - if ($this->container['addToCartRate'] < 0) { - $invalidProperties[] = "invalid value for 'addToCartRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['addToCartCount']) || null === $this->container['addToCartCount']) { $invalidProperties[] = "'addToCartCount' can't be null"; } - if ($this->container['addToCartCount'] < 0) { - $invalidProperties[] = "invalid value for 'addToCartCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['purchaseRate']) || null === $this->container['purchaseRate']) { $invalidProperties[] = "'purchaseRate' can't be null"; } - if ($this->container['purchaseRate'] > 1) { - $invalidProperties[] = "invalid value for 'purchaseRate', must be smaller than or equal to 1."; - } - - if ($this->container['purchaseRate'] < 0) { - $invalidProperties[] = "invalid value for 'purchaseRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['purchaseCount']) || null === $this->container['purchaseCount']) { $invalidProperties[] = "'purchaseCount' can't be null"; } @@ -389,13 +345,6 @@ public function getClickThroughRate() */ public function setClickThroughRate($clickThroughRate) { - if ($clickThroughRate > 1) { - throw new \InvalidArgumentException('invalid value for $clickThroughRate when calling TopHitWithRevenueAnalytics., must be smaller than or equal to 1.'); - } - if ($clickThroughRate < 0) { - throw new \InvalidArgumentException('invalid value for $clickThroughRate when calling TopHitWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['clickThroughRate'] = $clickThroughRate; return $this; @@ -420,13 +369,6 @@ public function getConversionRate() */ public function setConversionRate($conversionRate) { - if ($conversionRate > 1) { - throw new \InvalidArgumentException('invalid value for $conversionRate when calling TopHitWithRevenueAnalytics., must be smaller than or equal to 1.'); - } - if ($conversionRate < 0) { - throw new \InvalidArgumentException('invalid value for $conversionRate when calling TopHitWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['conversionRate'] = $conversionRate; return $this; @@ -475,10 +417,6 @@ public function getClickCount() */ public function setClickCount($clickCount) { - if ($clickCount < 0) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling TopHitWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['clickCount'] = $clickCount; return $this; @@ -503,10 +441,6 @@ public function getConversionCount() */ public function setConversionCount($conversionCount) { - if ($conversionCount < 0) { - throw new \InvalidArgumentException('invalid value for $conversionCount when calling TopHitWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['conversionCount'] = $conversionCount; return $this; @@ -531,13 +465,6 @@ public function getAddToCartRate() */ public function setAddToCartRate($addToCartRate) { - if ($addToCartRate > 1) { - throw new \InvalidArgumentException('invalid value for $addToCartRate when calling TopHitWithRevenueAnalytics., must be smaller than or equal to 1.'); - } - if ($addToCartRate < 0) { - throw new \InvalidArgumentException('invalid value for $addToCartRate when calling TopHitWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['addToCartRate'] = $addToCartRate; return $this; @@ -562,10 +489,6 @@ public function getAddToCartCount() */ public function setAddToCartCount($addToCartCount) { - if ($addToCartCount < 0) { - throw new \InvalidArgumentException('invalid value for $addToCartCount when calling TopHitWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['addToCartCount'] = $addToCartCount; return $this; @@ -590,13 +513,6 @@ public function getPurchaseRate() */ public function setPurchaseRate($purchaseRate) { - if ($purchaseRate > 1) { - throw new \InvalidArgumentException('invalid value for $purchaseRate when calling TopHitWithRevenueAnalytics., must be smaller than or equal to 1.'); - } - if ($purchaseRate < 0) { - throw new \InvalidArgumentException('invalid value for $purchaseRate when calling TopHitWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['purchaseRate'] = $purchaseRate; return $this; diff --git a/lib/Model/Analytics/TopSearchWithAnalytics.php b/lib/Model/Analytics/TopSearchWithAnalytics.php index 73260379..23ef82a8 100644 --- a/lib/Model/Analytics/TopSearchWithAnalytics.php +++ b/lib/Model/Analytics/TopSearchWithAnalytics.php @@ -220,60 +220,24 @@ public function listInvalidProperties() if (!isset($this->container['clickThroughRate']) || null === $this->container['clickThroughRate']) { $invalidProperties[] = "'clickThroughRate' can't be null"; } - if ($this->container['clickThroughRate'] > 1) { - $invalidProperties[] = "invalid value for 'clickThroughRate', must be smaller than or equal to 1."; - } - - if ($this->container['clickThroughRate'] < 0) { - $invalidProperties[] = "invalid value for 'clickThroughRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['averageClickPosition']) || null === $this->container['averageClickPosition']) { $invalidProperties[] = "'averageClickPosition' can't be null"; } - if ($this->container['averageClickPosition'] < 1) { - $invalidProperties[] = "invalid value for 'averageClickPosition', must be bigger than or equal to 1."; - } - if (!isset($this->container['clickPositions']) || null === $this->container['clickPositions']) { $invalidProperties[] = "'clickPositions' can't be null"; } - if (count($this->container['clickPositions']) > 12) { - $invalidProperties[] = "invalid value for 'clickPositions', number of items must be less than or equal to 12."; - } - - if (count($this->container['clickPositions']) < 12) { - $invalidProperties[] = "invalid value for 'clickPositions', number of items must be greater than or equal to 12."; - } - if (!isset($this->container['conversionRate']) || null === $this->container['conversionRate']) { $invalidProperties[] = "'conversionRate' can't be null"; } - if ($this->container['conversionRate'] > 1) { - $invalidProperties[] = "invalid value for 'conversionRate', must be smaller than or equal to 1."; - } - - if ($this->container['conversionRate'] < 0) { - $invalidProperties[] = "invalid value for 'conversionRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } if (!isset($this->container['clickCount']) || null === $this->container['clickCount']) { $invalidProperties[] = "'clickCount' can't be null"; } - if ($this->container['clickCount'] < 0) { - $invalidProperties[] = "invalid value for 'clickCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['conversionCount']) || null === $this->container['conversionCount']) { $invalidProperties[] = "'conversionCount' can't be null"; } - if ($this->container['conversionCount'] < 0) { - $invalidProperties[] = "invalid value for 'conversionCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['nbHits']) || null === $this->container['nbHits']) { $invalidProperties[] = "'nbHits' can't be null"; } @@ -359,13 +323,6 @@ public function getClickThroughRate() */ public function setClickThroughRate($clickThroughRate) { - if ($clickThroughRate > 1) { - throw new \InvalidArgumentException('invalid value for $clickThroughRate when calling TopSearchWithAnalytics., must be smaller than or equal to 1.'); - } - if ($clickThroughRate < 0) { - throw new \InvalidArgumentException('invalid value for $clickThroughRate when calling TopSearchWithAnalytics., must be bigger than or equal to 0.'); - } - $this->container['clickThroughRate'] = $clickThroughRate; return $this; @@ -390,10 +347,6 @@ public function getAverageClickPosition() */ public function setAverageClickPosition($averageClickPosition) { - if ($averageClickPosition < 1) { - throw new \InvalidArgumentException('invalid value for $averageClickPosition when calling TopSearchWithAnalytics., must be bigger than or equal to 1.'); - } - $this->container['averageClickPosition'] = $averageClickPosition; return $this; @@ -418,12 +371,6 @@ public function getClickPositions() */ public function setClickPositions($clickPositions) { - if (count($clickPositions) > 12) { - throw new \InvalidArgumentException('invalid value for $clickPositions when calling TopSearchWithAnalytics., number of items must be less than or equal to 12.'); - } - if (count($clickPositions) < 12) { - throw new \InvalidArgumentException('invalid length for $clickPositions when calling TopSearchWithAnalytics., number of items must be greater than or equal to 12.'); - } $this->container['clickPositions'] = $clickPositions; return $this; @@ -448,13 +395,6 @@ public function getConversionRate() */ public function setConversionRate($conversionRate) { - if ($conversionRate > 1) { - throw new \InvalidArgumentException('invalid value for $conversionRate when calling TopSearchWithAnalytics., must be smaller than or equal to 1.'); - } - if ($conversionRate < 0) { - throw new \InvalidArgumentException('invalid value for $conversionRate when calling TopSearchWithAnalytics., must be bigger than or equal to 0.'); - } - $this->container['conversionRate'] = $conversionRate; return $this; @@ -503,10 +443,6 @@ public function getClickCount() */ public function setClickCount($clickCount) { - if ($clickCount < 0) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling TopSearchWithAnalytics., must be bigger than or equal to 0.'); - } - $this->container['clickCount'] = $clickCount; return $this; @@ -531,10 +467,6 @@ public function getConversionCount() */ public function setConversionCount($conversionCount) { - if ($conversionCount < 0) { - throw new \InvalidArgumentException('invalid value for $conversionCount when calling TopSearchWithAnalytics., must be bigger than or equal to 0.'); - } - $this->container['conversionCount'] = $conversionCount; return $this; diff --git a/lib/Model/Analytics/TopSearchWithRevenueAnalytics.php b/lib/Model/Analytics/TopSearchWithRevenueAnalytics.php index 9bfe31b2..cfd73d6f 100644 --- a/lib/Model/Analytics/TopSearchWithRevenueAnalytics.php +++ b/lib/Model/Analytics/TopSearchWithRevenueAnalytics.php @@ -260,60 +260,24 @@ public function listInvalidProperties() if (!isset($this->container['clickThroughRate']) || null === $this->container['clickThroughRate']) { $invalidProperties[] = "'clickThroughRate' can't be null"; } - if ($this->container['clickThroughRate'] > 1) { - $invalidProperties[] = "invalid value for 'clickThroughRate', must be smaller than or equal to 1."; - } - - if ($this->container['clickThroughRate'] < 0) { - $invalidProperties[] = "invalid value for 'clickThroughRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['averageClickPosition']) || null === $this->container['averageClickPosition']) { $invalidProperties[] = "'averageClickPosition' can't be null"; } - if ($this->container['averageClickPosition'] < 1) { - $invalidProperties[] = "invalid value for 'averageClickPosition', must be bigger than or equal to 1."; - } - if (!isset($this->container['clickPositions']) || null === $this->container['clickPositions']) { $invalidProperties[] = "'clickPositions' can't be null"; } - if (count($this->container['clickPositions']) > 12) { - $invalidProperties[] = "invalid value for 'clickPositions', number of items must be less than or equal to 12."; - } - - if (count($this->container['clickPositions']) < 12) { - $invalidProperties[] = "invalid value for 'clickPositions', number of items must be greater than or equal to 12."; - } - if (!isset($this->container['conversionRate']) || null === $this->container['conversionRate']) { $invalidProperties[] = "'conversionRate' can't be null"; } - if ($this->container['conversionRate'] > 1) { - $invalidProperties[] = "invalid value for 'conversionRate', must be smaller than or equal to 1."; - } - - if ($this->container['conversionRate'] < 0) { - $invalidProperties[] = "invalid value for 'conversionRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['trackedSearchCount']) || null === $this->container['trackedSearchCount']) { $invalidProperties[] = "'trackedSearchCount' can't be null"; } if (!isset($this->container['clickCount']) || null === $this->container['clickCount']) { $invalidProperties[] = "'clickCount' can't be null"; } - if ($this->container['clickCount'] < 0) { - $invalidProperties[] = "invalid value for 'clickCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['conversionCount']) || null === $this->container['conversionCount']) { $invalidProperties[] = "'conversionCount' can't be null"; } - if ($this->container['conversionCount'] < 0) { - $invalidProperties[] = "invalid value for 'conversionCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['nbHits']) || null === $this->container['nbHits']) { $invalidProperties[] = "'nbHits' can't be null"; } @@ -323,32 +287,12 @@ public function listInvalidProperties() if (!isset($this->container['addToCartRate']) || null === $this->container['addToCartRate']) { $invalidProperties[] = "'addToCartRate' can't be null"; } - if ($this->container['addToCartRate'] > 1) { - $invalidProperties[] = "invalid value for 'addToCartRate', must be smaller than or equal to 1."; - } - - if ($this->container['addToCartRate'] < 0) { - $invalidProperties[] = "invalid value for 'addToCartRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['addToCartCount']) || null === $this->container['addToCartCount']) { $invalidProperties[] = "'addToCartCount' can't be null"; } - if ($this->container['addToCartCount'] < 0) { - $invalidProperties[] = "invalid value for 'addToCartCount', must be bigger than or equal to 0."; - } - if (!isset($this->container['purchaseRate']) || null === $this->container['purchaseRate']) { $invalidProperties[] = "'purchaseRate' can't be null"; } - if ($this->container['purchaseRate'] > 1) { - $invalidProperties[] = "invalid value for 'purchaseRate', must be smaller than or equal to 1."; - } - - if ($this->container['purchaseRate'] < 0) { - $invalidProperties[] = "invalid value for 'purchaseRate', must be bigger than or equal to 0."; - } - if (!isset($this->container['purchaseCount']) || null === $this->container['purchaseCount']) { $invalidProperties[] = "'purchaseCount' can't be null"; } @@ -434,13 +378,6 @@ public function getClickThroughRate() */ public function setClickThroughRate($clickThroughRate) { - if ($clickThroughRate > 1) { - throw new \InvalidArgumentException('invalid value for $clickThroughRate when calling TopSearchWithRevenueAnalytics., must be smaller than or equal to 1.'); - } - if ($clickThroughRate < 0) { - throw new \InvalidArgumentException('invalid value for $clickThroughRate when calling TopSearchWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['clickThroughRate'] = $clickThroughRate; return $this; @@ -465,10 +402,6 @@ public function getAverageClickPosition() */ public function setAverageClickPosition($averageClickPosition) { - if ($averageClickPosition < 1) { - throw new \InvalidArgumentException('invalid value for $averageClickPosition when calling TopSearchWithRevenueAnalytics., must be bigger than or equal to 1.'); - } - $this->container['averageClickPosition'] = $averageClickPosition; return $this; @@ -493,12 +426,6 @@ public function getClickPositions() */ public function setClickPositions($clickPositions) { - if (count($clickPositions) > 12) { - throw new \InvalidArgumentException('invalid value for $clickPositions when calling TopSearchWithRevenueAnalytics., number of items must be less than or equal to 12.'); - } - if (count($clickPositions) < 12) { - throw new \InvalidArgumentException('invalid length for $clickPositions when calling TopSearchWithRevenueAnalytics., number of items must be greater than or equal to 12.'); - } $this->container['clickPositions'] = $clickPositions; return $this; @@ -523,13 +450,6 @@ public function getConversionRate() */ public function setConversionRate($conversionRate) { - if ($conversionRate > 1) { - throw new \InvalidArgumentException('invalid value for $conversionRate when calling TopSearchWithRevenueAnalytics., must be smaller than or equal to 1.'); - } - if ($conversionRate < 0) { - throw new \InvalidArgumentException('invalid value for $conversionRate when calling TopSearchWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['conversionRate'] = $conversionRate; return $this; @@ -578,10 +498,6 @@ public function getClickCount() */ public function setClickCount($clickCount) { - if ($clickCount < 0) { - throw new \InvalidArgumentException('invalid value for $clickCount when calling TopSearchWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['clickCount'] = $clickCount; return $this; @@ -606,10 +522,6 @@ public function getConversionCount() */ public function setConversionCount($conversionCount) { - if ($conversionCount < 0) { - throw new \InvalidArgumentException('invalid value for $conversionCount when calling TopSearchWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['conversionCount'] = $conversionCount; return $this; @@ -682,13 +594,6 @@ public function getAddToCartRate() */ public function setAddToCartRate($addToCartRate) { - if ($addToCartRate > 1) { - throw new \InvalidArgumentException('invalid value for $addToCartRate when calling TopSearchWithRevenueAnalytics., must be smaller than or equal to 1.'); - } - if ($addToCartRate < 0) { - throw new \InvalidArgumentException('invalid value for $addToCartRate when calling TopSearchWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['addToCartRate'] = $addToCartRate; return $this; @@ -713,10 +618,6 @@ public function getAddToCartCount() */ public function setAddToCartCount($addToCartCount) { - if ($addToCartCount < 0) { - throw new \InvalidArgumentException('invalid value for $addToCartCount when calling TopSearchWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['addToCartCount'] = $addToCartCount; return $this; @@ -741,13 +642,6 @@ public function getPurchaseRate() */ public function setPurchaseRate($purchaseRate) { - if ($purchaseRate > 1) { - throw new \InvalidArgumentException('invalid value for $purchaseRate when calling TopSearchWithRevenueAnalytics., must be smaller than or equal to 1.'); - } - if ($purchaseRate < 0) { - throw new \InvalidArgumentException('invalid value for $purchaseRate when calling TopSearchWithRevenueAnalytics., must be bigger than or equal to 0.'); - } - $this->container['purchaseRate'] = $purchaseRate; return $this; diff --git a/lib/Model/Ingestion/Event.php b/lib/Model/Ingestion/Event.php index d89f237c..926338df 100644 --- a/lib/Model/Ingestion/Event.php +++ b/lib/Model/Ingestion/Event.php @@ -212,10 +212,6 @@ public function listInvalidProperties() if (!isset($this->container['batchSize']) || null === $this->container['batchSize']) { $invalidProperties[] = "'batchSize' can't be null"; } - if ($this->container['batchSize'] < 0) { - $invalidProperties[] = "invalid value for 'batchSize', must be bigger than or equal to 0."; - } - if (!isset($this->container['publishedAt']) || null === $this->container['publishedAt']) { $invalidProperties[] = "'publishedAt' can't be null"; } @@ -373,10 +369,6 @@ public function getBatchSize() */ public function setBatchSize($batchSize) { - if ($batchSize < 0) { - throw new \InvalidArgumentException('invalid value for $batchSize when calling Event., must be bigger than or equal to 0.'); - } - $this->container['batchSize'] = $batchSize; return $this; diff --git a/lib/Model/Ingestion/Pagination.php b/lib/Model/Ingestion/Pagination.php index 28682b2f..e1b81071 100644 --- a/lib/Model/Ingestion/Pagination.php +++ b/lib/Model/Ingestion/Pagination.php @@ -168,34 +168,15 @@ public function listInvalidProperties() if (!isset($this->container['nbPages']) || null === $this->container['nbPages']) { $invalidProperties[] = "'nbPages' can't be null"; } - if ($this->container['nbPages'] < 1) { - $invalidProperties[] = "invalid value for 'nbPages', must be bigger than or equal to 1."; - } - if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } - if ($this->container['page'] < 1) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 1."; - } - if (!isset($this->container['nbItems']) || null === $this->container['nbItems']) { $invalidProperties[] = "'nbItems' can't be null"; } - if ($this->container['nbItems'] < 0) { - $invalidProperties[] = "invalid value for 'nbItems', must be bigger than or equal to 0."; - } - if (!isset($this->container['itemsPerPage']) || null === $this->container['itemsPerPage']) { $invalidProperties[] = "'itemsPerPage' can't be null"; } - if ($this->container['itemsPerPage'] > 100) { - $invalidProperties[] = "invalid value for 'itemsPerPage', must be smaller than or equal to 100."; - } - - if ($this->container['itemsPerPage'] < 1) { - $invalidProperties[] = "invalid value for 'itemsPerPage', must be bigger than or equal to 1."; - } return $invalidProperties; } @@ -230,10 +211,6 @@ public function getNbPages() */ public function setNbPages($nbPages) { - if ($nbPages < 1) { - throw new \InvalidArgumentException('invalid value for $nbPages when calling Pagination., must be bigger than or equal to 1.'); - } - $this->container['nbPages'] = $nbPages; return $this; @@ -258,10 +235,6 @@ public function getPage() */ public function setPage($page) { - if ($page < 1) { - throw new \InvalidArgumentException('invalid value for $page when calling Pagination., must be bigger than or equal to 1.'); - } - $this->container['page'] = $page; return $this; @@ -286,10 +259,6 @@ public function getNbItems() */ public function setNbItems($nbItems) { - if ($nbItems < 0) { - throw new \InvalidArgumentException('invalid value for $nbItems when calling Pagination., must be bigger than or equal to 0.'); - } - $this->container['nbItems'] = $nbItems; return $this; @@ -314,13 +283,6 @@ public function getItemsPerPage() */ public function setItemsPerPage($itemsPerPage) { - if ($itemsPerPage > 100) { - throw new \InvalidArgumentException('invalid value for $itemsPerPage when calling Pagination., must be smaller than or equal to 100.'); - } - if ($itemsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for $itemsPerPage when calling Pagination., must be bigger than or equal to 1.'); - } - $this->container['itemsPerPage'] = $itemsPerPage; return $this; diff --git a/lib/Model/Ingestion/Run.php b/lib/Model/Ingestion/Run.php index 279589ea..1f667995 100644 --- a/lib/Model/Ingestion/Run.php +++ b/lib/Model/Ingestion/Run.php @@ -247,14 +247,6 @@ public function listInvalidProperties() if (!isset($this->container['status']) || null === $this->container['status']) { $invalidProperties[] = "'status' can't be null"; } - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] > 100)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be smaller than or equal to 100."; - } - - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] < 0)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be bigger than or equal to 0."; - } - if (!isset($this->container['type']) || null === $this->container['type']) { $invalidProperties[] = "'type' can't be null"; } @@ -439,13 +431,6 @@ public function getFailureThreshold() */ public function setFailureThreshold($failureThreshold) { - if (!is_null($failureThreshold) && ($failureThreshold > 100)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling Run., must be smaller than or equal to 100.'); - } - if (!is_null($failureThreshold) && ($failureThreshold < 0)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling Run., must be bigger than or equal to 0.'); - } - $this->container['failureThreshold'] = $failureThreshold; return $this; diff --git a/lib/Model/Ingestion/SourceCSV.php b/lib/Model/Ingestion/SourceCSV.php index 2726ced6..6ee0b8e2 100644 --- a/lib/Model/Ingestion/SourceCSV.php +++ b/lib/Model/Ingestion/SourceCSV.php @@ -174,13 +174,6 @@ public function listInvalidProperties() if (!isset($this->container['url']) || null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if (isset($this->container['delimiter']) && (mb_strlen($this->container['delimiter']) > 1)) { - $invalidProperties[] = "invalid value for 'delimiter', the character length must be smaller than or equal to 1."; - } - - if (isset($this->container['delimiter']) && (mb_strlen($this->container['delimiter']) < 1)) { - $invalidProperties[] = "invalid value for 'delimiter', the character length must be bigger than or equal to 1."; - } return $invalidProperties; } @@ -311,13 +304,6 @@ public function getDelimiter() */ public function setDelimiter($delimiter) { - if (!is_null($delimiter) && (mb_strlen($delimiter) > 1)) { - throw new \InvalidArgumentException('invalid length for $delimiter when calling SourceCSV., must be smaller than or equal to 1.'); - } - if (!is_null($delimiter) && (mb_strlen($delimiter) < 1)) { - throw new \InvalidArgumentException('invalid length for $delimiter when calling SourceCSV., must be bigger than or equal to 1.'); - } - $this->container['delimiter'] = $delimiter; return $this; diff --git a/lib/Model/Ingestion/SourceInput.php b/lib/Model/Ingestion/SourceInput.php index f534edbd..5e8979b4 100644 --- a/lib/Model/Ingestion/SourceInput.php +++ b/lib/Model/Ingestion/SourceInput.php @@ -356,14 +356,6 @@ public function listInvalidProperties() if (!isset($this->container['storeHash']) || null === $this->container['storeHash']) { $invalidProperties[] = "'storeHash' can't be null"; } - if (isset($this->container['delimiter']) && (mb_strlen($this->container['delimiter']) > 1)) { - $invalidProperties[] = "invalid value for 'delimiter', the character length must be smaller than or equal to 1."; - } - - if (isset($this->container['delimiter']) && (mb_strlen($this->container['delimiter']) < 1)) { - $invalidProperties[] = "invalid value for 'delimiter', the character length must be bigger than or equal to 1."; - } - if (!isset($this->container['projectID']) || null === $this->container['projectID']) { $invalidProperties[] = "'projectID' can't be null"; } @@ -734,13 +726,6 @@ public function getDelimiter() */ public function setDelimiter($delimiter) { - if (!is_null($delimiter) && (mb_strlen($delimiter) > 1)) { - throw new \InvalidArgumentException('invalid length for $delimiter when calling SourceInput., must be smaller than or equal to 1.'); - } - if (!is_null($delimiter) && (mb_strlen($delimiter) < 1)) { - throw new \InvalidArgumentException('invalid length for $delimiter when calling SourceInput., must be bigger than or equal to 1.'); - } - $this->container['delimiter'] = $delimiter; return $this; diff --git a/lib/Model/Ingestion/SourceUpdateInput.php b/lib/Model/Ingestion/SourceUpdateInput.php index 649523d6..65420114 100644 --- a/lib/Model/Ingestion/SourceUpdateInput.php +++ b/lib/Model/Ingestion/SourceUpdateInput.php @@ -294,14 +294,6 @@ public function listInvalidProperties() if (!isset($this->container['url']) || null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if (isset($this->container['delimiter']) && (mb_strlen($this->container['delimiter']) > 1)) { - $invalidProperties[] = "invalid value for 'delimiter', the character length must be smaller than or equal to 1."; - } - - if (isset($this->container['delimiter']) && (mb_strlen($this->container['delimiter']) < 1)) { - $invalidProperties[] = "invalid value for 'delimiter', the character length must be bigger than or equal to 1."; - } - if (!isset($this->container['projectID']) || null === $this->container['projectID']) { $invalidProperties[] = "'projectID' can't be null"; } @@ -540,13 +532,6 @@ public function getDelimiter() */ public function setDelimiter($delimiter) { - if (!is_null($delimiter) && (mb_strlen($delimiter) > 1)) { - throw new \InvalidArgumentException('invalid length for $delimiter when calling SourceUpdateInput., must be smaller than or equal to 1.'); - } - if (!is_null($delimiter) && (mb_strlen($delimiter) < 1)) { - throw new \InvalidArgumentException('invalid length for $delimiter when calling SourceUpdateInput., must be bigger than or equal to 1.'); - } - $this->container['delimiter'] = $delimiter; return $this; diff --git a/lib/Model/Ingestion/Task.php b/lib/Model/Ingestion/Task.php index 7b854cb6..9c4e2504 100644 --- a/lib/Model/Ingestion/Task.php +++ b/lib/Model/Ingestion/Task.php @@ -247,14 +247,6 @@ public function listInvalidProperties() if (!isset($this->container['enabled']) || null === $this->container['enabled']) { $invalidProperties[] = "'enabled' can't be null"; } - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] > 100)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be smaller than or equal to 100."; - } - - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] < 0)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be bigger than or equal to 0."; - } - if (!isset($this->container['action']) || null === $this->container['action']) { $invalidProperties[] = "'action' can't be null"; } @@ -487,13 +479,6 @@ public function getFailureThreshold() */ public function setFailureThreshold($failureThreshold) { - if (!is_null($failureThreshold) && ($failureThreshold > 100)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling Task., must be smaller than or equal to 100.'); - } - if (!is_null($failureThreshold) && ($failureThreshold < 0)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling Task., must be bigger than or equal to 0.'); - } - $this->container['failureThreshold'] = $failureThreshold; return $this; diff --git a/lib/Model/Ingestion/TaskCreate.php b/lib/Model/Ingestion/TaskCreate.php index c1bd488a..378aa43b 100644 --- a/lib/Model/Ingestion/TaskCreate.php +++ b/lib/Model/Ingestion/TaskCreate.php @@ -206,13 +206,6 @@ public function listInvalidProperties() if (!isset($this->container['action']) || null === $this->container['action']) { $invalidProperties[] = "'action' can't be null"; } - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] > 100)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be smaller than or equal to 100."; - } - - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] < 0)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be bigger than or equal to 0."; - } return $invalidProperties; } @@ -367,13 +360,6 @@ public function getFailureThreshold() */ public function setFailureThreshold($failureThreshold) { - if (!is_null($failureThreshold) && ($failureThreshold > 100)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskCreate., must be smaller than or equal to 100.'); - } - if (!is_null($failureThreshold) && ($failureThreshold < 0)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskCreate., must be bigger than or equal to 0.'); - } - $this->container['failureThreshold'] = $failureThreshold; return $this; diff --git a/lib/Model/Ingestion/TaskCreateV1.php b/lib/Model/Ingestion/TaskCreateV1.php index dee1b3f9..4be61cfa 100644 --- a/lib/Model/Ingestion/TaskCreateV1.php +++ b/lib/Model/Ingestion/TaskCreateV1.php @@ -209,13 +209,6 @@ public function listInvalidProperties() if (!isset($this->container['action']) || null === $this->container['action']) { $invalidProperties[] = "'action' can't be null"; } - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] > 100)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be smaller than or equal to 100."; - } - - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] < 0)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be bigger than or equal to 0."; - } return $invalidProperties; } @@ -370,13 +363,6 @@ public function getFailureThreshold() */ public function setFailureThreshold($failureThreshold) { - if (!is_null($failureThreshold) && ($failureThreshold > 100)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskCreateV1., must be smaller than or equal to 100.'); - } - if (!is_null($failureThreshold) && ($failureThreshold < 0)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskCreateV1., must be bigger than or equal to 0.'); - } - $this->container['failureThreshold'] = $failureThreshold; return $this; diff --git a/lib/Model/Ingestion/TaskUpdate.php b/lib/Model/Ingestion/TaskUpdate.php index 93ee49e7..e0d4b5db 100644 --- a/lib/Model/Ingestion/TaskUpdate.php +++ b/lib/Model/Ingestion/TaskUpdate.php @@ -171,17 +171,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] > 100)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be smaller than or equal to 100."; - } - - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] < 0)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be bigger than or equal to 0."; - } - - return $invalidProperties; + return []; } /** @@ -310,13 +300,6 @@ public function getFailureThreshold() */ public function setFailureThreshold($failureThreshold) { - if (!is_null($failureThreshold) && ($failureThreshold > 100)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskUpdate., must be smaller than or equal to 100.'); - } - if (!is_null($failureThreshold) && ($failureThreshold < 0)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskUpdate., must be bigger than or equal to 0.'); - } - $this->container['failureThreshold'] = $failureThreshold; return $this; diff --git a/lib/Model/Ingestion/TaskUpdateV1.php b/lib/Model/Ingestion/TaskUpdateV1.php index 44f24af1..33f4af08 100644 --- a/lib/Model/Ingestion/TaskUpdateV1.php +++ b/lib/Model/Ingestion/TaskUpdateV1.php @@ -171,17 +171,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] > 100)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be smaller than or equal to 100."; - } - - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] < 0)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be bigger than or equal to 0."; - } - - return $invalidProperties; + return []; } /** @@ -310,13 +300,6 @@ public function getFailureThreshold() */ public function setFailureThreshold($failureThreshold) { - if (!is_null($failureThreshold) && ($failureThreshold > 100)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskUpdateV1., must be smaller than or equal to 100.'); - } - if (!is_null($failureThreshold) && ($failureThreshold < 0)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskUpdateV1., must be bigger than or equal to 0.'); - } - $this->container['failureThreshold'] = $failureThreshold; return $this; diff --git a/lib/Model/Ingestion/TaskV1.php b/lib/Model/Ingestion/TaskV1.php index f5d9841d..dd2e0c98 100644 --- a/lib/Model/Ingestion/TaskV1.php +++ b/lib/Model/Ingestion/TaskV1.php @@ -236,14 +236,6 @@ public function listInvalidProperties() if (!isset($this->container['enabled']) || null === $this->container['enabled']) { $invalidProperties[] = "'enabled' can't be null"; } - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] > 100)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be smaller than or equal to 100."; - } - - if (isset($this->container['failureThreshold']) && ($this->container['failureThreshold'] < 0)) { - $invalidProperties[] = "invalid value for 'failureThreshold', must be bigger than or equal to 0."; - } - if (!isset($this->container['action']) || null === $this->container['action']) { $invalidProperties[] = "'action' can't be null"; } @@ -428,13 +420,6 @@ public function getFailureThreshold() */ public function setFailureThreshold($failureThreshold) { - if (!is_null($failureThreshold) && ($failureThreshold > 100)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskV1., must be smaller than or equal to 100.'); - } - if (!is_null($failureThreshold) && ($failureThreshold < 0)) { - throw new \InvalidArgumentException('invalid value for $failureThreshold when calling TaskV1., must be bigger than or equal to 0.'); - } - $this->container['failureThreshold'] = $failureThreshold; return $this; diff --git a/lib/Model/Insights/AddedToCartObjectIDs.php b/lib/Model/Insights/AddedToCartObjectIDs.php index 498a0888..67bb8f87 100644 --- a/lib/Model/Insights/AddedToCartObjectIDs.php +++ b/lib/Model/Insights/AddedToCartObjectIDs.php @@ -224,18 +224,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -248,48 +236,9 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['objectData']) && (count($this->container['objectData']) > 20)) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be less than or equal to 20."; - } - - if (isset($this->container['objectData']) && (count($this->container['objectData']) < 1)) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be greater than or equal to 1."; - } return $invalidProperties; } @@ -324,16 +273,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling AddedToCartObjectIDs., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling AddedToCartObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling AddedToCartObjectIDs., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -430,12 +369,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling AddedToCartObjectIDs., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling AddedToCartObjectIDs., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -460,16 +393,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling AddedToCartObjectIDs., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling AddedToCartObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling AddedToCartObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -494,16 +417,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling AddedToCartObjectIDs., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling AddedToCartObjectIDs., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling AddedToCartObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; @@ -552,12 +465,6 @@ public function getObjectData() */ public function setObjectData($objectData) { - if (!is_null($objectData) && (count($objectData) > 20)) { - throw new \InvalidArgumentException('invalid value for $objectData when calling AddedToCartObjectIDs., number of items must be less than or equal to 20.'); - } - if (!is_null($objectData) && (count($objectData) < 1)) { - throw new \InvalidArgumentException('invalid length for $objectData when calling AddedToCartObjectIDs., number of items must be greater than or equal to 1.'); - } $this->container['objectData'] = $objectData; return $this; diff --git a/lib/Model/Insights/AddedToCartObjectIDsAfterSearch.php b/lib/Model/Insights/AddedToCartObjectIDsAfterSearch.php index f07e842a..9feede99 100644 --- a/lib/Model/Insights/AddedToCartObjectIDsAfterSearch.php +++ b/lib/Model/Insights/AddedToCartObjectIDsAfterSearch.php @@ -232,18 +232,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -256,63 +244,12 @@ public function listInvalidProperties() if (!isset($this->container['queryID']) || null === $this->container['queryID']) { $invalidProperties[] = "'queryID' can't be null"; } - if (mb_strlen($this->container['queryID']) > 32) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be smaller than or equal to 32."; - } - - if (mb_strlen($this->container['queryID']) < 32) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be bigger than or equal to 32."; - } - - if (!preg_match('/[0-9a-f]{32}/', $this->container['queryID'])) { - $invalidProperties[] = "invalid value for 'queryID', must be conform to the pattern /[0-9a-f]{32}/."; - } - if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['objectData']) && (count($this->container['objectData']) > 20)) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be less than or equal to 20."; - } - - if (isset($this->container['objectData']) && (count($this->container['objectData']) < 1)) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be greater than or equal to 1."; - } return $invalidProperties; } @@ -347,16 +284,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling AddedToCartObjectIDsAfterSearch., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling AddedToCartObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling AddedToCartObjectIDsAfterSearch., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -453,16 +380,6 @@ public function getQueryID() */ public function setQueryID($queryID) { - if (mb_strlen($queryID) > 32) { - throw new \InvalidArgumentException('invalid length for $queryID when calling AddedToCartObjectIDsAfterSearch., must be smaller than or equal to 32.'); - } - if (mb_strlen($queryID) < 32) { - throw new \InvalidArgumentException('invalid length for $queryID when calling AddedToCartObjectIDsAfterSearch., must be bigger than or equal to 32.'); - } - if (!preg_match('/[0-9a-f]{32}/', $queryID)) { - throw new \InvalidArgumentException("invalid value for {$queryID} when calling AddedToCartObjectIDsAfterSearch., must conform to the pattern /[0-9a-f]{32}/."); - } - $this->container['queryID'] = $queryID; return $this; @@ -487,12 +404,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling AddedToCartObjectIDsAfterSearch., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling AddedToCartObjectIDsAfterSearch., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -517,16 +428,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling AddedToCartObjectIDsAfterSearch., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling AddedToCartObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling AddedToCartObjectIDsAfterSearch., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -551,16 +452,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling AddedToCartObjectIDsAfterSearch., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling AddedToCartObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling AddedToCartObjectIDsAfterSearch., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; @@ -609,12 +500,6 @@ public function getObjectData() */ public function setObjectData($objectData) { - if (!is_null($objectData) && (count($objectData) > 20)) { - throw new \InvalidArgumentException('invalid value for $objectData when calling AddedToCartObjectIDsAfterSearch., number of items must be less than or equal to 20.'); - } - if (!is_null($objectData) && (count($objectData) < 1)) { - throw new \InvalidArgumentException('invalid length for $objectData when calling AddedToCartObjectIDsAfterSearch., number of items must be greater than or equal to 1.'); - } $this->container['objectData'] = $objectData; return $this; diff --git a/lib/Model/Insights/ClickedFilters.php b/lib/Model/Insights/ClickedFilters.php index b32eb36f..61ef18f5 100644 --- a/lib/Model/Insights/ClickedFilters.php +++ b/lib/Model/Insights/ClickedFilters.php @@ -192,18 +192,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -213,40 +201,9 @@ public function listInvalidProperties() if (!isset($this->container['filters']) || null === $this->container['filters']) { $invalidProperties[] = "'filters' can't be null"; } - if (count($this->container['filters']) > 20) { - $invalidProperties[] = "invalid value for 'filters', number of items must be less than or equal to 20."; - } - - if (count($this->container['filters']) < 1) { - $invalidProperties[] = "invalid value for 'filters', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } return $invalidProperties; } @@ -281,16 +238,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ClickedFilters., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ClickedFilters., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling ClickedFilters., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -363,12 +310,6 @@ public function getFilters() */ public function setFilters($filters) { - if (count($filters) > 20) { - throw new \InvalidArgumentException('invalid value for $filters when calling ClickedFilters., number of items must be less than or equal to 20.'); - } - if (count($filters) < 1) { - throw new \InvalidArgumentException('invalid length for $filters when calling ClickedFilters., number of items must be greater than or equal to 1.'); - } $this->container['filters'] = $filters; return $this; @@ -393,16 +334,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ClickedFilters., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ClickedFilters., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling ClickedFilters., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -427,16 +358,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ClickedFilters., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ClickedFilters., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling ClickedFilters., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; diff --git a/lib/Model/Insights/ClickedObjectIDs.php b/lib/Model/Insights/ClickedObjectIDs.php index b004b973..2d401e56 100644 --- a/lib/Model/Insights/ClickedObjectIDs.php +++ b/lib/Model/Insights/ClickedObjectIDs.php @@ -192,18 +192,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -213,40 +201,9 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } return $invalidProperties; } @@ -281,16 +238,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ClickedObjectIDs., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ClickedObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling ClickedObjectIDs., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -363,12 +310,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling ClickedObjectIDs., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling ClickedObjectIDs., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -393,16 +334,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ClickedObjectIDs., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ClickedObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling ClickedObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -427,16 +358,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ClickedObjectIDs., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ClickedObjectIDs., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling ClickedObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; diff --git a/lib/Model/Insights/ClickedObjectIDsAfterSearch.php b/lib/Model/Insights/ClickedObjectIDsAfterSearch.php index 4a695b82..2a93ea4d 100644 --- a/lib/Model/Insights/ClickedObjectIDsAfterSearch.php +++ b/lib/Model/Insights/ClickedObjectIDsAfterSearch.php @@ -208,18 +208,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -229,66 +217,15 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['positions']) || null === $this->container['positions']) { $invalidProperties[] = "'positions' can't be null"; } - if (count($this->container['positions']) > 20) { - $invalidProperties[] = "invalid value for 'positions', number of items must be less than or equal to 20."; - } - - if (count($this->container['positions']) < 1) { - $invalidProperties[] = "invalid value for 'positions', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['queryID']) || null === $this->container['queryID']) { $invalidProperties[] = "'queryID' can't be null"; } - if (mb_strlen($this->container['queryID']) > 32) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be smaller than or equal to 32."; - } - - if (mb_strlen($this->container['queryID']) < 32) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be bigger than or equal to 32."; - } - - if (!preg_match('/[0-9a-f]{32}/', $this->container['queryID'])) { - $invalidProperties[] = "invalid value for 'queryID', must be conform to the pattern /[0-9a-f]{32}/."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } return $invalidProperties; } @@ -323,16 +260,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ClickedObjectIDsAfterSearch., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ClickedObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling ClickedObjectIDsAfterSearch., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -405,12 +332,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling ClickedObjectIDsAfterSearch., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling ClickedObjectIDsAfterSearch., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -435,12 +356,6 @@ public function getPositions() */ public function setPositions($positions) { - if (count($positions) > 20) { - throw new \InvalidArgumentException('invalid value for $positions when calling ClickedObjectIDsAfterSearch., number of items must be less than or equal to 20.'); - } - if (count($positions) < 1) { - throw new \InvalidArgumentException('invalid length for $positions when calling ClickedObjectIDsAfterSearch., number of items must be greater than or equal to 1.'); - } $this->container['positions'] = $positions; return $this; @@ -465,16 +380,6 @@ public function getQueryID() */ public function setQueryID($queryID) { - if (mb_strlen($queryID) > 32) { - throw new \InvalidArgumentException('invalid length for $queryID when calling ClickedObjectIDsAfterSearch., must be smaller than or equal to 32.'); - } - if (mb_strlen($queryID) < 32) { - throw new \InvalidArgumentException('invalid length for $queryID when calling ClickedObjectIDsAfterSearch., must be bigger than or equal to 32.'); - } - if (!preg_match('/[0-9a-f]{32}/', $queryID)) { - throw new \InvalidArgumentException("invalid value for {$queryID} when calling ClickedObjectIDsAfterSearch., must conform to the pattern /[0-9a-f]{32}/."); - } - $this->container['queryID'] = $queryID; return $this; @@ -499,16 +404,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ClickedObjectIDsAfterSearch., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ClickedObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling ClickedObjectIDsAfterSearch., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -533,16 +428,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ClickedObjectIDsAfterSearch., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ClickedObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling ClickedObjectIDsAfterSearch., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; diff --git a/lib/Model/Insights/ConvertedFilters.php b/lib/Model/Insights/ConvertedFilters.php index 88c59fad..638c7ee6 100644 --- a/lib/Model/Insights/ConvertedFilters.php +++ b/lib/Model/Insights/ConvertedFilters.php @@ -190,18 +190,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -211,40 +199,9 @@ public function listInvalidProperties() if (!isset($this->container['filters']) || null === $this->container['filters']) { $invalidProperties[] = "'filters' can't be null"; } - if (count($this->container['filters']) > 20) { - $invalidProperties[] = "invalid value for 'filters', number of items must be less than or equal to 20."; - } - - if (count($this->container['filters']) < 1) { - $invalidProperties[] = "invalid value for 'filters', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } return $invalidProperties; } @@ -279,16 +236,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ConvertedFilters., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ConvertedFilters., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling ConvertedFilters., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -361,12 +308,6 @@ public function getFilters() */ public function setFilters($filters) { - if (count($filters) > 20) { - throw new \InvalidArgumentException('invalid value for $filters when calling ConvertedFilters., number of items must be less than or equal to 20.'); - } - if (count($filters) < 1) { - throw new \InvalidArgumentException('invalid length for $filters when calling ConvertedFilters., number of items must be greater than or equal to 1.'); - } $this->container['filters'] = $filters; return $this; @@ -391,16 +332,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ConvertedFilters., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ConvertedFilters., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling ConvertedFilters., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -425,16 +356,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ConvertedFilters., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ConvertedFilters., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling ConvertedFilters., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; diff --git a/lib/Model/Insights/ConvertedObjectIDs.php b/lib/Model/Insights/ConvertedObjectIDs.php index 2f7d7dea..db717a2b 100644 --- a/lib/Model/Insights/ConvertedObjectIDs.php +++ b/lib/Model/Insights/ConvertedObjectIDs.php @@ -192,18 +192,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -213,40 +201,9 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } return $invalidProperties; } @@ -281,16 +238,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ConvertedObjectIDs., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ConvertedObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling ConvertedObjectIDs., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -363,12 +310,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling ConvertedObjectIDs., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling ConvertedObjectIDs., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -393,16 +334,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ConvertedObjectIDs., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ConvertedObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling ConvertedObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -427,16 +358,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ConvertedObjectIDs., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ConvertedObjectIDs., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling ConvertedObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; diff --git a/lib/Model/Insights/ConvertedObjectIDsAfterSearch.php b/lib/Model/Insights/ConvertedObjectIDsAfterSearch.php index 5c5a4946..365ba7e7 100644 --- a/lib/Model/Insights/ConvertedObjectIDsAfterSearch.php +++ b/lib/Model/Insights/ConvertedObjectIDsAfterSearch.php @@ -200,18 +200,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -221,55 +209,12 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['queryID']) || null === $this->container['queryID']) { $invalidProperties[] = "'queryID' can't be null"; } - if (mb_strlen($this->container['queryID']) > 32) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be smaller than or equal to 32."; - } - - if (mb_strlen($this->container['queryID']) < 32) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be bigger than or equal to 32."; - } - - if (!preg_match('/[0-9a-f]{32}/', $this->container['queryID'])) { - $invalidProperties[] = "invalid value for 'queryID', must be conform to the pattern /[0-9a-f]{32}/."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } return $invalidProperties; } @@ -304,16 +249,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ConvertedObjectIDsAfterSearch., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ConvertedObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling ConvertedObjectIDsAfterSearch., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -386,12 +321,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling ConvertedObjectIDsAfterSearch., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling ConvertedObjectIDsAfterSearch., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -416,16 +345,6 @@ public function getQueryID() */ public function setQueryID($queryID) { - if (mb_strlen($queryID) > 32) { - throw new \InvalidArgumentException('invalid length for $queryID when calling ConvertedObjectIDsAfterSearch., must be smaller than or equal to 32.'); - } - if (mb_strlen($queryID) < 32) { - throw new \InvalidArgumentException('invalid length for $queryID when calling ConvertedObjectIDsAfterSearch., must be bigger than or equal to 32.'); - } - if (!preg_match('/[0-9a-f]{32}/', $queryID)) { - throw new \InvalidArgumentException("invalid value for {$queryID} when calling ConvertedObjectIDsAfterSearch., must conform to the pattern /[0-9a-f]{32}/."); - } - $this->container['queryID'] = $queryID; return $this; @@ -450,16 +369,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ConvertedObjectIDsAfterSearch., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ConvertedObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling ConvertedObjectIDsAfterSearch., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -484,16 +393,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ConvertedObjectIDsAfterSearch., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ConvertedObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling ConvertedObjectIDsAfterSearch., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; diff --git a/lib/Model/Insights/EventsItems.php b/lib/Model/Insights/EventsItems.php index 711a8af9..cf4fd815 100644 --- a/lib/Model/Insights/EventsItems.php +++ b/lib/Model/Insights/EventsItems.php @@ -246,18 +246,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -267,91 +255,24 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['positions']) || null === $this->container['positions']) { $invalidProperties[] = "'positions' can't be null"; } - if (count($this->container['positions']) > 20) { - $invalidProperties[] = "invalid value for 'positions', number of items must be less than or equal to 20."; - } - - if (count($this->container['positions']) < 1) { - $invalidProperties[] = "invalid value for 'positions', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['queryID']) || null === $this->container['queryID']) { $invalidProperties[] = "'queryID' can't be null"; } - if (mb_strlen($this->container['queryID']) > 32) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be smaller than or equal to 32."; - } - - if (mb_strlen($this->container['queryID']) < 32) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be bigger than or equal to 32."; - } - - if (!preg_match('/[0-9a-f]{32}/', $this->container['queryID'])) { - $invalidProperties[] = "invalid value for 'queryID', must be conform to the pattern /[0-9a-f]{32}/."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - if (!isset($this->container['eventSubtype']) || null === $this->container['eventSubtype']) { $invalidProperties[] = "'eventSubtype' can't be null"; } if (!isset($this->container['objectData']) || null === $this->container['objectData']) { $invalidProperties[] = "'objectData' can't be null"; } - if (count($this->container['objectData']) > 20) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectData']) < 1) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['filters']) || null === $this->container['filters']) { $invalidProperties[] = "'filters' can't be null"; } - if (count($this->container['filters']) > 20) { - $invalidProperties[] = "invalid value for 'filters', number of items must be less than or equal to 20."; - } - - if (count($this->container['filters']) < 1) { - $invalidProperties[] = "invalid value for 'filters', number of items must be greater than or equal to 1."; - } return $invalidProperties; } @@ -386,16 +307,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling EventsItems., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling EventsItems., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling EventsItems., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -468,12 +379,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling EventsItems., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling EventsItems., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -498,12 +403,6 @@ public function getPositions() */ public function setPositions($positions) { - if (count($positions) > 20) { - throw new \InvalidArgumentException('invalid value for $positions when calling EventsItems., number of items must be less than or equal to 20.'); - } - if (count($positions) < 1) { - throw new \InvalidArgumentException('invalid length for $positions when calling EventsItems., number of items must be greater than or equal to 1.'); - } $this->container['positions'] = $positions; return $this; @@ -528,16 +427,6 @@ public function getQueryID() */ public function setQueryID($queryID) { - if (mb_strlen($queryID) > 32) { - throw new \InvalidArgumentException('invalid length for $queryID when calling EventsItems., must be smaller than or equal to 32.'); - } - if (mb_strlen($queryID) < 32) { - throw new \InvalidArgumentException('invalid length for $queryID when calling EventsItems., must be bigger than or equal to 32.'); - } - if (!preg_match('/[0-9a-f]{32}/', $queryID)) { - throw new \InvalidArgumentException("invalid value for {$queryID} when calling EventsItems., must conform to the pattern /[0-9a-f]{32}/."); - } - $this->container['queryID'] = $queryID; return $this; @@ -562,16 +451,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling EventsItems., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling EventsItems., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling EventsItems., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -596,16 +475,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling EventsItems., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling EventsItems., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling EventsItems., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; @@ -702,12 +571,6 @@ public function getObjectData() */ public function setObjectData($objectData) { - if (count($objectData) > 20) { - throw new \InvalidArgumentException('invalid value for $objectData when calling EventsItems., number of items must be less than or equal to 20.'); - } - if (count($objectData) < 1) { - throw new \InvalidArgumentException('invalid length for $objectData when calling EventsItems., number of items must be greater than or equal to 1.'); - } $this->container['objectData'] = $objectData; return $this; @@ -756,12 +619,6 @@ public function getFilters() */ public function setFilters($filters) { - if (count($filters) > 20) { - throw new \InvalidArgumentException('invalid value for $filters when calling EventsItems., number of items must be less than or equal to 20.'); - } - if (count($filters) < 1) { - throw new \InvalidArgumentException('invalid length for $filters when calling EventsItems., number of items must be greater than or equal to 1.'); - } $this->container['filters'] = $filters; return $this; diff --git a/lib/Model/Insights/InsightsEvents.php b/lib/Model/Insights/InsightsEvents.php index 9322be8e..b6c6b6f9 100644 --- a/lib/Model/Insights/InsightsEvents.php +++ b/lib/Model/Insights/InsightsEvents.php @@ -142,13 +142,6 @@ public function listInvalidProperties() if (!isset($this->container['events']) || null === $this->container['events']) { $invalidProperties[] = "'events' can't be null"; } - if (count($this->container['events']) > 1000) { - $invalidProperties[] = "invalid value for 'events', number of items must be less than or equal to 1000."; - } - - if (count($this->container['events']) < 1) { - $invalidProperties[] = "invalid value for 'events', number of items must be greater than or equal to 1."; - } return $invalidProperties; } @@ -183,12 +176,6 @@ public function getEvents() */ public function setEvents($events) { - if (count($events) > 1000) { - throw new \InvalidArgumentException('invalid value for $events when calling InsightsEvents., number of items must be less than or equal to 1000.'); - } - if (count($events) < 1) { - throw new \InvalidArgumentException('invalid length for $events when calling InsightsEvents., number of items must be greater than or equal to 1.'); - } $this->container['events'] = $events; return $this; diff --git a/lib/Model/Insights/ObjectDataAfterSearch.php b/lib/Model/Insights/ObjectDataAfterSearch.php index 6b8e398d..03d6c978 100644 --- a/lib/Model/Insights/ObjectDataAfterSearch.php +++ b/lib/Model/Insights/ObjectDataAfterSearch.php @@ -161,21 +161,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['queryID']) && (mb_strlen($this->container['queryID']) > 32)) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be smaller than or equal to 32."; - } - - if (isset($this->container['queryID']) && (mb_strlen($this->container['queryID']) < 32)) { - $invalidProperties[] = "invalid value for 'queryID', the character length must be bigger than or equal to 32."; - } - - if (isset($this->container['queryID']) && !preg_match('/[0-9a-f]{32}/', $this->container['queryID'])) { - $invalidProperties[] = "invalid value for 'queryID', must be conform to the pattern /[0-9a-f]{32}/."; - } - - return $invalidProperties; + return []; } /** @@ -208,16 +194,6 @@ public function getQueryID() */ public function setQueryID($queryID) { - if (!is_null($queryID) && (mb_strlen($queryID) > 32)) { - throw new \InvalidArgumentException('invalid length for $queryID when calling ObjectDataAfterSearch., must be smaller than or equal to 32.'); - } - if (!is_null($queryID) && (mb_strlen($queryID) < 32)) { - throw new \InvalidArgumentException('invalid length for $queryID when calling ObjectDataAfterSearch., must be bigger than or equal to 32.'); - } - if (!is_null($queryID) && (!preg_match('/[0-9a-f]{32}/', $queryID))) { - throw new \InvalidArgumentException("invalid value for {$queryID} when calling ObjectDataAfterSearch., must conform to the pattern /[0-9a-f]{32}/."); - } - $this->container['queryID'] = $queryID; return $this; diff --git a/lib/Model/Insights/PurchasedObjectIDs.php b/lib/Model/Insights/PurchasedObjectIDs.php index ecfb47be..d9591118 100644 --- a/lib/Model/Insights/PurchasedObjectIDs.php +++ b/lib/Model/Insights/PurchasedObjectIDs.php @@ -224,18 +224,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -248,48 +236,9 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['objectData']) && (count($this->container['objectData']) > 20)) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be less than or equal to 20."; - } - - if (isset($this->container['objectData']) && (count($this->container['objectData']) < 1)) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be greater than or equal to 1."; - } return $invalidProperties; } @@ -324,16 +273,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling PurchasedObjectIDs., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling PurchasedObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling PurchasedObjectIDs., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -430,12 +369,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling PurchasedObjectIDs., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling PurchasedObjectIDs., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -460,16 +393,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling PurchasedObjectIDs., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling PurchasedObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling PurchasedObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -494,16 +417,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling PurchasedObjectIDs., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling PurchasedObjectIDs., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling PurchasedObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; @@ -552,12 +465,6 @@ public function getObjectData() */ public function setObjectData($objectData) { - if (!is_null($objectData) && (count($objectData) > 20)) { - throw new \InvalidArgumentException('invalid value for $objectData when calling PurchasedObjectIDs., number of items must be less than or equal to 20.'); - } - if (!is_null($objectData) && (count($objectData) < 1)) { - throw new \InvalidArgumentException('invalid length for $objectData when calling PurchasedObjectIDs., number of items must be greater than or equal to 1.'); - } $this->container['objectData'] = $objectData; return $this; diff --git a/lib/Model/Insights/PurchasedObjectIDsAfterSearch.php b/lib/Model/Insights/PurchasedObjectIDsAfterSearch.php index bb792803..fdf3ee13 100644 --- a/lib/Model/Insights/PurchasedObjectIDsAfterSearch.php +++ b/lib/Model/Insights/PurchasedObjectIDsAfterSearch.php @@ -224,18 +224,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -248,51 +236,12 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - if (!isset($this->container['objectData']) || null === $this->container['objectData']) { $invalidProperties[] = "'objectData' can't be null"; } - if (count($this->container['objectData']) > 20) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectData']) < 1) { - $invalidProperties[] = "invalid value for 'objectData', number of items must be greater than or equal to 1."; - } return $invalidProperties; } @@ -327,16 +276,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling PurchasedObjectIDsAfterSearch., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling PurchasedObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling PurchasedObjectIDsAfterSearch., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -433,12 +372,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling PurchasedObjectIDsAfterSearch., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling PurchasedObjectIDsAfterSearch., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -463,16 +396,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling PurchasedObjectIDsAfterSearch., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling PurchasedObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling PurchasedObjectIDsAfterSearch., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -497,16 +420,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling PurchasedObjectIDsAfterSearch., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling PurchasedObjectIDsAfterSearch., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling PurchasedObjectIDsAfterSearch., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; @@ -555,12 +468,6 @@ public function getObjectData() */ public function setObjectData($objectData) { - if (count($objectData) > 20) { - throw new \InvalidArgumentException('invalid value for $objectData when calling PurchasedObjectIDsAfterSearch., number of items must be less than or equal to 20.'); - } - if (count($objectData) < 1) { - throw new \InvalidArgumentException('invalid length for $objectData when calling PurchasedObjectIDsAfterSearch., number of items must be greater than or equal to 1.'); - } $this->container['objectData'] = $objectData; return $this; diff --git a/lib/Model/Insights/ViewedFilters.php b/lib/Model/Insights/ViewedFilters.php index 37399551..411b94fa 100644 --- a/lib/Model/Insights/ViewedFilters.php +++ b/lib/Model/Insights/ViewedFilters.php @@ -192,18 +192,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -213,40 +201,9 @@ public function listInvalidProperties() if (!isset($this->container['filters']) || null === $this->container['filters']) { $invalidProperties[] = "'filters' can't be null"; } - if (count($this->container['filters']) > 20) { - $invalidProperties[] = "invalid value for 'filters', number of items must be less than or equal to 20."; - } - - if (count($this->container['filters']) < 1) { - $invalidProperties[] = "invalid value for 'filters', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } return $invalidProperties; } @@ -281,16 +238,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ViewedFilters., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ViewedFilters., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling ViewedFilters., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -363,12 +310,6 @@ public function getFilters() */ public function setFilters($filters) { - if (count($filters) > 20) { - throw new \InvalidArgumentException('invalid value for $filters when calling ViewedFilters., number of items must be less than or equal to 20.'); - } - if (count($filters) < 1) { - throw new \InvalidArgumentException('invalid length for $filters when calling ViewedFilters., number of items must be greater than or equal to 1.'); - } $this->container['filters'] = $filters; return $this; @@ -393,16 +334,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ViewedFilters., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ViewedFilters., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling ViewedFilters., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -427,16 +358,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ViewedFilters., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ViewedFilters., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling ViewedFilters., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; diff --git a/lib/Model/Insights/ViewedObjectIDs.php b/lib/Model/Insights/ViewedObjectIDs.php index 68d0d38f..396b1a6b 100644 --- a/lib/Model/Insights/ViewedObjectIDs.php +++ b/lib/Model/Insights/ViewedObjectIDs.php @@ -192,18 +192,6 @@ public function listInvalidProperties() if (!isset($this->container['eventName']) || null === $this->container['eventName']) { $invalidProperties[] = "'eventName' can't be null"; } - if (mb_strlen($this->container['eventName']) > 64) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be smaller than or equal to 64."; - } - - if (mb_strlen($this->container['eventName']) < 1) { - $invalidProperties[] = "invalid value for 'eventName', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $this->container['eventName'])) { - $invalidProperties[] = "invalid value for 'eventName', must be conform to the pattern /[\\x20-\\x7E]{1,64}/."; - } - if (!isset($this->container['eventType']) || null === $this->container['eventType']) { $invalidProperties[] = "'eventType' can't be null"; } @@ -213,40 +201,9 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 20) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 20."; - } - - if (count($this->container['objectIDs']) < 1) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['userToken']) || null === $this->container['userToken']) { $invalidProperties[] = "'userToken' can't be null"; } - if (mb_strlen($this->container['userToken']) > 129) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be smaller than or equal to 129."; - } - - if (mb_strlen($this->container['userToken']) < 1) { - $invalidProperties[] = "invalid value for 'userToken', the character length must be bigger than or equal to 1."; - } - - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['userToken'])) { - $invalidProperties[] = "invalid value for 'userToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) > 129)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be smaller than or equal to 129."; - } - - if (isset($this->container['authenticatedUserToken']) && (mb_strlen($this->container['authenticatedUserToken']) < 1)) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', the character length must be bigger than or equal to 1."; - } - - if (isset($this->container['authenticatedUserToken']) && !preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $this->container['authenticatedUserToken'])) { - $invalidProperties[] = "invalid value for 'authenticatedUserToken', must be conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."; - } return $invalidProperties; } @@ -281,16 +238,6 @@ public function getEventName() */ public function setEventName($eventName) { - if (mb_strlen($eventName) > 64) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ViewedObjectIDs., must be smaller than or equal to 64.'); - } - if (mb_strlen($eventName) < 1) { - throw new \InvalidArgumentException('invalid length for $eventName when calling ViewedObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[\\x20-\\x7E]{1,64}/', $eventName)) { - throw new \InvalidArgumentException("invalid value for {$eventName} when calling ViewedObjectIDs., must conform to the pattern /[\\x20-\\x7E]{1,64}/."); - } - $this->container['eventName'] = $eventName; return $this; @@ -363,12 +310,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 20) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling ViewedObjectIDs., number of items must be less than or equal to 20.'); - } - if (count($objectIDs) < 1) { - throw new \InvalidArgumentException('invalid length for $objectIDs when calling ViewedObjectIDs., number of items must be greater than or equal to 1.'); - } $this->container['objectIDs'] = $objectIDs; return $this; @@ -393,16 +334,6 @@ public function getUserToken() */ public function setUserToken($userToken) { - if (mb_strlen($userToken) > 129) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ViewedObjectIDs., must be smaller than or equal to 129.'); - } - if (mb_strlen($userToken) < 1) { - throw new \InvalidArgumentException('invalid length for $userToken when calling ViewedObjectIDs., must be bigger than or equal to 1.'); - } - if (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $userToken)) { - throw new \InvalidArgumentException("invalid value for {$userToken} when calling ViewedObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['userToken'] = $userToken; return $this; @@ -427,16 +358,6 @@ public function getAuthenticatedUserToken() */ public function setAuthenticatedUserToken($authenticatedUserToken) { - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) > 129)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ViewedObjectIDs., must be smaller than or equal to 129.'); - } - if (!is_null($authenticatedUserToken) && (mb_strlen($authenticatedUserToken) < 1)) { - throw new \InvalidArgumentException('invalid length for $authenticatedUserToken when calling ViewedObjectIDs., must be bigger than or equal to 1.'); - } - if (!is_null($authenticatedUserToken) && (!preg_match('/[a-zA-Z0-9_=\\/+-]{1,129}/', $authenticatedUserToken))) { - throw new \InvalidArgumentException("invalid value for {$authenticatedUserToken} when calling ViewedObjectIDs., must conform to the pattern /[a-zA-Z0-9_=\\/+-]{1,129}/."); - } - $this->container['authenticatedUserToken'] = $authenticatedUserToken; return $this; diff --git a/lib/Model/Personalization/PersonalizationStrategyParams.php b/lib/Model/Personalization/PersonalizationStrategyParams.php index 90fb478e..d5f4f0b4 100644 --- a/lib/Model/Personalization/PersonalizationStrategyParams.php +++ b/lib/Model/Personalization/PersonalizationStrategyParams.php @@ -164,13 +164,6 @@ public function listInvalidProperties() if (!isset($this->container['personalizationImpact']) || null === $this->container['personalizationImpact']) { $invalidProperties[] = "'personalizationImpact' can't be null"; } - if ($this->container['personalizationImpact'] > 100) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if ($this->container['personalizationImpact'] < 0) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } return $invalidProperties; } @@ -253,13 +246,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if ($personalizationImpact > 100) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling PersonalizationStrategyParams., must be smaller than or equal to 100.'); - } - if ($personalizationImpact < 0) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling PersonalizationStrategyParams., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; diff --git a/lib/Model/QuerySuggestions/Configuration.php b/lib/Model/QuerySuggestions/Configuration.php index fea97e93..e612c8b9 100644 --- a/lib/Model/QuerySuggestions/Configuration.php +++ b/lib/Model/QuerySuggestions/Configuration.php @@ -176,9 +176,6 @@ public function listInvalidProperties() if (!isset($this->container['sourceIndices']) || null === $this->container['sourceIndices']) { $invalidProperties[] = "'sourceIndices' can't be null"; } - if (count($this->container['sourceIndices']) < 1) { - $invalidProperties[] = "invalid value for 'sourceIndices', number of items must be greater than or equal to 1."; - } return $invalidProperties; } @@ -213,9 +210,6 @@ public function getSourceIndices() */ public function setSourceIndices($sourceIndices) { - if (count($sourceIndices) < 1) { - throw new \InvalidArgumentException('invalid length for $sourceIndices when calling Configuration., number of items must be greater than or equal to 1.'); - } $this->container['sourceIndices'] = $sourceIndices; return $this; diff --git a/lib/Model/QuerySuggestions/ConfigurationResponse.php b/lib/Model/QuerySuggestions/ConfigurationResponse.php index 3be1041d..7aade244 100644 --- a/lib/Model/QuerySuggestions/ConfigurationResponse.php +++ b/lib/Model/QuerySuggestions/ConfigurationResponse.php @@ -198,10 +198,6 @@ public function listInvalidProperties() if (!isset($this->container['sourceIndices']) || null === $this->container['sourceIndices']) { $invalidProperties[] = "'sourceIndices' can't be null"; } - if (count($this->container['sourceIndices']) < 1) { - $invalidProperties[] = "invalid value for 'sourceIndices', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['languages']) || null === $this->container['languages']) { $invalidProperties[] = "'languages' can't be null"; } @@ -296,9 +292,6 @@ public function getSourceIndices() */ public function setSourceIndices($sourceIndices) { - if (count($sourceIndices) < 1) { - throw new \InvalidArgumentException('invalid length for $sourceIndices when calling ConfigurationResponse., number of items must be greater than or equal to 1.'); - } $this->container['sourceIndices'] = $sourceIndices; return $this; diff --git a/lib/Model/QuerySuggestions/ConfigurationWithIndex.php b/lib/Model/QuerySuggestions/ConfigurationWithIndex.php index da4ef494..c6959340 100644 --- a/lib/Model/QuerySuggestions/ConfigurationWithIndex.php +++ b/lib/Model/QuerySuggestions/ConfigurationWithIndex.php @@ -184,10 +184,6 @@ public function listInvalidProperties() if (!isset($this->container['sourceIndices']) || null === $this->container['sourceIndices']) { $invalidProperties[] = "'sourceIndices' can't be null"; } - if (count($this->container['sourceIndices']) < 1) { - $invalidProperties[] = "invalid value for 'sourceIndices', number of items must be greater than or equal to 1."; - } - if (!isset($this->container['indexName']) || null === $this->container['indexName']) { $invalidProperties[] = "'indexName' can't be null"; } @@ -225,9 +221,6 @@ public function getSourceIndices() */ public function setSourceIndices($sourceIndices) { - if (count($sourceIndices) < 1) { - throw new \InvalidArgumentException('invalid length for $sourceIndices when calling ConfigurationWithIndex., number of items must be greater than or equal to 1.'); - } $this->container['sourceIndices'] = $sourceIndices; return $this; diff --git a/lib/Model/QuerySuggestions/SourceIndex.php b/lib/Model/QuerySuggestions/SourceIndex.php index cc9e1951..71d1037e 100644 --- a/lib/Model/QuerySuggestions/SourceIndex.php +++ b/lib/Model/QuerySuggestions/SourceIndex.php @@ -200,13 +200,6 @@ public function listInvalidProperties() if (!isset($this->container['indexName']) || null === $this->container['indexName']) { $invalidProperties[] = "'indexName' can't be null"; } - if (isset($this->container['minHits']) && ($this->container['minHits'] < 0)) { - $invalidProperties[] = "invalid value for 'minHits', must be bigger than or equal to 0."; - } - - if (isset($this->container['minLetters']) && ($this->container['minLetters'] < 0)) { - $invalidProperties[] = "invalid value for 'minLetters', must be bigger than or equal to 0."; - } return $invalidProperties; } @@ -337,10 +330,6 @@ public function getMinHits() */ public function setMinHits($minHits) { - if (!is_null($minHits) && ($minHits < 0)) { - throw new \InvalidArgumentException('invalid value for $minHits when calling SourceIndex., must be bigger than or equal to 0.'); - } - $this->container['minHits'] = $minHits; return $this; @@ -365,10 +354,6 @@ public function getMinLetters() */ public function setMinLetters($minLetters) { - if (!is_null($minLetters) && ($minLetters < 0)) { - throw new \InvalidArgumentException('invalid value for $minLetters when calling SourceIndex., must be bigger than or equal to 0.'); - } - $this->container['minLetters'] = $minLetters; return $this; diff --git a/lib/Model/Recommend/BoughtTogetherQuery.php b/lib/Model/Recommend/BoughtTogetherQuery.php index 6b639298..49f2b99e 100644 --- a/lib/Model/Recommend/BoughtTogetherQuery.php +++ b/lib/Model/Recommend/BoughtTogetherQuery.php @@ -185,22 +185,6 @@ public function listInvalidProperties() if (!isset($this->container['threshold']) || null === $this->container['threshold']) { $invalidProperties[] = "'threshold' can't be null"; } - if ($this->container['threshold'] > 100) { - $invalidProperties[] = "invalid value for 'threshold', must be smaller than or equal to 100."; - } - - if ($this->container['threshold'] < 0) { - $invalidProperties[] = "invalid value for 'threshold', must be bigger than or equal to 0."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be smaller than or equal to 1000."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] < 1)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be bigger than or equal to 1."; - } - if (!isset($this->container['model']) || null === $this->container['model']) { $invalidProperties[] = "'model' can't be null"; } @@ -265,13 +249,6 @@ public function getThreshold() */ public function setThreshold($threshold) { - if ($threshold > 100) { - throw new \InvalidArgumentException('invalid value for $threshold when calling BoughtTogetherQuery., must be smaller than or equal to 100.'); - } - if ($threshold < 0) { - throw new \InvalidArgumentException('invalid value for $threshold when calling BoughtTogetherQuery., must be bigger than or equal to 0.'); - } - $this->container['threshold'] = $threshold; return $this; @@ -296,13 +273,6 @@ public function getMaxRecommendations() */ public function setMaxRecommendations($maxRecommendations) { - if (!is_null($maxRecommendations) && ($maxRecommendations > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling BoughtTogetherQuery., must be smaller than or equal to 1000.'); - } - if (!is_null($maxRecommendations) && ($maxRecommendations < 1)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling BoughtTogetherQuery., must be bigger than or equal to 1.'); - } - $this->container['maxRecommendations'] = $maxRecommendations; return $this; diff --git a/lib/Model/Recommend/Condition.php b/lib/Model/Recommend/Condition.php index 2d95cc17..f6663eba 100644 --- a/lib/Model/Recommend/Condition.php +++ b/lib/Model/Recommend/Condition.php @@ -147,13 +147,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['context']) && !preg_match('/[A-Za-z0-9_-]+/', $this->container['context'])) { - $invalidProperties[] = "invalid value for 'context', must be conform to the pattern /[A-Za-z0-9_-]+/."; - } - - return $invalidProperties; + return []; } /** @@ -210,10 +204,6 @@ public function getContext() */ public function setContext($context) { - if (!is_null($context) && (!preg_match('/[A-Za-z0-9_-]+/', $context))) { - throw new \InvalidArgumentException("invalid value for {$context} when calling Condition., must conform to the pattern /[A-Za-z0-9_-]+/."); - } - $this->container['context'] = $context; return $this; diff --git a/lib/Model/Recommend/Consequence.php b/lib/Model/Recommend/Consequence.php index e14e5437..a4b63823 100644 --- a/lib/Model/Recommend/Consequence.php +++ b/lib/Model/Recommend/Consequence.php @@ -155,17 +155,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['hide']) && (count($this->container['hide']) < 1)) { - $invalidProperties[] = "invalid value for 'hide', number of items must be greater than or equal to 1."; - } - - if (isset($this->container['promote']) && (count($this->container['promote']) < 1)) { - $invalidProperties[] = "invalid value for 'promote', number of items must be greater than or equal to 1."; - } - - return $invalidProperties; + return []; } /** @@ -198,9 +188,6 @@ public function getHide() */ public function setHide($hide) { - if (!is_null($hide) && (count($hide) < 1)) { - throw new \InvalidArgumentException('invalid length for $hide when calling Consequence., number of items must be greater than or equal to 1.'); - } $this->container['hide'] = $hide; return $this; @@ -225,9 +212,6 @@ public function getPromote() */ public function setPromote($promote) { - if (!is_null($promote) && (count($promote) < 1)) { - throw new \InvalidArgumentException('invalid length for $promote when calling Consequence., number of items must be greater than or equal to 1.'); - } $this->container['promote'] = $promote; return $this; diff --git a/lib/Model/Recommend/FallbackParams.php b/lib/Model/Recommend/FallbackParams.php index c059cf8e..104c5e60 100644 --- a/lib/Model/Recommend/FallbackParams.php +++ b/lib/Model/Recommend/FallbackParams.php @@ -809,41 +809,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['paginationLimitedTo']) && ($this->container['paginationLimitedTo'] > 20000)) { - $invalidProperties[] = "invalid value for 'paginationLimitedTo', must be smaller than or equal to 20000."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - return $invalidProperties; + return []; } /** @@ -1212,10 +1178,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling FallbackParams., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1336,13 +1298,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling FallbackParams., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling FallbackParams., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1631,10 +1586,6 @@ public function getPaginationLimitedTo() */ public function setPaginationLimitedTo($paginationLimitedTo) { - if (!is_null($paginationLimitedTo) && ($paginationLimitedTo > 20000)) { - throw new \InvalidArgumentException('invalid value for $paginationLimitedTo when calling FallbackParams., must be smaller than or equal to 20000.'); - } - $this->container['paginationLimitedTo'] = $paginationLimitedTo; return $this; @@ -2715,13 +2666,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling FallbackParams., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling FallbackParams., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2770,10 +2714,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling FallbackParams., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2798,10 +2738,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling FallbackParams., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Recommend/LookingSimilarQuery.php b/lib/Model/Recommend/LookingSimilarQuery.php index e2b88134..a6b17703 100644 --- a/lib/Model/Recommend/LookingSimilarQuery.php +++ b/lib/Model/Recommend/LookingSimilarQuery.php @@ -193,22 +193,6 @@ public function listInvalidProperties() if (!isset($this->container['threshold']) || null === $this->container['threshold']) { $invalidProperties[] = "'threshold' can't be null"; } - if ($this->container['threshold'] > 100) { - $invalidProperties[] = "invalid value for 'threshold', must be smaller than or equal to 100."; - } - - if ($this->container['threshold'] < 0) { - $invalidProperties[] = "invalid value for 'threshold', must be bigger than or equal to 0."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be smaller than or equal to 1000."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] < 1)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be bigger than or equal to 1."; - } - if (!isset($this->container['model']) || null === $this->container['model']) { $invalidProperties[] = "'model' can't be null"; } @@ -273,13 +257,6 @@ public function getThreshold() */ public function setThreshold($threshold) { - if ($threshold > 100) { - throw new \InvalidArgumentException('invalid value for $threshold when calling LookingSimilarQuery., must be smaller than or equal to 100.'); - } - if ($threshold < 0) { - throw new \InvalidArgumentException('invalid value for $threshold when calling LookingSimilarQuery., must be bigger than or equal to 0.'); - } - $this->container['threshold'] = $threshold; return $this; @@ -304,13 +281,6 @@ public function getMaxRecommendations() */ public function setMaxRecommendations($maxRecommendations) { - if (!is_null($maxRecommendations) && ($maxRecommendations > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling LookingSimilarQuery., must be smaller than or equal to 1000.'); - } - if (!is_null($maxRecommendations) && ($maxRecommendations < 1)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling LookingSimilarQuery., must be bigger than or equal to 1.'); - } - $this->container['maxRecommendations'] = $maxRecommendations; return $this; diff --git a/lib/Model/Recommend/PromoteConsequenceObject.php b/lib/Model/Recommend/PromoteConsequenceObject.php index cf8e4237..2d42480f 100644 --- a/lib/Model/Recommend/PromoteConsequenceObject.php +++ b/lib/Model/Recommend/PromoteConsequenceObject.php @@ -147,13 +147,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['position']) && ($this->container['position'] < 0)) { - $invalidProperties[] = "invalid value for 'position', must be bigger than or equal to 0."; - } - - return $invalidProperties; + return []; } /** @@ -210,10 +204,6 @@ public function getPosition() */ public function setPosition($position) { - if (!is_null($position) && ($position < 0)) { - throw new \InvalidArgumentException('invalid value for $position when calling PromoteConsequenceObject., must be bigger than or equal to 0.'); - } - $this->container['position'] = $position; return $this; diff --git a/lib/Model/Recommend/RankingInfo.php b/lib/Model/Recommend/RankingInfo.php index d8225f70..a534d988 100644 --- a/lib/Model/Recommend/RankingInfo.php +++ b/lib/Model/Recommend/RankingInfo.php @@ -237,52 +237,21 @@ public function listInvalidProperties() { $invalidProperties = []; - if (isset($this->container['filters']) && ($this->container['filters'] < 0)) { - $invalidProperties[] = "invalid value for 'filters', must be bigger than or equal to 0."; - } - if (!isset($this->container['firstMatchedWord']) || null === $this->container['firstMatchedWord']) { $invalidProperties[] = "'firstMatchedWord' can't be null"; } - if ($this->container['firstMatchedWord'] < 0) { - $invalidProperties[] = "invalid value for 'firstMatchedWord', must be bigger than or equal to 0."; - } - if (!isset($this->container['geoDistance']) || null === $this->container['geoDistance']) { $invalidProperties[] = "'geoDistance' can't be null"; } - if ($this->container['geoDistance'] < 0) { - $invalidProperties[] = "invalid value for 'geoDistance', must be bigger than or equal to 0."; - } - - if (isset($this->container['geoPrecision']) && ($this->container['geoPrecision'] < 1)) { - $invalidProperties[] = "invalid value for 'geoPrecision', must be bigger than or equal to 1."; - } - if (!isset($this->container['nbExactWords']) || null === $this->container['nbExactWords']) { $invalidProperties[] = "'nbExactWords' can't be null"; } - if ($this->container['nbExactWords'] < 0) { - $invalidProperties[] = "invalid value for 'nbExactWords', must be bigger than or equal to 0."; - } - if (!isset($this->container['nbTypos']) || null === $this->container['nbTypos']) { $invalidProperties[] = "'nbTypos' can't be null"; } - if ($this->container['nbTypos'] < 0) { - $invalidProperties[] = "invalid value for 'nbTypos', must be bigger than or equal to 0."; - } - - if (isset($this->container['proximityDistance']) && ($this->container['proximityDistance'] < 0)) { - $invalidProperties[] = "invalid value for 'proximityDistance', must be bigger than or equal to 0."; - } - if (!isset($this->container['userScore']) || null === $this->container['userScore']) { $invalidProperties[] = "'userScore' can't be null"; } - if (isset($this->container['words']) && ($this->container['words'] < 1)) { - $invalidProperties[] = "invalid value for 'words', must be bigger than or equal to 1."; - } return $invalidProperties; } @@ -317,10 +286,6 @@ public function getFilters() */ public function setFilters($filters) { - if (!is_null($filters) && ($filters < 0)) { - throw new \InvalidArgumentException('invalid value for $filters when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['filters'] = $filters; return $this; @@ -345,10 +310,6 @@ public function getFirstMatchedWord() */ public function setFirstMatchedWord($firstMatchedWord) { - if ($firstMatchedWord < 0) { - throw new \InvalidArgumentException('invalid value for $firstMatchedWord when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['firstMatchedWord'] = $firstMatchedWord; return $this; @@ -373,10 +334,6 @@ public function getGeoDistance() */ public function setGeoDistance($geoDistance) { - if ($geoDistance < 0) { - throw new \InvalidArgumentException('invalid value for $geoDistance when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['geoDistance'] = $geoDistance; return $this; @@ -401,10 +358,6 @@ public function getGeoPrecision() */ public function setGeoPrecision($geoPrecision) { - if (!is_null($geoPrecision) && ($geoPrecision < 1)) { - throw new \InvalidArgumentException('invalid value for $geoPrecision when calling RankingInfo., must be bigger than or equal to 1.'); - } - $this->container['geoPrecision'] = $geoPrecision; return $this; @@ -477,10 +430,6 @@ public function getNbExactWords() */ public function setNbExactWords($nbExactWords) { - if ($nbExactWords < 0) { - throw new \InvalidArgumentException('invalid value for $nbExactWords when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['nbExactWords'] = $nbExactWords; return $this; @@ -505,10 +454,6 @@ public function getNbTypos() */ public function setNbTypos($nbTypos) { - if ($nbTypos < 0) { - throw new \InvalidArgumentException('invalid value for $nbTypos when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['nbTypos'] = $nbTypos; return $this; @@ -557,10 +502,6 @@ public function getProximityDistance() */ public function setProximityDistance($proximityDistance) { - if (!is_null($proximityDistance) && ($proximityDistance < 0)) { - throw new \InvalidArgumentException('invalid value for $proximityDistance when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['proximityDistance'] = $proximityDistance; return $this; @@ -609,10 +550,6 @@ public function getWords() */ public function setWords($words) { - if (!is_null($words) && ($words < 1)) { - throw new \InvalidArgumentException('invalid value for $words when calling RankingInfo., must be bigger than or equal to 1.'); - } - $this->container['words'] = $words; return $this; diff --git a/lib/Model/Recommend/RecommendHit.php b/lib/Model/Recommend/RecommendHit.php index 6545394e..24a46a9d 100644 --- a/lib/Model/Recommend/RecommendHit.php +++ b/lib/Model/Recommend/RecommendHit.php @@ -187,13 +187,6 @@ public function listInvalidProperties() if (!isset($this->container['score']) || null === $this->container['score']) { $invalidProperties[] = "'score' can't be null"; } - if ($this->container['score'] > 100) { - $invalidProperties[] = "invalid value for 'score', must be smaller than or equal to 100."; - } - - if ($this->container['score'] < 0) { - $invalidProperties[] = "invalid value for 'score', must be bigger than or equal to 0."; - } return $invalidProperties; } @@ -348,13 +341,6 @@ public function getScore() */ public function setScore($score) { - if ($score > 100) { - throw new \InvalidArgumentException('invalid value for $score when calling RecommendHit., must be smaller than or equal to 100.'); - } - if ($score < 0) { - throw new \InvalidArgumentException('invalid value for $score when calling RecommendHit., must be bigger than or equal to 0.'); - } - $this->container['score'] = $score; return $this; diff --git a/lib/Model/Recommend/RecommendSearchParams.php b/lib/Model/Recommend/RecommendSearchParams.php index 7cbf4460..5920d9ff 100644 --- a/lib/Model/Recommend/RecommendSearchParams.php +++ b/lib/Model/Recommend/RecommendSearchParams.php @@ -811,41 +811,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['paginationLimitedTo']) && ($this->container['paginationLimitedTo'] > 20000)) { - $invalidProperties[] = "invalid value for 'paginationLimitedTo', must be smaller than or equal to 20000."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - return $invalidProperties; + return []; } /** @@ -1214,10 +1180,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling RecommendSearchParams., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1338,13 +1300,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling RecommendSearchParams., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling RecommendSearchParams., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1633,10 +1588,6 @@ public function getPaginationLimitedTo() */ public function setPaginationLimitedTo($paginationLimitedTo) { - if (!is_null($paginationLimitedTo) && ($paginationLimitedTo > 20000)) { - throw new \InvalidArgumentException('invalid value for $paginationLimitedTo when calling RecommendSearchParams., must be smaller than or equal to 20000.'); - } - $this->container['paginationLimitedTo'] = $paginationLimitedTo; return $this; @@ -2717,13 +2668,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling RecommendSearchParams., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling RecommendSearchParams., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2772,10 +2716,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling RecommendSearchParams., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2800,10 +2740,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling RecommendSearchParams., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Recommend/RecommendationsHit.php b/lib/Model/Recommend/RecommendationsHit.php index 256a1527..6f6cdba2 100644 --- a/lib/Model/Recommend/RecommendationsHit.php +++ b/lib/Model/Recommend/RecommendationsHit.php @@ -201,14 +201,6 @@ public function listInvalidProperties() if (!isset($this->container['score']) || null === $this->container['score']) { $invalidProperties[] = "'score' can't be null"; } - if ($this->container['score'] > 100) { - $invalidProperties[] = "invalid value for 'score', must be smaller than or equal to 100."; - } - - if ($this->container['score'] < 0) { - $invalidProperties[] = "invalid value for 'score', must be bigger than or equal to 0."; - } - if (!isset($this->container['facetName']) || null === $this->container['facetName']) { $invalidProperties[] = "'facetName' can't be null"; } @@ -369,13 +361,6 @@ public function getScore() */ public function setScore($score) { - if ($score > 100) { - throw new \InvalidArgumentException('invalid value for $score when calling RecommendationsHit., must be smaller than or equal to 100.'); - } - if ($score < 0) { - throw new \InvalidArgumentException('invalid value for $score when calling RecommendationsHit., must be bigger than or equal to 0.'); - } - $this->container['score'] = $score; return $this; diff --git a/lib/Model/Recommend/RecommendationsRequest.php b/lib/Model/Recommend/RecommendationsRequest.php index 7eb944c0..a7b4532e 100644 --- a/lib/Model/Recommend/RecommendationsRequest.php +++ b/lib/Model/Recommend/RecommendationsRequest.php @@ -209,22 +209,6 @@ public function listInvalidProperties() if (!isset($this->container['threshold']) || null === $this->container['threshold']) { $invalidProperties[] = "'threshold' can't be null"; } - if ($this->container['threshold'] > 100) { - $invalidProperties[] = "invalid value for 'threshold', must be smaller than or equal to 100."; - } - - if ($this->container['threshold'] < 0) { - $invalidProperties[] = "invalid value for 'threshold', must be bigger than or equal to 0."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be smaller than or equal to 1000."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] < 1)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be bigger than or equal to 1."; - } - if (!isset($this->container['model']) || null === $this->container['model']) { $invalidProperties[] = "'model' can't be null"; } @@ -292,13 +276,6 @@ public function getThreshold() */ public function setThreshold($threshold) { - if ($threshold > 100) { - throw new \InvalidArgumentException('invalid value for $threshold when calling RecommendationsRequest., must be smaller than or equal to 100.'); - } - if ($threshold < 0) { - throw new \InvalidArgumentException('invalid value for $threshold when calling RecommendationsRequest., must be bigger than or equal to 0.'); - } - $this->container['threshold'] = $threshold; return $this; @@ -323,13 +300,6 @@ public function getMaxRecommendations() */ public function setMaxRecommendations($maxRecommendations) { - if (!is_null($maxRecommendations) && ($maxRecommendations > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling RecommendationsRequest., must be smaller than or equal to 1000.'); - } - if (!is_null($maxRecommendations) && ($maxRecommendations < 1)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling RecommendationsRequest., must be bigger than or equal to 1.'); - } - $this->container['maxRecommendations'] = $maxRecommendations; return $this; diff --git a/lib/Model/Recommend/RecommendationsResults.php b/lib/Model/Recommend/RecommendationsResults.php index 4cdde0de..20f640b2 100644 --- a/lib/Model/Recommend/RecommendationsResults.php +++ b/lib/Model/Recommend/RecommendationsResults.php @@ -371,29 +371,9 @@ public function listInvalidProperties() { $invalidProperties = []; - if (isset($this->container['abTestVariantID']) && ($this->container['abTestVariantID'] < 1)) { - $invalidProperties[] = "invalid value for 'abTestVariantID', must be bigger than or equal to 1."; - } - - if (isset($this->container['aroundLatLng']) && !preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $this->container['aroundLatLng'])) { - $invalidProperties[] = "invalid value for 'aroundLatLng', must be conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."; - } - if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - if (!isset($this->container['hits']) || null === $this->container['hits']) { $invalidProperties[] = "'hits' can't be null"; } @@ -455,10 +435,6 @@ public function getAbTestVariantID() */ public function setAbTestVariantID($abTestVariantID) { - if (!is_null($abTestVariantID) && ($abTestVariantID < 1)) { - throw new \InvalidArgumentException('invalid value for $abTestVariantID when calling RecommendationsResults., must be bigger than or equal to 1.'); - } - $this->container['abTestVariantID'] = $abTestVariantID; return $this; @@ -483,10 +459,6 @@ public function getAroundLatLng() */ public function setAroundLatLng($aroundLatLng) { - if (!is_null($aroundLatLng) && (!preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $aroundLatLng))) { - throw new \InvalidArgumentException("invalid value for {$aroundLatLng} when calling RecommendationsResults., must conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."); - } - $this->container['aroundLatLng'] = $aroundLatLng; return $this; @@ -1051,10 +1023,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling RecommendationsResults., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1127,13 +1095,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling RecommendationsResults., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling RecommendationsResults., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; diff --git a/lib/Model/Recommend/RecommendedForYouQuery.php b/lib/Model/Recommend/RecommendedForYouQuery.php index 87b3df2a..1d98d01f 100644 --- a/lib/Model/Recommend/RecommendedForYouQuery.php +++ b/lib/Model/Recommend/RecommendedForYouQuery.php @@ -185,22 +185,6 @@ public function listInvalidProperties() if (!isset($this->container['threshold']) || null === $this->container['threshold']) { $invalidProperties[] = "'threshold' can't be null"; } - if ($this->container['threshold'] > 100) { - $invalidProperties[] = "invalid value for 'threshold', must be smaller than or equal to 100."; - } - - if ($this->container['threshold'] < 0) { - $invalidProperties[] = "invalid value for 'threshold', must be bigger than or equal to 0."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be smaller than or equal to 1000."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] < 1)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be bigger than or equal to 1."; - } - if (!isset($this->container['model']) || null === $this->container['model']) { $invalidProperties[] = "'model' can't be null"; } @@ -262,13 +246,6 @@ public function getThreshold() */ public function setThreshold($threshold) { - if ($threshold > 100) { - throw new \InvalidArgumentException('invalid value for $threshold when calling RecommendedForYouQuery., must be smaller than or equal to 100.'); - } - if ($threshold < 0) { - throw new \InvalidArgumentException('invalid value for $threshold when calling RecommendedForYouQuery., must be bigger than or equal to 0.'); - } - $this->container['threshold'] = $threshold; return $this; @@ -293,13 +270,6 @@ public function getMaxRecommendations() */ public function setMaxRecommendations($maxRecommendations) { - if (!is_null($maxRecommendations) && ($maxRecommendations > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling RecommendedForYouQuery., must be smaller than or equal to 1000.'); - } - if (!is_null($maxRecommendations) && ($maxRecommendations < 1)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling RecommendedForYouQuery., must be bigger than or equal to 1.'); - } - $this->container['maxRecommendations'] = $maxRecommendations; return $this; diff --git a/lib/Model/Recommend/RelatedQuery.php b/lib/Model/Recommend/RelatedQuery.php index 96e6ce83..3d4b9848 100644 --- a/lib/Model/Recommend/RelatedQuery.php +++ b/lib/Model/Recommend/RelatedQuery.php @@ -193,22 +193,6 @@ public function listInvalidProperties() if (!isset($this->container['threshold']) || null === $this->container['threshold']) { $invalidProperties[] = "'threshold' can't be null"; } - if ($this->container['threshold'] > 100) { - $invalidProperties[] = "invalid value for 'threshold', must be smaller than or equal to 100."; - } - - if ($this->container['threshold'] < 0) { - $invalidProperties[] = "invalid value for 'threshold', must be bigger than or equal to 0."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be smaller than or equal to 1000."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] < 1)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be bigger than or equal to 1."; - } - if (!isset($this->container['model']) || null === $this->container['model']) { $invalidProperties[] = "'model' can't be null"; } @@ -273,13 +257,6 @@ public function getThreshold() */ public function setThreshold($threshold) { - if ($threshold > 100) { - throw new \InvalidArgumentException('invalid value for $threshold when calling RelatedQuery., must be smaller than or equal to 100.'); - } - if ($threshold < 0) { - throw new \InvalidArgumentException('invalid value for $threshold when calling RelatedQuery., must be bigger than or equal to 0.'); - } - $this->container['threshold'] = $threshold; return $this; @@ -304,13 +281,6 @@ public function getMaxRecommendations() */ public function setMaxRecommendations($maxRecommendations) { - if (!is_null($maxRecommendations) && ($maxRecommendations > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling RelatedQuery., must be smaller than or equal to 1000.'); - } - if (!is_null($maxRecommendations) && ($maxRecommendations < 1)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling RelatedQuery., must be bigger than or equal to 1.'); - } - $this->container['maxRecommendations'] = $maxRecommendations; return $this; diff --git a/lib/Model/Recommend/SearchRecommendRulesParams.php b/lib/Model/Recommend/SearchRecommendRulesParams.php index 9dba1100..7016de90 100644 --- a/lib/Model/Recommend/SearchRecommendRulesParams.php +++ b/lib/Model/Recommend/SearchRecommendRulesParams.php @@ -195,29 +195,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] < 1)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be bigger than or equal to 1."; - } - - return $invalidProperties; + return []; } /** @@ -298,10 +276,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchRecommendRulesParams., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -326,13 +300,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchRecommendRulesParams., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchRecommendRulesParams., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -429,13 +396,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchRecommendRulesParams., must be smaller than or equal to 1000.'); - } - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet < 1)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchRecommendRulesParams., must be bigger than or equal to 1.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Recommend/SearchRecommendRulesResponse.php b/lib/Model/Recommend/SearchRecommendRulesResponse.php index f4d2c163..5c46b242 100644 --- a/lib/Model/Recommend/SearchRecommendRulesResponse.php +++ b/lib/Model/Recommend/SearchRecommendRulesResponse.php @@ -172,10 +172,6 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } - if ($this->container['page'] < 0) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - if (!isset($this->container['nbPages']) || null === $this->container['nbPages']) { $invalidProperties[] = "'nbPages' can't be null"; } @@ -261,10 +257,6 @@ public function getPage() */ public function setPage($page) { - if ($page < 0) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchRecommendRulesResponse., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; diff --git a/lib/Model/Recommend/TrendingFacetHit.php b/lib/Model/Recommend/TrendingFacetHit.php index 0789ae09..5dacb23d 100644 --- a/lib/Model/Recommend/TrendingFacetHit.php +++ b/lib/Model/Recommend/TrendingFacetHit.php @@ -160,14 +160,6 @@ public function listInvalidProperties() if (!isset($this->container['score']) || null === $this->container['score']) { $invalidProperties[] = "'score' can't be null"; } - if ($this->container['score'] > 100) { - $invalidProperties[] = "invalid value for 'score', must be smaller than or equal to 100."; - } - - if ($this->container['score'] < 0) { - $invalidProperties[] = "invalid value for 'score', must be bigger than or equal to 0."; - } - if (!isset($this->container['facetName']) || null === $this->container['facetName']) { $invalidProperties[] = "'facetName' can't be null"; } @@ -208,13 +200,6 @@ public function getScore() */ public function setScore($score) { - if ($score > 100) { - throw new \InvalidArgumentException('invalid value for $score when calling TrendingFacetHit., must be smaller than or equal to 100.'); - } - if ($score < 0) { - throw new \InvalidArgumentException('invalid value for $score when calling TrendingFacetHit., must be bigger than or equal to 0.'); - } - $this->container['score'] = $score; return $this; diff --git a/lib/Model/Recommend/TrendingFacetsQuery.php b/lib/Model/Recommend/TrendingFacetsQuery.php index f43c9e0f..3772f3b3 100644 --- a/lib/Model/Recommend/TrendingFacetsQuery.php +++ b/lib/Model/Recommend/TrendingFacetsQuery.php @@ -193,22 +193,6 @@ public function listInvalidProperties() if (!isset($this->container['threshold']) || null === $this->container['threshold']) { $invalidProperties[] = "'threshold' can't be null"; } - if ($this->container['threshold'] > 100) { - $invalidProperties[] = "invalid value for 'threshold', must be smaller than or equal to 100."; - } - - if ($this->container['threshold'] < 0) { - $invalidProperties[] = "invalid value for 'threshold', must be bigger than or equal to 0."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be smaller than or equal to 1000."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] < 1)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be bigger than or equal to 1."; - } - if (!isset($this->container['facetName']) || null === $this->container['facetName']) { $invalidProperties[] = "'facetName' can't be null"; } @@ -273,13 +257,6 @@ public function getThreshold() */ public function setThreshold($threshold) { - if ($threshold > 100) { - throw new \InvalidArgumentException('invalid value for $threshold when calling TrendingFacetsQuery., must be smaller than or equal to 100.'); - } - if ($threshold < 0) { - throw new \InvalidArgumentException('invalid value for $threshold when calling TrendingFacetsQuery., must be bigger than or equal to 0.'); - } - $this->container['threshold'] = $threshold; return $this; @@ -304,13 +281,6 @@ public function getMaxRecommendations() */ public function setMaxRecommendations($maxRecommendations) { - if (!is_null($maxRecommendations) && ($maxRecommendations > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling TrendingFacetsQuery., must be smaller than or equal to 1000.'); - } - if (!is_null($maxRecommendations) && ($maxRecommendations < 1)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling TrendingFacetsQuery., must be bigger than or equal to 1.'); - } - $this->container['maxRecommendations'] = $maxRecommendations; return $this; diff --git a/lib/Model/Recommend/TrendingItemsQuery.php b/lib/Model/Recommend/TrendingItemsQuery.php index a7f20d91..39a38eac 100644 --- a/lib/Model/Recommend/TrendingItemsQuery.php +++ b/lib/Model/Recommend/TrendingItemsQuery.php @@ -201,22 +201,6 @@ public function listInvalidProperties() if (!isset($this->container['threshold']) || null === $this->container['threshold']) { $invalidProperties[] = "'threshold' can't be null"; } - if ($this->container['threshold'] > 100) { - $invalidProperties[] = "invalid value for 'threshold', must be smaller than or equal to 100."; - } - - if ($this->container['threshold'] < 0) { - $invalidProperties[] = "invalid value for 'threshold', must be bigger than or equal to 0."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be smaller than or equal to 1000."; - } - - if (isset($this->container['maxRecommendations']) && ($this->container['maxRecommendations'] < 1)) { - $invalidProperties[] = "invalid value for 'maxRecommendations', must be bigger than or equal to 1."; - } - if (!isset($this->container['model']) || null === $this->container['model']) { $invalidProperties[] = "'model' can't be null"; } @@ -278,13 +262,6 @@ public function getThreshold() */ public function setThreshold($threshold) { - if ($threshold > 100) { - throw new \InvalidArgumentException('invalid value for $threshold when calling TrendingItemsQuery., must be smaller than or equal to 100.'); - } - if ($threshold < 0) { - throw new \InvalidArgumentException('invalid value for $threshold when calling TrendingItemsQuery., must be bigger than or equal to 0.'); - } - $this->container['threshold'] = $threshold; return $this; @@ -309,13 +286,6 @@ public function getMaxRecommendations() */ public function setMaxRecommendations($maxRecommendations) { - if (!is_null($maxRecommendations) && ($maxRecommendations > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling TrendingItemsQuery., must be smaller than or equal to 1000.'); - } - if (!is_null($maxRecommendations) && ($maxRecommendations < 1)) { - throw new \InvalidArgumentException('invalid value for $maxRecommendations when calling TrendingItemsQuery., must be bigger than or equal to 1.'); - } - $this->container['maxRecommendations'] = $maxRecommendations; return $this; diff --git a/lib/Model/Search/BrowseParams.php b/lib/Model/Search/BrowseParams.php index 930e8dab..7f408a4b 100644 --- a/lib/Model/Search/BrowseParams.php +++ b/lib/Model/Search/BrowseParams.php @@ -753,57 +753,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['length']) && ($this->container['length'] > 1000)) { - $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; - } - - if (isset($this->container['length']) && ($this->container['length'] < 0)) { - $invalidProperties[] = "invalid value for 'length', must be bigger than or equal to 0."; - } - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - return $invalidProperties; + return []; } /** @@ -1124,10 +1074,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling BrowseParams., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1176,13 +1122,6 @@ public function getLength() */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { - throw new \InvalidArgumentException('invalid value for $length when calling BrowseParams., must be smaller than or equal to 1000.'); - } - if (!is_null($length) && ($length < 0)) { - throw new \InvalidArgumentException('invalid value for $length when calling BrowseParams., must be bigger than or equal to 0.'); - } - $this->container['length'] = $length; return $this; @@ -1303,10 +1242,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling BrowseParams., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1427,13 +1362,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BrowseParams., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BrowseParams., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1890,13 +1818,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling BrowseParams., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling BrowseParams., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -2497,13 +2418,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling BrowseParams., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling BrowseParams., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2552,10 +2466,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling BrowseParams., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2580,10 +2490,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling BrowseParams., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/BrowseParamsObject.php b/lib/Model/Search/BrowseParamsObject.php index 53ba86c1..4107c345 100644 --- a/lib/Model/Search/BrowseParamsObject.php +++ b/lib/Model/Search/BrowseParamsObject.php @@ -745,57 +745,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['length']) && ($this->container['length'] > 1000)) { - $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; - } - - if (isset($this->container['length']) && ($this->container['length'] < 0)) { - $invalidProperties[] = "invalid value for 'length', must be bigger than or equal to 0."; - } - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - return $invalidProperties; + return []; } /** @@ -1092,10 +1042,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling BrowseParamsObject., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1144,13 +1090,6 @@ public function getLength() */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { - throw new \InvalidArgumentException('invalid value for $length when calling BrowseParamsObject., must be smaller than or equal to 1000.'); - } - if (!is_null($length) && ($length < 0)) { - throw new \InvalidArgumentException('invalid value for $length when calling BrowseParamsObject., must be bigger than or equal to 0.'); - } - $this->container['length'] = $length; return $this; @@ -1271,10 +1210,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling BrowseParamsObject., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1395,13 +1330,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BrowseParamsObject., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling BrowseParamsObject., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1858,13 +1786,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling BrowseParamsObject., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling BrowseParamsObject., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -2465,13 +2386,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling BrowseParamsObject., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling BrowseParamsObject., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2520,10 +2434,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling BrowseParamsObject., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2548,10 +2458,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling BrowseParamsObject., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/BrowseResponse.php b/lib/Model/Search/BrowseResponse.php index 740cb6e0..a592a070 100644 --- a/lib/Model/Search/BrowseResponse.php +++ b/lib/Model/Search/BrowseResponse.php @@ -395,29 +395,9 @@ public function listInvalidProperties() { $invalidProperties = []; - if (isset($this->container['abTestVariantID']) && ($this->container['abTestVariantID'] < 1)) { - $invalidProperties[] = "invalid value for 'abTestVariantID', must be bigger than or equal to 1."; - } - - if (isset($this->container['aroundLatLng']) && !preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $this->container['aroundLatLng'])) { - $invalidProperties[] = "invalid value for 'aroundLatLng', must be conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."; - } - if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - if (!isset($this->container['hits']) || null === $this->container['hits']) { $invalidProperties[] = "'hits' can't be null"; } @@ -485,10 +465,6 @@ public function getAbTestVariantID() */ public function setAbTestVariantID($abTestVariantID) { - if (!is_null($abTestVariantID) && ($abTestVariantID < 1)) { - throw new \InvalidArgumentException('invalid value for $abTestVariantID when calling BrowseResponse., must be bigger than or equal to 1.'); - } - $this->container['abTestVariantID'] = $abTestVariantID; return $this; @@ -513,10 +489,6 @@ public function getAroundLatLng() */ public function setAroundLatLng($aroundLatLng) { - if (!is_null($aroundLatLng) && (!preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $aroundLatLng))) { - throw new \InvalidArgumentException("invalid value for {$aroundLatLng} when calling BrowseResponse., must conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."); - } - $this->container['aroundLatLng'] = $aroundLatLng; return $this; @@ -1081,10 +1053,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling BrowseResponse., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1157,13 +1125,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling BrowseResponse., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling BrowseResponse., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; diff --git a/lib/Model/Search/Condition.php b/lib/Model/Search/Condition.php index 243543ef..1887577b 100644 --- a/lib/Model/Search/Condition.php +++ b/lib/Model/Search/Condition.php @@ -169,13 +169,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['context']) && !preg_match('/[A-Za-z0-9_-]+/', $this->container['context'])) { - $invalidProperties[] = "invalid value for 'context', must be conform to the pattern /[A-Za-z0-9_-]+/."; - } - - return $invalidProperties; + return []; } /** @@ -280,10 +274,6 @@ public function getContext() */ public function setContext($context) { - if (!is_null($context) && (!preg_match('/[A-Za-z0-9_-]+/', $context))) { - throw new \InvalidArgumentException("invalid value for {$context} when calling Condition., must conform to the pattern /[A-Za-z0-9_-]+/."); - } - $this->container['context'] = $context; return $this; diff --git a/lib/Model/Search/Consequence.php b/lib/Model/Search/Consequence.php index 7a899ba3..4249ca97 100644 --- a/lib/Model/Search/Consequence.php +++ b/lib/Model/Search/Consequence.php @@ -171,17 +171,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['promote']) && (count($this->container['promote']) > 300)) { - $invalidProperties[] = "invalid value for 'promote', number of items must be less than or equal to 300."; - } - - if (isset($this->container['hide']) && (count($this->container['hide']) > 50)) { - $invalidProperties[] = "invalid value for 'hide', number of items must be less than or equal to 50."; - } - - return $invalidProperties; + return []; } /** @@ -238,9 +228,6 @@ public function getPromote() */ public function setPromote($promote) { - if (!is_null($promote) && (count($promote) > 300)) { - throw new \InvalidArgumentException('invalid value for $promote when calling Consequence., number of items must be less than or equal to 300.'); - } $this->container['promote'] = $promote; return $this; @@ -289,9 +276,6 @@ public function getHide() */ public function setHide($hide) { - if (!is_null($hide) && (count($hide) > 50)) { - throw new \InvalidArgumentException('invalid value for $hide when calling Consequence., number of items must be less than or equal to 50.'); - } $this->container['hide'] = $hide; return $this; diff --git a/lib/Model/Search/ConsequenceParams.php b/lib/Model/Search/ConsequenceParams.php index a18fba81..daef53ca 100644 --- a/lib/Model/Search/ConsequenceParams.php +++ b/lib/Model/Search/ConsequenceParams.php @@ -753,57 +753,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['length']) && ($this->container['length'] > 1000)) { - $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; - } - - if (isset($this->container['length']) && ($this->container['length'] < 0)) { - $invalidProperties[] = "invalid value for 'length', must be bigger than or equal to 0."; - } - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - return $invalidProperties; + return []; } /** @@ -1076,10 +1026,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling ConsequenceParams., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1128,13 +1074,6 @@ public function getLength() */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { - throw new \InvalidArgumentException('invalid value for $length when calling ConsequenceParams., must be smaller than or equal to 1000.'); - } - if (!is_null($length) && ($length < 0)) { - throw new \InvalidArgumentException('invalid value for $length when calling ConsequenceParams., must be bigger than or equal to 0.'); - } - $this->container['length'] = $length; return $this; @@ -1255,10 +1194,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling ConsequenceParams., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1379,13 +1314,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling ConsequenceParams., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling ConsequenceParams., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1842,13 +1770,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling ConsequenceParams., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling ConsequenceParams., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -2449,13 +2370,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling ConsequenceParams., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling ConsequenceParams., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2504,10 +2418,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling ConsequenceParams., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2532,10 +2442,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling ConsequenceParams., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/IndexSettings.php b/lib/Model/Search/IndexSettings.php index e82058fe..a2424a8c 100644 --- a/lib/Model/Search/IndexSettings.php +++ b/lib/Model/Search/IndexSettings.php @@ -619,37 +619,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['paginationLimitedTo']) && ($this->container['paginationLimitedTo'] > 20000)) { - $invalidProperties[] = "invalid value for 'paginationLimitedTo', must be smaller than or equal to 20000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - return $invalidProperties; + return []; } /** @@ -730,10 +700,6 @@ public function getPaginationLimitedTo() */ public function setPaginationLimitedTo($paginationLimitedTo) { - if (!is_null($paginationLimitedTo) && ($paginationLimitedTo > 20000)) { - throw new \InvalidArgumentException('invalid value for $paginationLimitedTo when calling IndexSettings., must be smaller than or equal to 20000.'); - } - $this->container['paginationLimitedTo'] = $paginationLimitedTo; return $this; @@ -1334,13 +1300,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling IndexSettings., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling IndexSettings., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -1941,13 +1900,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling IndexSettings., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling IndexSettings., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -1996,10 +1948,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling IndexSettings., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2024,10 +1972,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling IndexSettings., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/Log.php b/lib/Model/Search/Log.php index 07d2a31d..e9e848f1 100644 --- a/lib/Model/Search/Log.php +++ b/lib/Model/Search/Log.php @@ -263,17 +263,9 @@ public function listInvalidProperties() if (!isset($this->container['queryBody']) || null === $this->container['queryBody']) { $invalidProperties[] = "'queryBody' can't be null"; } - if (mb_strlen($this->container['queryBody']) > 1000) { - $invalidProperties[] = "invalid value for 'queryBody', the character length must be smaller than or equal to 1000."; - } - if (!isset($this->container['answer']) || null === $this->container['answer']) { $invalidProperties[] = "'answer' can't be null"; } - if (mb_strlen($this->container['answer']) > 1000) { - $invalidProperties[] = "invalid value for 'answer', the character length must be smaller than or equal to 1000."; - } - if (!isset($this->container['url']) || null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } @@ -398,10 +390,6 @@ public function getQueryBody() */ public function setQueryBody($queryBody) { - if (mb_strlen($queryBody) > 1000) { - throw new \InvalidArgumentException('invalid length for $queryBody when calling Log., must be smaller than or equal to 1000.'); - } - $this->container['queryBody'] = $queryBody; return $this; @@ -426,10 +414,6 @@ public function getAnswer() */ public function setAnswer($answer) { - if (mb_strlen($answer) > 1000) { - throw new \InvalidArgumentException('invalid length for $answer when calling Log., must be smaller than or equal to 1000.'); - } - $this->container['answer'] = $answer; return $this; diff --git a/lib/Model/Search/Promote.php b/lib/Model/Search/Promote.php index 898dffe3..7a809ca1 100644 --- a/lib/Model/Search/Promote.php +++ b/lib/Model/Search/Promote.php @@ -158,10 +158,6 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 100) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 100."; - } - if (!isset($this->container['position']) || null === $this->container['position']) { $invalidProperties[] = "'position' can't be null"; } @@ -202,9 +198,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 100) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling Promote., number of items must be less than or equal to 100.'); - } $this->container['objectIDs'] = $objectIDs; return $this; diff --git a/lib/Model/Search/PromoteObjectIDs.php b/lib/Model/Search/PromoteObjectIDs.php index 640c888c..7f63a65d 100644 --- a/lib/Model/Search/PromoteObjectIDs.php +++ b/lib/Model/Search/PromoteObjectIDs.php @@ -152,10 +152,6 @@ public function listInvalidProperties() if (!isset($this->container['objectIDs']) || null === $this->container['objectIDs']) { $invalidProperties[] = "'objectIDs' can't be null"; } - if (count($this->container['objectIDs']) > 100) { - $invalidProperties[] = "invalid value for 'objectIDs', number of items must be less than or equal to 100."; - } - if (!isset($this->container['position']) || null === $this->container['position']) { $invalidProperties[] = "'position' can't be null"; } @@ -193,9 +189,6 @@ public function getObjectIDs() */ public function setObjectIDs($objectIDs) { - if (count($objectIDs) > 100) { - throw new \InvalidArgumentException('invalid value for $objectIDs when calling PromoteObjectIDs., number of items must be less than or equal to 100.'); - } $this->container['objectIDs'] = $objectIDs; return $this; diff --git a/lib/Model/Search/RankingInfo.php b/lib/Model/Search/RankingInfo.php index 68d5d57f..89fd9512 100644 --- a/lib/Model/Search/RankingInfo.php +++ b/lib/Model/Search/RankingInfo.php @@ -237,52 +237,21 @@ public function listInvalidProperties() { $invalidProperties = []; - if (isset($this->container['filters']) && ($this->container['filters'] < 0)) { - $invalidProperties[] = "invalid value for 'filters', must be bigger than or equal to 0."; - } - if (!isset($this->container['firstMatchedWord']) || null === $this->container['firstMatchedWord']) { $invalidProperties[] = "'firstMatchedWord' can't be null"; } - if ($this->container['firstMatchedWord'] < 0) { - $invalidProperties[] = "invalid value for 'firstMatchedWord', must be bigger than or equal to 0."; - } - if (!isset($this->container['geoDistance']) || null === $this->container['geoDistance']) { $invalidProperties[] = "'geoDistance' can't be null"; } - if ($this->container['geoDistance'] < 0) { - $invalidProperties[] = "invalid value for 'geoDistance', must be bigger than or equal to 0."; - } - - if (isset($this->container['geoPrecision']) && ($this->container['geoPrecision'] < 1)) { - $invalidProperties[] = "invalid value for 'geoPrecision', must be bigger than or equal to 1."; - } - if (!isset($this->container['nbExactWords']) || null === $this->container['nbExactWords']) { $invalidProperties[] = "'nbExactWords' can't be null"; } - if ($this->container['nbExactWords'] < 0) { - $invalidProperties[] = "invalid value for 'nbExactWords', must be bigger than or equal to 0."; - } - if (!isset($this->container['nbTypos']) || null === $this->container['nbTypos']) { $invalidProperties[] = "'nbTypos' can't be null"; } - if ($this->container['nbTypos'] < 0) { - $invalidProperties[] = "invalid value for 'nbTypos', must be bigger than or equal to 0."; - } - - if (isset($this->container['proximityDistance']) && ($this->container['proximityDistance'] < 0)) { - $invalidProperties[] = "invalid value for 'proximityDistance', must be bigger than or equal to 0."; - } - if (!isset($this->container['userScore']) || null === $this->container['userScore']) { $invalidProperties[] = "'userScore' can't be null"; } - if (isset($this->container['words']) && ($this->container['words'] < 1)) { - $invalidProperties[] = "invalid value for 'words', must be bigger than or equal to 1."; - } return $invalidProperties; } @@ -317,10 +286,6 @@ public function getFilters() */ public function setFilters($filters) { - if (!is_null($filters) && ($filters < 0)) { - throw new \InvalidArgumentException('invalid value for $filters when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['filters'] = $filters; return $this; @@ -345,10 +310,6 @@ public function getFirstMatchedWord() */ public function setFirstMatchedWord($firstMatchedWord) { - if ($firstMatchedWord < 0) { - throw new \InvalidArgumentException('invalid value for $firstMatchedWord when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['firstMatchedWord'] = $firstMatchedWord; return $this; @@ -373,10 +334,6 @@ public function getGeoDistance() */ public function setGeoDistance($geoDistance) { - if ($geoDistance < 0) { - throw new \InvalidArgumentException('invalid value for $geoDistance when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['geoDistance'] = $geoDistance; return $this; @@ -401,10 +358,6 @@ public function getGeoPrecision() */ public function setGeoPrecision($geoPrecision) { - if (!is_null($geoPrecision) && ($geoPrecision < 1)) { - throw new \InvalidArgumentException('invalid value for $geoPrecision when calling RankingInfo., must be bigger than or equal to 1.'); - } - $this->container['geoPrecision'] = $geoPrecision; return $this; @@ -477,10 +430,6 @@ public function getNbExactWords() */ public function setNbExactWords($nbExactWords) { - if ($nbExactWords < 0) { - throw new \InvalidArgumentException('invalid value for $nbExactWords when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['nbExactWords'] = $nbExactWords; return $this; @@ -505,10 +454,6 @@ public function getNbTypos() */ public function setNbTypos($nbTypos) { - if ($nbTypos < 0) { - throw new \InvalidArgumentException('invalid value for $nbTypos when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['nbTypos'] = $nbTypos; return $this; @@ -557,10 +502,6 @@ public function getProximityDistance() */ public function setProximityDistance($proximityDistance) { - if (!is_null($proximityDistance) && ($proximityDistance < 0)) { - throw new \InvalidArgumentException('invalid value for $proximityDistance when calling RankingInfo., must be bigger than or equal to 0.'); - } - $this->container['proximityDistance'] = $proximityDistance; return $this; @@ -609,10 +550,6 @@ public function getWords() */ public function setWords($words) { - if (!is_null($words) && ($words < 1)) { - throw new \InvalidArgumentException('invalid value for $words when calling RankingInfo., must be bigger than or equal to 1.'); - } - $this->container['words'] = $words; return $this; diff --git a/lib/Model/Search/Rule.php b/lib/Model/Search/Rule.php index b3f4c336..a10cf0bf 100644 --- a/lib/Model/Search/Rule.php +++ b/lib/Model/Search/Rule.php @@ -184,13 +184,6 @@ public function listInvalidProperties() if (!isset($this->container['objectID']) || null === $this->container['objectID']) { $invalidProperties[] = "'objectID' can't be null"; } - if (isset($this->container['conditions']) && (count($this->container['conditions']) > 25)) { - $invalidProperties[] = "invalid value for 'conditions', number of items must be less than or equal to 25."; - } - - if (isset($this->container['conditions']) && (count($this->container['conditions']) < 0)) { - $invalidProperties[] = "invalid value for 'conditions', number of items must be greater than or equal to 0."; - } return $invalidProperties; } @@ -249,12 +242,6 @@ public function getConditions() */ public function setConditions($conditions) { - if (!is_null($conditions) && (count($conditions) > 25)) { - throw new \InvalidArgumentException('invalid value for $conditions when calling Rule., number of items must be less than or equal to 25.'); - } - if (!is_null($conditions) && (count($conditions) < 0)) { - throw new \InvalidArgumentException('invalid length for $conditions when calling Rule., number of items must be greater than or equal to 0.'); - } $this->container['conditions'] = $conditions; return $this; diff --git a/lib/Model/Search/SearchDictionaryEntriesParams.php b/lib/Model/Search/SearchDictionaryEntriesParams.php index 41629809..ee03c90c 100644 --- a/lib/Model/Search/SearchDictionaryEntriesParams.php +++ b/lib/Model/Search/SearchDictionaryEntriesParams.php @@ -168,17 +168,6 @@ public function listInvalidProperties() if (!isset($this->container['query']) || null === $this->container['query']) { $invalidProperties[] = "'query' can't be null"; } - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } return $invalidProperties; } @@ -237,10 +226,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchDictionaryEntriesParams., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -265,13 +250,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchDictionaryEntriesParams., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchDictionaryEntriesParams., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; diff --git a/lib/Model/Search/SearchDictionaryEntriesResponse.php b/lib/Model/Search/SearchDictionaryEntriesResponse.php index cb9ae2f7..9c4acef1 100644 --- a/lib/Model/Search/SearchDictionaryEntriesResponse.php +++ b/lib/Model/Search/SearchDictionaryEntriesResponse.php @@ -169,10 +169,6 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } - if ($this->container['page'] < 0) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - if (!isset($this->container['nbHits']) || null === $this->container['nbHits']) { $invalidProperties[] = "'nbHits' can't be null"; } @@ -237,10 +233,6 @@ public function getPage() */ public function setPage($page) { - if ($page < 0) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchDictionaryEntriesResponse., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; diff --git a/lib/Model/Search/SearchForFacetValuesRequest.php b/lib/Model/Search/SearchForFacetValuesRequest.php index a421eca1..bcb3c8bb 100644 --- a/lib/Model/Search/SearchForFacetValuesRequest.php +++ b/lib/Model/Search/SearchForFacetValuesRequest.php @@ -153,13 +153,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - return $invalidProperties; + return []; } /** @@ -240,10 +234,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SearchForFacetValuesRequest., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; diff --git a/lib/Model/Search/SearchForFacets.php b/lib/Model/Search/SearchForFacets.php index 13e2fe09..18d3e19e 100644 --- a/lib/Model/Search/SearchForFacets.php +++ b/lib/Model/Search/SearchForFacets.php @@ -779,54 +779,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['length']) && ($this->container['length'] > 1000)) { - $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; - } - - if (isset($this->container['length']) && ($this->container['length'] < 0)) { - $invalidProperties[] = "invalid value for 'length', must be bigger than or equal to 0."; - } - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - if (!isset($this->container['facet']) || null === $this->container['facet']) { $invalidProperties[] = "'facet' can't be null"; } @@ -1158,10 +1110,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchForFacets., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1210,13 +1158,6 @@ public function getLength() */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchForFacets., must be smaller than or equal to 1000.'); - } - if (!is_null($length) && ($length < 0)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchForFacets., must be bigger than or equal to 0.'); - } - $this->container['length'] = $length; return $this; @@ -1337,10 +1278,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling SearchForFacets., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1461,13 +1398,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchForFacets., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchForFacets., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1924,13 +1854,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchForFacets., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchForFacets., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -2531,13 +2454,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchForFacets., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchForFacets., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2586,10 +2502,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SearchForFacets., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2614,10 +2526,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchForFacets., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/SearchForHits.php b/lib/Model/Search/SearchForHits.php index d1bdd539..4f6ae88c 100644 --- a/lib/Model/Search/SearchForHits.php +++ b/lib/Model/Search/SearchForHits.php @@ -763,54 +763,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['length']) && ($this->container['length'] > 1000)) { - $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; - } - - if (isset($this->container['length']) && ($this->container['length'] < 0)) { - $invalidProperties[] = "invalid value for 'length', must be bigger than or equal to 0."; - } - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - if (!isset($this->container['indexName']) || null === $this->container['indexName']) { $invalidProperties[] = "'indexName' can't be null"; } @@ -1136,10 +1088,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchForHits., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1188,13 +1136,6 @@ public function getLength() */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchForHits., must be smaller than or equal to 1000.'); - } - if (!is_null($length) && ($length < 0)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchForHits., must be bigger than or equal to 0.'); - } - $this->container['length'] = $length; return $this; @@ -1315,10 +1256,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling SearchForHits., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1439,13 +1376,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchForHits., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchForHits., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1902,13 +1832,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchForHits., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchForHits., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -2509,13 +2432,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchForHits., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchForHits., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2564,10 +2480,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SearchForHits., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2592,10 +2504,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchForHits., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/SearchParams.php b/lib/Model/Search/SearchParams.php index c194b77d..e5efc49c 100644 --- a/lib/Model/Search/SearchParams.php +++ b/lib/Model/Search/SearchParams.php @@ -745,57 +745,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['length']) && ($this->container['length'] > 1000)) { - $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; - } - - if (isset($this->container['length']) && ($this->container['length'] < 0)) { - $invalidProperties[] = "invalid value for 'length', must be bigger than or equal to 0."; - } - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - return $invalidProperties; + return []; } /** @@ -1116,10 +1066,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchParams., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1168,13 +1114,6 @@ public function getLength() */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchParams., must be smaller than or equal to 1000.'); - } - if (!is_null($length) && ($length < 0)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchParams., must be bigger than or equal to 0.'); - } - $this->container['length'] = $length; return $this; @@ -1295,10 +1234,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling SearchParams., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1419,13 +1354,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParams., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParams., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1882,13 +1810,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchParams., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchParams., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -2489,13 +2410,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchParams., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchParams., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2544,10 +2458,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SearchParams., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2572,10 +2482,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchParams., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/SearchParamsObject.php b/lib/Model/Search/SearchParamsObject.php index 5ef78e9b..756a45df 100644 --- a/lib/Model/Search/SearchParamsObject.php +++ b/lib/Model/Search/SearchParamsObject.php @@ -739,57 +739,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['length']) && ($this->container['length'] > 1000)) { - $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; - } - - if (isset($this->container['length']) && ($this->container['length'] < 0)) { - $invalidProperties[] = "invalid value for 'length', must be bigger than or equal to 0."; - } - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - return $invalidProperties; + return []; } /** @@ -1086,10 +1036,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchParamsObject., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1138,13 +1084,6 @@ public function getLength() */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchParamsObject., must be smaller than or equal to 1000.'); - } - if (!is_null($length) && ($length < 0)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchParamsObject., must be bigger than or equal to 0.'); - } - $this->container['length'] = $length; return $this; @@ -1265,10 +1204,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling SearchParamsObject., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1389,13 +1324,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParamsObject., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchParamsObject., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1852,13 +1780,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchParamsObject., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchParamsObject., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -2459,13 +2380,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchParamsObject., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchParamsObject., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2514,10 +2428,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SearchParamsObject., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2542,10 +2452,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchParamsObject., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/SearchQuery.php b/lib/Model/Search/SearchQuery.php index 5feb50f1..85f56c4d 100644 --- a/lib/Model/Search/SearchQuery.php +++ b/lib/Model/Search/SearchQuery.php @@ -779,54 +779,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['length']) && ($this->container['length'] > 1000)) { - $invalidProperties[] = "invalid value for 'length', must be smaller than or equal to 1000."; - } - - if (isset($this->container['length']) && ($this->container['length'] < 0)) { - $invalidProperties[] = "invalid value for 'length', must be bigger than or equal to 0."; - } - - if (isset($this->container['minimumAroundRadius']) && ($this->container['minimumAroundRadius'] < 1)) { - $invalidProperties[] = "invalid value for 'minimumAroundRadius', must be bigger than or equal to 1."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] > 100)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be smaller than or equal to 100."; - } - - if (isset($this->container['personalizationImpact']) && ($this->container['personalizationImpact'] < 0)) { - $invalidProperties[] = "invalid value for 'personalizationImpact', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - if (!isset($this->container['indexName']) || null === $this->container['indexName']) { $invalidProperties[] = "'indexName' can't be null"; } @@ -1158,10 +1110,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchQuery., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1210,13 +1158,6 @@ public function getLength() */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchQuery., must be smaller than or equal to 1000.'); - } - if (!is_null($length) && ($length < 0)) { - throw new \InvalidArgumentException('invalid value for $length when calling SearchQuery., must be bigger than or equal to 0.'); - } - $this->container['length'] = $length; return $this; @@ -1337,10 +1278,6 @@ public function getMinimumAroundRadius() */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { - throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling SearchQuery., must be bigger than or equal to 1.'); - } - $this->container['minimumAroundRadius'] = $minimumAroundRadius; return $this; @@ -1461,13 +1398,6 @@ public function getPersonalizationImpact() */ public function setPersonalizationImpact($personalizationImpact) { - if (!is_null($personalizationImpact) && ($personalizationImpact > 100)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchQuery., must be smaller than or equal to 100.'); - } - if (!is_null($personalizationImpact) && ($personalizationImpact < 0)) { - throw new \InvalidArgumentException('invalid value for $personalizationImpact when calling SearchQuery., must be bigger than or equal to 0.'); - } - $this->container['personalizationImpact'] = $personalizationImpact; return $this; @@ -1924,13 +1854,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchQuery., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchQuery., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -2531,13 +2454,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchQuery., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchQuery., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2586,10 +2502,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SearchQuery., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2614,10 +2526,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SearchQuery., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/SearchResponse.php b/lib/Model/Search/SearchResponse.php index 2e311a5d..26bb8e00 100644 --- a/lib/Model/Search/SearchResponse.php +++ b/lib/Model/Search/SearchResponse.php @@ -387,29 +387,9 @@ public function listInvalidProperties() { $invalidProperties = []; - if (isset($this->container['abTestVariantID']) && ($this->container['abTestVariantID'] < 1)) { - $invalidProperties[] = "invalid value for 'abTestVariantID', must be bigger than or equal to 1."; - } - - if (isset($this->container['aroundLatLng']) && !preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $this->container['aroundLatLng'])) { - $invalidProperties[] = "invalid value for 'aroundLatLng', must be conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."; - } - if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - if (!isset($this->container['hits']) || null === $this->container['hits']) { $invalidProperties[] = "'hits' can't be null"; } @@ -477,10 +457,6 @@ public function getAbTestVariantID() */ public function setAbTestVariantID($abTestVariantID) { - if (!is_null($abTestVariantID) && ($abTestVariantID < 1)) { - throw new \InvalidArgumentException('invalid value for $abTestVariantID when calling SearchResponse., must be bigger than or equal to 1.'); - } - $this->container['abTestVariantID'] = $abTestVariantID; return $this; @@ -505,10 +481,6 @@ public function getAroundLatLng() */ public function setAroundLatLng($aroundLatLng) { - if (!is_null($aroundLatLng) && (!preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $aroundLatLng))) { - throw new \InvalidArgumentException("invalid value for {$aroundLatLng} when calling SearchResponse., must conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."); - } - $this->container['aroundLatLng'] = $aroundLatLng; return $this; @@ -1073,10 +1045,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchResponse., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1149,13 +1117,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchResponse., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchResponse., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; diff --git a/lib/Model/Search/SearchResult.php b/lib/Model/Search/SearchResult.php index 4c5ffce9..e4ec2510 100644 --- a/lib/Model/Search/SearchResult.php +++ b/lib/Model/Search/SearchResult.php @@ -395,32 +395,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if (isset($this->container['abTestVariantID']) && ($this->container['abTestVariantID'] < 1)) { - $invalidProperties[] = "invalid value for 'abTestVariantID', must be bigger than or equal to 1."; - } - - if (isset($this->container['aroundLatLng']) && !preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $this->container['aroundLatLng'])) { - $invalidProperties[] = "invalid value for 'aroundLatLng', must be conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."; - } - if (!isset($this->container['exhaustiveFacetsCount']) || null === $this->container['exhaustiveFacetsCount']) { $invalidProperties[] = "'exhaustiveFacetsCount' can't be null"; } if (!isset($this->container['processingTimeMS']) || null === $this->container['processingTimeMS']) { $invalidProperties[] = "'processingTimeMS' can't be null"; } - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - if (!isset($this->container['hits']) || null === $this->container['hits']) { $invalidProperties[] = "'hits' can't be null"; } @@ -491,10 +471,6 @@ public function getAbTestVariantID() */ public function setAbTestVariantID($abTestVariantID) { - if (!is_null($abTestVariantID) && ($abTestVariantID < 1)) { - throw new \InvalidArgumentException('invalid value for $abTestVariantID when calling SearchResult., must be bigger than or equal to 1.'); - } - $this->container['abTestVariantID'] = $abTestVariantID; return $this; @@ -519,10 +495,6 @@ public function getAroundLatLng() */ public function setAroundLatLng($aroundLatLng) { - if (!is_null($aroundLatLng) && (!preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $aroundLatLng))) { - throw new \InvalidArgumentException("invalid value for {$aroundLatLng} when calling SearchResult., must conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."); - } - $this->container['aroundLatLng'] = $aroundLatLng; return $this; @@ -1083,10 +1055,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchResult., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -1159,13 +1127,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchResult., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchResult., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; diff --git a/lib/Model/Search/SearchRulesParams.php b/lib/Model/Search/SearchRulesParams.php index e4e13bbe..4123f657 100644 --- a/lib/Model/Search/SearchRulesParams.php +++ b/lib/Model/Search/SearchRulesParams.php @@ -179,21 +179,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - return $invalidProperties; + return []; } /** @@ -298,10 +284,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchRulesParams., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -326,13 +308,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchRulesParams., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchRulesParams., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; diff --git a/lib/Model/Search/SearchSynonymsParams.php b/lib/Model/Search/SearchSynonymsParams.php index 1a3c10c0..91167195 100644 --- a/lib/Model/Search/SearchSynonymsParams.php +++ b/lib/Model/Search/SearchSynonymsParams.php @@ -161,21 +161,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - return $invalidProperties; + return []; } /** @@ -256,10 +242,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchSynonymsParams., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -284,13 +266,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchSynonymsParams., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchSynonymsParams., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; diff --git a/lib/Model/Search/SearchUserIdsParams.php b/lib/Model/Search/SearchUserIdsParams.php index 107e724b..58582352 100644 --- a/lib/Model/Search/SearchUserIdsParams.php +++ b/lib/Model/Search/SearchUserIdsParams.php @@ -168,17 +168,6 @@ public function listInvalidProperties() if (!isset($this->container['query']) || null === $this->container['query']) { $invalidProperties[] = "'query' can't be null"; } - if (isset($this->container['page']) && ($this->container['page'] < 0)) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } return $invalidProperties; } @@ -261,10 +250,6 @@ public function getPage() */ public function setPage($page) { - if (!is_null($page) && ($page < 0)) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchUserIdsParams., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -289,13 +274,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchUserIdsParams., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchUserIdsParams., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; diff --git a/lib/Model/Search/SearchUserIdsResponse.php b/lib/Model/Search/SearchUserIdsResponse.php index 2962be93..b531f186 100644 --- a/lib/Model/Search/SearchUserIdsResponse.php +++ b/lib/Model/Search/SearchUserIdsResponse.php @@ -182,21 +182,9 @@ public function listInvalidProperties() if (!isset($this->container['page']) || null === $this->container['page']) { $invalidProperties[] = "'page' can't be null"; } - if ($this->container['page'] < 0) { - $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 0."; - } - if (!isset($this->container['hitsPerPage']) || null === $this->container['hitsPerPage']) { $invalidProperties[] = "'hitsPerPage' can't be null"; } - if ($this->container['hitsPerPage'] > 1000) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if ($this->container['hitsPerPage'] < 1) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - if (!isset($this->container['updatedAt']) || null === $this->container['updatedAt']) { $invalidProperties[] = "'updatedAt' can't be null"; } @@ -282,10 +270,6 @@ public function getPage() */ public function setPage($page) { - if ($page < 0) { - throw new \InvalidArgumentException('invalid value for $page when calling SearchUserIdsResponse., must be bigger than or equal to 0.'); - } - $this->container['page'] = $page; return $this; @@ -310,13 +294,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if ($hitsPerPage > 1000) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchUserIdsResponse., must be smaller than or equal to 1000.'); - } - if ($hitsPerPage < 1) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SearchUserIdsResponse., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; diff --git a/lib/Model/Search/SettingsResponse.php b/lib/Model/Search/SettingsResponse.php index d2c7991c..38968797 100644 --- a/lib/Model/Search/SettingsResponse.php +++ b/lib/Model/Search/SettingsResponse.php @@ -625,37 +625,7 @@ public static function getters() */ public function listInvalidProperties() { - $invalidProperties = []; - - if (isset($this->container['paginationLimitedTo']) && ($this->container['paginationLimitedTo'] > 20000)) { - $invalidProperties[] = "invalid value for 'paginationLimitedTo', must be smaller than or equal to 20000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] > 1000)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be smaller than or equal to 1000."; - } - - if (isset($this->container['hitsPerPage']) && ($this->container['hitsPerPage'] < 1)) { - $invalidProperties[] = "invalid value for 'hitsPerPage', must be bigger than or equal to 1."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] > 7)) { - $invalidProperties[] = "invalid value for 'minProximity', must be smaller than or equal to 7."; - } - - if (isset($this->container['minProximity']) && ($this->container['minProximity'] < 1)) { - $invalidProperties[] = "invalid value for 'minProximity', must be bigger than or equal to 1."; - } - - if (isset($this->container['maxFacetHits']) && ($this->container['maxFacetHits'] > 100)) { - $invalidProperties[] = "invalid value for 'maxFacetHits', must be smaller than or equal to 100."; - } - - if (isset($this->container['maxValuesPerFacet']) && ($this->container['maxValuesPerFacet'] > 1000)) { - $invalidProperties[] = "invalid value for 'maxValuesPerFacet', must be smaller than or equal to 1000."; - } - - return $invalidProperties; + return []; } /** @@ -736,10 +706,6 @@ public function getPaginationLimitedTo() */ public function setPaginationLimitedTo($paginationLimitedTo) { - if (!is_null($paginationLimitedTo) && ($paginationLimitedTo > 20000)) { - throw new \InvalidArgumentException('invalid value for $paginationLimitedTo when calling SettingsResponse., must be smaller than or equal to 20000.'); - } - $this->container['paginationLimitedTo'] = $paginationLimitedTo; return $this; @@ -1340,13 +1306,6 @@ public function getHitsPerPage() */ public function setHitsPerPage($hitsPerPage) { - if (!is_null($hitsPerPage) && ($hitsPerPage > 1000)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SettingsResponse., must be smaller than or equal to 1000.'); - } - if (!is_null($hitsPerPage) && ($hitsPerPage < 1)) { - throw new \InvalidArgumentException('invalid value for $hitsPerPage when calling SettingsResponse., must be bigger than or equal to 1.'); - } - $this->container['hitsPerPage'] = $hitsPerPage; return $this; @@ -1947,13 +1906,6 @@ public function getMinProximity() */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SettingsResponse., must be smaller than or equal to 7.'); - } - if (!is_null($minProximity) && ($minProximity < 1)) { - throw new \InvalidArgumentException('invalid value for $minProximity when calling SettingsResponse., must be bigger than or equal to 1.'); - } - $this->container['minProximity'] = $minProximity; return $this; @@ -2002,10 +1954,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { - throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SettingsResponse., must be smaller than or equal to 100.'); - } - $this->container['maxFacetHits'] = $maxFacetHits; return $this; @@ -2030,10 +1978,6 @@ public function getMaxValuesPerFacet() */ public function setMaxValuesPerFacet($maxValuesPerFacet) { - if (!is_null($maxValuesPerFacet) && ($maxValuesPerFacet > 1000)) { - throw new \InvalidArgumentException('invalid value for $maxValuesPerFacet when calling SettingsResponse., must be smaller than or equal to 1000.'); - } - $this->container['maxValuesPerFacet'] = $maxValuesPerFacet; return $this; diff --git a/lib/Model/Search/UserHit.php b/lib/Model/Search/UserHit.php index 0fabd0fd..ee28101c 100644 --- a/lib/Model/Search/UserHit.php +++ b/lib/Model/Search/UserHit.php @@ -182,10 +182,6 @@ public function listInvalidProperties() if (!isset($this->container['userID']) || null === $this->container['userID']) { $invalidProperties[] = "'userID' can't be null"; } - if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $this->container['userID'])) { - $invalidProperties[] = "invalid value for 'userID', must be conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/."; - } - if (!isset($this->container['clusterName']) || null === $this->container['clusterName']) { $invalidProperties[] = "'clusterName' can't be null"; } @@ -235,10 +231,6 @@ public function getUserID() */ public function setUserID($userID) { - if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $userID)) { - throw new \InvalidArgumentException("invalid value for {$userID} when calling UserHit., must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/."); - } - $this->container['userID'] = $userID; return $this; diff --git a/lib/Model/Search/UserId.php b/lib/Model/Search/UserId.php index 86d79b41..1e75d96c 100644 --- a/lib/Model/Search/UserId.php +++ b/lib/Model/Search/UserId.php @@ -168,10 +168,6 @@ public function listInvalidProperties() if (!isset($this->container['userID']) || null === $this->container['userID']) { $invalidProperties[] = "'userID' can't be null"; } - if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $this->container['userID'])) { - $invalidProperties[] = "invalid value for 'userID', must be conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/."; - } - if (!isset($this->container['clusterName']) || null === $this->container['clusterName']) { $invalidProperties[] = "'clusterName' can't be null"; } @@ -215,10 +211,6 @@ public function getUserID() */ public function setUserID($userID) { - if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $userID)) { - throw new \InvalidArgumentException("invalid value for {$userID} when calling UserId., must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/."); - } - $this->container['userID'] = $userID; return $this;